#development

1 messages · Page 6 of 1

copper ravine
#

Ah right on

bitter edge
#

Just decided to go without the 3d model

copper ravine
#

You still need the matched pairs between the controller and the usb connectors

rancid nimbus
#

So, your pairs of wires look like they need to be closer together. Also the wire length's need to be matched. I think both might have been said already. (Not ee just a speculation based upon looking at other high bitrate devices.

bitter edge
#

I'm like 1/20 finished with the actual thing

copper ravine
bitter edge
copper ravine
bitter edge
copper ravine
bitter edge
copper ravine
#

Electronics is a bunch of hard work to get it right :)

bitter edge
#

This seems like work

copper ravine
#

Yup it sure is. And that is a small schematic with a pretty straight forward design. The client I have right now has about 20 pages of fairly complex schematics for their product

nocturne galleon
#

the schematics are the easy part ime lol

#

routing shit takes ages

bitter edge
#

When I first tried doing this I skipped schematics

#

Which was a pain in the ass because it didn't show me which pins were which pins

#

So now I use schematics

copper ravine
#

UPS for data centers

bitter edge
bitter edge
#

Still not done and still need charging and the switches

#

@copper ravine also do you know what FB is it says uh "220 @ 100MHZ"

copper ravine
#

Which pin?

#

That's a really small screenshot

bitter edge
bitter edge
copper ravine
#

oooh

#

FB -> Ferrite Bead

#

And the specs for the ferrite have to be 220H @ 100MHz

bitter edge
#

And what's the board Pv thing

copper ravine
#

your 1.1V power supply for the controller ship

#

The data sheet assumes the user knows how to design one

bitter edge
copper ravine
#

That isn't the power supply.. that's the filtering needed to interface to the power supply you need to design/provide

bitter edge
copper ravine
#

That's an entire field of electronics by itself. I would look online for examples and figure out from there.

bitter edge
bitter edge
#

Pin*

copper ravine
#

no idea, what does the datasheet say?

bitter edge
#

I am not good at finding things in the dat sheet

copper ravine
#

It is referenced in the VBUS power switch schematic on page 28

gilded moon
#

So I’m trying to build a program on Windows 10, it provides a vcxproj file, and I have the build tools for Visual Studio 2022 installed, but it keeps failing saying some .cpp file is missing, do I need the whole of Visual Studio installed? I’d like to keep it to just the build tools if I can

#

I have the Visual C++ redistributable 2015-2022 installed for both x86 and 64

bitter edge
copper ravine
#

kinda. That is the VBUS from the power switch chip. If the power switch detects a higher than 2A (or whatever you set it for) load, it will disconnect the VBUS to that port.

gilded moon
silk eagle
#

probably a "visual c++ redist" google search

bitter edge
#

bruh decreasing it can't make up its mind

#

slowly getting there

supple hull
#

Well i just played with real world coding stuff with OpenAI and tried to see how close I could get it to do a few things like filter an array of objects by year in JS, it got close but couldn't figure it out the year part and was stuck on ranges. Impressive though. It does a good job at taking jQuery to ES6.

#

The most impressive stuff it does is mock up dummy data

peak acorn
#

That's cool lmao

supple hull
peak acorn
#

I've heard copilot is amazing at generating and describing regex strings

supple hull
#

Here's me asking it to create a regex for a common pattern for like a password

peak acorn
#

Wow is this the correct formula?

supple hull
#

You can use the regex generators to do this already but its so damn fast

supple hull
peak acorn
#

lmfaooo

supple hull
#

not a game developer

peak acorn
#

really cool

supple hull
#

I've found edges with it but if you give it a script want to convert it, it can assist porting. I was messing around and it seemed to take a node script and make it into PHP. didn't run it to test

#

However, like you ask it to create a stateful functional React component that make a color palette picker, it'll just make a component that has a hex value, and be pretty happy with itself. Impressive as it does create a component that has a color but color picker it is not.

peak acorn
#

It's definitely very happy with whatever it generates lol

supple hull
#

It should end every output with 💯

peak acorn
#

im gonna try to use it to generate my networked python homework assignment later lmao

supple hull
#

Ha

peak acorn
#

See what it's like to use it as a tool to generate specific functions

supple hull
#

I've taken example callback hell and it seems to fix it

peak acorn
rancid nimbus
#

It doesn't work like that.

peak acorn
#

I know, thats what it thinks though

rancid nimbus
#

It is confidently wrong.

peak acorn
#

Is the multiplication incorrect?

#

or the overall rotation formula i mean

rancid nimbus
#

I am curious too.

storm berry
peak acorn
#

wdym

#

abcd would be components of a 4d vector

#

and then uvwx is the components of the axis vector

storm berry
peak acorn
#

oh yeah that part is wrong for sure

storm berry
peak acorn
#

yea but it would take like 4 seconds to fix

#

obviously if the actually algorithm there is wrong then its completely useless, but if its right that would actually be useful lol

#

U just change it into some structs or smth and boom ur done

#

(not actually done since 99% its more performant to use a library or simd instructions but bla bla bla)

ornate summit
#

Does anyone happen to know if you can use the GL_NV_gpu_multicast extension on Quadros?

bitter edge
#

someone give me a challenge to do in js

humble mirage
#

advent of code 2022 is currently happening if you're into that

hollow basalt
#

yes

humble mirage
#

it's an advent calendar of programming puzzles

bitter edge
bitter edge
humble mirage
bitter edge
humble mirage
#

you click on the row with the 1 after it

bitter edge
#

/* The first Elf is carrying food with 1000, 2000, and 3000 Calories, a total of 6000 Calories. /
var food = [1000, 2000, 3000];
/
The second Elf is carrying one food item with 4000 Calories. /
food.push(4000);
/
The third Elf is carrying food with 5000 and 6000 Calories, a total of 11000 Calories. /
food.push(5000);
food.push(6000);
/
The fourth Elf is carrying food with 7000, 8000, and 9000 Calories, a total of 24000 Calories. /
food.push(7000);
food.push(8000);
food.push(9000);
/
The fifth Elf is carrying one food item with 10000 Calories. /
food.push(10000);
/
In case the Elves get hungry and need extra snacks, they need to know which Elf to ask: they'd like to know how many Calories are being carried by the Elf carrying the most Calories. In the example above, this is 24000 (carried by the fourth Elf). /
var max = 0;
for (var i = 0; i < food.length; i++) {
if (food[i] > max) {
max = food[i];
}
}
/
Find the Elf carrying the most Calories. How many total Calories is that Elf carrying? */
console.log(max);

#

In conclusion open ai isn't very smart at this

peak acorn
#

Lol

bitter edge
#

Bruh it can track my mouse

#

But when I tell it to create a spinning donut it loses its shit

#

I got it to create a Pokedex ; -;

#

I got it to make FNAF lore 💀

wispy knot
#

look at pictures in the terminal, cross platform

storm berry
bitter edge
bitter edge
wispy knot
wispy knot
bitter edge
wispy knot
bitter edge
#

bruh it stopped at Pidgeotto

cursive root
wispy knot
cursive root
# bitter edge but what is it ;- ;

each of those rectangles is the character ▮or one just like that painted with different colors. I guess you'd just open an image, subdivide the image in whatever amount of characters fit on the screen, get the main color in that section and get to printing

cursive root
wispy knot
cursive root
#

🤣 very nice! [Epilepsy warning alert]

#

I tried to do it with just an image using ChatGPT without thinking too much about it and well, it didn't work, but after replacing a few things (using ChatGPT to do it) it..... well, it also didn't work

#

but it came close!!

cursive root
#

oh, now that I look again there were just a couple of stupid errors; a few generated by the AI a few generated by me

#

good enough for a couple of prompts and a couple of fixes

wispy knot
#

ye

bitter edge
#

Small steps :))

storm berry
#

I made a cli based image viewer that you can zoom with

wanton orbit
#

So where can I share my platform hehe

hollow basalt
#

#platforms

twilit beacon
#

#platform

#

turns out there is nonecool_2

bitter edge
peak acorn
#

Platform is a buzzword for a service for almost anything that people use

silk eagle
peak acorn
#

Lol

bitter edge
#

well now we wait

#

damn it broke

cursive root
#

🤣🤣🤣 nice one

#

just tried it differently, asking it for an HTML page that does that instead, and succeeded

bitter edge
#

bc i want it to create a button that just creates more buttons

#

and have those buttons create even more buttons

#

and then have those buttons to create more buttons and so on

#

this works but u gotta press it for every button

peak acorn
#

if ur task aint 'embarassingly parallelizable' dont parallelize it 😎

nocturne galleon
#

i sure do love when github actions gives a different gradle build output than my local build >.<

#

updating gradle seems to have fixed it somehow?

peak acorn
#

gradle is a cursed technology

#

all java build chains are really

nocturne galleon
#

i- i feel like this is an actions issue now, i just removed a debug print i forgot to from a while ago, and it's clearly not there anymore, but the actions binary has it

#

i'm not even caching anything wtf

cursive root
bitter edge
#

@copper ravine what do you think about this routing

copper ravine
#

Clean; did you calculate the trace width and spacing for the data lines?

bitter edge
#

I just looked at this and tried to space it out as much as I can

copper ravine
#

Then the upstream routing likely needs to be fixed

bitter edge
#

it just said it needed to be 5x further

#

wait I'm dumb and I read that wring

#

wrong*

#

wait or did I

copper ravine
#

They are "impedance matched": this means there is a electrical relation between those two data lines (they are each a differential pair)

#

Yeah, the distance between pairs is to eliminate crosstalk between pairs

bitter edge
copper ravine
#

See, part of the impedance matching is to have the ground plane pulled away from the pair traces.

#

Also the thickness of the PCB and whether there is ground plane or other signals running under those pairs matters

bitter edge
#

like 1.2 or 1.4

copper ravine
#

usually 1.6mm

bitter edge
#

alr

copper ravine
#

I think

bitter edge
copper ravine
#

But also, that doesn't matter; whatever the thickness is, you have to adjust the traces

bitter edge
#

what's wrong with them

copper ravine
#

Look up how to calculate and impedance matched trace pair

#

the space between the two traces of each pair has to be a certain distance, the space between the ground plane and the trace pairs has to be a specific distance and the width the traces have to take the thickness of the PCB and what's under them into account.

#

Or just forget about USB 3.0 speeds and it will work fine running at USB 2.0 speeds

bitter edge
#

this is getting difficult

#

and I still haven't found out how to make that power supply

copper ravine
#

Doing a layout for a USB 3.0 device is not "trivial"

#

Although it would be something that I would expect an EE grad to be able to do

bitter edge
#

it is when you're very stupid

copper ravine
#

I said it "is not trivial", i.e. it is moderately difficult

bitter edge
#

there goes my stupidity

#

do you have a schematic of where the 1.1 3.3 and 5v volt rails come from

#

bc idk what I'm looking for exactly

copper ravine
#

I'd have to look later; I'm in the middle of getting my kids ready for bed

bitter edge
#

I have a feeling it has smth to do with this thing

rancid nimbus
#

I was listening to the "amp hour" podcast and one of the two of them mentioned that for non theory and real-world PCB design hobbyists can do PCB design ok and just out of college grads have a tendency to struggle. I think it had something to do with college classes not requiring much if any PCB design.

rancid nimbus
#

For 5v that logo is an option.

bitter edge
#

like this wouldn't be an example of hooking smth up to a 5v rail

rancid nimbus
#

Yes that looks correct. Looking a bit more zoomed out would be helpful.

#

Are you going to use USB c for the side that connects to the computer?

bitter edge
bitter edge
#

how tf does it have 5v where is the source

midnight wind
#

wdym?

#

where does 5v come from?

#

you have a 5v rail

rancid nimbus
#

A voltage regulator is a system designed to automatically maintain a constant voltage. A voltage regulator may use a simple feed-forward design or may include negative feedback. It may use an electromechanical mechanism, or electronic components. Depending on the design, it may be used to regulate one or more AC or DC voltages.
Electronic voltag...

#

A voltage regulator needs to be connected to a source. If you are not doing type c vbus could be hooked up to vcc and vss on the USB connector connecting to the computer.

bitter edge
#

so ALL I HAVE TO DO IS PLACE DOWN A THIS

#

a +5 and use a regulator

rancid nimbus
#

For the 3v3 and 1v1 you will want a voltage regulator. You will have to find one that takes in 5v and provides the 3v3 and 1v1 output.

bitter edge
#

how do I know which regulator to use

bitter edge
midnight wind
rancid nimbus
rancid nimbus
#

Your USB chip will presumably draw current on the 3v3 rail. You will want your voltage regulator to handle more than the USB chip needs.

bitter edge
rancid nimbus
#

You will have to read to determine if you want the high or low to get it to give an output. There will be some documentation on what voltage level that needs to hook up to.

peak acorn
#

on circuits the 5v labels are just abstractions for the source

bitter edge
peak acorn
#

The answer is you're supposed to hook up the pin to 5v

#

whatever way you do that is up to after you finish the schematic

rancid nimbus
# bitter edge but what about Chip Enable

Chip enable could be hooked up to a switch so you can enable and disable the output. The datasheet will tell you if it is active high or active low and the voltage tolerances. You will probably just hook that to 5v. Read the documentation to double check.

rancid nimbus
bitter edge
bitter edge
rancid nimbus
#

Yes

bitter edge
#

ik that 5v has to be connected to smth

#

can't just pull 5v from the air

#

here's the connector usb

rancid nimbus
# bitter edge what now

The output presumably goes to 3V3 goes to your USB chip if I understood correctly. Vbus and 5V need to be connected. An EE could state best practices.

bitter edge
#

like this and this

rancid nimbus
bitter edge
rancid nimbus
#

your regulator takes in 5V right?

#

No, I just have built a board or two.

bitter edge
#

and outputs 3.3

bitter edge
rancid nimbus
#

I have previously built a board to represent an enigma machine and an electronic version of board game I play with friends.

peak acorn
#

o_O

bitter edge
#

why does usb 3.0 have to be difficult 😢

peak acorn
#

high speed communication complicated bestie

#

enigma machine emulating 1940s tech haha

bitter edge
#

this was all I had to do

#

for a usb 2.0 hub ;- ;

peak acorn
#

yuuup

bitter edge
#

then there's this fuckery

peak acorn
#

Whole lot of pins

bitter edge
#

16 to 65 ;- ;

rancid nimbus
bitter edge
#

somehow I figured out how to make a usb 2.0 hub

#

and I have no fucking clue how to make a usb led

rancid nimbus
#

USB led?

bitter edge
#

yeah

#

like lets say I wanted to add a led to the front of the usb

#

i have no fucking clue how I would add it

rancid nimbus
#

Add an LED and a resistor.

bitter edge
#

to what...

rancid nimbus
#

You have a resistor hooked up to vcc and the arrow side of the led schematic logo. The flat line is hooked to gnd.

bitter edge
#

seems like complication

bitter edge
#

bc now I gotta create the 1.1v ;- ;

rancid nimbus
#

I think the resistor should be about 100 ohm (a rating).

bitter edge
#

most schematics tell me the resistance I need well the good ones atleast

rancid nimbus
bitter edge
#

I'm trying to convert 5v to 3v3

rancid nimbus
#

As far as I know that should be it.

#

1v1 should be reasonably similar.

bitter edge
#

like this connects to VOUT

rancid nimbus
#

Vout goes to 3v3 yes.

bitter edge
#

alr

bitter edge
#

it wants everything with gnd to be connected

rancid nimbus
#

I usually manually route the traces.

bitter edge
#

imma just ignore it

#

if it wants to be connected to gnd it can

#

time to design the most fucked up fuckery

rancid nimbus
#

Also, I would label the 3v3 net.

#

I just finished a board layout and will be reviewing it tomorrow and then order it. I will probably do a green PCB since that comes slightly faster. The board is for testing a new part layout on a much smaller board and testing the software to check if I need to alter the hardware any. On paper it looks like everything will just work.

rancid nimbus
#

Keyboard.

#

I am prototyping the tightness on the keys and the pad layout. I think it should work, but last time I messed up the scale trying to follow the data sheet.

#

Different part.

bitter edge
#

Finished the upstream port 🎉
now time to do the fucking rest

rancid nimbus
rancid nimbus
#

Why?

bitter edge
#

idk it's in the schematic tho

rancid nimbus
#

What does that do?

bitter edge
#

idk

#

it's all gnd it's hooked up from the usb gnd to the board gnd

#

also easyeda doesn't have this fucking symbol

rancid nimbus
#

Gnd does not connect directly to the shield. Remove the dot to the upper left of C3.

#

Like the second schematic.

bitter edge
#

this is shield

rancid nimbus
#

No the other one.

bitter edge
#

oh wait does it connect to the C3

rancid nimbus
#

The four way.

#

That's my point.

bitter edge
#

so the wire goes straight ti the capacitator instead of the line

#

it's still there

rancid nimbus
#

The two lines cross and not connect.

#

Delete the other part of that line and re-draw it to cross without the dot. Maybe you could select the red dot.

bitter edge
rancid nimbus
#

There you go. Now you can fix the PCB.

bitter edge
#

what's wrong with it...

#

bruh nvm I remember

#

it was all gnd which it shouldn't be

bitter edge
rancid nimbus
#

You could maybe make it look better.

bitter edge
#

but then I might break smth because I use auto router

#

I think I should finish everything first then touch up the nets later

#

now to design power :))

#

after I create the 1.1v rail

bitter edge
#

because most boards I've seen have components on both sides

rancid nimbus
#

I have not had a board that was populated that much before. My keyboard (macro pad currently) layout has almost everything on one side.

#

I might have to share a picture of it.

bitter edge
bitter edge
#

actually probably more

bitter edge
#

When should I place vias fir uh via stitching

rancid nimbus
woeful rapids
#

wanted to make a custom M.2 card but in order to get the docs for the specification you need to give them your dna sample

#

my tempmail is surely gonna get approved

#

i just need to know about the UART bus on the M.2 key E interface

rancid nimbus
#

M.2 had some public documentation somewhere. That sounds like an interesting project.

woeful rapids
#

yup found it

#

wikipedia reference number 19 on the M.2 page

woeful rapids
#

since the ax200 uses PCIe for Wi-Fi and USB for BT, the UART bus is unconnected and i can use it for my own stuff

#

the key E interface is super fun because it has PCIe (but thats out of my league), but also easy stuff, like SDIO (SD card), UART, I2C, I2S and USB (and other stuff too)

#

as long as your board is well manufactured and designed, it should be super cool

#

and also like it can be embedded inside a laptop or something, which is insane for portability

copper ravine
# bitter edge When should I place vias fir uh via stitching

It is unlikely you will need via stitching (used to reduce the capacitance and inductance between layers in a pcb). Bu you will likely want to have at least a ground plane on the other side and yeah you should have a few vias connecting the ground planes on both top and bottom layers together. You need to think about ground loops (and maybe current paths but likely not as much)

woeful rapids
#

i have never tried making an USB hub

#

too hard for me, it involves logic

#

UART is very simple and i don't need to touch anything, just wire it all up

#

definitely do check out the M.2 key E interface, it's really cool and you can make all kinds of neat devices

#

i just wanted GPS on my laptop because it's stupid why phones have good GPS and laptops don't

woeful rapids
#

i might have a thickness problem

bitter edge
#

All the sites I've tried using only show 1+ tolerance and won't go higher

woeful rapids
#

the GPS module is 13.3mm thick and the PCB is 0.8mm as mandated by the M.2 spec, so 21.3mm, which is not small

woeful rapids
#

yeah i dont wanna mess with RF signals

copper ravine
woeful rapids
copper ravine
#

@woeful rapids how are you going to route the antenna out of the laptop?

woeful rapids
#

oh shit

#

oh oh shit the laptop is alluminum

copper ravine
#

yeah

woeful rapids
#

uhh yeah i need an external antenna for sure

copper ravine
#

it also needs a line of sight to the sky, so no windows = no worky well

bitter edge
woeful rapids
#

afaik my thinkpad had gps configuration option

#

it is plastic tho

hollow basalt
#

👍

woeful rapids
#

hmm well my plans went to shit

copper ravine
#

Sorry :/

bitter edge
#

I have an idea of what I want to do now

#

Make a pcie card with integrated wifi+Bluetooth

woeful rapids
#

Wi-Fi antennas are usually routed through the display assembly

woeful rapids
bitter edge
#

If it's any harder than that imma give up

woeful rapids
#

anything involving RF is inherently jankier

bitter edge
woeful rapids
#

radio frequency

bitter edge
midnight wind
#

?

bitter edge
midnight wind
midnight wind
bitter edge
midnight wind
#

that's not that hard

#

it's mostly a matter of reading specs and designing to make it match specs

bitter edge
midnight wind
#

ah, that's not even that bad

bitter edge
#

It is

midnight wind
#

it's really not...

bitter edge
#

It is

midnight wind
#

it's like some of the more basic projects

#

anyway if you are new to electronics, look at ben eater's videos

bitter edge
#

No that's USB 2 USB 3 is a nightmare

woeful rapids
bitter edge
#

I have a nice looking USB 2.0 hub but the 3.0 makes it 500x harder

midnight wind
#

oh 3.0, for some reason I thought SS was 2.0

bitter edge
#

USB 2 is so simple

midnight wind
#

but yeah wifi will defiantly be harder

bitter edge
bitter edge
bitter edge
#

Making some progress

woeful rapids
#

usb hub with the max number of ports

#

127 ports

#

ill make an M.2 key E breakout board to test around

bitter edge
woeful rapids
#

usb

#

any revision

bitter edge
woeful rapids
#

none but you can plug a hub in another hub

#

and also it should be possible to make a chip like that

bitter edge
#

It just has to be BIG

#

And need a lot of external power

woeful rapids
#

a sata power cable should do it

bitter edge
#

Also I am gonna declare myself 3/5ths finished

woeful rapids
#

super nice

bitter edge
#

Probably gonna edit the board design to look like a normal USB hub

#

Instead of the square one

bitter edge
#

@copper ravine if I used a USB c make to USB female connectors would I need resistors in between the

copper ravine
bitter edge
#

Would I just wire it up or does it need any resistors

copper ravine
#

So and upstream port hard-wired to a downstream port? Yes, it would still need the resistors on the appropriate lines.

bitter edge
#

Why can't I just use a USB a

copper ravine
#

For upstream? You need to use the correct connector for upstream connections. SO for USB-C it is the same, for USBA/B, you need to use USB-B for upstream, USB-A for downstream. It's part of the USB physical/electrical layer spec

bitter edge
copper ravine
#

that's ok; USB-C can be both up and down stream as per the spec

bitter edge
#

Oh but it can't be USB a and a

copper ravine
#

Correct

bitter edge
copper ravine
#

Can you link one? I've not seen any that are USB A upstream

copper ravine
#

Yes

copper ravine
#

no no, that's not the same thing

#

there is no upstream "connector"... there is a cable which yes, has a USB-A connector on it

#

We are talking about connectors in devices, not plugs on cables

#

This is a fundamental part of the USB spec, you really should be familiar with it.

#

I guess you could design the upstream connection to be a cable with a USB-A plug on it, but again, that doesn't make it any easier (it's actually more difficult to properly attach a cable to PCB such that the connection doesn't get destroyed over time due to stress and movement)

bitter edge
#

sigh
still not done

peak acorn
#

gonna build some once u design it?

bitter edge
past owl
bitter edge
past owl
#

nope I just joined the server :)

bitter edge
past owl
#

Why are you making a usb hub

bitter edge
past owl
#

why

bitter edge
past owl
#

I can’t read smh

bitter edge
#

I am also shaking ur head

#

next time I will blow it up

peak acorn
bitter edge
#

because I'm stupid and I need to do things step by step

#

and I need the instructions right in-front of my face

rancid nimbus
#

@bitter edge ^^^

bitter edge
rancid nimbus
#

Yea that is, but I also only wanted to implement something easy and check that the switches fit the way I expect them to fit.

#

I will eventually build an rp2040 board.

bitter edge
bitter edge
#

bruh wtf 647 pages of dics

#

docs*

rancid nimbus
#

The soldering for the board above will be interesting.

#

It is going to be a keyboard. I am planning to make a 1800 layout keyboard.

#

Probably a compact 1800

#

Maybe i might a 40% for a friend.

bitter edge
#

with cherry red switches

rancid nimbus
#

A 9 key keyboard?

bitter edge
#

like a numpad

#

except it isn't a numpad and it's programable

#

D e s i g n i n g

rancid nimbus
bitter edge
#

it has like 54 pins and my ti chip has 65 with less docs

#

can auto route handle it I bet not

#

i was right it cannot handle it

rancid nimbus
#

Just route the path yourself.

bitter edge
#

there's to many components to do that

#

i'm just gonna move them around till auto router finds a way

midnight wind
#

It's honestly not that bad

bitter edge
rancid nimbus
#

I placed all those traces on my PCB without an auto router.

bitter edge
#

I have a nightmare if things connecting to things

rancid nimbus
#

Look at the pine phone PCB layout. That probably was done without an auto router.

rancid nimbus
#

That is probably 4 layer...

#

I think that might be via stitching on the edge or gold edges...

#

And I don't see the cell modem, so there is a whole other side.

bitter edge
#

how tf do led strips work is it one giant bendable pcb

storm berry
bitter edge
#

@copper ravine Does this look good so far

#

the only thing I haven't add is the 1.1v thing, the clock, a few resistors for R1, and this thing

copper ravine
bitter edge
rancid nimbus
#

Ah no 1v1.

simple hound
bitter edge
simple hound
#

*what software are you using then?

bitter edge
#

what are u making

rancid nimbus
#

For board design I use KiCAD.

#

You can find easier software or more advanced software.

#

There is easyeda if you want an online webpage board layout and schematic software.

bitter edge
rancid nimbus
#

They probably allow you to make your own logo for a custom net.

bitter edge
simple bolt
#

I’m trying to learn front end web development any book recommendations for learning or other resources

bitter edge
#

or would I still have to automatically route it

storm berry
bitter edge
#

idk that's why I'm asking bruh

rancid nimbus
#

Yes

storm berry
#

you will still need a wire going from one to the other

bitter edge
#

damn

rancid nimbus
#

Not necessarily a wire in the schematic, but maybe.

bitter edge
#

back to this

storm berry
bitter edge
bitter edge
#

@copper ravine Should everything that's connected to gnd be routed together

bitter edge
storm berry
#

usually you'd use a ground plane for that

#

like a copper fill that covers the whole board and is attached to gnd

bitter edge
storm berry
#

it's an island

bitter edge
#

but I can assure u everything has gnd

storm berry
#

like the triangle/pentagon shape to the bottom left of the ic

#

that's an island that isn't connected to the other gnd fill which is why those two smd components still want to be connected

bitter edge
storm berry
#

ye

#

or just have a trace from the bottom that connects to the other island

bitter edge
#

bruh it didn't fill

storm berry
#

idk what the best choice is here

storm berry
bitter edge
rancid nimbus
#

Add vias to pass the gnd to the bottom layer and back up on the other side.

bitter edge
rancid nimbus
#

I work at the department of redundancy department. Yes that is how a via works.

bitter edge
storm berry
bitter edge
#

what I have : vs : what I need

storm berry
bitter edge
rancid nimbus
#

What does gnd_drain connect to?

copper ravine
#

@storm berry sounds like you've done this before ;) @bitter edge And yes you need to make sure all ground nets are connected during the PCB routing process. You can get "islands" or areas that are supposed to be connected but get disconnected by other traces during the routing process. It is not uncommon. This is why you need the schematic; it allows the PCB checker to verify that all traces are properly routed and all signals are connected properly.

bitter edge
bitter edge
copper ravine
#

Also you need to tell it about all the design constraints, like impedance controlled signals, trace spacing, etc etc.

copper ravine
#

sure

bitter edge
bitter edge
nocturne galleon
#

honestly id just use a regular gnd for everything
no real reason to have them seperate

bitter edge
nocturne galleon
#

ground is ground

#

your device is usb connected lol it's going to be the same ground at the end of the day and that's one less net

bitter edge
nocturne galleon
#

in 99% of cases it is

rancid nimbus
#

How long should it take gdb to launch?

bitter edge
midnight wind
rancid nimbus
#

It has been more than 32 minutes on a 24 mhz processor.

bitter edge
#

does anyone know the pinout of the Molex 47053-1000

rancid nimbus
#

The fan one or some power related one?

#

That is what I found from Google.

bitter edge
#

so Ig I'll only need the 1 and 2 pins

bitter edge
rancid nimbus
#

Well, that connector should be 12v so you would need a boost converter to get there and USB might not supply what you want in terms of amperage. If you go USB type c and connect it to a device capable of it you could get 12 v out.

bitter edge
rancid nimbus
#

And something to control the pwm of a fan header. Maybe something to read the sense line.

bitter edge
rancid nimbus
#

So no speed then?

bitter edge
#

Because I use a usb to cable to fan and it still worked ;- ;

rancid nimbus
bitter edge
rancid nimbus
#

Again you have to do something with the on/off pin. If you don't pull it up or down and did not read the data sheet it will do the opposite of what you want.

rancid nimbus
bitter edge
#

for me it seems like it wants to go into Vin

rancid nimbus
#

Step-Down Switching Voltage Regulators

#

Look at the recommended vin for the 12 v variant.

#

It stated 15 < vin < 40

bitter edge
rancid nimbus
#

Page 11 has a sample schematic.

#

Also that voltage range is for the series of chips.

#

Sorry the typical application is page 13.

#

It is labeled step down. You want step up.

rancid nimbus
#

You have 5v and want 12v

#

You could also just use USB type C and have a voltage negotiation chip that requests 12v.

#

Also you could just under volt the fan and hope nothing bad happens. The worst I can think about now is an early death of the fan.

bitter edge
#

imma just do smth easier

#

I don't think I can fuck this up

bitter edge
#

@rancid nimbus for the uh C_0402 do I just not place anything there

bitter edge
rancid nimbus
#

If it says leave it alone then leave it alone.

bitter edge
#

it says nothing other than to not mount the capacitator

rancid nimbus
#

Have it on PCB and just to not put it on there unless you need to.

peak acorn
#

Determine whether or not two quadtrees with arbitrary root and edge order are identical or not?

rancid nimbus
#

Are they the same pointer?

#

More realistically you want the same constance. Just unravel both and check every index.

peak acorn
#

No

#

So my problem has changed to something much easier

#

The edge order will be the same, but the thing is that the nodes are not named, or equivalent in memory pointer or anything like that

#

two separate data structures where the only thing that matters is the number of connections basically

#

So anyways I don't need to solve that overly complicated issue

bitter edge
#

@copper ravine how would I make a audio jack to usb

copper ravine
#

oie, that's much more complicated. You need to create a USB Audio device, which requires understanding how to either use a chip designed for that purpose (I don't know of any) or using a microcontroller with a DAC and an audio amplifier.

rancid nimbus
bitter edge
bitter edge
#

oh wow ti has a thing for everything

rancid nimbus
#

Maybe a pointer...

peak acorn
#

point

bitter edge
#

but it's supposed to be a small thing not a big thing with 10s if resistors and caps

bitter edge
rancid nimbus
#

A CD has 1.4 Mbps and USB 1.1 has 12Mbps.

#

You don't need USB 2.0 or 3.0 unless you are going for super high bitrate audio in which case you would spend lots of time on the audio amplification and power cleaning.

bitter edge
bitter edge
rancid nimbus
#

USB is backwards compatible.

bitter edge
ornate summit
#

I'm wondering if anyone here knows much about QT?

I want to make a tree that shows a list of roots that may or may not have children.

#
java.lang.NullPointerException: Cannot invoke "io.qt.core.QModelIndex.child(int, int)" because "parent" is null

I am clearly doing something very wrong here.

lament bridge
#

Anyone here made an VSCode extension before?

How such a popup can be made?

#

basically it shows the syntax and some notes

supple hull
#

I think our contractor thinks I'm bicycle helment. I did a quick fix on a project and I didn't push it to bit bucket as I was in a rush, so it went to the end point he noticed then explained to me where to push to. MOTHERFUCKER I SET UP THE BIT BUCKET REPO AND GAVE YOU ACCESS.

vestal spire
#

I'm trying to deploy a python Flask project to vercel and I'm getting this error. Any help?

bitter edge
old nimbus
#

Anyone here wanna help a college student out with some really simple Javascript? 😆

hollow basalt
#

No

old nimbus
#

fair enough

#

would be grateful to anyone else though

nocturne galleon
#

Just ask whatever you want to ask and someone may answer :3

old nimbus
#

Trying to create pong for a class using jquery and I have made the ball bounce, the sliders and have got everything nearly working but can't seem to get the ball to interact with the sliders at all

young elbow
# old nimbus Trying to create pong for a class using jquery and I have made the ball bounce, ...

hmm I don't see the collisionDetection function in it or anything related to collision, is it an old version of your code?
A couple of advices:

  1. Too much comments is like not enough. Don't point the obvious, example:
    line 86 ->
      // Move the player according to its velocity in the two dimensions:
      playerX += playerVelocityX;
      playerY += playerVelocityY;

This does not add anything that the code doesn't already say with your variables names

  1. When you seek help, before sending code, fix your indentation.
    Indentation is very important for a reader so we can visually understand where we are in the code.

  2. Try as much as possible to be explicit with your variables' names (aka don't use abbreviations).
    I know that math makes us use single letter variables but when we code, writing height instead of h doesn't cost anything and makes it easier to read.
    Readability > speed of writing.

If you want more feedback or you have an up to date version, you can send it to me in private message. 😛

bitter edge
twilit beacon
#

this would be something```js
// Set up the canvas and its context
const canvas = document.getElementById('canvas');
const context = canvas.getContext('2d');

// Set up the ball properties
let ballX = canvas.width / 2;
let ballY = canvas.height / 2;
let ballVelocityX = 5;
let ballVelocityY = 5;
let ballRadius = 10;

// Set up the player paddles
const paddleWidth = 10;
const paddleHeight = 100;
const player1PaddleX = 0;
const player2PaddleX = canvas.width - paddleWidth;
let player1PaddleY = canvas.height / 2 - paddleHeight / 2;
let player2PaddleY = canvas.height / 2 - paddleHeight / 2;

// Set up the keyboard input handlers
const keyDownHandler = (event) => {
if (event.key === 'w') {
player1PaddleY -= 5;
} else if (event.key === 's') {
player1PaddleY += 5;
} else if (event.key === 'ArrowUp') {
player2PaddleY -= 5;
} else if (event.key === 'ArrowDown') {
player2PaddleY += 5;
}
};

document.addEventListener('keydown', keyDownHandler);

// Set up the game loop
const gameLoop = () => {
// Clear the canvas
context.clearRect(0, 0, canvas.width, canvas.height);

// Draw the ball
context.beginPath();
context.arc(ballX, ballY, ballRadius, 0, Math.PI * 2);
context.fillStyle = 'black';
context.fill();
context.closePath();

// Draw the player paddles
context.fillStyle = 'black';
context.fillRect(player1PaddleX, player1PaddleY, paddleWidth, paddleHeight);
context.fillRect(player2PaddleX, player2PaddleY, paddleWidth, paddleHeight);

// Move the ball
ballX += ballVelocityX;
ballY += ballVelocityY;

// Check for ball collisions with the paddles or walls
if (ballX + ballVelocityX > canvas.width - ballRadius || ballX + ballVelocityX < ballRadius) {
ballVelocityX = -ballVelocityX;
}
if (ballY + ballVelocityY > canvas.height - ballRadius || ballY + ballVelocityY < ballRadius) {
ballVelocityY = -ballVelocityY;
}

// Check for ball collisions with the paddles
if (ballX + ballVelocityX > player2PaddleX && ballX + ballVelocityX < player2PaddleX + paddleWidth && ballY + ballVelocityY > player2PaddleY && ballY + ballVelocityY < player2PaddleY + paddleHeight) {
ballVelocityX = -ballVelocityX;
}
if (ballX + ballVelocityX < player1PaddleX + paddleWidth && ballX + ballVelocityX > player1P
// Check for ball collisions with the paddles
if (ballX + ballVelocityX > player2PaddleX && ballX + ballVelocityX < player2PaddleX + paddleWidth && ballY + ballVelocityY > player2PaddleY && ballY + ballVelocityY < player2PaddleY + paddleHeight) {
ballVelocityX = -ballVelocityX;
}
if (ballX + ballVelocityX < player1PaddleX + paddleWidth && ballX + ballVelocityX > player1PaddleX && ballY + ballVelocityY > player1PaddleY && ballY + ballVelocityY < player1PaddleY + paddleHeight) {
ballVelocityX = -ballVelocityX;
}

// Call the game loop again
requestAnimationFrame(gameLoop);
};

// Start the game loop
requestAnimationFrame(gameLoop);

#

(made by ai, should i add)

hollow basalt
#

yes

twilit beacon
#

can anyone run this? idk if it works and idk how to run js

hollow basalt
#

no

twilit beacon
#

ok

#

is this supposed to be complete with html and css or is it standalone

hollow basalt
#

that's standalone

#

try running it in your oven

twilit beacon
#

oven

#

why do they even call it oven when you out of in hot eat the food

nocturne galleon
#

a classic

rancid nimbus
#

For the num pad I designed, the PCB quality is good and the part spacing is fine with the major problem being the spacing of the connections to the dev board. I will do another rev with more of a fuller design just with a bigger connector so I can solder my dev board directly to it. I also learned that soldering tiny diodes with an iron and tweezers takes lots of time.

abstract fog
#

If I wanna start coding in some way, where should I start? I’m kinda interested in it, and if I really need a job I could add coding into that to make the list of possible jobs higher

#

And coding pays pretty good I believe, I think my dad is making close to 90k a year with his job where he does coding for oil rigs (hopefully that doesn’t come across as flexing or anything), so I would be interested in it

humble mirage
#

have you asked him

#

you could start by sitting down with a linux install and the legendary book "the c programming language" and learn like that, 80s-style

abstract fog
#

I could possibly ask him

#

I mean he does have like over 15-20 years of experience so he would probably, I could ask him next weekend or something tbh

abstract fog
humble mirage
#

i mean that's just if you wanna do things your dad's way lol

abstract fog
#

Either way should work fine tbh

humble mirage
#

there's like a ton of courses and books and stuff out there, the possibilities are endless

abstract fog
#

If he happens to have the book I might could use it, than I shouldn’t need to pay for anything

#

Which he might would have that book, I have no idea tho

#

I mean looking it up that book and I see some pdfs of questionable legality

#

Definitely questionable legally wise

#

It seems like the entire book

twilit beacon
#

do you guys recon i could maje a primitive raytracer by using brensehams algorithm? i already made it into an algorithm for 3d (since its originally for 2d) but is there any better way?

#

so i could calculate every ray

#

and boom ray tracer

rancid nimbus
peak acorn
#

Can anyone tell me what these periods mean? Are they just multiplication?

twilit beacon
arctic tusk
silk eagle
#

but then you dont learn

arctic tusk
#

PBKDF2, Argon2, or bcrypt?

arctic tusk
rancid nimbus
umbral saffron
#

ignoring software, how would i physically put this together, specifically the part on the left with the laser diode and the conjunction

rancid nimbus
#

Your beam splitter looks like it is facing the wrong way.

#

Beats me, I have not felt with lasers before.

#

I am guessing you 3d print something if the Lazer stays cool enough.

bitter edge
#

unless u don't read the shit

silk eagle
#

memory better for things u did yourself

bitter edge
arctic tusk
coral zenith
#

Question what do u use c++ and JavaScript for?

bright geode
# coral zenith Question what do u use c++ and JavaScript for?

Both are general-purpose languages, but Javascript is most commonly used in web development, while C++ is typically a "systems" language (OS, drivers, implementation of other languages, anything that requires high-performance low-level native compiled code)

A common example of where you would see them used together in the same project would be (but certainly not limited to) a Javascript front-end as part of a webapp GUI (what the user interacts with) which communicates with a C++ back-end (the thing that does most of the computation / storage /... ).

humble mirage
#

JS is general purpose and usually isn't the wrong thing to choose
C++ you should only use if you absolutely have to, since it takes a lot more knowledge to use, being a very complex and badly standardized language with a hard to use ecosystem

keen hound
#

JavaScript for websites

hollow basalt
#

Javascript for essentially any computer program

#

C++ for systems

keen hound
#

C++ is very rarely used for that, in 90% of cases C is used

#

most computer programs are written in C++ (game engines, internet browsers, etc)

umbral saffron
umbral saffron
ember sapphire
#

Both languages (c++ and js) should be avoided these days.

#

Js lack’s pretty much any safely guarantees offered by even c when when it comes to type safety. It’s also easy to write slow code in it, and even when you “optimize it” it’s still generally a few times slower then what you could do in something like c or rust. That is before even getting into compiler intrinsics.

There are other subjective takes like it’s lack of a matures and consolidated ecosystem like rust and go that also applies to c++ as well.

For c++, to quote it’s creator, “C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.”.

#

About JS being needed for web, it’s not really anymore. WASM can pretty much replace it in its entirety

#

C++ is much better now, however you can still do the getto things that have to still be supported as well as accepting other people might do it as well. In the argument of using rust (and some others I’m not 100% on board with it but this is valid) it can’t do as many compile time checks and or takes far longer to test with something like valgrind.

#

I’m not saying you shouldn’t use it, but it should be avoided unless you need the performance gains from it or you really know what you are doing

#

I would never call c++ (or any) the best language. Nor is js being the current foundation of the web a valid reason to keep using it or endorse it at all

#

And about the argument of using TS as a wrapper for js for type safety. It has bugs and quite a few of them that breaks it. It’s also annoying.

ember sapphire
#

Also doesn’t anyone find it weird how strange and insecure c handles strings in the standard library?

peak acorn
#

Yeah it is pretty bad, always gotta be super careful

hollow basalt
cursive root
#

TIL C++ and JS are the only programming languages in existence 🤣

ember sapphire
#

What’s this rust and go you speak of

humble mirage
#

isn't java still weirdly high on the TIOBE index

ember sapphire
#

Yeah but it’s on a decline

worthy bone
#

just use typescript lol

ember sapphire
#

Just use c lol

nocturne galleon
#

can anybody recommend touchscreen compatible controll panel program or smthng

cursive root
#

none of these discussions make sense without any context. No one's gonna use C to build web stuff, use Python if they need particularly high performance or use Javascript... well, ever, hopefully. Unfortunately there aren't a lot of alternatives if you wanna do stuff on the browser, so there you go

rancid nimbus
cursive root
ember sapphire
rancid nimbus
nocturne galleon
rancid nimbus
#

Everything?

hollow basalt
#

Everything?

#

I don’t think a touch screen control can control toilet seats

nocturne galleon
#

yeah... volume, displays, shows, midi, lights, recording, nuclear launch codes

ember sapphire
nocturne galleon
#

and etc

ember sapphire
rancid nimbus
# rancid nimbus Everything?

I don't know if that exists. A Facebook what's it called or Amazon what's it called is probably what you might want to look in to.

nocturne galleon
rancid nimbus
cursive root
ember sapphire
#

Yeah it’s pretty good, you can run a win95 vm in the bowser with it

#

There is a whole project to get a Linux environment running

cursive root
ember sapphire
#

WASM is a compile target so you can literally use anything for it, even js.

#

Hopefully WASM will replace js as soon as it can edit the dom or even before that as there is literally no reason not to besides maybe slightly slower load times for websites

#

That is however compensated by being 2-10s of times faster when loaded

rancid nimbus
#

Web assembly Doom 3.

ember sapphire
#

Google is a piece of shit and decided that jpegxl wasn’t good enough for them and removed it from chromium. You can however just ship your own super light decoder in WASM and use that instead for massive bandwidth savings as well as properly supporting HDR.

You can literally do anything with it

old nimbus
#

can someone explain why this is not working in javascript?

#

function victory(){
let end = 0;
let start = 0;
if ((playerScore = 10) && (botScore = 10)){

#

let start = Date.now();

#

if (playerScore < 10){

#

let end = Date.now();

#

console.log (Execution time: ${end - start} ms)

peak acorn
#

You need to use == for equality comparisons

#

That's at least one issue, first I noticed

peak acorn
#

Also it looks like you aren't ending your function or if statement with }}

old nimbus
#

that's just discord not playing nice with those bits

midnight wind
#

Use code blocks

#

To preserve formatting

rancid nimbus
#

So going off of what was already stated, you end up setting a variable in the if statement and it enters that is statement. Then it does the other if statement and returns false so it doesn't get the end time. Then the console log would out something like undefined - 100 and that returns probably undefined I don't know JS so I could be wrong but that is what I see. Also not ending the functions with curly brackets doesn't help. Look at this for hot to share code on discord. It does syntax highlighting if you do it correctly. https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-

old nimbus
#

function victory(){
    let start = 0
    let end = 0
    if ((playerScore == 10) && (botScore == 10)){
      start == performance.now();
      
    }
    if (playerScore < 10){
      
       end == performance.now();
       console.log(`Execution time: ${end - start} ms`);
      
    }
  }```
#

thx

#

see my problem is that I can't figure out to have the function end properly

#

because its for a pong game and a requirement is to have the highscore as the fastest time but i can't get the timer to work

#

so when the points go down to 0 it should post a time

rancid nimbus
#

You are missing a return statement, but js ignores that. You are missing semicolons on your lat statement, but js allows for that. You are missing a definition for playerScore and botScore, but js then will use a global variable (not good practice, but oh well).

old nimbus
#

playerscore and botscore are further up the code

#

if someone wants the full file and sift through it to see where ive fucked up

#

I would worship you

ember sapphire
#

btw after the first 3 graves add js for syntax highlighting, like this.

let test = 12;
old nimbus
#

javascript

ember sapphire
#

make it on the same line

old nimbus
#

fixed

#

sorry im so noobish at coding its childish

#

but this is worth 90% of my grade so im pretty desperate

hollow basalt
#

Ok

peak acorn
#

Does calculating a matrix determinant have a really bad time complexity?

ember sapphire
#

As the size of your matrix increases yeah it’s really bad. For smaller ones it’s fairly quick tho

peak acorn
#

Hm

#

Yeah trying to turn a 1x1x2 cuboid into a graph representing where faces are connected and using that to run a formula that required a derivative, just doesnt solve

#

1x1x2 solves immediately (10 nodes) but 1x2x2 (16) doesnt finish

mossy turret
#

Hey all, before I post/communicate here, does Web Design/Development (Using WordPress) count as #development? Thanks in advance ❤

peak acorn
#

yea

hollow basalt
#

yea

twilit beacon
#

yea

young elbow
#

yea

ember sapphire
#

yea

silk eagle
#

yea

lone vault
#

Yea

peak acorn
#

mobile user spotted

hollow basalt
#

yea

bitter edge
#

yea

twin remnant
#

yea

mental lynx
#

yea

umbral saffron
hot briar
#

Sorry if I shouldn't be asking here, but I'm desperate... Anyone here know Java and can help me with a simple coding issue?

coarse comet
#

Don't ask to ask, just ask

hot briar
#

I need to do 3 things with a string

  • Check that it's 3 characters long (easy, no issues here)

  • Check that the first 2 characters of the string make a number from '01' to '99'

  • Check that the last character of the string is either 'A', 'B' or 'C'.

I need to do all of this in a single method, returning true if all the conditions above are met, and false if not.

I know I need to use charAt, but I just can't work it out. Can someone please help me?

#

I know it's probably simple, but my brain is fried, I've been up for 30 hours, and I'm losing the will to go on!

coarse comet
#

Do you know how to get the last character?

hot briar
#

I think so? Just a simple string.charAt(2) == 'A' || string.charAt == 'B' etc etc

#

But not sure

coarse comet
#

string.charAt(2) won't always get you the last character tho, any idea how to always get the last character for a string of any length?

hot briar
#

create a variable and store its value as string.length() and use that. So int position = string.length()
then string.charAt(position - 1)
?

coarse comet
#

Yeah!

hot briar
#

But I'm assuming if my first 'if' condition checks the length of the string is 3, then I may not need that?
It's the check that the first 2 characters in the string are numbers that fall between '01' and '99' that's really stumping me

coarse comet
#

Of yeah, you're right

#

So you're checking if the string is like 36E, right?

hot briar
#

Yep. specifically "36A" for example

#

last character must be A B or C

#

First 2 characters a number between 01 and 99

coarse comet
#

You can take a substring of the first two characters and check that

hot briar
#

Would you mind giving more info? Haven't come across substrings yet

#

Thanks for the help BTW

coarse comet
#

You can call .substring() to get a sub string (damn) specifying the start and end index

#

So like .substring(0,2) to get the first 2 characters of the string

#

And then you just need to check if they are a number, really

hot briar
#

Would I then need to convert to integers to check that they are numbers?

coarse comet
#

Yea but if they are not numbers you'll get an exception so you'll want to catch it

#

Not sure if there is a better way to check that

hot briar
#

I'll take a look and see what I can come up with. Still not feeling in any way sure. This assignment is really killing my drive, I hate it!

coarse comet
#

Or I guess you could do if (Character.isDigit(ss.charAt(0)) && Character.isDigit(ss.charAt(1))) in this case

hot briar
#

For all digits 0-9? Is that an acceptable thing to do in Java? Have such a long 'if' condition, I mean?

coarse comet
#

oh wait I'm dumb

hot briar
#

Ah I see. But I also have to exclude '00' as a possibility

coarse comet
#

Yea you can just check if the substring isn't 00 or convert it to an int and check if it's not 0

hot briar
#

Can I store the first character as an integer variable? With something like 'int firstChar = string.charAt(0);'

coarse comet
#

Well yes but then it stores the ascii value of the character

hot briar
#

Ah, so use .isDigit and also != 0

coarse comet
#

Is this an assignment for school?

hot briar
#

Second year of distance comp sci degree

coarse comet
#

If you are allowed to use try catch then that is (imo) the best way

hot briar
#

I'll have a look into it. catch is new to me though

coarse comet
#

If you use try catch you can easily return false if it's not a number and if it is, it's already an int so it's easy to check if it's between 01 and 99

hot briar
#

That looks like it's going to be helpful, thank you!

hot briar
#

{
if(number.length() != 3) {
return false;
}
else {
if(number.charAt(0) < 48 || number.charAt(0) > 57) {
return false;
}
else {
if(number.charAt(1) < 48 || number.charAt(1) > 57) {
return false;
}
else {
if(number.charAt(2) < 65 || number.charAt(2) > 67) {
return false;
}
else {
if(number.charAt(0) == 48 && number.charAt(1) == 48) {
return false;
}
else {
return true;
}
}
}
}
}
}
}

#

@coarse comet I think I did it?!

coarse comet
#

Send it as

```java
// code here
```

#

gimme a sec

hot briar
#
{
        if(number.length() != 3) {
            return false;
        }
        else {
            if(number.charAt(0) < 48 || number.charAt(0) > 57) {
                return false;
            }
            else {
                if(number.charAt(1) < 48 || number.charAt(1) > 57) {
                    return false;
                }
                else {
                    if(number.charAt(2) < 65 || number.charAt(2) > 67) {
                        return false;
                    }
                    else {
                        if(number.charAt(0) == 48 && number.charAt(1) == 48) {
                            return false;
                        }
                        else {
                            return true;
                        }
                    }
                }
            }
        }
    }
}

#

So what was screwing me up, I think, was not just checking the char using the ascii numbers

coarse comet
#

Cool!

#
            if(number.length() != 3) {
                return false;
            }
            
            if(number.charAt(0) < 48 || number.charAt(0) > 57) {
                return false;
            }
            if(number.charAt(1) < 48 || number.charAt(1) > 57) {
                return false;
            }
            if(number.charAt(2) < 65 || number.charAt(2) > 67) {
                return false;
            }
            if(number.charAt(0) == 48 && number.charAt(1) == 48) {
                return false;
            }
            
            return true;

makes it more readable

#

if you are checking for something and then returning, you don't need an else since that code will never run anyway

hot briar
#

It does! The chat really helped me order my thoughts. Thanks a lot for that, I really appreciate it

coarse comet
#

Np, have fun!

grizzled steeple
#

I might also externalise the recurring range check into a separate function to clean up the code a bit more 🙂

hot briar
#

That's not a bad idea. If I get any time before this is due I'll definitely try

#

Man, this is killing me! It's my first java assignment, I'm waaaay behind, my wife has just had ACL and knee reconstruction surgery, and I've been sick. It's like the universe doesn't want me to pass this course. Studying distance can really suck. I just wish I had a tutor next to me sometimes to ask questions.

#

Anyway, I've really appreciated the help on here today. It's brightened my spirits a bit. Thanks

coarse comet
#

Google is your best friend lafr_Smile

hot briar
#

I've maxed out my 16GB ram for the first time ever with all my chrome tabs 😆

coarse comet
#

Heard of Firefox? linuth

grizzled steeple
#

The problem isn't the browser, the problem are the Websites (and the extremely bloated ECMA specifications)

hot briar
#

Ha! Yeah I think I, and many others, will be switching over very soon. Can't be doing with ad blockers not working any more

grizzled steeple
#

The Adblocker in Brave (a Chromium based Browser) will continue to work fully even with Manifest V3, as it isn't actually a plugin, but what makes me switch to FF soon are plugins like Decentraleyes and Privacy Badger. Neither of which can really work with Manifest V3...

#

Plus, I do make use of Desktop to mobile sync, and Firefox mobile is just so much superiour to any Chromium Mobile browser, just because of Plugin Support on Android 👀

hot briar
#

Interesting. Will read into that more. Not aware of the plugins you mentioned

coarse comet
#

I love plugins ❤️

grizzled steeple
#

Decentraleyes basically anonomizes requests to CDNs and caches them locally, so requests to CDNs are reduced to the absolute minimum necessary and Privacy Badger is a plugin from the EFF foundation blocking cookies and scripts from well known tracking links, but with the twist that it learns what it needs to block as you use it (tho that isn't turned on by default anymore, as one especially greedy tracker has found a way to exploit that learning as a super-cookie in a sense)

coarse comet
#

In case you haven't already, try the Annoyances filters in uBlock Origin, they block a lot of cookie consent/newsletter popups

#

ClearURLs is also super useful so that you don't get tracked with URL queries

grizzled steeple
#

You mean Clear Links?

coarse comet
grizzled steeple
#

Ah. thanks

coarse comet
#

I still run two browsers tho, Firefox for privacy-first browsing and Ungoogled chromium for whatever doesn't work on my Firefox

ember sapphire
#

Better yet you could use switch statments in java. Switch statments also make it easier for the compiler to optimzie it into a jump table or for larger ones a binary search
Just realized its not really applicable to this situations

coarse comet
#

I don't think I've ever used a switch before, to be honest

ember sapphire
#

I personally love them when they make sense. Makes code a bit easier to read and harder to fuck up

nocturne galleon
#

This a good place to ask noob questions about HTML/JS?

sage vector
#

Might also be a case where a regular expression would be better since it looks like some string validation rules. But regular expressions is also something I would recommend for a person that is still learning how to do basic programming 🙂

sage vector
nocturne galleon
#

If I wanted an HTML site to grab data and make an addition to an HTML doc, what languages/tricks would I need to use in order to do that? Currently I hazard to guess it would probably be part of a JavaScript script in the html doc, but I'm not entirely sure whether I'm completely right, somewhat right, or not even close.

What I'm thinking is kind of like adding a link to a table element or making an <a> element based off of the link that is given. So it would parse an input field for https://example.invalid/ and then output that to a div with an id, then add an <a> element based off a set of options or a premade script (like opening in _blank or _self by a simple toggleable switch or just make all added links open as _blank)

sage vector
nocturne galleon
#

Most likely. I'm thinking of grabbing the data off of a text field (eventually finding a way to parse whether the link works (as in https or starts with / for local files)) in the same doc

#

All of this is just for a site that is hosted locally only on a windows server

sage vector
#

I am very confused about what you are trying to create

nocturne galleon
#

I want to make a text field in the HTML site that can be parsed for data which will be added to a field like this in the same document or a document in the same folder as index.html```html
<a href=" "></a>

sage vector
#

Should it be persisted?

nocturne galleon
#

Yes, it should add it to the doc if possible

sage vector
#

Ok, but do you want to persist this locally in your browser or on your server?

nocturne galleon
#

Serverside, my b

sage vector
#

I would suggest making the site where your server generates the HTML code and takes input as normal POST calls. I don't really see much benefit here using JavaScript

#

Not saying we need to go with PHP 😉

nocturne galleon
#

As I said, im very noobish and just got my feet wet with HTML, I wouldnt know what would be the best way to make what I want happen. Hell, I dont even really know how I would work with GET or POST calls overall- I just know there are muiltiple types of calls and ways to use em, just not how

sage vector
nocturne galleon
#

Im studying HTML through CodeCademy, I know my way around Java but cant write it, Ive done some python- Just small things really- not in depth either

midnight wind
#

then when the server gets a request for the website it will dynamically generate the content from the database

#

there are many ways to do this, you can use js, php, really any programming language on the sever side

#

anything client side will usually be javascript

nocturne galleon
midnight wind
#

the hype nowadays is to use serverless ways like cloudflare workers to do things like this, but for now I would recommend probably just using nodejs with express webserver using templates

#

get practice with js

nocturne galleon
#

I got most of your message, but Id need to do lots of googling to understand it all XD
I've been meaning to get into JS as well to do fancier clientside things as well but havent had the time. Now that im on my christmas break im most likely gonna try n get far on my HTML and JS then.

ember sapphire
#

I do wonder how inefficient serverless is with how many layers of abstraction it uses

midnight wind
#

@nocturne galleon also I would learn more about how web works, because from what I read you don't really understand it too much. HTML is just a document sent to browser to render. HTML is not a "site". The backend is what makes a site a site and does the heavy lifting

nocturne galleon
midnight wind
nocturne galleon
#

Running Windows Server's IIS role and pointing it to the share holding all of files for the site. HTML, CSS, manifests, favicons- etc

midnight wind
#

ah

#

just an fyi windows IIS is rarely used

humble mirage
#

rarely used, huh

midnight wind
#

I've never seen in the wild yet myself

nocturne galleon
#

Fair, but as it stands I wanted to get some windows server experience for my IT bachelor (Had servers 1) and didnt wanna get into installing things that werent Windows features yet since it was my primary lab server

humble mirage
#

I set up IIS at my job a bunch of times

#

like yes your average node/rails/java stuff won't use IIS (because it will just be thrown at a linux anyways) but there's plenty of reasons for IIS to be used

midnight wind
#

yeah ik

#

it has a place

nocturne galleon
ember sapphire
#

#BestPractives==NoBestPractices* trollBaelz

nocturne galleon
#

Right XD Missed out on that joke

#

Still thinking in yaml from my docker mishaps this mornin

lilac pebble
#

Any maths Wiz's? In what context usually that we come across element wise multiplications of matrix?