Facebook friends list feature – nothing in the stream, how to fix it?

As a manual here

You can create lists to organize your friends on Facebook (example: close friends, acquaintances) and see messages from a specific friend list in a single feed.

I've created a list with 5 friends to see their publications but when I access the list since https://www.facebook.com/bookmarks/lists/ there is no message from them or anyone.
list of friends, no publication in the thread

caching – how to fix the error when i use @EnableCaching annotation on bootfuguration file spring boot? I wanted to use the redis cache

I wanted to use the Redis cache in the Spring Boot project (version 2.0.0), while I am annotating the configuration class with @EnableCaching, this indicates an error.

java.lang.IllegalStateException: error handling condition enabled
org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches (SpringBootCondition.java:64)
~ (spring-boot-autoconfigure-2.0.0.RELEASE.jar: 2.0.0.RELEASE) to
org.springframework.context.annotation.ConditionEvaluator.shouldSkip (ConditionEvaluator.java:109)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader $ TrackedConditionEvaluator.shouldSkip (ConfigurationClassBeanDefinitionReader.java:443)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass (ConfigurationClassBeanDefinitionReader.java:128)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions (ConfigurationClassBeanDefinitionReader.java:117)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions (ConfigurationClassPostProcessor.java:328)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry (ConfigurationClassPostProcessor.java:233)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors (PostProcessorRegistrationDelegate.java:273)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors (PostProcessorRegistrationDelegate.java:93)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors (AbstractApplicationContext.java:693)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:531)
~ (spring-context-5.0.4.RELEASE.jar: 5.0.4.RELEASE) to
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:140)
~ (spring-boot-2.0.0.RELEASE.jar: 2.0.0.RELEASE) to
org.springframework.boot.SpringApplication.refresh (SpringApplication.java:752)
(spring-boot-2.0.0.RELEASE.jar: 2.0.0.RELEASE) to the address
org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:388)
(spring-boot-2.0.0.RELEASE.jar: 2.0.0.RELEASE) to the address
org.springframework.boot.SpringApplication.run (SpringApplication.java:327)
(spring-boot-2.0.0.RELEASE.jar: 2.0.0.RELEASE) to the address
org.springframework.boot.SpringApplication.run (SpringApplication.java:1246)
(spring-boot-2.0.0.RELEASE.jar: 2.0.0.RELEASE) to the address
org.springframework.boot.SpringApplication.run (SpringApplication.java:1234)
(spring-boot-2.0.0.RELEASE.jar: 2.0.0.RELEASE) to the address
com.skilrock.dge.Application.main (Application.java:20) (classes /: na)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (native method)
~ (na: 1.8.0_191) to
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
~ (na: 1.8.0_191) to
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
~ (na: 1.8.0_191) to java.lang.reflect.Method.invoke (Method.java:498)
~ (na: 1.8.0_191) to
org.springframework.boot.devtools.restart.RestartLauncher.run (RestartLauncher.java:49)
(spring-boot-devtools-2.0.0.RELEASE.jar: 2.0.0.RELEASE) Caused by:
java.lang.IllegalStateException: failure of class introspection
from ClassLoader (sun.misc.Launcher$AppClassLoader@2a139a55) to the address
org.springframework.util.ReflectionUtils.getDeclaredMethods (ReflectionUtils.java:659)
~ (spring-core-5.0.4.RELEASE.jar: 5.0.4.RELEASE)

adb – I need help to fix this and fix an Android bug without rebooting

My LGEV521 [LG G Pad X 8.0+] was lost due to an old Android bug and I do not want to reset it. I've saved game data, automated feeds, stardew valley, heaps of other apps and appdata, etc., and I want to keep everything because a nandroid backup will not do it.

I can not use the UI to switch to mtp for lg bridge, because this old android bug starts as wallpaper and then turns into black, chrome-like style, where looking at it from different angles makes it look like chrome or opal, but darker. And I can interact with the user interface, but the user interface is not visible to the user and the screen is locked.

The only way to use the lg bridge is to use adb to set it to mtp, but i need a way to do that for android 7 using a command to switch to mtp since midi will not work on them devices under android 9.0 [Pie], but working on the version 7.0 [Nougat], maybe there is a database or a .prop file in the root directory to which the access does not is not denied even on the lock screen because I do not have root [difficult to root after the update of April 2018 because more secure the system] … What that anybody can, can anyone help me with this workaround? Could it be the black screen of death or does it have anything to do with bios?

Tablet specifications

Brand – LGE
Label – LG V521 [LG GPad X 8.0 Plus]
Version – Android 7.0 [Nougat]
Developer options enabled – True
Bootloader Unlocked – True
Architecture – ARM7ABI
Storage – 32GB Internal Sd Card [32GB Root Directory] 32GB
RAM – 1.8 GB
Display – 8.0 inches 1920×1200

Affordable removal of the background image for $ 5

Removing the background of any image
Fast Service Service
Delivery in 1 day
Worth trust worthy

by: Cyannimonae
Established: —
Category: Graphics & Logos
Viewed: 0


boot – How can I fix the error "bootmgr missing" of ubuntu?

I can not use Windows 7 anymore because of this error. The problem is that I do not have an installation disc or bootable USB stick, not even a license. I was just trying to copy this missing file into "reserved system" with the help of a Ubuntu bootable USB key, but I can not access this partition. The mistake I get when trying to enter is as follows:

Error mounting /dev/sda1 at /media/ubuntu/Reservado para el sistema: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=999,gid=999" "/dev/sda1" "/media/ubuntu/Reservado para el sistema"' exited with non-zero exit status 13: ntfs_mst_post_read_fixup_warn: magic: 0x48cd8b49  size: 4096   usa_ofs: 27785  usa_count: 10275: Invalid argument
Actual VCN (0x1bf41ffff) of index buffer is different from expected VCN (0x0).
Failed to mount '/dev/sda1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.

I hope you can help me, I really do not want to buy a Windows 7 installation CD or bootable USB stick (I really do not know how to make them and I have not not the money to allow me to buy multiple USB drives for trial and error)

How to Fix "Incompatible Types.Required: BroadcastReceiver.Found: BroadcastReceiver"?

I make a pot to use in Unity. Now, I'm getting this error when trying to link the broadcastcastreceiver.

I have tried the suggested solutions, but they do not work, I tried to search a little in Google, but to no avail, nothing says of similar required / found.

    BluetoothAdapter mBluetoothAdapter;

    // Create a BroadcastReceiver for ACTION_FOUND.
    private final BroadcastReceiver mBroadcastReceiver1 = new BroadcastReceiver() {
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
            if (action.equals(mBluetoothAdapter.ACTION_STATE_CHANGED)) {

    public void TurnOnBluetooth(){
        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); //Init bluetoothadapter

    public void enableDisableBT(){
        if(mBluetoothAdapter == null){
            Log.d(TAG, "enableDisableBT: Does not have BT capabilities.");
        if (!mBluetoothAdapter.isEnabled()){
            Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
            IntentFilter BTIntent = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
            registerReceiver(mBroadcastReceiver1, BTIntent);
        if (mBluetoothAdapter.isEnabled()){
            IntentFilter BTIntent = new Intent tFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
            registerReceiver(mBroadcastReceiver1, BTIntent);

c # – What is a NullReferenceException exception and how to fix it?

the NullReference Exception for Visual Basic is not different from that of VS #. After all, they both report the same exception defined in the .NET Framework that they both use. Causes unique to Visual Basic are rare (perhaps only one).

This response will use Visual Basic terms, syntax, and context. The examples used come from a large number of previous issues relating to stack overflow. It's to maximize relevance by using the Types situations often seen in posts. A little more explanation is also provided for those who might need it. An example similar to yours is very probably listed here.


  1. This is based on a concept: there is no code to stick in your project. It is intended to help you understand what causes a NullReferenceException (NRE), how to find it, how to fix it and how to avoid it. An NRE can be provoked in many ways, so it is unlikely to be your only encounter.
  2. The examples (extracts from Stack Overflow) do not always indicate the best way to do something in the first place.
  3. Generally, the simplest remedy is used.

Basic meaning

The message "Object not defined on an object instance" means that you are trying to use an object that has not been initialized. It boils down to one of these:

  • Your code declared an object variable, but this is not the case initialize it (creates an instance or & # 39;instantiate& # 39; he)
  • Something your code supposed to initialize an object was not.
  • Maybe, another code prematurely invalidates an object still in use

Find the cause

As the problem is an object reference that is Nothingthe answer is to examine them to see which one. Then determine why it is not initialized. Hold the mouse over the different variables and Visual Studio (VS) will show their values ​​- the culprit will be Nothing.

IDE Debug View

You must also remove all Try / Catch blocks from the appropriate code, especially those where there is nothing in the Catch block. This will cause your code to crash when trying to use an object that is Nothing. Here's what you want because it will identify the exact location of the problem, and allow you to identify the object that causes it.

A MsgBox in the catch that displays Error while... will be of little help. This method also leads to very bad Stack overflow issues because you can not describe the actual exception, the object involved or even the line of code where this occurs.

You can also use the Locals Window (Debug -> Windows -> Local) to examine your objects.

Once you know what and where the problem is, it is usually quite easy to solve and faster than asking a new question.

See also:

Examples and remedies

Class Objects / Instance Creation

Dim reg As CashRegister
TextBox1.Text = reg.Amount         ' NRE

The problem is that Dim does not create CashRegister object; it only declares a named variable reg of that type. To declare an object variable and create a example are two different things.


the New The operator can often be used to create the instance when you declare it:

Dim reg As New CashRegister        ' (New) creates instance, invokes the constructor

' Longer, more explicit form:
Dim reg As CashRegister = New CashRegister

When it is only appropriate to create the instance later:

Private reg As CashRegister         ' Declare
reg = New CashRegister()            ' Create instance

Note: Do not use Dim again in a procedure, including the constructor (Sub New):

Private reg As CashRegister

Public Sub New()
   Dim reg As New CashRegister
End Sub

This will create a local variable, reg, which exists only in this context (sub). the reg variable with module level Scope that you will use everywhere else remains Nothing.

Missing it New the operator is the first cause of NullReference Exceptions seen in stack overflow issues examined.

Visual Basic tries to make the process clear several times by using New: Using the New The operator creates a New object and calls Sub New – the constructor – where your object can perform any other initialization.

To be clear, Dim (or Private) only declared a variable and its Type. the Scope of the variable – that it exists for the whole module / class or that it is local to a procedure – is determined by or it is declared. Private | Friend | Public defines the level of access, no Scope.

For more information, see:


The tables must also be instantiated:

Private arr as String()

This table has only been declared, not created. There are several ways to initialize a table:

Private arr as String() = New String(10){}
' or
Private arr() As String = New String(10){}

' For a local array (in a procedure) and using 'Option Infer':
Dim arr = New String(10) {}

Note: As of VS 2010, when initializing a local array using a literal and Option Infer, the As and New the elements are optional:

Dim myDbl As Double() = {1.5, 2, 9.9, 18, 3.14}
Dim myDbl = New Double() {1.5, 2, 9.9, 18, 3.14}
Dim myDbl() = {1.5, 2, 9.9, 18, 3.14}

The data type and the table size are deduced from the assigned data. Class / module level declarations always require As with Option Strict:

Private myDoubles As Double() = {1.5, 2, 9.9, 18, 3.14}

Example: array of class objects

Dim arrFoo(5) As Foo

For i As Integer = 0 To arrFoo.Count - 1
   arrFoo(i).Bar = i * 10       ' Exception

The table was created, but the Foo the objects that it contains do not have.


For i As Integer = 0 To arrFoo.Count - 1
    arrFoo(i) = New Foo()         ' Create Foo instance
    arrFoo(i).Bar = i * 10

Using a List(Of T) it will be quite difficult to have an item with no valid purpose:

Dim FooList As New List(Of Foo)     ' List created, but it is empty
Dim f As Foo                        ' Temporary variable for the loop

For i As Integer = 0 To 5
    f = New Foo()                    ' Foo instance created
    f.Bar =  i * 10
    FooList.Add(f)                   ' Foo object added to list

For more information, see:

Lists and Collections

.NET collections (among which there are many varieties – lists, dictionary, etc.) must also be instantiated or created.

Private myList As List(Of String)
myList.Add("ziggy")           ' NullReference

You get the same exception for the same reason – myList has only been declared, but no instance has been created. The remedy is the same:

myList = New List(Of String)

' Or create an instance when declared:
Private myList As New List(Of String)

A common oversight is a class that uses a collection Type:

Public Class Foo
    Private barList As List(Of Bar)

    Friend Function BarCount As Integer
        Return barList.Count
    End Function

    Friend Sub AddItem(newBar As Bar)
        If barList.Contains(newBar) = False Then
        End If
    End Function

One or the other procedure will result in an NRE because barList is only declared, not instantiated. Create an instance of Foo will not also create an instance of the internal barList. The intention was perhaps to do this in the constructor:

Public Sub New         ' Constructor
    ' Stuff to do when a new Foo is created...
    barList = New List(Of Bar)
End Sub

As before, this is incorrect:

Public Sub New()
    ' Creates another barList local to this procedure
     Dim barList As New List(Of Bar)
End Sub

For more information, see List(Of T) Classroom.

Data Provider Objects

Working with databases offers many opportunities for NullReference because there can be multiple objects (Command, Connection, Transaction, Dataset, DataTable, DataRows….) used at once. Note: It does not matter which data provider you use – MySQL, SQL Server, OleDB, etc. – the the concepts are the same.

Example 1

Dim da As OleDbDataAdapter
Dim ds As DataSet
Dim MaxRows As Integer

Dim sql = "SELECT * FROM tblfoobar_List"
da = New OleDbDataAdapter(sql, con)
da.Fill(ds, "foobar")

MaxRows = ds.Tables("foobar").Rows.Count      ' Error

As before, the ds The dataset object has been declared, but no instance has ever been created. the DataAdapter will fill an existing DataSet, not create one. In this case, since ds is a local variable, the IDE warns you that it could happen:


When it is declared as a module / class level variable, as seems to be the case with con, the compiler can not know if the object was created by an upstream procedure. Do not ignore the warnings.


Dim ds As New DataSet

Example 2

ds = New DataSet
da = New OleDBDataAdapter(sql, con)
da.Fill(ds, "Employees")

txtID.Text = ds.Tables("Employee").Rows(0).Item(1)
txtID.Name = ds.Tables("Employee").Rows(0).Item(2)

A typo is a problem here: Employees against Employee. There was no DataTable named "employee" created, so a NullReferenceException results trying to access it. Another potential problem is to assume that there will be Meme it Items this may not be the case when the SQL code includes a WHERE clause.


As it uses a table, using Tables(0) avoid spelling mistakes. look Rows.Count can also help:

If ds.Tables(0).Rows.Count > 0 Then
    txtID.Text = ds.Tables(0).Rows(0).Item(1)
    txtID.Name = ds.Tables(0).Rows(0).Item(2)
End If

Fill is a function that returns the number of Rows affected who can also be tested:

If da.Fill(ds, "Employees") > 0 Then...

Example 3

Dim da As New OleDb.OleDbDataAdapter("SELECT TICKET.TICKET_NO,
Dim ds As New DataSet

If ds.Tables("TICKET_RESERVATION").Rows.Count > 0 Then

the DataAdapter provide TableNames as shown in the previous example, but it does not parse the names of the SQL table or the database. Therefore, ds.Tables("TICKET_RESERVATION") refers to a nonexistent table.

the Remedy is identical, references the table by index:

If ds.Tables(0).Rows.Count > 0 Then

See also DataTable class.

Object / nested paths

If myFoo.Bar.Items IsNot Nothing Then

The code is only testing Items while both myFoo and Bar can also be nothing. the remedy is to test the entire chain or path of objects, one by one:

If (myFoo IsNot Nothing) AndAlso
    (myFoo.Bar IsNot Nothing) AndAlso
    (myFoo.Bar.Items IsNot Nothing) Then

AndAlso is important. The following tests will not be performed once the first False the condition is met. This allows the code to "break through" safely into the object (s), "level" at a time, by evaluating myFoo.Bar only after (and if) myFoo is determined to be valid. Strings or object paths can be quite long when encoding complex objects:


It is not possible to refer to anything "downstream" of a null object. This also applies to controls:

myWebBrowser.Document.GetElementById("formfld1").InnerText = "some value"

Right here, myWebBrowser or Document could be nothing or the formfld1 The item may not exist.

UI checks

Dim cmd5 As New SqlCommand("select Cartons, Pieces, Foobar " _
     & "FROM Invoice where invoice_no = '" & _
     Me.ComboBox5.SelectedItem.ToString.Trim & "' And category = '" & _
     Me.ListBox1.SelectedItem.ToString.Trim & "' And item_name = '" & _
     Me.ComboBox2.SelectedValue.ToString.Trim & "' And expiry_date = '" & _
     Me.expiry.Text & "'", con)

Among other things, this code does not provide that the user may not have selected something in one or more controls of the user interface. ListBox1.SelectedItem may well be Nothing, so ListBox1.SelectedItem.ToString will result in an NRE.


Validate the data before using it (also use Option Strict and SQL parameters):

Dim expiry As DateTime         ' for text date validation
If (ComboBox5.SelectedItems.Count > 0) AndAlso
    (ListBox1.SelectedItems.Count > 0) AndAlso
    (ComboBox2.SelectedItems.Count > 0) AndAlso
    (DateTime.TryParse(expiry.Text, expiry) Then

    '... do stuff
    MessageBox.Show(...error message...)
End If

Alternatively, you can use (ComboBox5.SelectedItem IsNot Nothing) AndAlso...

Visual Basic Forms

Public Class Form1

    Private NameBoxes = New TextBox(5) {Controls("TextBox1"), _
                   Controls("TextBox2"), Controls("TextBox3"), _
                   Controls("TextBox4"), Controls("TextBox5"), _

    ' same thing in a different format:
    Private boxList As New List(Of TextBox) From {TextBox1, TextBox2, TextBox3 ...}

    ' Immediate NRE:
    Private somevar As String = Me.Controls("TextBox1").Text

This is a fairly common way to get an NRE. In C #, according to its coding, EDI will indicate that Controls does not exist in the current context or "can not refer to a non-static member". So, to a certain extent, this situation is reserved for VB. It is also complex because it can result in a cascading failure.

Tables and collections can not be initialized this way. This initialization code will execute before the constructor creates the Form or the Controls. Therefore:

  • The lists and the collection will be simply empty
  • The table will contain five elements of nothing
  • the somevar transfer will give rise to an immediate NRE because nothing has .Text property

Referencing array elements later will result in an NRE. If you do that in Form_Load, due to a strange bug, the IDE Maybe not report the exception when this occurs. The exception will appear later when your code tries to use the table. This "silent exception" is detailed in this post. For our purposes, the key is that when something catastrophic happens when creating a form (Sub New or Form Load event), the exceptions may not be reported, the code exits the procedure and simply displays the form.

Since no other code in your Sub New or Form Load the event will take place after the NRE, many other things can be left uninitialized.

Sub Form_Load(..._
   Dim name As String = NameBoxes(2).Text        ' NRE
   ' ...
   ' More code (which will likely not be executed)
   ' ...
End Sub

Note this applies to all control and component references making these illegal when they are:

Public Class Form1

    Private myFiles() As String = Me.OpenFileDialog1.FileName & ...
    Private dbcon As String = OpenFileDialog1.FileName & ";Jet Oledb..."
    Private studentName As String = TextBox13.Text

Partial remedy

It is curious that VB does not warn of warning, but the remedy is to to declare containers at the form level but initialize them in the form load event handler when the controls make to exist. This can be done in Sub New as long as your code is after the InitializeComponent call:

' Module level declaration
Private NameBoxes as TextBox()
Private studentName As String

' Form Load, Form Shown or Sub New:
' Using the OP's approach (illegal using OPTION STRICT)
NameBoxes = New TextBox() {Me.Controls("TextBox1"), Me.Controls("TestBox2"), ...)
studentName = TextBox32.Text           ' For simple control references

The matrix code may not have come out of the wood yet. Any control that is in a container control (such as a GroupBox or Panel) will not be found in Me.Controls; they will be in the Controls collection of this Panel or GroupBox. A control will not be returned if the name of the control is misspelled ("TeStBox2"). In such cases, Nothing will be stored again in these array elements and an NRE result will be generated when you attempt to reference it.

These should be easy to find now that you know what you are looking for:
VS shows you the error of your ways

"Button2" resides on a Panel


Rather than indirect references by name using the form Controls collection, use the control reference:

' Declaration
Private NameBoxes As TextBox()

' Initialization -  simple and easy to read, hard to botch:
NameBoxes = New TextBox() {TextBox1, TextBox2, ...)

' Initialize a List
NamesList = New List(Of TextBox)({TextBox1, TextBox2, TextBox3...})
' or
NamesList = New List(Of TextBox)
NamesList.AddRange({TextBox1, TextBox2, TextBox3...})

Function returning nothing

Private bars As New List(Of Bars)        ' Declared and created

Public Function BarList() As List(Of Bars)
    If someCondition Then
        For n As Integer = 0 to someValue
        Next n
        Exit Function
    End If

    Return bars
End Function

This is a case where EDI will warn you thatall the paths do not return a value and a NullReferenceException can result& # 39 ;. You can suppress the warning by replacing Exit Function with Return Nothingbut that does not solve the problem. Anything that tries to use the return when someCondition = False will result in an NRE:

bList = myFoo.BarList()
For Each b As Bar in bList      ' EXCEPTION


Replace Exit Function in the function with Return bList. Return a empty List It's not the same as coming back Nothing. If there is a chance that an object returned can be Nothing, test before using it:

 bList = myFoo.BarList()
 If bList IsNot Nothing Then...

Trial / capture poorly implemented

A poorly implemented Try / Catch can hide the problem and create new ones:

Dim dr As SqlDataReader
    Dim lnk As LinkButton = TryCast(sender, LinkButton)
    Dim gr As GridViewRow = DirectCast(lnk.NamingContainer, GridViewRow)
    Dim eid As String = GridView1.DataKeys(gr.RowIndex).Value.ToString()
    ViewState("username") = eid
    sqlQry = "select FirstName, Surname, DepartmentName, ExtensionName, jobTitle,
             Pager, mailaddress, from employees1 where username='" & eid & "'"
    If connection.State <> ConnectionState.Open Then
    End If
    command = New SqlCommand(sqlQry, connection)

    'More code fooing and barring

    dr = command.ExecuteReader()
    If dr.Read() Then
        lblFirstName.Text = Convert.ToString(dr("FirstName"))
    End If

    dr.Close()             ' <-- NRE
End Try

This is the case where an object is not created as expected, but also demonstrates the usefulness of an empty object. Catch.

There is an extra comma in SQL code (after "mailaddress") that causes an exception to .ExecuteReader. After the Catch do nothing, Finally try to clean up, but since you can not Close a loser DataReader object, a brand new NullReferenceException results.

A hole Catch the block is the devil's playground. This PO was baffled by the fact that he was getting an NRE in the Finally block. In other situations, a vacuum Catch can lead to something further downstream that can waste your time and require you to spend time looking for the wrong things in the wrong place to solve the problem. ("The silent exception" described above provides the same entertainment value.)


Do not use empty Try / Catch blocks - leave the code planted in order to be able to a) identify the cause b) identify the location and c) apply an appropriate solution. Try / Catch blocks are not meant to hide exceptions to the specially qualified person to solve them - the developer.

DBNull is not the same thing as nothing

For Each row As DataGridViewRow In dgvPlanning.Rows
    If Not IsDBNull(row.Cells(0).Value) Then

the IsDBNull function is used to test whether a value equals System.DBNull: From MSDN:

The System.DBNull value indicates that the object represents missing or missing data. DBNull is not the same as Nothing, which indicates that a variable has not yet been initialized.


If row.Cells(0) IsNot Nothing Then ...

As before, you can test Nothing, then for a specific value:

If (row.Cells(0) IsNot Nothing) AndAlso (IsDBNull(row.Cells(0).Value) = False) Then

Example 2

Dim getFoo = (From f In dbContext.FooBars
               Where f.something = something
               Select f).FirstOrDefault

If Not IsDBNull(getFoo) Then
    If IsDBNull(getFoo.user_id) Then
        txtFirst.Text = getFoo.first_name

FirstOrDefault returns the first element or the default value, which is Nothing for reference types and never DBNull:

If getFoo IsNot Nothing Then...


Dim chk As CheckBox

chk = CType(Me.Controls(chkName), CheckBox)
If chk.Checked Then
    Return chk
End If

If a CheckBox with chkName not found (or exists in a GroupBox) and then chk will be nothing and trying to refer to a property will result in an exception.


If (chk IsNot Nothing) AndAlso (chk.Checked) Then ...

The DataGridView

The DGV has some quirks seen periodically:

dgvBooks.DataSource = loan.Books
dgvBooks.Columns("ISBN").Visible = True       ' NullReferenceException
dgvBooks.Columns("Title").DefaultCellStyle.Format = "C"
dgvBooks.Columns("Author").DefaultCellStyle.Format = "C"
dgvBooks.Columns("Price").DefaultCellStyle.Format = "C"

Yes dgvBooks at AutoGenerateColumns = Truehe will create the columns, but he does not name them. The code above fails as it references them by name.


Name the columns manually or reference by index:

dgvBooks.Columns(0).Visible = True

Example 2 - Watch out for NewRow

xlWorkSheet = xlWorkBook.Sheets("sheet1")

For i = 0 To myDGV.RowCount - 1
    For j = 0 To myDGV.ColumnCount - 1
        For k As Integer = 1 To myDGV.Columns.Count
            xlWorkSheet.Cells(1, k) = myDGV.Columns(k - 1).HeaderText
            xlWorkSheet.Cells(i + 2, j + 1) = myDGV(j, i).Value.ToString()

When your DataGridView at AllowUserToAddRows as True (default), the Cells in the empty / new line at the bottom will contain all Nothing. Most attempts to use the content (for example, ToString) will result in an NRE.


Use a For/Each loop and test the IsNewRow property to determine if this is the last line. It works if AllowUserToAddRows is true or not:

For Each r As DataGridViewRow in myDGV.Rows
    If r.IsNewRow = False Then
         ' ok to use this row

If you use a For n loop, change the number of lines or use Exit For when IsNewRow is right.

My.Settings (StringCollection)

In some circumstances, try using an article from My.Settings which is a StringCollection may result in a null reference the first time you use it. The solution is the same, but not so obvious. Consider:

My.Settings.FooBars.Add("ziggy")         ' foobars is a string collection

Since VB handles the settings for you, it is reasonable to expect that it will initialize the collection. This will be the case, but only if you have already added an initial entry to the collection (in the settings editor). Since the collection is (apparently) initialized when an item is added, it remains Nothing when there is no element in the parameter editor to add.


Initialize the parameter collection in the form Load event manager, if / when necessary:

If My.Settings.FooBars Is Nothing Then
    My.Settings.FooBars = New System.Collections.Specialized.StringCollection
End If

Typically, the Settings the collection must be initialized only the first time the application is run. Another solution is to add an initial value to your collection in Project -> Settings | FooBars, save the project, and then delete the wrong value.

You have probably forgotten the New operator.


Something you assumed would work perfectly to return an initialized object to your code, did not do it.

Do not ignore the compiler warnings (never) and use Option Strict On (always).

Exception NullReference MSDN

GSA OJS Engine must fix

The OJS platform produces very powerful backlinks. Indeed, most OJS platforms are related to education.
However, the GSA relies heavily on the "articles" of the OJS platform. However, an important backlink is a "profile backlink".
OJS Profile Backlinks are permanent links. OJS profile backlinks can be created in the Bio instructions when creating the profile. But, when you create a profile with the help of the GSA, it is created without recognizing the Ahref link.
Indeed, the OJS platform can only enter Ahrefs by pressing the HTML button of the Bio instruction.
Maybe the GSA comes in "about me" as in the Bio statement. This needs improvement.
If this is improved, the GSA will be a very powerful tool.
Indeed, most backlink generators can not find the URL of your OJS profile.
In addition to this part, GSA will be a powerful backlink generation tool.
Can you consider this in the update?

Ubuntu gnome – Annoying problem with nautilus I can not fix

I was looking for other file managers to try Ubuntu 18.04 lts and I installed Dolphin. It worked, then I removed and then Nautilus did not work. I've tried to reinstall Nautilus and he had the same problem he did not show the scrollbar with the bookmarks that I used to purge Nautilus and after apt install Nautilus and he had the same problem, I do not know what to do?

no scrollbar with bookmarks

PC Games – ATOM RPG: Post-apocalyptic Independent Game v 1.109 fix (2018) GOG | NulledTeam UnderGround

ATOM RPG: Post-apocalyptic Independent Game (Correction 1.1109) (2018) GOG PC | Size: 5.76 GB

Release year: 2017
Genre: RPG
Developer: AtomTeam
Publisher: AtomTeam
The French language
Tablet: GOG

ATOM RPG is an independent post-apocalyptic game inspired by classic GPRC: Fallout, Wasteland, Shock System, Deus Ex, Baldur's Gate. In 1986, the USSR and the Western Bloc were virtually destroyed during the exchange of nuclear strikes. You are one of the survivors of the apocalypse. Your task is to explore the cruel and mysterious world of Soviet Wildlands, to gain a place in the sun under the sun and to unravel the grim plot that threatens life on Earth even more than atomic war.

▪ Ability to create a unique character with his strengths and weaknesses;
▪ GURPS-inspired balanced role-playing system: each set of statistics promises a unique way to complete the game, separate dialogues and special ways to complete tasks!
▪ Dozens of skills – from hacking to gambling!
▪ A fascinating game in various places: familiarize yourself with the lives of other survivors in the colony built from the ashes of the ancient world, visit fields and forests flooded with dangerous mutants, challenge the secrets of the Underground bunker from before the war … or just go fishing in a picturesque pond.
▪ turn-based tactical battles;
▪ Casual encounters with dangerous and surprising inhabitants of the Soviet Lands!
▪ Dozens of carefully crafted conversations with unique NPKs;
▪ Many tasks with alternative pass options. Come on the game as you wish, and not as the developers have forced!
▪ Plot completely nonlinear!
▪ And much more.

ATOM RPG – Supporter Pack

1. Install the game
2. Playing

Required configuration:
√ Operating system: Windows 7/8/10 (x64)
√ Processor: Intel Core 2 Duo E6300
√ RAM: 4 GB
√ Video card: GeForce GTX 660 / Radeon HD 7850
√ Sound card: DirectX 9.0c compatible
√ Free disk space: 4 GB