Welcome to Answer Overflow!
Answer Overflow is the best way to discover Discord content. Browse trending forum posts, explore popular servers, or view new content. Know of a Discord server that should show up on the site? Learn more about adding a server!
DHDistant Horizons
Created by Loser on 3/18/2024 in #help-me
ReTerraForged.
i have spent the last few hours learning about the mystery that is reterraforged, the large gatekeeping community surrounding this mod (which i find to be very complexing) has made it extremally difficult to uncover information. regardless, i have tried to compile it myself starting from absolutely zero coding knowledge, i can not seem to get it to work. Does anyone have a simple jar file for 1.20.1 they could send my way, i would be very grateful.
42 replies
DHDistant Horizons
Created by Kegg on 3/7/2024 in #help-me
Distant horizons not loading
So my pc can load up to 61 chunks through normal rendering without distant horizons, but when i set minecraft to 12 chunks and distant horizons radius to 128, nothing happens, only when i visit a chunk and then go away does it go past that 12 chunk radius, do i have to go to chunks first before distant horizons can load them or what? I have sodium and c2me installed and im using the prism launcher, singleplayer world, i have a 3060, 16 gigs of ram and a ryzen 5 5500 cpu, so i dont understand why it dosent load.
11 replies
VVALORANT
Created by L. Hamilton! ϟ on 2/15/2024 in #community-help
login servers are temporarily unavaible
No description
23 replies
PMPUBG MOBILE
Created by Elvio on 3/16/2024 in #questions
How To Level up Home
How do I level my home What is the requirements to level up my home I can't see it???
5 replies
DHDistant Horizons
Created by Manalor on 3/13/2024 in #help-me
Trouble Getting Distant Horizons to work with Bliss Shaders
Hi all. I've been trying to get DH and Bliss shaders to work together. I'm using the following versions:
Minecraft | 1.20.1
Fabric | 0.15.7
Distant Horizons | 2.0.1-a
Sodium | 0.5.8
Iris Shaders | 1.6.17
Indium | 1.0.30
Bliss | 2.0.4
Minecraft | 1.20.1
Fabric | 0.15.7
Distant Horizons | 2.0.1-a
Sodium | 0.5.8
Iris Shaders | 1.6.17
Indium | 1.0.30
Bliss | 2.0.4
I've kept all the default settings, but when I tried to enable Bliss shaders DH horizons chunks didn't render at all. Before After I also tried with the Complementary fork and DH was working, however I got the blending issues (as described in this post) and a bug where clouds render in front of blocks (this seems to happen without DH, so I believe it is unrelated). From what I'm seeing, Bliss should work better than Complementary, but it isn't working at all for me. Anything about my setup immediately stand out to anyone as incorrect? Thanks!
4 replies
TTCTheo's Typesafe Cult
Created by human on 5/4/2023 in #questions
Next.js 13 get current URL path in Server Component
This may be due to the current beta-phase of Next.js 13 app directory, but I am struggling to make a simple nav link with an active state based on the current path name–only with server components. I assumed that there were an API to get the current pathname, just like you can get headers and cookies in Server Components. But alas, I couldn't find any. I know this is possible to do with Client Components. But I wan't to keep the nav and its links server-side rendered for this example. The only alternative I can think of is kind of hacky; create a middleware that sets a header (or cookie) that is then read from that SC. I don't need these routes to be statically rendered anyway. I also tried to make a client-only provider component which would wrap around a nav link (rendered as a SC) and use tailwind's group feature, then use that group to set the nav link style based on the class name or state. This didn't work, however this resulted in the following error:
Error: usePathname only works in Client Components. Add the "use client" directive at the top of the file to use it.
Error: usePathname only works in Client Components. Add the "use client" directive at the top of the file to use it.
It seems that rendering a client component that uses useRouter or usePathname inside a server component isn't allowed (or supported), even if I don't wrap it (???) I am ok if I have to pass a prop from the layout into the main nav. That's not my main concern.
43 replies
DTDrizzle Team
Created by kinsyu on 12/1/2023 in #help
There's not enough information to infer relation
I am trying to use drizzle studio but I'm running into the following issue, There is not enough information to infer relation "__public__.collectionsTable.tokens". Here's a simplified version of the schema.
export const tokensTable = mysqlTable(
'tokens',
{
tokenId: varchar('token_id', { length: 255 }).notNull(),

metadataName: varchar('metadata_name', { length: 255 }),
metadataDescription: text('metadata_description'),
collectionId: varbinary('collection_id', {
length: 42,
}).notNull(),

createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Token = InferSelectModel<typeof tokensTable>
export type TokenInsert = InferInsertModel<typeof tokensTable>

export const tokensRelations = relations(tokensTable, ({ one }) => ({
collection: one(collectionsTable, {
fields: [tokensTable.collectionId],
references: [collectionsTable.id],
}),
}))

export const collectionsTable = mysqlTable(
'collections',
{
id: varbinary('id', {
length: 42,
}).primaryKey(),

name: varchar('name', {
length: 255,
}).notNull(),
description: text('description'),
createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Collection = InferSelectModel<typeof collectionsTable>
export type CollectionInsert = InferInsertModel<typeof collectionsTable>

export const collectionsRelations = relations(collectionsTable, ({ one, many }) => ({
tokens: many(tokensTable, {
relationName: 'collectionTokens',
}),
}))
export const tokensTable = mysqlTable(
'tokens',
{
tokenId: varchar('token_id', { length: 255 }).notNull(),

metadataName: varchar('metadata_name', { length: 255 }),
metadataDescription: text('metadata_description'),
collectionId: varbinary('collection_id', {
length: 42,
}).notNull(),

createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Token = InferSelectModel<typeof tokensTable>
export type TokenInsert = InferInsertModel<typeof tokensTable>

export const tokensRelations = relations(tokensTable, ({ one }) => ({
collection: one(collectionsTable, {
fields: [tokensTable.collectionId],
references: [collectionsTable.id],
}),
}))

export const collectionsTable = mysqlTable(
'collections',
{
id: varbinary('id', {
length: 42,
}).primaryKey(),

name: varchar('name', {
length: 255,
}).notNull(),
description: text('description'),
createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Collection = InferSelectModel<typeof collectionsTable>
export type CollectionInsert = InferInsertModel<typeof collectionsTable>

export const collectionsRelations = relations(collectionsTable, ({ one, many }) => ({
tokens: many(tokensTable, {
relationName: 'collectionTokens',
}),
}))
In short, each collection can have multiple tokens, but each token can belong to only one collection. I haven't had any issues with this schema for around the 6 months that we've been using it, but we wanted to try out drizzle studio and ran into that issue. The database is running on Planetscale, not sure if that's relevant.
3 replies
DTDrizzle Team
Created by eatmoose on 6/2/2023 in #help
Auto update timestamp fields
How to auto update fields like updated_at?
17 replies
VVALORANT
Created by Sewer Person on 3/14/2024 in #community-help
valonax?
im wondering if theres a known scam called "valonax"
7 replies
DHDistant Horizons
Created by Zorquey on 3/8/2024 in #help-me
Can't Seem to get Shaders to work.
No description
7 replies
DTDrizzle Team
Created by McLean 25 on 4/5/2023 in #help
Can't find meta/_journal.json file when running migrate
3 replies
DHDistant Horizons
Created by Puttato on 3/3/2024 in #help-me
How to do the Iris + DH thing
8 replies
DTDrizzle Team
Created by iqrow on 5/24/2023 in #help
How to delete with cascade?
I'm using postgres with the following schema (reduced to the important parts):
export const worlds = pgTable('worlds', {
id: uuid('id').defaultRandom().primaryKey()
})
export const users_to_worlds = pgTable(
'users_to_worlds',
{
userId: varchar('user_id', { length: 32 })
.references(() => users.id)
.notNull(),
worldId: uuid('world_id')
.references(() => worlds.id)
.notNull(),
},
(table) => {
return {
pk: primaryKey(table.userId, table.worldId),
}
}
)
export const worlds = pgTable('worlds', {
id: uuid('id').defaultRandom().primaryKey()
})
export const users_to_worlds = pgTable(
'users_to_worlds',
{
userId: varchar('user_id', { length: 32 })
.references(() => users.id)
.notNull(),
worldId: uuid('world_id')
.references(() => worlds.id)
.notNull(),
},
(table) => {
return {
pk: primaryKey(table.userId, table.worldId),
}
}
)
And I'm trying to implement an api call to delete a world. Due to the reference to the world in the users_to_worlds I get the error: Error: update or delete on table "worlds" violates foreign key constraint "users_to_worlds_world_id_worlds_id_fk" on table "users_to_worlds" I believe what I want to use is a CASCADE delete where everything referencing a world is deleted when I delete a world. Is this possible through Drizzle? I can't seem to find anything on this.
7 replies
PGCPokémon GO Coordinates
Created by kanyeeastinparis on 8/26/2023 in #❓│support-pogo
No spawns
I’m not softbanned, i can spin stops and catch things, but only incense and lures spawn things. i’m auto walking under 9kmh.
14 replies
VVALORANT
Created by Mevix on 1/26/2024 in #community-help
secure boot verification failure
No description
219 replies
VVALORANT
Created by derek on 12/16/2023 in #community-help
how do you check what you got banned for?
Help
15 replies
VVALORANT
Created by stan_jkk on 3/5/2024 in #community-help
"PMID"
No description
5 replies
VVALORANT
Created by Liquid AceDevesh on 10/31/2023 in #community-help
VAN -92 error
No description
9 replies
VVALORANT
Created by fabob on 2/11/2024 in #crosshairs
Temet crosshair
0;c;1;s;1;P;c;5;o;1;0t;1;0l;5;0v;3;0g;1;0a;1;0f;0;1b;0
3 replies
DTDrizzle Team
Created by Louistiti on 7/18/2023 in #help
Clear the whole database?
For my test environment I'd like to clear the whole db.. is there a way to achieve this using drizzle ?
59 replies
TTCTheo's Typesafe Cult
Created by Romain on 7/9/2023 in #questions
Zod enums vs Native enums
From what I understood from the documentation of Zod, enum should be use as followed :
const FishEnum = z.enum(["Salmon", "Tuna", "Trout"]);
type FishEnum = z.infer<typeof FishEnum>;

// to use it
const someFish = FishEnum.parse("Salmon");
// to validate
const VALUES = ["Salmon", "Tuna", "Trout"] as const;
const FishEnum = z.enum(VALUES);
const FishEnum = z.enum(["Salmon", "Tuna", "Trout"]);
type FishEnum = z.infer<typeof FishEnum>;

// to use it
const someFish = FishEnum.parse("Salmon");
// to validate
const VALUES = ["Salmon", "Tuna", "Trout"] as const;
const FishEnum = z.enum(VALUES);
But it is also possible to use native enums :
export enum Countries {
Maroc = "Maroc",
Tunisie = "Tunisie",
Egypte = "Egypte",
}

// to use it
const someCountry = Countries.Maroc;
// to validate
const country = z.nativeEnum(Countries);
export enum Countries {
Maroc = "Maroc",
Tunisie = "Tunisie",
Egypte = "Egypte",
}

// to use it
const someCountry = Countries.Maroc;
// to validate
const country = z.nativeEnum(Countries);
Using native enums seems more easy so, why would I use zod enums ? Have I missed something ?
6 replies
DIAdiscord.js - Imagine a bot
Created by M4LIO on 10/30/2023 in #djs-questions
node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */)
Hey! i have an :
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<_Collection>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<_Collection>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
This is my code, if u can help me !
5 replies
VVALORANT
Created by Protoblitz on 2/4/2024 in #community-help
Cannot go into user settings (website)
I get the "Sorry, the login servers are temporarily unavailable. Please try again later. Check the service status page for more information." Is this happening to everyone else?
12 replies
PMPUBG MOBILE
Created by Deepblue on 2/2/2024 in #questions
Login failed. Please try again. (211, -541)j
Hello, i am getting this error while trying to login with phone number. Login failed. Please try again. (211, -541) I've tried to login on different devices getting same error. I've changed pw aswell but still same problem. Any idea? Thanks.
2 replies
CC#
Created by hunterlan on 12/6/2023 in #help
No authenticationScheme was specified, and there was no DefaultChallengeScheme found.
Hello, there! I added JWT Authentication to my ASP.NET Core Web API project by this code snipper:
builder.Services.AddAuthentication(a =>
{
a.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
a.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
a.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
})
.AddJwtBearer("jwt", o =>
{
o.TokenValidationParameters = new TokenValidationParameters()
{
ValidIssuer = config["Jwt:Issuer"],
ValidAudience = config["Jwt:Audience"],
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(config["Jwt:Key"]!)),
ValidateIssuer = true,
ValidateAudience = true,
ValidateLifetime = true,
ValidateIssuerSigningKey = true
};
});
builder.Services.AddAuthentication(a =>
{
a.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
a.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
a.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
})
.AddJwtBearer("jwt", o =>
{
o.TokenValidationParameters = new TokenValidationParameters()
{
ValidIssuer = config["Jwt:Issuer"],
ValidAudience = config["Jwt:Audience"],
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(config["Jwt:Key"]!)),
ValidateIssuer = true,
ValidateAudience = true,
ValidateLifetime = true,
ValidateIssuerSigningKey = true
};
});
Then, when I'm requesting any endpoint that requires authorization, asp.net core throws an exception:
System.InvalidOperationException: No authenticationScheme was specified, and there was no DefaultChallengeScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions).
at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.<>c__DisplayClass0_0.<<HandleAsync>g__Handle|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
System.InvalidOperationException: No authenticationScheme was specified, and there was no DefaultChallengeScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions).
at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.<>c__DisplayClass0_0.<<HandleAsync>g__Handle|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
What am I doing wrong?
4 replies