runtime-error

MVC5 / C# - Cannot perform runtime binding on a null reference

自闭症网瘾萝莉.ら 提交于 2020-05-29 11:03:08
问题 I'm trying to figure out what's causing a Cannot perform runtime binding on a null reference error from this code: var query = "SELECT Id, UserName, List_Order, LoggedIn " + "FROM AspNetUsers" + "WHERE LoggedIn = 1" + "ORDER BY List_Order ASC"; var conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString); var cmd = new SqlCommand(query, conn); conn.Open(); var rdr = cmd.ExecuteReader(); var n = 0; while(rdr.Read()) { if

Swing apps doesn't run

大憨熊 提交于 2020-05-23 21:36:27
问题 I have a problem in using swing. I don't know what is the cause of this but i'm just trying to create a simple frame app using swing at it give me a lot of error. import javax.swing.JFrame; public class StacksGui { public static void main(String args[]) JFrame frame = new JFrame(); frame.setVisible(true); frame.setSize(100,200); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } Exception in thread "main" java.lang.ExceptionInInitializerError at javax.swing.JPanel.updateUI(Unknown Source

Getting error while using a script in VBA

若如初见. 提交于 2020-05-17 06:49:05
问题 **Public Sub WebTest() Dim keys As New keys, arr(), ws As Worksheet, i As Long Dim temp1(), temp2() As String 'Set ws = ThisWorkbook.Worksheets("Sheet1") '<==Adjust to your sheet arr = Application.Transpose(Selection) '<== Adjust to your range With bot .Start "Chrome" .Get "url here" For i = LBound(arr) To UBound(arr) If Not IsEmpty(arr(i)) Then If i > 1 Then .ExecuteScript "window.open(arguments[0])", "url here" .SwitchToNextWindow End If .FindElementByCss("[name=q]").SendKeys arr(i)

Python protobuf “from google.protobuf.pyext import _message” - “ImportError: DLL load failed: The specified procedure could not be found”

不想你离开。 提交于 2020-05-13 03:58:59
问题 I'm trying to get a simple Python script up to convert protobuf files into json files (required format for what I'm doing at work). I've seen some recommendations to upgrade to Python 3.6.1 (I'm at 3.6.0), up/downgrade google.protobuf. Neither solution helped. def convert_to_json(directory: str): os.chdir(jsonPath) for (root, dirs, files) in os.walk(os.getcwd()): for file_ in files: if os.path.dirname(file_) != root and file_.endswith(".pb"): json_file: str = MessageToJson(file_) file_name =

Python protobuf “from google.protobuf.pyext import _message” - “ImportError: DLL load failed: The specified procedure could not be found”

佐手、 提交于 2020-05-13 03:58:10
问题 I'm trying to get a simple Python script up to convert protobuf files into json files (required format for what I'm doing at work). I've seen some recommendations to upgrade to Python 3.6.1 (I'm at 3.6.0), up/downgrade google.protobuf. Neither solution helped. def convert_to_json(directory: str): os.chdir(jsonPath) for (root, dirs, files) in os.walk(os.getcwd()): for file_ in files: if os.path.dirname(file_) != root and file_.endswith(".pb"): json_file: str = MessageToJson(file_) file_name =

VBA Run-Time Error 9 When Sheet Name Does Not Match the Target Sheet Name

╄→гoц情女王★ 提交于 2020-04-30 06:42:05
问题 I have the following code which converts Excel Sheets with a specific sheet names into PDF and then it loops in the folder. The User can input the sheet name into the tool for the code to loop for. However, if the sheet name is incorrect or does not exist, it shows Run-Time Error 9: Subscript out of Range. Instead of this error, I would like to get a MsgBox then Exit the Sub. I tried using On Error GoTo approach, which works when the code doesnt match the sheet name to the reference cell and

Flask, SQLAlchemy : KeyError: 'SQLALCHEMY_TRACK_MODIFICATIONS'

偶尔善良 提交于 2020-04-02 16:44:25
问题 I am trying to follow the instructions from the following tutorial: Tutorial I downloaded the code from the following repo: Repo However when I run it locally and try to add something to the database, I get the following error: builtins.KeyError KeyError: 'SQLALCHEMY_TRACK_MODIFICATIONS' When I tried to read the traceback, I realised that even if I add a variable SQLALCHEMY_TRACK_MODIFICATIONS to the config file, some python library file is unable to recognise it exists. Looks like there is

Flask, SQLAlchemy : KeyError: 'SQLALCHEMY_TRACK_MODIFICATIONS'

橙三吉。 提交于 2020-04-02 16:42:04
问题 I am trying to follow the instructions from the following tutorial: Tutorial I downloaded the code from the following repo: Repo However when I run it locally and try to add something to the database, I get the following error: builtins.KeyError KeyError: 'SQLALCHEMY_TRACK_MODIFICATIONS' When I tried to read the traceback, I realised that even if I add a variable SQLALCHEMY_TRACK_MODIFICATIONS to the config file, some python library file is unable to recognise it exists. Looks like there is

How to fix androidx.appcompat.widget.AppCompatButton cannot be cast to com.rey.material.widget.Button

余生长醉 提交于 2020-03-26 01:00:54
问题 I'm building a amazon like app. after coding the loginactivity I can't access it from mainactivity because it always crashes this is my loginactivity.java public class loginActivity extends AppCompatActivity { private EditText InputPhoneNumber, InputPassword; private Button LoginButtonPage; private ProgressDialog loadingBar; private String parentDbname = "Users"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity

How to fix androidx.appcompat.widget.AppCompatButton cannot be cast to com.rey.material.widget.Button

我是研究僧i 提交于 2020-03-26 00:55:53
问题 I'm building a amazon like app. after coding the loginactivity I can't access it from mainactivity because it always crashes this is my loginactivity.java public class loginActivity extends AppCompatActivity { private EditText InputPhoneNumber, InputPassword; private Button LoginButtonPage; private ProgressDialog loadingBar; private String parentDbname = "Users"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity