Thin Ethernet, popularly known as cheapernet or thinnet, is among the family of Ethernet standards that uses thinner coaxial cable as a transmission media. It is technically known as 10-BASE-2. Here, 10 is the maximum throughput, i.e. 10 Mbps, BASE denoted use of baseband transmission, and 2 refers to the maximum segment length of about 200 metres (precisely 185 metres).This type of cabling allows a maximum of 30 stations to be connected to it by BNC connectors with 50 centimetres minimum gap between subsequent stations.Features of Cable and NetworkThe salient features of 10-BASE-2 Ethernet cabling are −10-BASE-2 use RG-58 A/U ... Read More
_.union()_.Union() method belongs to underscore.js a library of javascript. The _.union() function is used to take n number of arrays and return a new array with the unique terms in all those arrays (union of all array). It scrutinizes each and every value of the arrays and pushes out unique values into another array.syntax_.union( array1, array2, .... );ExampleIn the following example, _.union() is used to get an array of unique elements.Live Demo document.write(_.union([1, 2, 9, 40], ... Read More
The HTML DOM Input Email Object represents an input HTML element with type email.SyntaxFollowing is the syntax −Creating an with type emailvar emailObject = document.createElement(“input”); emailObject.type = “email”;AttributesHere, “emailObject” can have the following attributes −AttributesDescriptionautocompleteIt provides suggestions based on previously typed text, if set to ‘ON’autofocusIf set to true the email field is focused upon initial page load.defaultValueIt sets/returns the default value of an email fielddisabledIt defines if an email field is disabled/enabledformIt returns a reference of enclosing form that contains the email fieldmaxLengthIt returns/sets the value of maxLength attribute of an email fieldmultipleIt returns/sets if an email field ... Read More
Given a 2d array of n*n and the task is to find the antispiral arrangement of the given matrixInput : arr[4][4]={1,2,3,4, 5,6,7,8, 9,10,11,12 13,14,15,16} Output: 10 11 7 6 5 9 13 14 15 16 12 8 4 3 2 1For this, stack can be used where the transpose of a matrix can be pushed inside stack and poped reverselyAlgorithmSTART STEP 1 -> declare stack vector element as stk and variables as int r=4, c=4, i, j, rs=0 and cs=0 Step 2 -> store matrix elements in 2-3 array Step 3 -> Loop For i=0 and o
You can use createUser() method for this. Following is the syntax −db.createUser( { user: "yourUserName", pwd: "yourPassword", roles: [ { role: "read", db: "yourDatabaseName" } ] } );Let us create a user in MongoDB. Here, we are using database ‘test’ −> db.createUser( ... { ... user: "David", ... pwd: "David123456", ... roles: [ { role: "read", db: "test" } ] ... } ... );This will produce the following output −Successfully added user: { "user" : "David", "roles" : [ { "role" : "read", "db" : "test" } ] }
This example demonstrate about How to play ringtone/alarm/notification sound in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.javapackage app.tutorialspoint.com.notifyme; import android.app.NotificationManager; import android.content.Context; import android.media.MediaPlayer; import android.media.RingtoneManager; import android.net.Uri; import android.support.v4.app.NotificationCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import java.util.Objects; public class MainActivity extends AppCompatActivity { private final static String default_notification_channel_id = "default"; @Override protected void onCreate (Bundle ... Read More
To sum every field in a sub document, use aggregate framework. Let us first create a collection with documents −> db.sumEveryFieldDemo.insertOne( ... { ... "_id":101, ... "PlayerDetails": [ ... {"PlayerName":"John", "PlayerScore":1000}, ... {"PlayerName":"Carol", "PlayerScore":2000}, ... {"PlayerName":"Sam", "PlayerScore":3000} ... ] ... } ... ); { "acknowledged" : true, "insertedId" : 101 }Following is the query to display all documents from a collection with the help of find() method −> db.sumEveryFieldDemo.find().pretty();This will produce the following output −{ "_id" : 101, "PlayerDetails" : [ { "PlayerName" : "John", ... Read More
To set the alignment of the label content along the X axis, use the setHorizontalAlignment() method. Let us first set a label component. We have set the label background color as well so that we can check the alignment of the label’s content properly −JLabel label = new JLabel("Team "); label.setPreferredSize(new Dimension(190, 100)); label.setOpaque(true); label.setBackground(Color.BLUE); label.setForeground(Color.WHITE);Now, we will align the label content along the X axis −label.setHorizontalAlignment(JLabel.CENTER);The following is an example to set the alignment of the JLabel content along the X axis −Examplepackage my; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextArea; import ... Read More
To sort by sub-document match, you can use aggregate framework. Let us first create a collection with documents −> db.sortBySubDocumentsDemo.insertOne( { "StudentName": "Chris", "StudentDetails": [ { "Age":21, "StudentScore":91 }, { "Age":22, "StudentScore":99 }, { "Age":21, "StudentScore":93 ... Read More
Thick EthernetThick Ethernet was the first commercially available form of cabling supported by Ethernet. It is technically known as 10-BASE-5. Here, 10 is the maximum throughput, i.e. 10 Mbps, BASE denoted use of baseband transmission, and 5 refers to the maximum segment length of 500 metres (1, 600 ft). This type of cabling allows 100 stations to be connected to it by vampire taps.Thin EthernetThin Ethernet, popularly known as cheapernet or thinnet, is among the family of Ethernet standards that uses thinner coaxial cable as a transmission media. It is technically known as 10-BASE-2.Here, 10 is the maximum throughput, i.e. ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP