Launch new instance when there is no instance open on current workspace

I am struggling with organizing my workspaces. I have one workspace per Project I am working on. Some applications I can fix to a single workspace, since they are only needed for a single project. Others (like firefox) I need on all workspaces. Now, when I open firefox from a workspace that does not have a firefox instance in it, I am either taken to a workspace with a firefox instance or a new firefox instance is launched. How can I always launch a new instance, when there is none in the current workspace? Turning on the “Launch new instance” plugin in gnome-tweaks launches new instances even if there is an instance open in the current workspace.

Basically, when I open firefox (or any application that is not fixed to a workspace), I want the following to happen:

Is there an instance running in the current workspace? -> Give focus to that instance Otherwise, launch a new instance in the current workspace.

How can I achieve that?

Backup a database from Azure SQL Managed Instance and restore to on premise SQL Server

I have three databases that I am migrating to Azure SQL Managed Instance. One is a Utility database, just a small collection of generic functions and procedures. One is the OLTP database for a web application. The third is a read-only archive of the OLTP database containing historic data for analysis and reporting as well as audit tables. I need to be able to restore these databases to on premise development and test servers. So far, I have been unsuccessful.

My first attempt was to use backup to Azure Blob Storage. But no matter what version of SQL Server I use locally, I always get an error that the Copy Only backup is from a newer version and restore is not supported.

Next, I tried Export Data tier application from SSMS v.18.1. Unfortunately, it never gets past the export. I get dozens of errors that read External references are not supported when creating a package from this platform. One of the greatest strengths of Managed Instance over Azure SQL DB is the ability to do cross-database queries. I have a number of views and procedures that link tables in the two databases. Additionally, some procedures in the OLTP database call the functions in the Utility database. Since MI is not Azure SQL database, you would think this wouldn’t be a problem!

Searching Google, I found this question on Stack Overflow. So I tried the Visual Studio approach proposed as an answer. Although it appears to work, meaning it creates a multi-gigabyte file on my local machine, attempting to import that file using SSMS gives me an error that reads No data is present in this file. So then I tried the second possible solution using sqlpackage.exe. But that solution doesn’t work for me either as it only references exporting the schema. And if I try to export the whole database with /Action:Export I get the same error message as SSMS gives.

I also examined this Database Administrators question. No help – that is what I originally attempted. If anyone has any other thoughts I would greatly appreciate hearing them!

How can I completely record and replay a VM/Docker instance?

Let’s say I have a program which is not open source, or I want to exactly reproduce the result of previously executed program. It may have Web-calls or may lookup the system time or access any resource dynamically. Is there any tool that can record all the computations of a Docker container or virtual machine instance and repeat it later (this means mocking all the dynamic resources again)?

suitecrm in ubuntu18 ec2 instance port 80 error

hi i have problem while setup suitecrm in ec2 instance free tier …everything was fine till installation page for suitecrm then i got (Internal Server Error…Apache/2.4.29 (Ubuntu) Server at (IP entance ) Port 80..i treid to change configuration in sudo nano /etc/apache2/sites-available/suitecrm.conf but error still exit is there something should be changed or entance is not avilable with suitecrm i used this tutorial for setting up my instance


Property does not exist on the Eloquent builder instance

estoy practicando con laravel pero tengo algunas dudas, quiero aplicar un middleware que le prohiba el acceso a una ruta si un usuario logueado tiene “0” en la columna “wizard” de mi tabla “empresas” y lo redireccione a completar su proceso pero si este tiene “1” en el campo lo deje pasar a la ruta /dashboard

declare mi modelo de la siguiente forma:

    <?php      namespace App;      use Illuminate\Database\Eloquent\Model;      class Empresa extends Model     {         /**          * The database table used by the model.          *          * @var string          */         protected $  table = 'empresas';          /**         * The database primary key value.         *         * @var string         */         protected $  primaryKey = 'id';          /**          * Attributes that should be mass-assignable.          *          * @var array          */         protected $  fillable = ['nombreempresa',         'nombrecomercial',         'idfiscal',         'logo',         'adminid',         'tel',         'pais',         'status',         'email',         'acceso',         'verified',         'categoria',         'sector',         'tipo',         'serial',         'wizard',         'created_at',         'updated_at'];         public function user()           {             return $  this->belongsTo('App\User');           }     } 

El codigo del middleware es:

namespace App\Http\Middleware; use Illuminate\Support\Facades\Auth; use Closure; use App\Empresa;  class WizardVerification {     /**      * Handle an incoming request.      *      * @param  \Illuminate\Http\Request  $  request      * @param  \Closure  $  next      * @return mixed      */     public function handle($  request, Closure $  next)        {          if(Empresa::where('adminid', Auth::user()->id)->wizard && !Auth::check()){             return redirect('/dashboard');           }          return $  next($  request);        } } 

en mis rutas lo llame asi:

Route::group(['middleware' => ['wizard']], function () {  /*Todas las rutas que esten en este grupo estaran restringidas si el usuario no completo su informacion y se restringira su paso si la no se encuentra logueado.*/ Auth::routes(); Route::get('/dashboard', 'DashboardController@index', function () {     return redirect('/home'); }); Route::get('/home', 'HomeController@index')->name('home'); }); 

pero al hacer la prueba me aparece el error “propety [wizard] does not exist” que estoy haciendo mal? porque segui cuidadosamente este tutorial pero no lo logre hacer funcionar, espero alguien pueda explicarme porque esta mal mi codigo, saludos!!!

How can I economically scale to 100+ instances of my .Net Core app without using 1 container per instance?

Currently I have a .NET core application, which fires up a new thread to hold each customer account. Each thread instance:

  • Is long running for many months or more
  • Holds open SignalR Websockets and calls 3rd party APIs
  • Needs to be super responsive
  • Has 1 instance for every user account as it connects to unique web sockets / account APIs.

The current plan is to compile this to a Windows Service then deploy 1 application per server instance that uses all resources on the server, then have an orchestrator that manages controlling and deleting the threads through a RabbitMQ integration. We are imagining that 1 server instance could run up to 40 threads or something. Then the orchestrator would create new server instances to manage more accounts as we scale.

I am not happy with this approach as it feels clunky to me. Ideally I’d like to fire up each account instance in it’s own Container using Kubernetes or similar, but the cost of running 1 user account per container is not financially viable.

Are there any other alternatives that anyone can recommend. Other things I’ve been thinking of are to create each account as a separate app as a Windows Service and then fire up multiple versions of the windows service on each server with some kind of service orchestrator.

I am fairly new to architecture like this, so go easy on me if I have not explained this properly. Any advice/ideas on how others could/would approach this would be most appreciated.

Object Instance Diagram – What can be modeled?

According to my professor, one of the following relationships cannot be modeled in an object instance diagram:

  • Association
  • Composition
  • Generalization

I made the argument that the association could not be modeled in an object instance diagram, since that is more abstracted and is typically for a class diagram, while the other two are more concrete. However my TA told me I was wrong, and did not offer additional clarification.

I have read this post and looked up this page. Any guidance is appreciated.

Use model instance to access model’s manager ‘objects’

In the Django documentation it’s mentioned that Django managers are accessible only via model classes rather than model instances to enforce table and record level operations. What are table and record level operations and does they get affected if we use a model instance?I have gone through, but was unable to understand much. I am not much acquainted with database. It would be helpful if i can get an example to understand the scenario.