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

Backend on server keeps getting corrupt

I built an access database. It was originally meant to be for 6 people but I see that it’s up to about 20, so that could be the problem. Anyway, the backend gets corrupted a couple of times a day. It is usually possible to resolve this by opening the backend at which point it offers to fix it and usually does so.

The database is not particularly complicated (I don’t think) but it does have some VBA.

The basic idea of the database is that we are tracking lots that need to move through a set of processes but that get broken up. So we might receive 1000 items, and then have 300 of them go to prescreening, and later another 100, and so on through all the about 8 steps.

The way I’ve done this (which I’d be happy to change – I just don’t know what to change) is to have a small submission table, which tracks the lots as they come in, and a larger table (called preorder for reasons which don’t matter) which tracks the line items.

The preorder table has quite a large number of fields (about 75). But of importance to this is the quantity field and the status field. The status field tracks the items through the process (so from step 1=Receiving to 8=Shipping or whatever). The quantity tracks how many of this particular item there are from this batch with the other properties at this status.

Then there are forms for each of these steps with very similar VBA behind them. One of the fields will be basically "quantity to move to the next step" (this is one of the fields in the preorder table that is initially defaulted to 0). The user fills in this quantity (and some additional information potentially) and presses a button to process the step.

The VBA:

  1. opens a recordset (rs) for the preorder table where the status is 1 (say) and the quantity to go to the next step is >0.
  2. It also opens an appendonly recordset of the preorder table (rs2).
  3. Then it goes through the records in rs, adjusts the quantity down, and appends a new copy of the record with the new quantity and an updated status.

The below is an example from one of the screens. Others are similar, although there are some nuances baked in that may or may not be important.

```Private Sub btnProcess_Click()     DoCmd.Hourglass True     Dim db As Database     Dim rs As DAO.Recordset     Dim rs2 As DAO.Recordset     Set db = CurrentDb     Set rs = db.OpenRecordset("SELECT * FROM tblPreorder " & _                             "WHERE (((tblPreorder.StatusID)=1) AND ((tblPreorder.PSQuantity)>0));", dbOpenDynaset, dbFailOnError)     If rs.EOF Then         MsgBox "No records found for processing"         rs.Close         DoCmd.Hourglass False         Exit Sub     End If     Set rs2 = db.OpenRecordset("tblPreorder", dbOpenDynaset, dbAppendOnly)     rs.MoveFirst     Do Until rs.EOF         myQuantity = rs("Quantity").Value         PSQuantity = rs("PSQuantity").Value         rs2.AddNew         For Each fld In rs.Fields             SFld = fld.Name 'to catch special fields             Select Case SFld                 'special cases                 Case "ID":  'do nothing                 Case "Quantity":                     rs.Edit                     rs(SFld).Value = myQuantity - PSQuantity                     rs.Update                     rs2(SFld).Value = PSQuantity                 Case "Comment":                     If Len(Trim(rs("PSComment")) > 0) Then                         rs2(SFld).Value = Trim(rs("Comment")) & vbCrLf & Trim(rs("PSComment"))                     Else                         rs2(SFld).Value = rs(SFld)                     End If                 Case "StatusID":                     rs2(SFld).Value = 2 'Changes the status from 1 to 2                 Case "DateChanged":                     rs2(SFld).Value = Now()                 Case "EmployeeID":                     rs2(SFld).Value = UserID()                 Case "Location":                     If rs("PSLocation") <> "" Then                         rs2(SFld).Value = rs("PSLocation")                     End If                 Case "PSDate":                     rs2(SFld).Value = Now()                 Case "PSEmployeeID":                     rs2(SFld).Value = UserID()                 Case "PSQuantity":                     rs.Edit                     rs(SFld) = 0                     rs.Update                     rs2(SFld) = 0                 Case "ReleasedFiles": 'do nothing                 Case Else:                     rs2(SFld).Value = fld.Value             End Select         Next fld         rs2.Update         rs.MoveNext     Loop     rs.Close     rs2.Close     c = Me.CurrentRecord     Me.Requery On Error Resume Next:     DoCmd.GoToRecord acDataForm, Me.Name, acGoTo, c     MsgBox "Items moved to BNC Request"     DoCmd.Hourglass False End Sub''' 

My questions:

  1. If you see anything obviously wrong, of course, let me know. It works like a charm when it’s just me testing it. I’ve never managed to replicate the issue, but I can see that it’s happening in the production version.
  2. I’ve followed the advice on a couple of websites on avoiding this (e.g. https://www.techrepublic.com/article/get-it-done-top-10-ways-to-prevent-access-database-corruption/). I’m basically tinkering and trying things because I don’t fundamentally know what the issue is. E.g. I switched from recordset to DAO.recordset in the above code. It didn’t seem to make a difference, so I might go back. Everyone is using Access 2010 and the backend is Access 2010 so it seemed to make sense to use an Access specific recordset. I close all the recordsets (rs.close); I compile the VBA; I have saved the frontend as an accde; All users use the accde from their own computers; All users are using wired connections; I have version control so everyone is using the latest frontend.
  3. The main question, I suppose: How can I diagnose this? I could easily imagine putting a new table in to track who’s hitting the process button and when and which one. I’m probably going to do that to see what happens in the lead up to a corruption. But what are your recommendations for what to track and are there any other tricks and tips to get to the root of this?

Code specific questions:

  1. Recordset or DAO.Recordset or some other thing?
  2. dbFailOnError or dbSeeChanges or some other thing?
  3. rs.Edit … rs.Update on the couple of fields that get updated as I loop (current code)? Or one rs.Edit … rs.Update on either side of the loop?
  4. Should I be putting a manual hold or something to prevent people from running similar code simultaneously? It offends me a little to do so, since I kind of imagine that the people who make MS Access will do a better job than me at that sort of thing. But I could probably set a flag somewhere that literally makes people wait their turn. I’d still be worried about a race condition.

Wider database questions:

  1. Are there other secret settings that need to be adjusted to minimize this issue? Everyone is using MS Access 2010. Name AutoCorrect Options, Filter lookup options, caching, data type support options. I don’t really know what these do and I suspect there are gotchas everywhere! I had a similar database that I used for years without issue, so I was lulled into a false sense of security here.
  2. Have I structured this completely wrong? I’m okay to do a whole bunch of work – it would just be nice to have a good sense that it would solve the problem!

Thanks!

Izito and similar sites keeps appearing in my search results

Izito and similar sites keep appearing on my search engine results. It started a few weeks ago. It has been happening on both – my Ubuntu and Windows computer, and even on a new Windows computer. It has been happening on Chrome and Microsoft Edge and on Google and Bing. I have since installed Bitdefender AV and done factory resets and it still keeps coming back after a while. I was wondering if someone could please advise on what might be causing it, what damage / impact it might (have) caused, and how I could get rid of it.

Power BI Report Server keeps asking for credentials locally

I’ve installed PBIRS on my laptop to do some development.

Each time try to connect it prompts with dialog wanting me to login.

Login

If I try and connect from a remote PC using the same domain login, it recognises me and logs me in without any problems.

What do I need to change so that PBIRS accepts my connection?

PBIRS May 2020 SQL Server 2019 HP Elitebook 16Gb RAM Windows 10.

Unity Animation Controller and walking diagonally keeps switching between the two diagonals?

Using Unity 2019.4.1f1 Personal.

Unity Animation Controller nodes

I have the above Animation Controller. When only walking in one direction at a time and when you stop you stay facing that direction, this works as planned.

Successfully walking pokemon trainer

All of the transitions do not have an exit time and have a fixed duration of 0. I don’t know what info to give as this is the first time I’ve used animation. Let me know and I’ll add relevant details.

Here’s my update function that updates the variables in the animator:

void Update() {   float h = Input.GetAxisRaw("Horizontal");   float v = Input.GetAxisRaw("Vertical");    animator.SetFloat("Horizontal", h);   animator.SetFloat("Vertical", v);    if (Mathf.Abs(v) < Mathf.Abs(h)) {     // flips the renderer to reuse other handed image     spriteRenderer.flipX = h > 0;   }    // no actual movement until I figure this out } 

What I’m experiencing that I want to fix is when running diagonally:

Broken diagonal movement

It seems that when walking diagonally then the animator variables for Horizontal and Vertical are both either 1 or -1 and this causes the alternating of the sprites. What I’d like to happen is that the state machine would deterministically pick either N/S sprites or E/W sprites when moving diagonally. Turning on "Can Transition To Self" seems to properly pick a direction and stick to it but it fails to animate when only moving in a single direction. It looks like it’s constantly transitioning to itself which starts over the cycle so I’ve left that unchecked on all transitions.

I’m not sure what the best way to fix this is. Most attempts I’ve tried so far complicate the state machine to the point it’s unmaintainable. I also couldn’t find anything about introducing priorities in a way that fixed the jitter.

What’s the idiomatic Unity way to achieve clean diagonal movement in 2D?

John the Ripper: Cannot extract hash from PDF because Python keeps opening?

I’m having a really strange issue. I’m attempting to extract a hash from a user-password encrypted .pdf with John the Ripper’s pdf2john tool, but every time I run the command:

c:\...\run\pdf2john.pl mypdf.pdf 

My Python IDE (Visual Studio Code) opens up the pdf2john.pl file and the following appears in the command line:

[main 2020-06-18T10:02:06.775Z] update#setState idle (node:15044) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information [main 2020-06-18T10:02:36.776Z] update#setState checking for updates [main 2020-06-18T10:02:36.934Z] update#setState downloading 

Any ideas on how to stop my IDE from opening up and having the command actually work as expected? The latest version of Perl is installed on my machine.

A bug happens in the Footer and the code keeps appearing

On this WordPress site with the Newspaper theme, the footer appears and looks normal (as you can see in https://www.vendaonline.pt/), but I installed a question plugin (DW Question Answer) and on the pages corresponding to the content of each subject, keep the footer with bug (https://www.vendaonline.pt/foruns/teste1/). The problem happens only on pages dedicated to the individual subject only. Can anyone help me solve the problem? enter image description here enter image description here

JS Error keeps showing up on Cart Page

Every page is working fine but when i try to update the items in the cart using the Update cart button or when i try adding coupon code it shows me an error saying Uncaught TypeError: t.addClass(…).block is not a function Error Message

What i tried is

  1. Updating the plugins
  2. Removing multiple versions of jquery
  3. Adding a new version of jquery
  4. Added the jquery using an enqueue and loaded it into the footer section.

Still nothing is working out. The url : https://pandablocs.com/cart/

GSA keeps spiking from 10% CPU to 100% CPU.. Why?

I own one of the fastest dedicated servers available and usually my GSA is running at 10% or less CPU but occasionally it is spiking to 100% CPU which is causing a lot of problems and crashing of my DS.  I have GSA even set to only run 100 threads and it is still doing this CPU spiking.  What might be the possible cause of this?  By looking at the logs it appears to be spiking when it is loading url’s from the verified sites list but it also might be something else.  Any idea’s how to fix this? 

Google Scrape Keeps Timing Out

hey guys,
I’ve got a problem with my scrape and would really appreciate any help anyone can give me.
Whenever i try to scrape Google, i get through about 30 searches, then Scrapebox starts returning zero results for everything else.

I’m using:

  • 50 semi-dedicated proxies from buyproxies.org
  • Detailed harvester
  • Scraping Google
  • 30 second delay
  • ~3,000 keywords to search

Why can’t i scrape using my entire list?

Is it an issue with my proxies?
Can anyone recommend a reliable source of proxies for scraping?

thanks!