My App Keeps o Stopping and there is an exception there [closed]

I Have Tried To Rebuild the project but nothing Happened

My Code Is Down

`

        save_time.setOnClickListener {         val medicine = medicinea.text.toString()          val days = arrayOf("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")         for (aday in days) {            if(day_selected.toString() == aday) {               val shrd = getSharedPreferences("Add$  day_selected", Context.MODE_PRIVATE)               val editor = shrd.edit()               editor.putString("medicine", medicine)               editor.putString("day", day_selected)               editor.putString("whenSelected", when_selected)               editor.putString("medicineSelected", medicine_selected)               editor.putString("time", time_selected)               editor.apply()               Toast.makeText(this@Add, "Saved To Internal Database", Toast.LENGTH_SHORT).show()           }       }            if (day_selected.toString() == "Friday") {             val intent = Intent(this, Friday::class.java)             CustomIntent.customType(this@Add, "fadein-to-fadeout")             startActivity(intent)           }          if (day_selected.toString() == "Saturday") {             val intent = Intent(this, Saturday::class.java)             CustomIntent.customType(this@Add, "fadein-to-fadeout")             startActivity(intent)  }         if (day_selected.toString() == "Sunday") {             val intent = Intent(this, Sunday::class.java)             CustomIntent.customType(this@Add, "fadein-to-fadeout")             startActivity(intent)          }         if (day_selected.toString() == "Monday") {             val intent = Intent(this, Monday::class.java)             CustomIntent.customType(this@Add, "fadein-to-fadeout")             startActivity(intent)         }          if (day_selected.toString() == "Tuesday") {             val intent = Intent(this, Tuesday::class.java)             CustomIntent.customType(this@Add, "fadein-to-fadeout")             startActivity(intent)         }         if (day_selected.toString() == "Wednesday") {             val intent = Intent(this, Wednesday::class.java)             CustomIntent.customType(this@Add, "fadein-to-fadeout")             startActivity(intent)         }         if (day_selected.toString() == "Thursday") {             val intent = Intent(this, Thursday::class.java)             CustomIntent.customType(this@Add, "fadein-to-fadeout")             startActivity(intent)         }      }` 

From here if i go to Friday activity

 package com.example.medicaltimetableapp   import android.content.Context  import com.example.medicaltimetableapp.R  import android.graphics.Color  import android.os.Build  import android.os.Bundle  import android.view.View  import android.widget.TextView  import androidx.annotation.RequiresApi  import androidx.appcompat.app.AppCompatActivity  import androidx.constraintlayout.widget.ConstraintSet  import kotlinx.android.synthetic.main.activity_add.*  import kotlinx.android.synthetic.main.activity_friday.*  import kotlinx.android.synthetic.main.activity_main.view.*   class Friday : AppCompatActivity() {  @RequiresApi(Build.VERSION_CODES.LOLLIPOP) override fun onCreate(savedInstanceState: Bundle?) {     super.onCreate(savedInstanceState)     setContentView(R.layout.activity_friday)        val pref = getSharedPreferences("AddFriday", MODE_PRIVATE)     val dayA = pref?.getString("day", "NOT FOUND ").toString()     val medicinea = pref?.getString("medicine", "NOT FOUND ").toString()     val whenSel = pref?.getString("whenSelected", "NOT FOUND ").toString()     val mediselec = pref?.getString("medicineSelected", "NOT FOUND ").toString()     val time = pref?.getString("time", "NOT FOUND ").toString()      val layout = fridaylayout      val dayview = add_view(dayA, R.id.dayf)     val constraintSet = ConstraintSet().apply {         clone(layout)         connect(R.id.dayf, ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.TOP)         connect(R.id.dayf, ConstraintSet.RIGHT, ConstraintSet.PARENT_ID, ConstraintSet.RIGHT)     }     constraintSet.applyTo(layout)      val medicineview = add_view(medicinea, R.id.medicinef)     medicineview!!.x = +100F     val constraintSet1 = ConstraintSet().apply {         clone(layout)         connect(R.id.medicinef, ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.TOP)         connect(R.id.medicinef, ConstraintSet.RIGHT, ConstraintSet.PARENT_ID, ConstraintSet.RIGHT)     }     constraintSet.applyTo(layout)      val whenselview = add_view(whenSel, R.id.whenf)     whenselview!!.x = +200F     val constraintSet2 = ConstraintSet().apply {         clone(layout)         connect(R.id.whenf, ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.TOP)         connect(R.id.whenf, ConstraintSet.RIGHT, ConstraintSet.PARENT_ID, ConstraintSet.RIGHT)     }     constraintSet.applyTo(layout)      val mediselview = add_view(whenSel, R.id.howmuchf)     mediselview!!.x = +300F     val constraintSet3 = ConstraintSet().apply {         clone(layout)         connect(R.id.howmuchf, ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.TOP)         connect(R.id.howmuchf, ConstraintSet.RIGHT, ConstraintSet.PARENT_ID, ConstraintSet.RIGHT)     }     constraintSet.applyTo(layout)      val timeview = add_view(whenSel, R.id.timef)     timeview!!.x = +400F     val constraintSet4 = ConstraintSet().apply {         clone(layout)         connect(R.id.timef, ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.TOP)         connect(R.id.timef, ConstraintSet.RIGHT, ConstraintSet.PARENT_ID, ConstraintSet.RIGHT)     }     constraintSet.applyTo(layout)      layout.addView(dayview)     layout.addView(medicineview)     layout.addView(whenselview)     layout.addView(mediselview)     layout.addView(timeview)    }   private fun add_view(data: String, id: Int): View? {      val text = TextView(applicationContext)     text.setBackgroundColor(Color.rgb(255, 229, 229))     text.width = 100     text.height = 50     text.x = 21F     text.y = 88F     text.id = id     text.text = data      return text } 

}

And I Get This Exception

E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.medicaltimetableapp, PID: 24254    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.medicaltimetableapp/com.example.medicaltimetableapp.Tuesday}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.constraintlayout.widget.ConstraintLayout.addView(android.view.View)' on a null object reference         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2805)        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2883)       at android.app.ActivityThread.-wrap11(Unknown Source:0)       at android.app.ActivityThread$  H.handleMessage(ActivityThread.java:1613)      at android.os.Handler.dispatchMessage(Handler.java:106)        at android.os.Looper.loop(Looper.java:164)        at android.app.ActivityThread.main(ActivityThread.java:6523)       at java.lang.reflect.Method.invoke(Native Method)       at com.android.internal.os.RuntimeInit$  MethodAndArgsCaller.run(RuntimeInit.java:438)       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.constraintlayout.widget.ConstraintLayout.addView(android.view.View)' on a null object reference     at com.example.medicaltimetableapp.Tuesday.onCreate(Tuesday.kt:44)          at android.app.Activity.performCreate(Activity.java:7023)     at android.app.Activity.performCreate(Activity.java:7014)     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2758)     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2883)      at android.app.ActivityThread.-wrap11(Unknown Source:0)      at android.app.ActivityThread$  H.handleMessage(ActivityThread.java:1613)      at android.os.Handler.dispatchMessage(Handler.java:106)      at android.os.Looper.loop(Looper.java:164)      at android.app.ActivityThread.main(ActivityThread.java:6523)      at java.lang.reflect.Method.invoke(Native Method)      at com.android.internal.os.RuntimeInit$  MethodAndArgsCaller.run(RuntimeInit.java:438)      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)  

My Manifiest File

<?xml version="1.0" encoding="utf-8"?> 

<application     android:allowBackup="true"     android:icon="@mipmap/ic_launcher"     android:label="@string/app_name"     android:roundIcon="@mipmap/ic_launcher_round"     android:supportsRtl="true"     android:theme="@style/AppTheme">     <activity android:name=".MainActivity"></activity>     <activity android:name=".Add"></activity>     <activity android:name=".Sunday" />     <activity android:name=".Saturday" />     <activity android:name=".Friday" />     <activity android:name=".Thursday" />     <activity android:name=".Wednesday" />     <activity android:name=".Tuesday" />     <activity android:name=".Monday" />     <activity android:name=".homeanimation">         <intent-filter>             <action android:name="android.intent.action.MAIN" />              <category android:name="android.intent.category.LAUNCHER" />         </intent-filter>     </activity> </application> 

Can Anyone Please Help Me

Thanks Asad

[ Physics ] Open Question : Why do the Star Trek writers think that stopping engines will stop forward momentum in space?

Shouldn’t they at least know that they’d have to reverse thrusters to give the equal and opposite force to stop forward momentum? Shouldn’t someone writing for one of the premier scifi franchises know this basic fact? Verisimilitude is the hallmark of good fiction writing.

Stopping touchpad clicks registering as right-clicks when there’s another finger already on the pad

Often I will drag the cursor to a particular location with my right finger and then press the touchpad with my left finger to left-click, whilst my right finger is still on the pad. This works in Windows and other laptops I’ve used before, but in Ubuntu 18.04 these keep registering as right-clicks whenever my fingers are too close together. This makes clicking and dragging particularly annoying as I have to lift my other finger off the pad before initiating the click.

Basically I want to configure my touchpad to ignore the presence of a second finger when it is clicked, and just do a left click regardless, but can’t spot a relevant setting in xinput --list-props

nvidia-persistenced stopping and rebooting which freezes RDP

I am running Ubuntu 16.04 and have four Tesla K80s hooked up. I’m running NVIDIA Driver Version: 390.30 with driver version 9.1 and runtime version 9.0. Running nvidia-smi the output looks good:

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 390.30                 Driver Version: 390.30                    | |-------------------------------+----------------------+----------------------+ | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. | |===============================+======================+======================| |   0  Tesla K80           Off  | 00000EDF:00:00.0 Off |                    0 | | N/A   55C    P0    57W / 149W |      0MiB / 11441MiB |      0%      Default | +-------------------------------+----------------------+----------------------+ |   1  Tesla K80           Off  | 0000304A:00:00.0 Off |                    0 | | N/A   53C    P0    63W / 149W |      0MiB / 11441MiB |      0%      Default | +-------------------------------+----------------------+----------------------+ |   2  Tesla K80           Off  | 000063B4:00:00.0 Off |                    0 | | N/A   42C    P0    71W / 149W |      0MiB / 11441MiB |      0%      Default | +-------------------------------+----------------------+----------------------+ |   3  Tesla K80           Off  | 0000E54B:00:00.0 Off |                    0 | | N/A   44C    P0    72W / 149W |      0MiB / 11441MiB |      1%      Default | +-------------------------------+----------------------+----------------------+  +-----------------------------------------------------------------------------+ | Processes:                                                       GPU Memory | |  GPU       PID   Type   Process name                             Usage      | |=============================================================================| |  No running processes found                                                 | +-----------------------------------------------------------------------------+ 

But then when I run tail -f /var/log/syslog I get:

Sep 10 16:49:27 whaledetection systemd[1]: Stopping NVIDIA Persistence Daemon... Sep 10 16:49:27 whaledetection nvidia-persistenced: Received signal 15 Sep 10 16:49:27 whaledetection nvidia-persistenced: Socket closed. Sep 10 16:49:27 whaledetection nvidia-persistenced: PID file unlocked. Sep 10 16:49:27 whaledetection nvidia-persistenced: PID file closed. Sep 10 16:49:27 whaledetection nvidia-persistenced: The daemon no longer has permission to remove its runtime data directory /var/run/nvidia-persistenced Sep 10 16:49:27 whaledetection nvidia-persistenced: Shutdown (3275) Sep 10 16:49:27 whaledetection systemd[1]: Stopped NVIDIA Persistence Daemon. 

And usually when I get this my remote desktop connection freezes and I have to reconnect. This happens every minute or two. Any ideas for how to fix this? I worked on this machine for nearly a year and it worked fine, but it is a VM on Azure and when I resized it (to reduce GPU count which I have switched back) I assume it changed some setting.

What kind of action is stopping concentrating on a spell?

Our party’s initiative order is like this:

  • 20 – Bard
  • 19 – Bad guy
  • 18 – Bad guy
  • 17 – Bad guy
  • 16 – Bad guy
  • 15 – Nobody
  • 14 – Ally
  • 13 – Ally
  • 12 – Ally

Can my bard cast calm emotions such that the bad guys cannot take violent actions on their turns, and then stop concentrating as a free action at initiative position 15 so that my allies can act fully?

application pools keeps stopping

I have an issue with SharePoint server, I hope you can help me solve it.

here is my question

I deployed SharePoint 2019 (on Windows server 2019) and SQL 2017(on Windows server 2019),

Since I deployed the environment, I encountered this issue once in a while and I tried many solutions and only solution that worked was repair option in SharePoint 2019 setup.

Here are symptoms:

SharePoint 80 pool and central administration pool has stopped.

SharePoint timer service stopped and I got 1503 error when I tried to restart it.

I got message when I opened SharePoint management shell. enter image description here

Note : when I deployed the SharePoint server I use local administrator account instead of using sp-farm account. can this issue relate the account that I’ m used in deployment stage or no ,and how can I solve it ?

camera stays busy after stopping code

I installed spyder2.X. with Ubuntu 16.04, gave me this message:

Spyder crashed during last session.          ........         ....... 

then, installed it by:

sudo pip install -U spyder 

this commend installed spyder3

the problem:

when running the code from spyder, the camera stays busy after stopping running.

when running the code from the terminal, everything is ok.

I read more about this problem, one comment is very hard https://github.com/spyder-ide/spyder/issues/3554 “Closing because this is a Debian/Ubuntu problem because they decided to intentionally break Spyder.”

Also, this enter link description here change OpenCV version but my case is different. my case with spyder, not OpenCV.

the summary:

I can’t use an anaconda library and python3 because of some confliction with ROS library.

please help me or any suggestion

Thank you in advance!

Is there anything stopping a druid from combining animals to form a new wild shape?


Wild Shape (PHB Pg. 66)
Starting at 2nd level, you can use your action to magically assume the shape of a beast that you have seen before.

Wild shape requires that a druid has seen an animal before being able to shapeshift into it.

Is there anything stopping a druid from combining animals to form a new wild shape?

Implement Early Stopping After Certain Number of Epochs

How can I implement keras’ EarlyStopping() callback function after only a certain number of epochs has passed?

My model has a lot of fluctuations in the accuracy and loss in the first few epochs, so implementing early stopping from the start would cause my model to stop training much too early. How can I implement early stopping after a certain epoch (say, 20) when my model has stabilized?