Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
104 views

I'm using a creating Eloquent model observer to automatically generate a slug before inserting a new product into the database. Here’s the code from my ProductObserver: public function creating(...
Somar kn's user avatar
  • 143
1 vote
1 answer
72 views

class ExampleUserService { public function approve($user, $data) { $approvedUser = DB::transaction(function () use ($user, $data) { if ($data['approve_by_admin'] == 1) { ...
Dilip Thakre's user avatar
1 vote
0 answers
106 views

Sorry for the lengthy post but this needs some context. Context I'm building an app for academic papers publishing. The stack is Laravel + vanilla JS and I use Etherpad to edit the papers. It is ...
ept0915's user avatar
  • 23
0 votes
0 answers
71 views

This is my observer class (Laravel 11) to create logs actions namespace App\Observers; use App\Models\Log as LogModel; use Illuminate\Support\Facades\Auth; class UserActionObserver { public function ...
Abdulhadi Afghan's user avatar
0 votes
0 answers
111 views

I have been asked to run a python script from the Windows Task Scheduler. In my python script I will substantially use watchdog library in order to instanciate and run an Observer that will monitor ...
Fra B's user avatar
  • 13
0 votes
0 answers
148 views

I was working on a problem where I have 20 divs(div-0, div-1, etc.) and a ResizeObserver on the application level. Using a single instance of this ResizeObserver, I am observing on all the 20 divs. ...
163lbs's user avatar
  • 11
1 vote
1 answer
707 views

I'm using Laravel and something is modifying a property before it's saved to the database. In Database/Eloquent/Model.php I can modify the save() method like so: dd($this->my_property); if ($this-&...
John Mellor's user avatar
  • 2,533
0 votes
1 answer
278 views

I have defined an attribute in Magento 2. When I say Dont Show in Category in this attribute, I do not want the product to be shown in Category and Search. But I don't want to completely remove the ...
ramazan's user avatar
0 votes
0 answers
554 views

I'm trying to implement a NavigatorObserver in order to execute a method each time a new entry is pushed/popped on the Navigation stack. First of all, here is my Observer: class ...
thibaultk's user avatar
0 votes
1 answer
55 views

Is it possible to monitor property changes of all devices within a drum rack/chains? Properties such as: samples, chain name, file path, drum pad names... The problem is that in my case I only get a ...
justewanproducer's user avatar
0 votes
1 answer
86 views

In running the below R Shiny code, the user changing the sliderInput() (object input$periods) resets all of the variable user input tables called "X/Y child tables" as shown in the code with ...
Village.Idyot's user avatar
0 votes
0 answers
342 views

I have a ProductPrice Model which I register an observer attribute with ObservedBy on as follows #[ObservedBy([ProductPriceObserver::class])] class ProductPrice extends Model { use HasFactory, ...
Soneye Sina's user avatar
0 votes
0 answers
200 views

I add an observer in a function which I call on the start. It is only initiated once(I thoroughly checked). On the safer side, I also remove observers before I add observers. below is the function ...
Kouv's user avatar
  • 1
0 votes
0 answers
110 views

I have two models User and Role many to many relationship through a pivot table. User: public static function boot(): void { parent::boot(); self::observe(new UserObserver()); } public ...
KordDEM's user avatar
  • 209
0 votes
1 answer
169 views

I am working on a project and I am sending a GET Request to an API URL in my project. (As follows) Actually everything here works for me. But the problem is; When I first send the request, the "...
SwiftTry's user avatar
  • 151
0 votes
1 answer
84 views

I'm encountering an error in my Flutter application related to a ScrollController. I have a QuestionDetailsScreen where I'm using a ScrollController to monitor the scroll position. I want to trigger a ...
Abir Ahsan's user avatar
  • 3,089
1 vote
1 answer
115 views

I am using Laravel (5.8) and I need to delete a record from table A and then also table B. So I tried Observers, but it never fired the observer's deleted method. I already used other methods like ...
Julian's user avatar
  • 449
0 votes
1 answer
78 views

The observer in my MainActivity is not being triggered when the string data is being changed Here is my MainActivity: package com.example.translator import androidx.appcompat.app.AppCompatActivity ...
Python coder's user avatar
1 vote
1 answer
209 views

I'm trying to simplify my code. Rather than copy/pasting similar elements, I want to define a list that describes them and then lapply to get them. I need two/way communication with a global setting. ...
W_vH's user avatar
  • 155
0 votes
0 answers
145 views

In the context of the discussion at https://stackoverflow.com/a/35043309/19365092, it is advisable to avoid using the subscribe method for HTTP calls. The reason is that while it is true that ...
saurabh tiwari's user avatar
0 votes
0 answers
283 views

I am adding a sticky nav in my website using IntersectionObserver, when the isIntersecting has passed from true to false, the website and nav starts flickering, in the background. The isIntersecting ...
Jorstev's user avatar
3 votes
0 answers
77 views

The R Shiny code posted at the bottom allows the user to add columns to a rhandsontable table, allows manual inputs into the first row of the table, and automatically populates the non-editable second ...
Curious Jorge - user9788072's user avatar
1 vote
0 answers
83 views

I need to observe for realm objects that fall into specific time range, and cannot figure out if it is possible to create a dynamic date as a predicate for the query. For example, I want to observe ...
J.Doe's user avatar
  • 366
1 vote
0 answers
141 views

Context I am writing a dashboard builder application. Users create visualizations in the dashboard which access variables defined in the dashboard to generate queries. Here is an example. Dashboard: ...
Madhusoodan P's user avatar
0 votes
0 answers
88 views

Thanks in advance for any advice. I have a query from a roomdatabase, only some columns are exposed by the interface to the user (~ 3 out of 7). The query does not include favorite columns. So, there ...
Marco Jacobo's user avatar
1 vote
0 answers
54 views

I have the following code for simple room and Dao function. I am trying to create observer to observe Customers entity table. I do not have a lifecycle or UI so how to create the observer? data class ...
Mahmoud Hassan's user avatar
0 votes
1 answer
529 views

How do I remove a viewTreeObserver? There are 3 different removeOnGlobalFocusChangeListener callbacks class MyFragment: Fragment() { override fun onViewCreated(view: View, savedInstanceState: ...
Lance Samaria's user avatar
1 vote
1 answer
585 views

I created a observer for my pivot table CreatorListing and I dont know why it wont trigger the created event. I even tried others like creating, saving, and saved but they wont go through. Here is in ...
draw134's user avatar
  • 1,219
1 vote
0 answers
28 views

I have a class Message, that contains an array of Addresses. Opening the page immediately querys all the pending messages. I need the Adresses to be queryed once the user opens the tab inside the ...
Zulumaster's user avatar
1 vote
1 answer
49 views

The difference between the two Shiny apps is that the first one includes observeEvent( input$alert, { flag(TRUE) } ) while this code is replaced with the following code in the ...
Stéphane Laurent's user avatar
0 votes
1 answer
52 views

I'm doing an APP and I have to show the itens from contacts in a RecyclerView. But, when I enter in the APP the items don't show. But, if I go to another Fragment then back the RecyclerView is working ...
Antony Lajes's user avatar
0 votes
1 answer
409 views

I am requesting help as no matter how many tutorials I watch, I cannot seem to figure out how use the Observer() function to get it to replace a link with another only if that link appears. Am I ...
Knewest's user avatar
  • 13
0 votes
1 answer
709 views

I have a variable that i have instantiated in the top of my typescript class like this: UserTimeRegistration: TimeRegistration[]; I have a method calling an api like this: getUserInfo(UserID: string):...
Smileyman's user avatar
0 votes
1 answer
643 views

The observable function is NOT http; the function must be local, but it needs to be subscribed. This is the best I could do based on online example: export class AppComponent implements OnInit { ...
Yogi Bear's user avatar
  • 963
1 vote
1 answer
2k views

I would like to dynamically change the transition used to navigate between pages. To do so I created an enum that gives two different transition names TransitionType.fade and TransitionType.slide for ...
Walrus's user avatar
  • 20.6k
0 votes
1 answer
1k views

I need to change elementA when elementB is out from viewport. I have html elements <header id="header"> <div id="banner"> and js: const banner = document....
Константин Сурков's user avatar
1 vote
1 answer
1k views

I have a question on how to mute the observer's method based on the parameters I pass. I have a parameter of link_social and if it is set to false I wanted the observer to not trigger the created() ...
draw134's user avatar
  • 1,219
0 votes
1 answer
2k views

I have this snippet of code that starts the video as soon as the video enters the screen. the problem is that it doesn't work on safari, leaving the video completely black and giving me this error: &...
Teti's user avatar
  • 1
0 votes
0 answers
104 views

We have a complex app and we do write test cases for testing. While writing an acceptance test case for my changes, I have encountered one issue. The issue was my test case was running perfectly fine ...
Manoj's user avatar
  • 1
0 votes
1 answer
1k views

Here is what I'm doing in a componemt: import { Component, OnDestroy, OnInit } from '@angular/core'; import { interval, Subscription } from 'rxjs'; @Component({ selector: 'app-home', templateUrl:...
Niv Naim's user avatar
0 votes
0 answers
508 views

I am looking into observers and I found out that instead of calling an observer during the boot() method of the App\Providers\EventServiceProvider laravel can call it using the property protected $...
Nemoko's user avatar
  • 451
-1 votes
1 answer
403 views

I want to pass a variable in the controller to the model in laravel. In Controller, $withoutUser = True; $post->update([ 'status' => 'inactive' ]); In model, protected static function boot(...
ChathurangaA's user avatar
0 votes
1 answer
629 views

I'm having a problem in my implementation using observers in Swift, The problem is I'm having the same observer multiple times so I make one function more than once. How can I validate if I'm ...
Antonio Labra's user avatar
1 vote
1 answer
329 views

I am trying to get LiveData updates in a ViewModel, and make sure that the observer is not leaking, but it is leaking. The typical problem is that the observer is not stored in a variable, but that is ...
John Glen's user avatar
  • 966
0 votes
0 answers
216 views

In the below code, I'm trying to understand what the input[[...]] in the two commented observeEvent() functions do. Could someone please explain? I'm trying to adapt this code so the function of the ...
Village.Idyot's user avatar
0 votes
1 answer
61 views

The code posted below allows the user via clicks of action buttons to add/delete individual rhandsontable tables for data input. For deletion each table has its own action button underneath. Any ideas ...
Village.Idyot's user avatar
2 votes
1 answer
87 views

In the code posted at the bottom, I'm trying to cap the value of the second reactive object (y) at the value of the first reactive object (x) using two observeEvents() as action button click counters, ...
Village.Idyot's user avatar
2 votes
0 answers
164 views

Essentially I have a scrolling list of videos (think TikTok). I want each video to play while it's on the screen. The functionality is all there, but when you swipe to the next video, I want to remove ...
nickcoding2's user avatar
0 votes
1 answer
361 views

I am currently developing a script to synchronize the data stored in my database with an external API. That is to say that all the records created/deleted must also be created/deleted on the external ...
Louis Sallée-Delille's user avatar
0 votes
1 answer
65 views

I have built an Angular(14) app where I need to store some data in a DB. So I have a component with a button, I want to press this button and do stuff in three different components, when they are all ...
Hjalmar's user avatar

1
2 3 4 5
19