Quantcast
Channel: Recent Questions - Stack Overflow
Browsing all 12111 articles
Browse latest View live
↧

Is it possible to use a readonly property in TypeScript Interfaces?

I would like to define an interface with a readonly property. For instance (as a strawman);interface foo { get bar():bool;}However, this gives the syntax error, "expected ';'" on bar. I have setup my...

View Article


Issue on Using Group by on Lambda and IEnumerable - ASP.Net

I need to render list of events (games) Grouped by the CreateDateIn controller I havepublic ActionResult Index(){ var gs = db.Games.Include(p => p.Activity).GroupBy(e => e.CreateDate); return...

View Article


Image may be NSFW.
Clik here to view.

Exporting select from two MySQL tables to one JSON file

How can I run a query against a database with two tables client and appointment to out put JSON like this:{"id": "1","app1": null,"app2": null,"app3":["cname": "John","clastname": "Doe","cemail":...

View Article

Error on Restoring AspNet Identity Core Package

Using MS VS 2015 Pro and Asp.net Core, I am trying to add Microsoft.AspNet.Identity.Core Package but I am getting this error: Errors in c:\users\xxx\documents\visual studio...

View Article

Access denied; you need (at least one of) the SUPER privilege(s) for this...

So I try to import sql file into rds (1G MEM, 1 CPU). The sql file is like 1.4Gmysql -h xxxx.rds.amazonaws.com -u user -ppass --max-allowed-packet=33554432 db < db.sqlIt got stuck at:ERROR 1227...

View Article


How to sync up the expiration time of Next Auth Session and a token coming...

I have implemented a next-auth authentication system for my Next.js app. In the providers, I have chosen credentials because I have a node.js backend server.The problem that I am facing is the...

View Article

Upgrade nodejs in Ubuntu 22 failed

nodejs -vv12.22.9I tried to upgradesudo apt remove nodejssudo apt install nodejsI got error:(Reading database ... 220599 files and directories currently installed.)Preparing to unpack...

View Article

Find the divisors of a number using Prolog by using recursion

I want to print the divisors of a number in Prolog and I have made the following code:find_and_display_divisors(N) :- write('Divisors of '), write(N), write(':'), nl, find_divisors(N,...

View Article


Image may be NSFW.
Clik here to view.

How to create lambda PyObject from its Python code in a C string?

I have the following code in Python, which uses pyjexl module:import pyjexljexl = pyjexl.JEXL()jexl.add_transform("lowercase", lambda x: str(x).lower())I want to do the same using Python C API....

View Article


Sending HTTP request using TCP healthcheck

I have the following config, which is sending a TCP healthcheck to my application (because of the check on the last line):backend bk_my-service-9801 mode tcp balance leastconn server kube_my-service-0...

View Article

Repeat an action after a delay

I would like to repeat a sequence of actions, each repetition taking place after a waiting time.I tried this:action1rep = number of repetitionsaction1reptime = delayfor i in 1...action1rep {...

View Article

How can I crawl data about professors information of universities in the...

There isn't any input data. The program should return a table of information of the top 30 computer science departments in U.S. Columns may be age, publications or research interests.I want to get...

View Article

Can I reproduce eslint's "prefer-object-spread" rule using ast-grep?

I am trying to compare different linters and their performance with custom rules. Ast-grep is promising, and likely runs much faster than eslint, as it is written in Rust instead of javascript....

View Article


Flutter I have issue at firebase Auth creating user

I have a strange issue with my Firebase Auth at creating users,when the user successfully signs up with his email and password it automatically goes to the login page even my awesome dialog shows but...

View Article

Laravel eloquent where condition parent/children with 3rd many to many

I have 2 models User and ModulesModules has a recursive parent/children relation having Many childrens (SubModules).In other hand a User can Have Many Modules and Many Submodules (permissions to access...

View Article


How to Efficiently Assign Date Ranges to Prioritized Items in Python?

I need to calculate the errors of some forecasts which are stored as time series in InfluxDB. Each forecast has a Tag associated with the guid in InfluxDB. However, for certain date ranges, you have...

View Article

Could not build wheels for xformers, which is required to install...

I am trying to install the audiocrafts library in my pyenv virtual environment (MacOS) but I keep getting this error. clang: error: unsupported option '-fopenmp' error: command '/usr/bin/clang' failed...

View Article


Can a WPF animated button be reversed on the second click without codebehind?

Im using powershell w/WPF. I have the following example code that produces a button that animates by moving to the right when clicked, I am trying to figure out the best way of approaching clicking it...

View Article

ASP.NET Core Razor page form submit is generating...

I am trying to check or uncheck a checkbox for individual records in a table and save the new check status back to the database. The form loads all the records correctly and shows the correct current...

View Article

Create an objects with input value

I have the various number of input like that. I do not control the exact numbers of inputs as they are coming from backend<input value="User"><input value="email@mail.com"><input...

View Article
Browsing all 12111 articles
Browse latest View live