instruction stringlengths 0 30k ⌀ |
|---|
I currently have an issue with a client's website that uses Twitter Bootstrap 3.2 with LESS. The technical lead at my client has flagged that Google Pagespeed Insights is showing a red flag against several of the CSS files in the site causing render blocking issues:
https://developers.google.com/speed/pagespeed/insi... |
Brand new to programming. Following a tutorial on C, where the creator uses these 3 commands in the terminal: <br>
code hello.c
make hello
./hello
The `make hello` command doesn't work on my end for some reason. Giving me this error instead:
make : The term 'make' is not recogni... |
Invalid or unexpected token
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:interna... |
For someone looking for a solution with Ionic v7, this is what you can do to apply custom CSS for toastController.
1. Specify `cssClass` property in `toastController.create()`.
const toast = await this.toastController.create({
message: 'Your Toast Message',
duration: 2000,
cssClass: 'toa... |
I would increase range and use additional value as exception:
```cs
var index = Random.Next(2, 11);
if (index == 10)
index = 15;
``` |
This is the column part which i have declared.
`
{
title: 'Tags',
key: 'tags',
dataIndex: 'tags',
render: (_,{tags})=>{
<>
{tags.map((tag)=>{
return(
<Tag key={tag}>{tag}</Ta... |
Creating a module for this purpose is inevitable and not a strenuous task at all. All u need is a `package.json` with an `exports` field to limit which submodules can be loaded from within the package. From the [official Node.js docs](https://nodejs.org/api/packages.html#exports):
> The "exports" field allows defini... |
Try this regex `^$|(?!.*googlebot)(bot|crawl|spider)` |
When i run my app on FireFox, the console returns me an error : (in promise) TypeError: NetworkError when attempting to fetch resource.
I understand what's that mean but i have no clue how to fix it. Besides everythings run well on the others browsers...( chrome, Edge ..)
anyone has an idea?
here my code :
`e... |
{"OriginalQuestionIds":[129677],"Voters":[{"Id":285587,"DisplayName":"Your Common Sense","BindingReason":{"GoldTagBadge":"php"}}]} |
I'm encountering an issue with building a responsive webpage. When testing the page's responsiveness, the width extends beyond the device's width for some reason.
I've tried removing various parts of the code, and I've found that the "introduction" div seems to be causing the problem. When I remove it, the webpage r... |
void excelsave()
{
try
{
ApplicationClass app = new ApplicationClass(); // the Excel application.
Workbook book = null;
Worksheet sheet = null;
Range range = null;
// the range object is used to hold the ... |
JavaFX SwingNode instantiation fails with exception |
|javafx| |
null |
I am using model = 'filipealmeida/Mistral-7B-Instruct-v0.1-sharded' and quantize it in 4_bit
with the following function.
```
def load_quantized_model(model_name: str):
"""
:param model_name: Name or path of the model to be loaded.
:return: Loaded quantized model.
"""
bnb_config = BitsA... |
Quantization 4 bit and 8 bit - error in 'quantization_config' |
|gpu|local|large-language-model|quantization|8-bit| |
null |
im new to nodejs and i was just wants to update integer in mongodb but i con't do so.
i dont understand what im doing wrong here.no matter what i try findAndUpdate only returning original document without updating it. I also tried typecasting integer value but still didn't work.
```const id = "6606ff9e1a5c69a... |
Registration to be configured in ASP.NET Core 8 |
|c#|asp.net-core|.net-8.0| |
Finally found a solution.
The problem was coming from the the next.js SSR.
I needed to add `"use-client;"` in the top of every of my library components.
I did this with `rollup-plugin-banner2` package:
```
banner((chunck) => {
if(!bannedUseClientFiles.includes(chunck.fileName)){
return "'use client';... |
I suspect you are getting an uncaught `Exception` from your code:
config.write(config_file)
The `write()` method takes no arguments as it writes to the last read file.
Try changing that line to:
config.write() |
{"OriginalQuestionIds":[6339057],"Voters":[{"Id":5577765,"DisplayName":"Rabbid76","BindingReason":{"GoldTagBadge":"pygame"}}]} |
|javascript|jquery|asp-classic| |
I use segmented picker in iOS which contains few items. When user tap on not selected item this item becomes selected. Some of items can contain sub items. So when user tap on already selected type I need to show modal window with subitems for choosing one of them.
But taps on already selected items of segmented picke... |
There is a free API you can use with JavaScript to do this. I wear it and it works like a glove.
Basically you create a key (namespace) and each post for this route it increments 1. Then you can restore this count for display.
https://javascript.plainenglish.io/how-to-count-page-views-with-the-count-api-afc9369c1... |
{"OriginalQuestionIds":[27852613],"Voters":[{"Id":7884305,"DisplayName":"Chayim Friedman","BindingReason":{"GoldTagBadge":"rust"}}]} |
I have 2 SQL queries.
Query #1:
SELECT
SUM(PrincipalBalance)
FROM (
SELECT
lt.AccountId,
SUM(CASE
WHEN TransactionTypeId IN (1)
THEN PrincipalPortionAmount
ELSE 0
END)
- SUM(CASE
WHEN Transac... |
|java|multithreading|concurrency|java-21|structured-concurrency| |
{"Voters":[{"Id":476,"DisplayName":"deceze"}],"SiteSpecificCloseReasonIds":[11]} |
You should place .sql file inside the resource folder, so that H2 database will be initialized as per your requirement |
Full source code: https://github.com/remoteworkerid/backendgolang/blob/feature/RWIDPF-13/server.go
My code works for DEV_MODE==true. But it doesn't for DEV_MODE==false.
PrecompileTemplate:
```
func precompileTemplate() {
// Menggunakan template.ParseGlob untuk memuat semua file template
templates = templa... |
Are there any advanced books or tutorials on programming the Arm64?
Most of the books out there spend the first five chapters explaining what a register is and what memory is. I’ve written code in 5 other assembly languages, so I really don’t need that.
The official Arm documentation seems more like an encyclope... |
Advanced Arm64 books or tutorials? |
|arm64| |
To be honest, I'm not entirely clear on your question. If I understand correctly, you're looking to categorize values into intervals of 50, such as 1-50, 51-100, 101-150, and so on. After that, you want to group the IDs based on these intervals and sort them according to the "sort_me" column. Beside this, you want to c... |
My problem is given as follows:
[![][1]][1]
```python
import sympy as sp
p = sp.symbols('p')
I_p = sp.Identity(p)
C = sp.BlockMatrix([[I_p, I_p], [I_p, -I_p]])
Sigma_1 = sp.MatrixSymbol('Sigma_1', p, p)
Sigma_2 = sp.MatrixSymbol('Sigma_2', p, p)
Sigma = sp.BlockMatrix([[Sigma_1, Sigma_2], [Sigma_2, Sig... |
Using the sympy module to compute the matrix multiplication involving symbols |
|python|matrix|sympy|matrix-multiplication| |
You cannot write a function definition within JSX. You can only write expressions.
This is not allowed within JSX:
<pre><code>{async function fetchURL(){/*••• Function definition •••*/}}</code></pre>
But this is:
<pre><code>{fetchURL()}</code></pre> |
I had the same problem and I solve adding "withXSRFToken: true" to axios create. |
I'm try to install OHS, but there's an error: INST-07551: Not all dependent featuresets for install type "Collocated HTTP Server (Managed through WebLogic server)" could be found. The following prerequisites were found t
o be missing:
wls_server - 12.2.1.4.0em_fmc - 12.2.1.4.0
My version of weblogic is 14.1.1 and ... |
Save an Excel file in C# |
In main you have (with some other stuff)
bool ID;
std::cin >> ID;
So `ID` is declared as a boolean (true or false), and you read into, but you enter `151`, which is not a valid boolean. Depending on your flags, `1` might be, but that will leave `51` to still be input. Regardless, when you then call idc... |
` * What went wrong:
A problem occuremphasized textred configuring project ':cloud_firestore'.
> Could not resolve all files for configuration ':cloud_firestore:classpath'.
> Could not download builder-7.0.2.jar (com.android.tools.build:builder:7.0.2)
> Could not get resource 'https://dl.google.com/dl/andr... |
I'm trying to install "Sparkpost" package with pip. The installation is finished, im import it and then I get this error: No module named 'sparkpost'
from sparkpost import SparkPost
My virtual enviroment is working totally fine....
I follow this guide: https://pypi.org/project/sparkpost/ |
No module named 'sparkpost' |
|python|api|sparkpost| |
I am using Keycloak (`24.0.2`) as a standalone self-registration app (with some custom fields) for a small non-profit organization. Keycloak runs as docker behind nginx and is served under `keycloak.myorganization.com`. I have two realms: `master` (the default one) and `members` (where members will login/register).
... |
(in promise) TypeError: NetworkError when attempting to fetch resource |
|javascript|firefox|browser|module|fetch| |
null |
If you're writing something that does "the same thing, with just one thing changing at each step", that's a loop. You don't use separate `if` statements. Not even "when you're lazy": being lazy is an _excellent_ property to have when you're a programmer, because it means you want to do as little work as possible. Of c... |
{"Voters":[{"Id":529282,"DisplayName":"Martheen"},{"Id":272109,"DisplayName":"David Makogon"},{"Id":408390,"DisplayName":"Warren Burton"}]} |
Extract the processing of the nc files: IndexError IndexError index 10933172 is out of bounds for axis 0 with size 9098798 |
|python-3.x| |
null |
|spring-boot|cross-browser| |
Here' my error message:
```
* What went wrong:
A problem occurred configuring root project 'map'.
> Could not determine the dependencies of null.
> Could not resolve all task dependencies for configuration ':classpath'.
> Could not find com.google.gms.google-services:4.4.1:.
Required by:
... |
Couldn't import Google Map API |
|android|react-native|google-maps| |
null |
) CREATE TABLE ahli(
nama VARCHAR(6),
nokp VARCHAR(12),
id_kelas INT(2),
tahap VARCHAR(20),
katalaluan VARCHAR(20),
PRIMARY KEY(nokp),
FOREIGN KEY(id_kelas) REFERENCES kelas(id_kelas) ON UPDATE CASCADE ON DELETE CASCADE
I try to change it with another words, symbol, numbers and bac... |
I got unexpected of beginning near 'nama' |
I want to perform multiple Identity-related actions in a transaction. There is [some guidance](https://learn.microsoft.com/en-us/ef/core/saving/transactions) in the docs for EF in general, but not for Identity in particular.
This approach is used in many SO posts:
```cs
using var transaction = await _context.Datab... |
I recently upgraded my laravel application to bootstrap 5 and I cannot (for the life of me) get bootstrap's tooltips working. My application is running Laravel Framework 9.52.16 with bootstrap 5.3.3 and popper.js 1.16.1.
My default html tooltips work but I would like to use bootstrap 5's tooltips as they are cleaner... |
Keycloak: How to override Welcome Screen redirect behavior (to custom realm, instead of master realn/admin) |
|nginx|realm|keycloak| |
I am using a ```UIBezierPath``` to draw a curved line. The curve works however, I am unable to curve the edges of the line.
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/xFcoV.jpg
If you look at the top/bottom end of the curve, you can see that the edges are flattened out, thats no... |
How can I configure settings.gradle to accommodate different setups based on the flavours of my app?
In my settings.gradle, I have several modules defined, such as:
include ':SubModule1'
include ':SubModule2'
.....
include ':SubModule8'
include ':SubModule10'
Now, I have two flavour dim... |
Android Configuring settings.gradle for different app flavours |
|android|gradle| |
When I try to fetch from a query on a single table I get an associated array where Key is a name of column. But when I try to `JOIN` another table's columns on a query I get an array which only contains a key 'row' and a string value which looks like
`(value1,value2,value3,...,valueN)`, without column names.
I need ... |
I want to add a worker and then his id and name go to another table to work with
this doesnt work I tried it
`router.post('/add_employee', (req, res) => {
// Insert into puntoretuji table
const sql = "INSERT INTO puntoretuji (name, salary, role) VALUES (?)";
const values = [req.body.name, req.body... |
Express Mysql getting max ID from table not working cought in a promise |
|javascript|mysql| |
null |
Initially there is no open or close and the style
```
.mobile-nav ul {
transform: translateY(-200%);
}
```
in applied. When the style is either open or close the transition will play.
I moved the SVG to the CSS background -- I don't know if that will work for you?
<!-- begin snippet: js hide: false cons... |
Apologies in advance for the incompleteness/unprofessional terms as I do not have a CS background and Thank you so much for your help!
I am making a Simple Multicast Receiver through Python, the receiver receives singlecast/multicast/broadcast packets through ethernet connection from a Elevator Control Server. And I... |
Python Multicast packet receiver stops receiving multicast packets when computer is connected to WiFi |
|python|sockets|wireshark|multicastsocket| |
null |
```
import { NextResponse } from "next/server";
import User from "../../models/post";
const POST = async (req, res) => {
try {
const body = req.json();
console.log(req);
const userData = {
Title: body.title,
content: body.content,
tag: body.... |
Invalid or unexpected token in window terminal |
|node.js|quick-install-package| |
null |
|mysql|mysql-8.0| |
I'm trying to simulate a two neuron network in Python. It's simple enough to do writing separate equations for each neuron, but since I would like to generalize the code a bit more so that it's easy to increase the number of neurons without rewriting the equations over and over. The two neural network equations are the... |
Writing a small neural network with matrices |
|python|ode| |
Have you tried changing your function to:
def cos_func(times, amplitude, frequency, offset):
return amplitude * np.cos(frequency * times) + offset |
The website works fine only for 1-2 requests, after which it starts loading endlessly and if I wait for some time I get an Internal Server Error.
After this I reload the server `sudo systemctl reload apache2`, website works for 1 request and I got same problem again
(When i use `runserver 0.0.0.0:8000` it works fine)... |
I'm facing an issue with comparing a hashed email value stored as a BLOB in an SQLite database with a hash generated from an email address in my Android application. Here's a simplified version of my code:
```
@SuppressLint("Range")
public UserCredentials findUserCredentials(String email) throws DBFindException {
... |
How to put in selectionArgs from a query in SQLite Android Studio byte[] value |
Oracle Http server ISNT-07551 |
|oracle|apache|weblogic14c| |
null |
The spring boot plugin generates a unique structure by default: See [the Spring docs](https://docs.spring.io/spring-boot/docs/current/reference/html/executable-jar.html) for more details.
You will need
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-loader</artifac... |