#development

1 messages ยท Page 11 of 1

red mulch
#

and azure you need to pay for shit that is "free" on AWS

#

This is it in a nutshell

deep bluff
#

A lot of apps tell you to turn of IPv6, for ex. Valorant

#

IPv6 is great and all, its just not really talked about much, whilst IPv4 almost everyone knows what it is

hollow basalt
#

Ok

spring skiff
#

I obviously know it's the smarter and more secure way, but is creating and setting up on my github account a new ssh cert for each device worth the extra effort over just copying my existing one to every device of mine and just using the same one everywhere?

deep bluff
peak acorn
#

I copy my key for each device

#

I don't understand how mocking system features is supposed to work

#

say im working in go, and I have a service or data structure or whatever that uses Time.now for various calculations. For testing I would like to control the time that the functions are actually working with

#

So what seems like is most common is you just change around your data structure to basically hold a "provided time function" and under normal operation of the software you give it the "time.now", and when you test you give it "customTimeFunction(...)" But if you do that aren't all your tested data structures going to get super bloated where everything that needs control is gonna be in every constructor etc etc

#

Apparently theres this 'monkey' package that can directly override a function within the go instance so that seems to be the best solution for small scale mocking like this single function override

surreal chasm
#

Forward your key with your ssh-agent

silent gust
#

(Still working on it, will love to know what you think of it)

#

@deep bluff

deep bluff
deep bluff
silent gust
silent gust
deep bluff
#

The left menu bar needs to have atleast 3 more icons, and needs to be less fat. Secondly, the right side of the screen needs something maybe a faded logo

deep bluff
silent gust
#

I see

#

Should i make the button bigger?

#

Because somewhy reducing that space doesnt work

inner wraith
# silent gust https://media.discordapp.net/attachments/1024342168955011154/1138288692239282204...

You ask, so I answer.
Putting both sides of the conversation on one side is bad UI and distinguishing them by icon alone isn't great either. Go look at any text messaging software and what they do with chat bubbles.
You're using a lot of space for two buttons with that sidebar unnecessarily. You could put in a narrow top bar or if you'll only have two put them inline with the input box. Ideally you'd make them buttons so you can see the pressable area and labelling them never hurt.
The lack of colour leads to the whole thing looking a tad dull. Not unforgivable but a splash of colour or at least different shades for the send button or to distinguish between sides of the conversation would make a difference.

silk eagle
#

notice how in Discord, theres a gap between messages with someone's display name & the message's timestamp above any message content to differentiate messages/message groups

#

but the reason discord is able to do that is because the messages take up the entire message section of the window

#

if youre doing bubbles, youll notice most apps like skype and whatsapp will put the different sides of a conversation on different sides of the message area

#

and usually have names between the messages above chat bubbles to separate them in group chats

silent gust
#

i still work on it and your answer do really help me on it thanks guys!

inner wraith
#

Well it's smaller but still not a good use of space. If you can't live without a sidebar for two icons at least use a bit of it and give them labels and position them relative to the top or bottom.

silent gust
peak acorn
#

Is just putting multiple addresses into the DNS for your website actually how services are load balanced

#

on the highest level

peak acorn
#

How do you avoid a single point of failure then?

#

Theres loadbalancers which my understand is it basically is the first line of defence, you talk to it and then it redirects you to one of the instances of the actual product

#

but if theres only one load balancer then if that fails arent you screwed?

midnight wind
#

from what I understand you can do that with DNS, but it's not that reliable and good

midnight wind
#

you can have multiple

peak acorn
#

How do client's know which load balancer to talk to first?

midnight wind
#

welcome to anycast

#

that's how 1.1.1.1 is one IP, but all over the world

peak acorn
#

Yeah yknow i never considered that 1.1.1.1 doesnt just have one server lol

white bear
#

recently got into programming and trying to make a discord bot with python changed the token to something random for this i have the error message two andbody know whats wrong?

lone vault
#

is there anyone here who knows if there's a way to make this code run faster/optimized

 /* You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).

Find two lines that together with the x-axis form a container, such that the container contains the most water.

Return the maximum amount of water a container can store.

Notice that you may not slant the container.
  
example:
Input: height = [4, 3, 8, 1, 9]
Output: 
image: https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/17/question_11.jpg
Explanation: The above vertical lines are represented by array [1,8,6,2,5,4,8,3,7]. In this case, the max area of water (blue section) the container can contain is 49.
  
*/
  
public static int area(int[] x){
  int l = 0;
  int r = x.length-1;
  int v = 0;
  int b = 0;
  
  while(l<r){
    b =  Math.min(x[l],x[r])*(r-l);
    if(b>v){
     v=b;  
    }
    if(x[l]>x[r]){
      //int pr = x[r];
      r--;
      while(x[r]<x[r+1]){
        r--;
      }
    }
    else{
      l++;
      while(l<r && x[l]<x[l-1]){
        l++;
      }
    }
  }
  return v;
}

midnight wind
#

look at the examples

white bear
#

Alr Iโ€™ll check that out

cyan niche
#

Oh man they're rectangles even better

deep bluff
lone vault
silent gust
#

so for example here is a simple discord bot template you can use

#

import discord
from discord.ext import commands

intents = discord.Intents.default() # Your error
intents.message_content = True # important to have

bot = commands.Bot(command_prefix='!', intents=intents) # for commands you can choose your prefix

@bot.event
async def on_ready(): # when bot successfuly connects
print(f'Logged in as {bot.user.name} - {bot.user.id}')

@bot.command() # command when used ! ( still have to set the name parameter if i am not wrong to use the hello method)
async def hello(ctx):
await ctx.send('Hello! I am your friendly bot.')

bot.run('YOUR_BOT_TOKEN') # YOU BOT TOKEN GOES HERE

midnight wind
# lone vault What?

You can use calculus to easily solve it if I understand the question correctly

#

More specifically derivatives

#

And solving for when the first derivative of the area function is 0

cyan niche
#

I thought it involved curves, but no curves means no calculus required

#

I think I can solve it in O(n)

kind jacinth
#

I think you just do a sliding window and take the max area

lone vault
lone vault
peak acorn
cyan niche
#

The subset sum problem (SSP) is a decision problem in computer science. In its most general formulation, there is a multiset

    S
  

{\displaystyle S}

of integers and a target-sum

    T
  

{\displaystyle T}

, and the question is to decide whether any subset of the integers s...

#

Since this problem is essentially a reduction of the generalized form of this problem, seems like the best you can do is O(n^2)

#

(that is, exhaustively check every single rectangle)

next igloo
#

I looked up the Intel HD 4000 on TechPowerUP, which is what my laptop uses.
Does this sheet refer to what the Intel HD 4000 supported in 2013 when it came out, since openCL 1.2 was the most recent version at the time. Or is the sheet saying that openCL 1.2 is the latest the hardware/drivers of the HD 4000 supports at all?

silk eagle
#

sighs of relief all around folks

#

technology didnt advance ๐Ÿ™

lone vault
inner wraith
cyan niche
#

LLMs don't have a mechanism to reason

cyan niche
#

I did solve the column problem using clingo though

% [1,8,6,2,5,4,8,3,7]
c(1,1).
c(2,8).
c(3,6).
c(4,2).
c(5,5).
c(6,4).
c(7,8).
c(8,3).
c(9,7).

area(|(X2-X1)*Y1|) :- c(X1,Y1), c(X2,Y2), Y1 <= Y2.
max_area(A) :- area(A), #max{AA : area(AA)} = A.
#show max_area/1.```
white bear
cyan niche
#

This is the development channel

minor ore
cyan niche
#

This channel is for software development

#

Like, writing code

minor ore
#

Alr

fair latch
#

I'm working with Mastodon.py - what's the difference between on_update and on_notification?

fair latch
silk eagle
#

so Mastodon.notifications says:

#

oops highlighted wrong thing

#

the line above that one, update - ...

#

not sure if its relevant to on_update though

fair latch
#

Testing it currently.
Seems if you reblog, it appears as an update with nothing in content
Seems if you post, it appears as an update

Seems if you reblog and the original post is edited, it appears as a notification of the type update

terse veldt
#

I'm starting to learn basic HTML/CSS to build pages on my XenForo site (so I don't really need PHP/JS/etc).

So far I'm using VSCode on my PC. But I wonder, is there an app that's available on Windows and Android (say my tab S7) that would let me work on those pages on-the-go?

I've considered GDrive sync, but doesn't seem like there is any out there really. I've looked and github works on VSCode, but is there any android app IDEs that support github and html5/css3? (Don't need more than those two languages)

silent gust
#

i will consider using github codespace for the task you asking because others app might work but in a tradeoff

terse veldt
#

I don't need hosting, I have that already.

midnight wind
#

files are tracked via git and stored in github

spark temple
# terse veldt I'm starting to learn basic HTML/CSS to build pages on my XenForo site (so I don...

So GitHub is a version control system (VCS) service that allows you to use Git (or Mercurial if you desire). Meaning they host a Git Server and that stores your code. Your local machines will clone, commit, and track changes to that code.

On Windows, you can use VSCode as a means to interact with your Git Repository via plugin or through terminal / bash / shell. You can also use a third party app to interact with your Git Repository too.

Also, with Windows you can load html pages via the browser given the path to the file. This isn't ideal because it won't match how it'll actually be served on the web. You should use a tool that'll allow you to serve files, aka a server. You can use MAMP or some other server and this will allow you to spin up a local HTTP server. This way you can access your web page in a manner more closely how it'll be served on the web.

So on Android, you need to find a tool that'll allow you to clone / checkout your code via Git. You can actually use (almost) any text editor to modify your code. Now, for it to be served up like you do on Windows, you'll need to find a web server like MAMP for it. Not sure of what's available on Android. But you may find an IDE that on Android too but I can't promise that as I don't know that platform as well.

#

Lastly, as PresentMokey pointed out, you can use VSCode on the web but you can also spin up a VSCode Server. This will allow you to use your Windows machine to run everything and use your Android as a thin client to modify the code.

terse veldt
#

Do I really need to run XAMPP? There's a extension for vscode that basically embeds Edge in the sidebar so I don't need to alt-tab so much. Just save, go to preview and hit f5.

#

And I'm not doing any JS or PHP. Strictly html/css. My website software, XenForo, handles the user login/registration/etc systems.

midnight wind
#

that's just a server hosting software bundle basically

#

there's a live preview extension for vscode that you don't even need to refresh

terse veldt
#

Yea the built in live preview was giving some odd visuals, one sec

midnight wind
terse veldt
#

this is with ZERO css in the <blockquote>
in vs preview window. browser displays fine

midnight wind
#

click on it with dev tools, and check styling

#

curious what the issue would be, I never had issues with it

terse veldt
#

shouldn't be happening this is entire CSS:

<style type="text/css">
    p {
        text-align: justify;
    }
    h2,h3,h4,h5,h6 {
        text-align: center;
        text-transform: capitalize;
    }
    #mhlogo {
        width: 125px;
        height: 125px;
        float: left;
        padding-right: 15px;
    }
</style>```
#

with the VSCode "Edge Preview" it looks perfectly fine

#

native preview though yea its doing that weird black background on black text. Oh and images show as broken in the vscode preview but fine in browser

#

my prefs are basically default for VSCode except wordwrap defaults on

midnight wind
#

as for images, that's prob just the way you are referencing them

terse veldt
#

nah im following a udemy tutorial. the images render fine in MS Edge. But in the VSCode preview they don't
same file

midnight wind
#

yes, but still

#

live server actually runs a server

#

idk how the extension you are using does it, but it may just be opening the file

#

how are you referencing images?

terse veldt
#

<img src="https://mesozoichaven.com/img/mh_192.png" alt="Mesozoic Haven Logo 192x" id="mhlogo">

midnight wind
#

ah it's an already hosted image?

terse veldt
#

same with local images in same folder
but external hosted fine

midnight wind
#

that should work fine, idk. If you open console it would probobly tell you

terse veldt
#

i mean i plan to not build full pages, don't need the full doctype since its html embedded in a page that gets rendered out with XenForo, so I just do the style & content

#

that way there isn't two doctypes etc

#

this previews the page more properly, but it does involve a Ctrl S, click, F5

terse veldt
red mulch
spark temple
spark temple
# terse veldt native preview though yea its doing that weird black background on black text. O...

So again, this is how the resources are obtained or โ€œservedโ€ to the client. Paths for these resources can be relative as long as you have permissions locally to the resource. But you can also use absolute paths too, again if you have permissions to that resource.

Now external resources it should be fine locally but may cause issues if you deploy it to the web or how the Live Preview plugins work under the hood. I believe the live preview may be using a HTTP server and this can cause whatโ€™s called CORS (Cross Origin Resource Sharing) issues. The server that you are requesting the image from will look at the origin of the request and see it is not an approved domain to request this resource. This protects both the client and server communicating by ensuring a third party cannot inject their own resources but allows the server/client to get resources from other approved domains.

jovial garden
#

Does this count as development? I've been getting an awkward white space in my HTML page trying to display the structure of an HTML page within <code> and <pre> tags, with <code> being inside of <pre.

silent gust
#

In code you set doctype again with head and title

#

Idk if indentation counts tho

kind jacinth
#

most ai is created using pytorch or tensorflow, both are open source

silent gust
#

I will consider checking out hugging face # transformers module

neon oriole
#

or the one by metabook is also popular since its release and also opensource

neon oriole
# jovial garden

i think you should take a look at your code , as you are defenetly doing things that the dom wont do (like nesting <pre> or <code>tags inside p tags) given the following code : wich is somewhat allong the lines what you wrote, what do you expect the actuall resulting code on the dom to be? html <html> <head> <title>title</title> </head> <body> <p> this is a p <pre> this is iside the pretag</pre> <code>this is inside the coded tag</code> this is insde the ptag <pre><code>this is inside the codetag inside a pre tag inside a p tag</code></pre> </p> </body> make a gues... ๐Ÿ˜„ does your guess look like this: ? ```html
<p>
this is a p
</p>
<pre> this is iside the pretag</pre>
<code>this is inside the coded tag</code>
this is insde the ptag
<pre>
<code>this is inside the codetag inside a pre tag inside a p tag</code>
</pre>
<p></p>

#

not that you do it but i also wanted to add that you also cant do h1- hx tags inside ptags , if you nest inside any tags , the dom automaticly closes the ptag before opening the tag you wanted to nest

#

then specifially on the whitespace: well if you indent your sourcecode inside of a pre tag (wich literally means the text inbetween this tag , is preformatted DOM DONT TOUCH THIS!) the indentation wil get printed as is on the html page

cyan niche
#

if the dom wont do it just force it

neon oriole
#

na the nesting is a "feature" of html

#

you cant nest stuff inside ptags but a verry few things

#

the dom will automaticly assume you forgot to close the p-tag , and close it for you before the nested tag

#

you can check the behavior with f12 in the browser , wich shows the actuall html that is being displayed (view sourc only shows the code that got received not what the dom made of it)

cyan niche
neon oriole
# cyan niche

nah is thast what your dom is showing? , anyways (clip is a rection video by the primagen, original clip is from Computerfile)https://www.youtube.com/watch?v=Gj5Q-x3OrWo

Recorded live on twitch, GET IN

https://twitch.tv/ThePrimeagen

Legend's Original: https://www.youtube.com/watch?v=-csXdj4WVwA
Legend's Channel: https://www.youtube.com/@Computerphile

MY MAIN YT CHANNEL: Has well edited engineering videos
https://youtube.com/ThePrimeagen

Discord
https://discord.gg/ThePrimeagen

Have something for me to read...

โ–ถ Play video
cyan niche
#

You can force the dom to do what you want with javascript, and it'll even render correctly.

neon oriole
neon oriole
cyan niche
#

your function is indented incorrectly

neon oriole
#

and there is a reason i wont anything js not even from afar

cyan niche
#

lol

#

Why is it nested under initiateBot()?

#

Is there a reason I don't know why you're using an inner function

#

It needs to be exposed globally in your file

#

inner functions are only accessible under the function they're defined.

#

i.e., shift + tab everything starting with @client.event and below

#

The on_ready function is called not by your program, but globally hooked into by Discord's API. it needs to be exposed at the top level. It's not defined like how you think. I recommend looking at some examples of how Discord bots are arranged

#

python is block scoped - i.e., variables/function defitions don't exist outside of the block they're defined in.

#

I assume you're new to programming. Good luck!

hardy ledge
#

You don't need public

#

Also the official Python server has a dedicated channel for Discord bots.

silk eagle
#

do decorators work if they arent directly above a function? I've never tested that

#

or does it just not care about empty lines between the decorator and a function

cyan niche
#

I imagine the python parser ignores blank lines

silent gust
#

Indentetation PogChomp

silk eagle
#

even with the indented empty line it ignores it

silent gust
silk eagle
#

i totally yoinked that from a geekforgeeks article to save myself the 5 minutes remembering how decorators are made

fair latch
#

I've been trying to add the dotfiles in ~/.config to a private Git repository. However, I am unable to due to some directories being Git repositories themselves.

Below is what I am trying to accomplish:

.
|-- .config/
|   |-- .git/
|   |-- alacritty/
|   |   |-- catppuccin (I want to keep this)/
|   |   |   `-- .git/
|   |   `-- alacritty.yml
|   |-- tmux/
|   |   |-- plugins/
|   |   |   `-- abcxyz/ (can be ignored)/
|   |   |       `-- .git
|   |   `-- ...
|   `-- nvim/
|       |-- .git/
|       |-- custom/ (I want to track this)
|       |-- .gitignore (ignores custom/)
|       `-- ...
`-- ...

neon oriole
#

make them submodules :?

spiral tulip
#

i'm wanting to learn python to make a small game because since I was 8 I've wanted to develop a game, I have some ideas for a product but before those ideas get out of hand i want to begin learning. can i please get some help with the coding language and maybe a tutorial.

spiral tulip
hollow basalt
#

ok

inner wraith
spiral tulip
inner wraith
#

C#

spiral tulip
spiral tulip
humble mirage
#

I wonder how badly LMG would fail the Joel test

silent gust
cyan niche
humble mirage
#

i mean that's not part of it

#
  1. Do you use source control?
  2. Can you make a build in one step?
  3. Do you make daily builds?
  4. Do you have a bug database?
  5. Do you fix bugs before writing new code?
  6. Do you have an up-to-date schedule?
  7. Do you have a spec?
  8. Do programmers have quiet working conditions?
  9. Do you use the best tools money can buy?
  10. Do you have testers?
  11. Do new candidates write code during their interview?
  12. Do you do hallway usability testing?
#

these are like relatively easy to reach minimums for basic software development productivity that a surprising amount of companies fails severely
(Originally from a blog post by Stackoverflow co-fonder Joel Spolsky)

#

i work at a company that's about 8/12 myself which in the original post is a fail (under 10)

cyan niche
#

rip stackoverflow jobs

humble mirage
#

rip stackoverflow in general

cyan niche
#

truueee

#

I didn't think my human machine singularity would turn out like this

#

I'm guessing they're failing on 3, 5, 7, 10, and 12.

#

small teams usually are

neon oriole
#
  1. -> if they want code , they gotta pay ๐Ÿ™‚
humble mirage
#

8 too, since i think they do a bunch of open plan ish stuff for non management

fair latch
neon oriole
# neon oriole 11. -> if they want code , they gotta pay ๐Ÿ™‚

well it wont be the first company to write out fake vacant programmer spots , only to have the applicants write code for a code project , to pass that code on to their actual programmers who were lagging behind and needed some help but the company was unwilling to hire extra's

neon oriole
cyan niche
#

Attach a copyleft license to your code

#

"Why did you attach a license to your code? Oh whoops, just the default I have my environment configured on my home code."

#

"Well we need you to remove it."

#

"Why?"
pikachu

fair latch
fair latch
cyan niche
#

You would have grounds to sue either way.

mortal geyser
humble mirage
#

hey, Team Foundation Server and an old home grown ticket system is a start!

#

(that's what my old job had)

#

although we also dogfooded heavily which imo fulfills #12 and did have a bit of code in interviews so yeah

neon oriole
#

ah you want a commit to happen for all repo's and submodules in the tree i assume

#

you can do that with:```sh
git submodule foreach --recursive <whateve command you like here>

neon oriole
#

and on the numbers list, well i dont get these : we fix bugs before we write new code: i think this means the bugfixing happens by the same team, while sometimes good , it means your also using your creatives to do the tedious work much better done by more consenious people, and i would like to see a dedicated we have a documentation team that documents our code and writes manuals (both to use the end product as how to use the code , for other teams within the company, and they should automaticly get any file with a diff in it to update the docs if need be ๐Ÿ™‚

fair latch
boreal crystal
#

Dont really know where to ask but are there any command line malware checkers?
Would rather not have to scan my whole system but simply any files i download

waxen river
cyan niche
#

Good for you for saying how you solved it

drowsy elbow
#

Anyone knows how to fix this? I already rebooted my phone twice, rebooted my pc, rebooted my router & disabled and re-enabled developer mode on my phone twice

#

It was working just fine yesterday

#

I also downgraded visual studio to previous version to see if it did anything

#

Managed to fix it by using adb pair this time. Idk why connect didnt work

red mulch
#

nobody else is going to give a shit

#

many days of work for... that ๐Ÿ˜‰

drowsy elbow
#

What does it do?

red mulch
#

it's an abstraction of pipewire - which is for audio routing

#

so it has actual devices, like an audio interface. I'm abstracting that out to an actual THING, like a microphone. And then making it so you can 'jam' that microphone into whatever

#

of course, there was no decent pipewire python lib, so I had to write that first.

red mulch
red mulch
#

I went to write some code that I could easily use to configure my midi surface to do stuff I wanted to do, and when I found that it didn't really exist, I kinda rabbit holed it

#

because while what I've done there is pretty good, it's really no use to anyone who doesn't want to bash out yaml. and shit. I don't even want to bash out yaml.

drowsy elbow
#

What problem does it solve?

#

capture midi device input?

red mulch
#

as per the code above on github, it just provides the ability to manage pipewire and some other stuff with a midi contoller

#

the new stuff I'm working on solves the problem of managing complex audio routing in a simple way, and dynamically adjusts controls to suit.

#

I am using my server as an audio router - I have 5.1 surround from a chromecast, and 5.1 from my desktop going in, mic out to desktop, in/out from laptop, in from actual mic, in/out to phone, out to speakers, out to wireless headphones, out to wired heaphones, out to outdoor speakers.

inland jay
#

interesting project... ive been meaning to set something similar years ago when I had audio from multiple PCs I wanted to control from a midi device... never got around to it and don't need it now but cool to see someone work on it.

lapis hearth
#

does anyone know how to use a digispark

red mulch
red mulch
lapis hearth
red mulch
#

cool, what was wrong?

lapis hearth
#

i was being a dumbass

silk eagle
#

did you plug it in?

red mulch
lapis hearth
#

i made a test script for a payload

silk eagle
#

that seems awfully suspicious

lapis hearth
next igloo
#

What emulator should I use to test Linux software on Windows 10?
I have a program that uses OpenCL for GPU compute, along with SDL2

spark temple
red mulch
silent gust
random bison
#

I have an unusual one...
Has anyone used Yahoo APIs to integrate with Slack for the purposes of Fantasy Football?

crisp bronze
next igloo
#

I do have virtual box, but I was a bit concerned that its graphics emulator might not work for OpenCL 1.2. Yes my software does have a GUI

#

When I tried to run it, it failed to open because I was missing some library files since it was on a fresh installation (not virtual boxes fault). I am yet to correct that currently

crisp bronze
#

Yeah, thats the joy of emulation for you xD

If you have a spair computer laying around it will be best to install linux on it and access it remotely. With ssh for terminal access and scp to transfer files you can automate the whole thing ๐Ÿ™‚

#

If your windows version and hardware supports it, you can also try hyperV. I had good results with it (circa 201). Better performance, closer to the metal and free (comes with windows pro).

It wasn't as easy to dev with tho (never got file sharing to work and I never saw how to controlling it with cli). But its probably better now ๐Ÿคท

crisp bronze
#

When I tried to run it, it failed to open because I was missing some library files since it was on a fresh installation (not virtual boxes fault). I am yet to correct that currently

Oh I thought you meant the windows install was fresh

steady wren
#

What Fullstack Enterprise framework do you guys recommend that is FAST AF, scalable, and easy to maintain?

midnight wind
#

and preferences

steady wren
# midnight wind what are your requirments

Must be

  • Fast
  • Scalable
  • Easy to maintain/develop

Must be capable of

  • Handlng 200k+ queries/hour
  • Must be able to take a JSON body in the request, and pass it to a script (Some type of script that has some sort of testing library)
  • Must be able to dynamically load the scripts in one folder. Meaning I can add a script to the folder without reloading/recompiling/restarting the backend app

Preferences

  • Auto Garbage collection (Don't like having to allocate and deallocate memory like C++)
  • Good documention
  • Able to easily integrate the Frontend into the fullstack app
midnight wind
steady wren
midnight wind
#

again depends on well you can use the tech

steady wren
#

I just am worried about the latency from the request from the frontend askign the backend to test this user's code which the backend routes the JSON body to the script, and the backend returns the response from the script

#

Frontend -> backend -> testing script -> backend -> frontend

midnight wind
#

so you are running user code

#

I wouldn't be worried about latency, that's not the issue here, it will be most likely negligable

steady wren
#

I also forgot to think of we are going to test the different programming languages that we are going to offer. Oh, this is complicated

midnight wind
#

what are you trying to build? a code sandbox?

steady wren
#

Online learning platform

midnight wind
#

ah

steady wren
#

I try not to share details much

midnight wind
#

if you are running user code on backend you need to be really careful

steady wren
#

Yes. That too

midnight wind
steady wren
#

Alright thanks! That will be VERY helpful

midnight wind
#

this is a nice overview of what I think you will need architecture wise

#

overall concept wise

steady wren
#

Alright cool

terse veldt
#

So I've been trying to work with materialize since for me, its very easy to understand and tweak (since you can literally do something like nav class="blue darken-4" to change navigation, similar with footer). But for some reason, the materialize CDN I use doesn't seem to work for a mobile view? It adds the "hamburger menu" but it renders the rest of the page like desktop. Not sure what's going on.

I'm using the cloudflare lib for it, v 0.100.2.

red mulch
#

diagrams are fun

red mulch
# steady wren Alright. Wouldn't django be slow since it is python?

if your thinking is "python is slow" - it really means you don't know enough to decide ๐Ÿ™‚ - not that python is super fast, or blah blah blah, but the realitt is that for most things, most of the time, premature optimising - including choosing "fast" underlying tech - is a terrible idea.

steady wren
#

I don't use Python much sooo

#

I also converted my Java TicTacToe with recursive minimax algorithm into Python, took 4 seconds to respond. So that's my experience

red mulch
#

haha, ok - that depends on so many different things. I mean, python, less than java, but more than some others, has a startup penalty of a few hundred ms, but that (like java) is irrelevant once the python interpreter is loaded

#

it also depends on what you're doing - if you were doing a pure python implementation of a heavy algorithm? yeah it might be significantly slower. But that's not what 99.9999% of python is doing.

red mulch
humble mirage
#

python is 4~16 times slower than languages whose reference implementations support multithreading

#

but that apparently may change, I heard

hollow basalt
#

though relying on GIL for safety might not be a good practice but who am i to tell

kind jacinth
deep bluff
hollow basalt
#

Ok

white bear
#

this might sounds stupid but is something like start = false a variable or is it if start is not

#

python btw

frozen flame
#

Anyways python has gotten significantly faster in recent releases thanks to a lot of underlying changes in cpython, but most web workers work around the biggest issue (namely the GIL) by using worker processes instead

frozen flame
#

Also if you're going to sandbox user python code take a look at snekbox @steady wren

steady wren
#

It will also be other languages

frozen flame
#

Snekbox is a python interface for NSjail, so you can probably learn a bit about using that for other languages from it

red mulch
red mulch
silk eagle
#

guys I have a crazy idea what if we like didnt use python for ML cuz like its so slow right

red mulch
silk eagle
#

the industry is wrong

frozen flame
#

Tbh mojo may as well not exist until they can actually come through with their promises

#

Seen that stuff promised a million times and never delivered

neon oriole
#

anybody ever had this with using gdbgui?

nocturne galleon
#

so i have a test and these are the problems im a noob so cant do much

#

problem 1
In an animal shelter, there are a certain number of cats that eat a different amount of food per day. Your task is to calculate the number of cats in each group and the money the owner needs for their food for one day, if 1 kg of food = 12.45 BGN.
โ€ข If the cat eats from 100 (inclusive) to 200 grams, then it falls into group 1: small cats.
โ€ข If the cat eats from 200 (inclusive) to 300 grams, then it falls into group 2: large cats.
โ€ข If the cat eats from 300 (inclusive) to 400 grams, then it falls into group 3: huge cats.
Login:
โ€ข In the first row - the number of cats - an integer in the interval [1..100]
โ€ข On each subsequent line for each cat - X grams of food - a real number in the interval [100.00..400.00]
Output:
The following lines are printed:
"Group 1: {the number of cats in group 1: small cats} cats."
"Group 2: {number of cats in group 2: big cats} cats."
"Group 3: {number of cats in group 3: huge cats} cats."
"Price for food per day: {price for food} lv."

#

problem 2
A group of enthusiasts travel to various locations where there are gold mines. Your task is to help them by writing a program that accepts the number of locations and the expected average gold yield per day for a location. For each day you will receive how much gold they mined at the location. Check whether they have achieved the expected yield for a given location or not.
Login:
Initially, a single number is read from the console - number of locations - an integer in the interval [1.. 100]
For each location, two numbers are read, one per line:

  1. On the first line - expected average yield per day of gold - a real number in the interval [0.00.. 10000.00]
  2. On the second line - number of days in which the given location will be mined - an integer in the interval [1.. 30]
    One number is read for each day:
    โ€ข Gold mined for the day - real number in the interval [0.00.. 1000.00]
    Output:
    After mining a location is complete, one line is printed as appropriate:
    โ€ข If the average gold yield per day reaches or exceeds the expected average gold yield per day:
    o "Good job! Average gold per day: {average gold per day for the given location}."
    โ€ข If the average gold yield per day is below the expected average gold yield per day:
    o "You need {gold that has not reached the expected average yield} gold."
    Format the result to the second character after the decimal separator.
#

the first picture is problem 1 and the second problem 2

humble mirage
# red mulch I know right!??!! All these people are crazy, everyone knows that python is slo...

it was a bit of a joke about how many cores cpus currently have that python can not use in a simple way due to its GIL (which is also apparently going to be optional soon which is exciting news and actually intended to be the main message)
no idea why you're so hurt by this? It's a fact that with something like C# where you can just use parallelism in Linq or even just Task.StartNew or hell even new Thread, it is a lot easier and faster (for the developer) to just parallelize parts when the need arises. You can't just do that in a small single file program in Python.

#

Of course you can do the whole microservice and sharding dance to your application, but that's kind of a different thing

red mulch
#

also.. you can. It depends entirely on what you're doing. If you're using python for heavy multi threaded tasks, you've already done it wrong.

#

If you need multi threading in your single small program in python, wtf are you doing

red mulch
#

(noting that you CAN thread python and/or use asynchronous patterns, you just don't get any performance benefit)

lilac sphinx
#

im trying to build a song recommendation using spotify in python and although i gave a correct spotify client id and client secret it is showing a key error. does anyone know what is the problem and how i can fix it?

midnight wind
#

just id and secret isn't enough

lilac sphinx
midnight wind
#

you need to do the first flow in order to access user information

#

which requires the user to allow your app access via oauth

lilac sphinx
#

i got some idea now
i shall try and get back to you!

midnight wind
#

oauth is a bit hard to understand at first

lilac sphinx
lilac sphinx
silk eagle
# lilac sphinx

keyerror, usually, means you just dont have that item in the dictionary its trying to grab it from

red mulch
#

but... reading the context it's just client oauth. it's a minuor pain, but eh

steady wren
#

Would it be much of a performance hit if I use MariaDB instead of Redist to store sessions?

midnight wind
#

redist is in memory, while mariadb is actual storage

steady wren
#

Yea, ik. So I assume yes

midnight wind
steady wren
#

Alright

wind horizon
#

Yeah itโ€™s very common to see sessions in a DB for small to medium apps, itโ€™s not much of a worry and in one case I even saw on a pretty heavily used app (200k+ users).

Iโ€™d suggest going with something from a framework, itโ€™ll have pre-made patterns likely for storing sessions.

If you use a single node / instance of your server and minimal users right now another cheap option is simple in memory list of sessions. But this wonโ€™t scale to multiple instances, uses some RAM, and means all sessions or lost on restart so no mid day deploys.

hollow basalt
#

ok

white bear
hollow basalt
#

For sure

silent gust
#

Is go language interesting?

red mulch
inner wraith
#

The database is much faster than my workers and the workers are much faster than my anticipated needs.

#

I've been in environments doing that with MySQL for location data with... maybe tens of queries/second all day every day? And the database was as good as idling, our problems were with the backend being slow. That kind of query load basically doesn't matter.

#

I don't think Facebook or Uber'll be taking that approach but it worked alright there.

steady wren
white bear
inner wraith
midnight wind
midnight wind
inner wraith
#

Guess it's still 2 then ยฏ_(ใƒ„)_/ยฏ

midnight wind
#

user submit code -> code gets run/validated

#

so need basics of user auth, etc.

inner wraith
#

Doesn't mean much, still completely dependent on implementation.

midnight wind
#

well yeah

inner wraith
#

If it's so secret that scale to an order of magnitude can't be disclosed than asking infra planning and design questions here will give consistently useless answers

kind jacinth
#

Imo trying keeping project ideas secret is fairly naive, considering that thousands of people probably have come up with that idea already but just couldn't find anyone to code it + market it

#

You just end up obstructing help, while otoh explaining your idea is more likely to get people excited to help

#

That's assuming you're not just under NDA

inner wraith
#

If you're under NDA pay a consultant to help you lol

white bear
#

Currently trying to install pygame but it is saying python not found when i put python3 -m pip install -U pygame --user
in terminal anybody have any idea why?

quartz walrus
kind jacinth
frozen flame
#

windows uses the py launcher for some ungodly reason

silent gust
quartz walrus
#

I/o on windows is eugh

silent gust
#

unity? using c++ ?

quartz walrus
#

Godot, c++ yes

silent gust
quartz walrus
#

Nop, it's made in c++ and has a custom language for game logic

#

I made a lot of custom shit, the imgui integration, the custom animation system etc

silent gust
#

i love your messy gaming setup btw :)

quartz walrus
#

Which one?

silent gust
#

the one on your insta that look old

quartz walrus
#

Ah yeah, can't really have a non messy setup with a racing setup

silent gust
quartz walrus
#

Which one? The 3d one I'm making?

silent gust
quartz walrus
#

Idk, it runs well enough at this time

silent gust
#

i am playing with golang :|ย its pretty dry as a language

quartz walrus
silent gust
quartz walrus
#

nice

silent gust
#

3 years is kinda alot :D

quartz walrus
#

Yup

red mulch
kind jacinth
#

My point exactly

drowsy elbow
#

Thanks Microsoft... wtf is this exception message

hollow basalt
#

wait for the exception message to load

cyan niche
#

u fukt up

silent gust
#

chocolatey

white bear
#

why is windows asking if i use this device for software development

#

dont really like that

white bear
sweet gate
white bear
#

im not smart enough to use linux

frozen flame
green gyro
#

Yep

silk eagle
#

gnus not unix (gnu (gnus not unix))

neon oriole
#

macos is darwin wich is a derived from bsd i think wich is a flavor of unix but without the unix name,due to some licensing issues with the unix name

#

great due to transparency you cant see the connections ๐Ÿ˜›

kind jacinth
#

Mac is POSIX compliant so its considered Unix

eternal scarab
#

Any golang experts ?

white bear
kind jacinth
silent gust
boreal crystal
#

Kinda a noob question

I'm capturing / storing raw btc futures trading data for a school project, using sqlalchemy / SQLite. I think a time series db would be prob more appropriate? since it's a crap ton of data and there's no relations in the data.

And second question are there any python library's to do this. I can't find anything

Can post the repo is you guys want / allowed. Kinda a cool project

urban mulch
#

So, I got into a project of repurposing pirate android tv boxes into actual PCs. What do you guys suggest doing with those?

steady wren
#

I am looking to make my ExpressJS app the MOST SECURE as can be. How can I learn about the different attacks and how to protect against them?

#

I understand rate limiting, and salting user passwords. That's where my knowledge ends

frozen flame
#

Probably wanna look into XSRF attacks

steady wren
#

Alright. Is there a list of ALL known attacks that I can protect against?

inner wraith
inner wraith
#

A robust process for updating packages and underlying infrastructure is an absolute must, as is removing obsolete or unsupported software.

silent gust
#

My ai has 2,2m parameters

boreal crystal
untold briar
frozen flame
#

New attacks are created literally every day

#

They can be as minor as a fatal buffer overflow that crashes your worker to as major as a log4j RCE

#

The list that was posted is a good start but it's no replacement for consistent monitoring and review

boreal crystal
#

If your worried about malware vxunderground is probably the largest collection there is ...

kind jacinth
eternal scarab
sweet gate
minor ore
#

Can someone help me

#

Ive tried everything

#

I dont think im doing anything wrong```const express = require("express");
require("dotenv").config();
const { Configuration, OpenAIApi } = require("openai");

const app = express();

app.use(express.json());

const configuration = new Configuration({
apiKey: process.env.OPEN_AI_KEY,
});
const openai = new OpenAIApi(configuration);

app.post("/find-complexity", async (req, res) => {
try {
return res.status(200).json({
message: "Working",
});
} catch (error) {}
});

const port = process.env.PORT || 5000;

app.listen(port, () => console.log(Server Listening On Port ${port}));```

mellow prawn
#

openai package has fairly recently updated to a new breaking change version, so if you're sure the code is correct i'd assume that

minor ore
#

Yea

mellow prawn
minor ore
#

I figured it out i just decided to redo it

mellow prawn
#

fair

silent gust
#

hehe i found 5,7 gb of data for my bot

#

and made 10gb

spark temple
# fathom pasture https://dontasktoask.com/

I love this. I literally wonโ€™t respond to people who do this because it just shows laziness.

Also, Iโ€™ve worked with people who do Python and posted the question they had and I was able to solve the issue for them while literally having never done Python because I understand how to debug stacktraces, look at code and read documentation.

midnight wind
#

Smart home stuff

#

Make a smart water value

#

Something useful

sonic kiln
#

Tryna render a circle on my homebrew graphics card

#

What could the problem be?

silver furnace
#

Is it just me or tis spookyfile in the link kekw

#

I especially love the #define SYELOG_PIPE_NAMEA "\\\\.\\pipe\\syelog"

kind jacinth
#

I've made a chat program with esp32 lol, used Google's voice to text api for typing.

latent wolf
#

Anyone here use ECMAScript 2022?

silver furnace
#

Which means fine but every single thing you say into it is collected and analyzed by Google. Chat messages are one of the best things to send to them amirite kekw

lunar quail
silver furnace
#

What's funny is for a while I've been thinking about stuff like that. For instance, what about direct connection peer-peer chat app? I was looking into peer-peer networks without centralization

#

So the goal is to connect to somebody you know no matter which network they're on. If it is centralized, maybe everybody id's as secret only the other contact knows. You can request an ip from centralized service by some identifier but centralized service has no clue who that is. Every single time it changes. Honestly lol i got it I think kekw

lunar quail
#

Been working on this dang Java project. Sooo tired of it. Ready to get back to using rust.

silver furnace
#

But yeah if you can do that, own Google by sending all private conversations to them but nobody knows who the conversations are happening between lmfao.

latent wolf
lunar quail
#

TS mostly.

latent wolf
#

how much experience?

lunar quail
#

๐Ÿคท like overall? >3 years ts.

latent wolf
#

Damn my brother has only been using for 2, 4 for js though.

kind jacinth
lunar quail
#

Iโ€™d have to really sit and think about how much js Iโ€™ve done. Got a lot of jquery out there in the wild.

silver furnace
#

Hope those conversations aren't personal kekw

latent wolf
kind jacinth
#

I mean yeah obviously Google is gonna collect everything sent to them

silver furnace
#

More than that you're I guess sending people's voice recording tied to personal messages + helping train it to understand speech (so it can one day maybe decide it's time for judgement day ala Terminator 3).

kind jacinth
#

Uhhh sure

#

Something something singularity

silver furnace
silver furnace
# kind jacinth Something something singularity

Singularities don't exist usually whenever that word comes up in physics. For AI, idk. Is there such a thing even in Terminator? A singular moment when machines become sentient. Is that the very first machine or something? Or is it that when machines became sentient, they were immediately one consciousness somehow which is the very same one that became aware and turned on humans? So many questions...

silver furnace
# kind jacinth Uhhh sure

Well jokes aside, definitely shouldnt brush off with sure. The whole thing today with chat apps is they have to be secure and private. Nobody can listen in on conversation except the two people on either ends to whom the conversation actually pertains. Why should a single other place receive people's personal messages lol.

See if you can write a message app but it's end to end encrypted and somehow anonymous maybe to even yourself the dev/service provider. Then at that point honestly it would matter way less again if Google gets every message. Nobody knows who that contact is apart from usual ip, rough location, etc if it's the client using Google api and then sending message afterwards. So if VPN then you can hide identity (thats the whole point)

silver furnace
# kind jacinth I mean yeah obviously Google is gonna collect everything sent to them

Btw try to fully think through what that 'everything' is. You've sent them way too much for what most people consider acceptable... to Google of all things kekw

Minimally you'd definitely need a privacy policy and agreement to use your app which links to the same of Google. I'd hope you at least make your own service and API that uses Google and just passes along the text response from voice clip. But now you're pretty hefty on traffic. Voice clips downloaded then uploaded as well. Would need scaling if you have a lot of users. Yeah just food for thought. Peace.

kind jacinth
#

It was a for a school project and I no longer give a fuck about it

silver furnace
# lunar quail Iโ€™d have to really sit and think about how much js Iโ€™ve done. Got a lot of jquer...

JS experience isn't really important. It's just being able to write on a certain scripting language. There's nothing to JS except for just basically object notation, knowing to write elsif/elseif/else if/elif/elf whatever because everybody has their own way to do it for some fkn reason. JQuery is I guess yeah you'd better use at least that if you're going raw on DOM frontend.

Today JS is mostly accepted in conjunction with other langs/frameworks if you don't type a single line yourself and it's all generated for you. If you write in JS, it better be node or something. Node experience counts.

kind jacinth
silver furnace
kind jacinth
#

I mean yeah but there's a spectrum of privacy vs convenience

silver furnace
#

Graphene os yeah Louis Rossmann uses it pretty sure so it can't be bad lol. I heard good things about it privacy-wise. But still unless you're gapps-less and only like fdroid is installed lol... I don't even see a point

silver furnace
#

Although I see nothing wrong with like using them for search engine if you're behind VPN or something. If your identity is anonymous. So browser data cleared too, etc. In that case, Google probably still best for searches lol (unless youre of the opinion that what you're searching for is tampered with). Like it sucks: they have probably still by far best search results but they seem to ruin themselves. Would have been best search engine lol

kind jacinth
#

Well Google search is miles ahead of any other alternative

kind jacinth
silver furnace
kind jacinth
#

Yeah if you really care about privacy, you should just be your own T1 ISP. Otherwise there's no point /s

silver furnace
#

I think they actually proved it too. Smart phones that dont have a way to remove battery will still connect to towers even 'off'. Unless you drain battery enough idk kekw

silver furnace
#

Unless idk what about airplane mode all radios off incl bluetooth and gps? That should work tbh. If it does, wow 2023: your phone is connected least while it's on not off :P

I mean the packet data and cell seem to stop working. You shouldn't have any way to receive whatever it is that could cue your device to re-enable any comms kekw

GSM I think has to be off even with no sim card right? You still connect to cell service and show IMEI? Emergency calls only.

kind jacinth
#

I think you should really check out graphene os

silver furnace
kind jacinth
#

It addresses everh concern you've had

silver furnace
#

Lol true. But all jokes aside, that's kinda a real issue now. Ideally you would be able to start your own ISP for max muh freedoms. But idk how neutral the net is. I heard Google themselves literally throttled some social thing that tried. Parlour I think it was

#

Emails I said on here before that it's even difficult to host your own SMTP. It's a reverse effect of everybody using like just 3 services literally across entire planet. They will always be permitted regardless amongst eachother. Meanwhile small personal SMTP server you like have to ask for unban every different provider. It's far more convenient like you said to use GMail or something... but probably better just say the only one convenient enough to the point of being guaranteed usable... at all...

#

So we're at the point where literally people have to ditch some of these companies together as entire internet lol. Just like a revolution for independence but entire planet. And it's net independence in the form of net neutrality. Internet already globalist society minus China and places like Russia a bit now.

silver furnace
# kind jacinth Bro did you miss the /s

But the whole thing is can you think of any decent solution that isn't /s and will work. For things like mailbox, I actually challenge you to think of how many different providers the entire Earth uses. I'm amazed that it's actually just a handful. Then you have smaller ones on diff scales I guess specific to countries idk. Those are better and worse in their own ways. It's actually kind of sad.

#

Like Russia right now: they sometimes ban all of FB nation-wide. China... Net neutrality lol it's doomed from the start. So long as somebody else provides connection, it's threatned. But 1 of 8 billion using GMail idk. That's just asking for it. Maybe VPN is best thing we'll have.

#

And btw I have an uncle who literally did that. Really polar siberian town in Russia. Has no internet. He was overseeing pretty much operation to set up first ever connection. I forget if it was the second one after satellite or the satellite one itself. I mean he said it was nice. They 'accidentally' pulled like 150Gbps or some sht with torrent client kekw

burnt spear
#

anyone do unity?

inner wraith
#

Yes. People do Unity.

wintry plinth
#

sup

#

i need resources on how to decompile a .jar (on linux)

silk eagle
#

winrar

#

what type of linux

wintry plinth
#

ubuntu flavour kde

wintry plinth
silk eagle
wind horizon
#

There are a lot of guides from archive utilities to using jar cli. Iโ€™d suggest Googling how to extract jar file and then returning to ask for help with a specific step if you get stuck. ๐Ÿ™‚

silver furnace
#

Nah there's one that runs on Java. Install Java and get jd. It's click to run jar and select jars to decompile. Idk but you get a lot of it back unless it's obfuscated. If it's obfuscated you still got Java code that's compileable technically. You can edit the Java and compile it still.

#

Or you decompile like scala to Java. Obfuscated?

silver furnace
#

Java decompiler itself has both kekw

neon oriole
nocturne galleon
#

As I am completely new and have this confusion. As I have scared that which pathway to start with, I am interested in being full-stack engineer as its most demanding and pays off more if I am right?

Which is the right way to progress?
Learn Front-end then after complete move to Back-end then after complete you are a full stack or learn more later on
OR
Just start learning Full-Stack

So does it means that I have to go like this? Front-end then to back-end and finally to full-stack instead of directly starting with full-stack?

So thought maybe I have to complete one by one like front-end then back-end and then full-stack instead of just start full-stack??

Kindly guys give you advice and suggestion regarding this please!

wind horizon
nocturne galleon
#

I heard a lots doing Web Development/ Web Design by being a front-end or back-end or full-stack or mern-stack developer.

#

So I want to exactly start the most demanding and future-proof career by which i can work at anywhere and get top paid as well

wind horizon
#

There isnโ€™t much future proofing in this career, you either keep learning and changing or you become outdated. ๐Ÿ˜…

#

Just jump in head first, youโ€™ll quickly learn what you do / donโ€™t like. There is massive amounts to learn and do in this field, there is tones of people who never even touch the web. ๐Ÿ™‚

#

If you know you want to be in the web space and think you want full stack, Iโ€™d suggest just jump into JS to start. Itโ€™s heavily used front end and now popular on backends too, so itโ€™ll give you a decent coverage on both sides in 1 language to start. But keep in mind many of the challenges are different between the 2 areas still.

Often times today devs who do front end are just expected to understand or be able to touch backend. I think the idea of full stack isnโ€™t as much of a special thing as it used to be, now it feels more like โ€œwhat are you strong inโ€ but working both is average / business as usual.

Many new devs I work with come in knowing only FE and within a year are semi comfortable opening backend PRs. Itโ€™s not that they are backend pros and they may still prefer front end, but itโ€™s inefficient often times to have someone only do 1 thing instead of them being able to deliver a full feature including backend work.

#

But there are positions that are still exclusive, so if you love one and hate the others you can find those roles. We have teams that only build client side code / reusable modules and we have teams that only build internal services and never touch the web app. But Iโ€™d just say itโ€™s no longer special imo for a JS/FE dev to be listed as full stack. ๐Ÿ™‚

nocturne galleon
#

Alright, thank you so much for explaining me in-depth details

#

I will got as short form to ask, if I were to select from front-end or back-end or full-stack which one to choose?

wind horizon
# nocturne galleon I will got as short form to ask, if I were to select from front-end or back-end ...

Iโ€™d just start learning to program, you will have a lot to learn for the basics if you arenโ€™t yet programming before you even have to worry about that. ๐Ÿ™‚

If your asking because of picking some kind of training / course selection Iโ€™d personally pickup one marketed as full stack just so it gets you exposure to a little of each to understand the whole picture.

But you may even end up hating programming, so I wouldnโ€™t over think this. Jump in learn some basics and then pick your path after you have basics of programming down.

nocturne galleon
#

So I want to get a full work done and be all in one, so that is why I want to be full-stack engineer.

#

Thus for that I am choosing code academy, full-stack engineer course to get pro certificate and be a certified

wind horizon
nocturne galleon
#

But due to covid-19, till now its almost 5 years I am not able to complete my A Levels (College) due to financial issues, so that is why I am seeing maximum persons doing Remote jobs or Freelancing so I that is why wanna enter the Web Development world. So that is why i was asking if the front or back or full is the go green or not! ๐Ÿ™‚

cyan niche
#

Be full stack and do both

#

You can do either

#

Although any programmer should be able to learn any role.

kind jacinth
#

In my experience full stack is still mainly back end but you're expected to touch some front end every once in a while

#

Honestly I wouldn't worry too much about what to focus on, your core skill as a SWE is to read documentation. You should be able to self teach yourself any stack with just a few weeks of reading

#

When you're starting out, it's more important to find a slice you enjoy so you don't lose motivation

drowsy elbow
#

Erm.... this is definetely not null...

#

I guess the getters throw

cyan niche
#

hahaha

silver furnace
#

And not getting classified is an understatement. Sometimes you're blacklisted by default and have to get whitelisted :D

neon oriole
#

dylan beaty has an interesting talk about mail/smtp

#

We're not quite sure exactly when email was invented. Sometime around 1971. We do know exactly when spam was invented: May 3rd, 1978, when Gary Thuerk emailed 400 people an advertisement for DEC computers. It made a lot of people very angry... but it also sold a few computers, and so junk email was born.

Fast forward half a century, and the rel...

โ–ถ Play video
silver furnace
#

Wow 4-5 days ๐Ÿ˜†

#

OTP or nonce usually expires in 5 min max

silver furnace
#

Wow I went on a rant weeks ago about this and people made fun of me. And yet I was right. The lefthand side is essentially originating from *nix username and RH side is just.... 'hostname'. Only it was made before even DNS resolution was written about by Robert Heinlein.

#

And I was literally on about the issues with the local side of the addys. Basically no standard. It's an FFA match

#

(Even though there is a standard)

stone warren
#

How am I able to add golang to Notepad++?

mental panther
#

people still use notepad++? KEKW

neon oriole
#

yes i do ...

frozen flame
#

Consider using literally anything else tbh... vscode is nice if you don't want a full on ide

#

Psure there's a golang plug-in for it too

neon oriole
neon oriole
frozen flame
#

Idk mate the rest of the world disagrees with you

#

Vsc isn't even my main editor (I use intellij mostly) but I can still recognize how insanely configurable it is through the use of both config files and plugins

neon oriole
#

the rest of the world also tought getting untested covid vaccines was a good idea ,and using spaces for indents is a good idea, so excuse me to not hold the rest of the world to a high standard when it comes to their choices,

frozen flame
#

Oh cool we got an antivaxxer

neon oriole
#

ah no im vaccinated for nearly everything but covid

#

if someone could give me why a basicly hermit programmer aged 35 who got infected and defeated covid before any vaccin was availeble , would need the vaccin im all ears. but it speaks for it self that you went with the vaccin part and not the spaces part of my reply

#

funny enough the FDA approved ivermectine as a valid medication for threating covid 3 weeks ago

frozen flame
#

one of those arguments is worth having, the other makes it not worth it to converse at all

neon oriole
#

smells like someone was not telling the truth about it being horsedewormer for 3 years

#

also smella allot like a money grab as if they would have approved it 3years early , no vaccin could have gotten the emergency use authorisation

#

on the vscode thing, the last thing i tried to do before i gave up on the editor. is to set the font to: Fira Code : Retina , with ligatures enabled...

#

and on the plugins part, plugins have become so convoluted that there are now multiple plugin packs (availeble as plugins) for just programming python... and its anyones guess wich plugins are any good , will be maintained into the future, are incompatible with eachother eg...

fading osprey
#

but this isnt the channel for that debate

neon oriole
#

minimally ... not in a way the other vaccines were, and the boosters were untested , unless you count 9 mice as a valid repr for humans

silent gust
neon oriole
#

define clean and helpfull and we can come to an agreement ๐Ÿ™‚

silent gust
neon oriole
#

does it have a cli , or terminal version that runs without the need for a GUI/graphical server being present

silent gust
#

I mean vscode is just good nothing to hate it aside of performance may be

neon oriole
#

vscode has a terminal client , lol well it has a cli, that wraps some git functions, meaning tey made some stuff accessible from commandline but not the editor part , of an editor ... i mean , git already has a cli no need for vscode to wrap it again

silent gust
neon oriole
#

and im happyto offer up some performance for a verry well integrated IDE with its tools, i use to love aptana3 ,ERIC7 (python), and i still use kdevelop for c so

#

the editor part of kdevelop is also availeble as kate the text editor , unfortunatly also no tui ... ๐Ÿ˜ฆ

silent gust
neon oriole
#

so vscode is basicly the editor of visual studio but with the development environment dropped from it , and then patched on again with questionable plugins ?

silent gust
#

And diversified

neon oriole
#

visual studio also has plugins and is (in terms of MS bound env) quite versatile , ...

silent gust
#

I prefer something cleaner from my point of view

neon oriole
#

and i have no prolems with plugins , and i have the same problem with the plugin system for nvim, ... towards beginners or learning a new language, Wich plugins does one need and or install , that are somewhat maintained . wich ones are required for a basic env and wich optional ,...

#

sublime text is cleaner then vscode

silent gust
neon oriole
#

click a button once and a while like everybody does

#

gvim ,neovim-qt both are free and much cleaner then vscode (even onivim is cleaner then vscode but written in javascript so :((()

silent gust
silent gust
#

3rd person of the day asking it

neon oriole
#

if you spend some time in the programmers hangout python channel , you start wondering the same about vscode

frozen flame
graceful drift
#

BRUH can someone help me i try installing php on nginx on a ubuntu machine and im getting error 500 when i visit the php test page https://rapter.ddns.net/info.php

frozen flame
#

I've noticed that whenever many people come by asking for garbage it's because of a YouTube tutorial lol

graceful drift
frozen flame
#

Tell your friends not to watch YouTube tutorials for programming lol

graceful drift
frozen flame
#

Programming isn't something you learn passively

#

Ah

graceful drift
frozen flame
#

500 error

#

I don't do php so I'm not much help to you unfortunately

graceful drift
midnight wind
#

what are you trying to do

graceful drift
#

install php 8.1 to nginx

#

im checking the logs theres nothing

midnight wind
#

apt install php8.1 php8.1-fpm

graceful drift
#

i might just uses nodejs

midnight wind
#

fastcgi_pass unix:/run/php/php8.1-fpm.sock;

graceful drift
midnight wind
#

then it's setup

graceful drift
#

idk where the error is coming from maybe its from the php code itself

#

no its not from the code

midnight wind
#

get rid of everything before echo

graceful drift
#

i know i just put that incase

#

did it with out it already

#

maybe permissions

midnight wind
#

@graceful drift systemctl status php8.1-fpm.service

graceful drift
midnight wind
#

idk then, I havn't messed with php setup in a while. I host everything in a manged enviroment like siteground

graceful drift
#

ill try reinstalling it

graceful drift
#

wait when i alt tab i see a not full windows with team viewer

#

bruh

midnight wind
#
  1. using teamviewer....
graceful drift
#

i used it a few days ago

#

was for a quick diagnostic

frozen flame
#

T-teamviewer?

graceful drift
neon oriole
# frozen flame Tell your friends not to watch YouTube tutorials for programming lol

i would love for all the youtube videos to actually be forum posts or articles some where much easier to search and assess for quality ... but unfortunatily they arent and they do hold valueable information if you wnat smth more or less up to date as the creators actually might earn something from it whereas most articles are written for free

neon oriole
#

note how dominating vim like are over vscode :p , where as vim certainly fall in the category easy to use and flat learning curve (neovim and vim are separated out but essentially up to a version ago interchangeble)

kind jacinth
#

I feel like I'm the weird guy for doing all my dev work in sublime

frozen flame
#

I mean sublime is fine, it's just nothing special

kind jacinth
#

Yeah I just never see anyone else using it lol

#

Everyone's arguing between vim and vscode and I'm just sitting in the sidelines

drowsy elbow
drowsy elbow
drowsy elbow
#

@frozen flame are you my old co-worker? he had the same name and attitude

frozen flame
#

Unless your last job was in roofing, probably not

drowsy elbow
#

Haha, guess you're his lost brother then ๐Ÿ˜„

neon oriole
#

and i had a typo in the prev one : well , typo , i meant to say dont fall in the category easy to use and flat learning curve

#

the only editor harder to exit then exitting vim when opened the first time with nvim filename.txt //this will skip the startup screen telling you how to exit is : ```
ed

#

seriously i usually end up having to kill the p process in the case of ed no clue how to exit that one (ctrl +z works to background but that all i got without looking up the manual)

sturdy ingot
#

It's basically the same as :q in Vi, but Q is like :q!.

cyan niche
#

fuck I git cleaned my ignored files

#

OOPS

#

finding and putting in secrets all over again EdiePout

neon oriole
# sturdy ingot

yeah i know i had to look it up the first time, since theres not much of an indicator on howto quit, or howto open help for that matter

#

and even your nice ecplanation sombebody new would go : how do i enter q as command and not as letter?

#

first launch , execve manpager ed && $_ , or so guarding against first time accidentals

cyan niche
#

People be like "DUDE VIM SO EFFICIENT" to write like 40 lines of code a day.

nimble shore
#

Can someone review my code. Need to submit as an assignment for an internship. (Java/SpringBoot) Just want someone to look at it before I submit

mental panther
nimble shore
#

@mental panther umm
How do I ask for a code review? that is if that blog was a response to my question

mental panther
#

generally by posting the code

nimble shore
nimble shore
#

java.sql.Date
or
java.util.Date
which one should use used to store dates in database
and why?

reef tangle
#

Anybody know how to use matlab?

twilit beacon
cyan niche
midnight wind
spring skiff
#

Yall where can I get java jdk 11.0.20, specifically that version?

#

This one project I need to get working doesn't run on anything else

reef tangle
# midnight wind yes

so my professor, said i should know matlab by now, despite being a fully EE student and having literally 0 experience with matlab, I coded like 6 basic af beginner things in intro to programming on C++, but that was literally like 2 years ago as a freshman and i have no idea how to code anything in matlab
either way, if you know where to tell me to look for resources or just help me with this assignment

#

I have to "Write a program in MATLAB to initialize a 1-D array with 10 random numbers and find
the range (R) of these numbers where R = MAX โ€“ MIN. MAX and MIN are two user
defined functions that you write to find the maximum and the minimum of these 10
numbers."

cyan niche
#

My professors don't expect me to know Matlab well and I'm in grad school

reef tangle
#

hmmm

#

i need to like make it look like its not plagarized too lmao

cyan niche
#

Well I didn't say copy it

#

"how to initialize a 1-d array in Matlab"

#

"how to generate random numbers in Matlab"

#

I'm guessing you can figure out the max/min functions from here

#

Anyway that's what I would do if I had your assignment.

red mulch
#

Files 1363 : Disk Used/size: 1.11 TB/4.6 TB, Avg file: 851.69 MB/3.45 GB

real 8m40.670s
user 8m30.997s
sys 0m5.387s
r

#

ooooof. calculating reflinks is hard

mental crest
#

How do I reverse engineer a really old abandonware (seems to be some word processor)

#

Not necessarily the code itself, just for now the file format could have been enough

#

Like, by creating files with specific pattern and compare their hex layout, I found that there are 20-24 bytes that are related to adding underlines

#

I have figured out that 12 of these bytes specified the line shape and coordinates to draw them, but I am lost with the other 8-12

#

It seems that those bytes were storing the line shape index and start coordinate in another format, but I am not entirely sure about that

red mulch
#

Pretty much what you're doing. Make educated guesses, iterate over it.

#

also feel free to ignore parts of it you don't care about

#

#I have no idea what these bytes do, but it doesn't seem to affect the outcome, so I ignore them!

red mulch
# reef tangle so my professor, said i should know matlab by now, despite being a fully EE stud...

wirte me a program in matlab to track a series of objects that have intervals (extents). When intervals intersect, they should be changed/added so that each interval has the correct reference count.
You should then be able to report the total number of extant blocks (the size of the intervals/extents), along with the number of allocated blocks - the size of the extents multiplied by the reference count.

#

There's about 2 million extents to track ๐Ÿ™‚

kind jacinth
#

The Matlab YouTube channel is a great resource

#

Also doesn't Matlab themselves have an interactive tutorial on their website?

vale parrot
#

i want to choose software development as my path next year in highschool, but i want to learn some basics myself this year

#
freeCodeCamp.org

In this article, I'm going to show you 140 beginner friendly courses where you can learn computer science and programming for free. The freeCodeCamp courses are completely free and some of them include a free certification that you can add to your LinkedIn or rรฉsumรฉ. Note that some of the

#

what if i complete all these courses?

kind jacinth
#

No idea about that but I always reccoment cs50x and 6.00x on edx

#

Cs50 is more broad and probably more interesting for beginners while 6.00x teaches fundamentals really well

#

Oh looks like 6.00x has been renamed to "Introduction to Computer Science and Programming Using Python"

simple canopy
#

Whilst I think Python is really easy to get into, I am actually not a huge fan of it (like I really dislike its syntax) and I more often than not end up suggesting JavaScript which is also not that hard to get into.

kind jacinth
#

Python is a programming language for mathematicians and scientists. It reads almost exactly like how you would describe an algorithm in a CS paper. Whether that feels intuitive to you or not depends on background.

Personally I feel like python reads like well written perl. I've also written like <150 lines of JS

simple canopy
kind jacinth
#

I don't really have much of an opinion of it. It looks like code.

Probably my only impression is that it there seems to be a lot of pitfalls to avoid to not code yourself into a corner, but that seems to be alleviated by typescript. Altho that itself is a weak "feeling" that I can't exactly back up well

simple canopy
#

yeah. Thatโ€™s why TS is so cool. And yeah sometimes JSโ€™s memory management makes little sense to me and I fall into traps I only realise I fell into much later

inner wraith
#

Hm. Well if we're throwing opinions around...
Python's nice to write - clear and concise - but it's still very slow. PIP's great for the most part and it's possible to build a great project on well-known libraries without drowning in dependencies to audit due to its strong standard library. Type hints help a lot.

Javascript is faster with V8 but NPM is a mess, as is dependency management. The syntax is also a bit of a mess and I've fallen afoul of ASI a few too many times to be pleased with it. The standard library is comparatively anemic and there's an NPM package to do basically anything, and hundreds of dependencies in a project is far from odd. No typing was a definite pitfall for the ~60k backend project I had to help clean up though I'm assured Typescript helps.

C#'s interesting. I haven't done a lot with packages because I haven't needed to - the standard library is quite good and my projects have been small. I'm uncertain how many idiosyncracies are from VS versus C# itself. The language itself is less flexible than say Python but having typing by default has been pretty nice. There's more boilerplate than in Python or JS.

kind jacinth
#

Python is slow, yes, but that shouldn't really be a consideration unless you've demonstrated you need the speed -- that's premature optimization imo. Pythons strength is in it's speed of iteration. You can prototype and drastically change things around very easily.

Second, python IS fast. If you're not using fast, cpp based libraries, then you're not really writing good python. This is why python is the premiere choice for data manipulation and ML.

inner wraith
#

I say slow but I do have a tiny project serving 1k reqs/sec on one interpreter - it's enough for some.

#

It is slow. And you're mistaken if you think compiled libraries makes Python good generally, any more than Bash is good if you make sure to use it solely for pipes.

#

You can certainly use them to do things quickly with Python as an interface - NumPy for example.

#

But that's NumPy and the incredible work done on it, not Python

kind jacinth
#

If your program can't make heavy use of numpy (whether that's scipy, opencv, pandas, tensor flow/pytorch, etc) it really shouldn't be written in python

inner wraith
#

I don't always have the luxury of being able to turn to a big C library that does what I want and for certain tasks like webservers, games or the like the brains and performance-critical components are written in Python.

inner wraith
kind jacinth
#

Nothing performance critical should be written in python imo

#

It is fast particularly for data processing and again, it's strength is in making MVPs

inner wraith
#

It isn't fast for data processing.

#

This is why data processing tasks in Python hand your data off to the libraries immediately and you do your tasks against what they represent to you.

kind jacinth
#

I'm saying python is fast bc you can hand everything off to faster libraries. You're saying python is slow bc you have to hand everything off to faster libraries. This is a pointless conversation.

inner wraith
#

The former is not correct.
The latter... No. I'm saying Python is slower than the alternatives mentioned. Libraries for fast processing do not mean the language is fast.

#

I still use Python for stuff. It's fast enough for many of my use-cases.

cyan niche
#

I've never had to wait on any python program I've programmed

#

Skill issue.

twilit beacon
cyan niche
#

Don't learn C++ learn Rust

kind jacinth
#

Cpp is employable. Rust is better.

twilit beacon
#

perhaps

cyan niche
#

Rust will be more employable later

twilit beacon
#

mayhaps

cyan niche
#

Definitely

twilit beacon
#

is rusts syntax similar to that of c++?

#

never programmed in it

hollow basalt
#

rust

unborn imp
#

Realistically, don't worry about the speed of a language unless you know going in that gonna be doing some really heavy number crunching. I've used Ruby - an infamously slow language - professionally for over a decade doing web dev related stuff, and in a surprisingly large number of cases it's fine.

#

(It's also not nearly as slow as most people seem to think it is, especially when turning on JIT compilation in the latest versions.)

#

Rust is a great language. It also has A LOT going on. If you don't know anything, I'd go with a friendlier language like Python or JS or Ruby. It's easier to keep motivation for learning up when you're making progress, and Rust has a lot of things that'll completely block you until you learn how it works.

fading osprey
#

This right here ^^

I spent a lot of time learning to code in C#, python, and then JavaScript before I finally felt at home with a language.

After a couple years with JS I got bored, heard good things about Rust and decided to make the leap, it took me over a year of consistently trying to make a semi-usable CLI app which displayed a countdown timer until the next rocket launch was supposed to happen.

it was very slow going, and took probably a good few years off my lifespan at this point from trying to figure out all this new stuff that I had no concept of from my time working with JavaScript.

inner wraith
#

...And can probably afford a few extra cores for them to live on.

#

There are exceptions - I wouldn't implement software video transcoding in Python, JS or Ruby - use ffmpeg or something. [3D] Games... just don't bother, use Java, C#, C++ or the like.

unborn imp
#

Depends on the game. For 2D games, use whatever you want. Python is super popular for roguelikes. CrossCode runs on Switch and uses JS. Lots of JS games on Steam running in an electron wrapper.

inner wraith
#

lol I amended my message at the same time

#

I detest JS+Electron with a burning passion (comparatively hard on CPU) though I can admit it's possible for games that don't require a lot of compute performance.

unborn imp
#

The V8 JS runtime is actually phenomenal. It's optimized to the point that you don't actually get that much more performance by using a compiled language in many cases.

inner wraith
#

It can sometimes be similar to compiled languages.

unborn imp
#

The garbage collector is the big thing that trips you up

inner wraith
#

In the general case it is not, though impressive for what it is

unborn imp
#

That, and the warm up period for the JIT.

#

Although you get that with Java and C#, too.

inner wraith
#

Ah, but with both of them you can have in-process parallelism... and they're both generally much faster.

#

One does not need a Ferrari to go grocery shopping but this does not make a Kia Picanto equivalent to it in all aspects.

unborn imp
#

I'm mostly tired of seeing people advocating for rewriting Javascript applications in Wasm when the speed gains just aren't that substantial for many applications.

hard rose
#

Can we just settle this by agreeing that Microsoft JScript with wsh was the best version of js and it should be used for everything

inner wraith
#

No

inner wraith
#

We should use cobol

hard rose
#

Not me sitting in my cubicle writing code in object pascal rn ๐Ÿฅต

unborn imp
inner wraith
#

Ah I remember that (there are real ones too of course)

inner wraith
#

So you may have Cobol on your webserver and browser

cyan niche
hard rose
#

How do you think I feel... Codebase is from 1997

nimble shore
#

Java /Springboot/SpringDataJpa
How do I ensure that owners can only access their own vehicles
I have owner and vehicle entity with ManyToOne association defined in vehicle class.
Right now i am taking ownerid and vehicle id in url path to check if owner id in vehicle model is same as the one in url path

cyan niche
hard rose
#

Eh, the main part of my job doesn't require me to mess with that part of the codebase. Mostly doing C# .NET MVC web stuff

cyan niche
#

ahhh gotcha

hard rose
#

Plus benefits/pay are good especially considering I just graduated

cyan niche
#

My first internship I was working on some weird proprietary database system that had a syntax based off of Pascal and I got paid like $40k that year to waste a year of my life learning it.

#

Looking back, I didn't have a choice, but holy shit there were people working there for twenty years with that system. I was like bro you have no relevant skills in anything else

#

They're basically stuck at the company because no one else uses it

hard rose
#

Yeah, trying my best to stay out of the pascal stuff. The syntax is so wack ๐Ÿคฃ. Got a lot of ppl at my company that have been here for over 25 years. A few over 40 yrs

inner wraith
#

A friend of mine's maintaining a system written in Gupta SQLWindows

cyan niche
#

How much?

#

Because no way I'm touching something like that for less than $300k

cyan niche
#

You're basically sacrificing your own relevance to work on systems like that, so the compensation needs to be a lot higher before anyone should really consider it career wise unless that's what you really enjoy. Like I'm thinking about quitting because we're not using Vue or React where I work.

#

And I think at this point I wouldn't work on anything but vue

hard rose
#

If I were only using pascal I'd agree. Only planning on staying for another year/ year and a half as is. Waiting on gf to graduate then moving.

inner wraith
cyan niche
inner wraith
#

Apparently there was an attempt at writing a new one with a consultancy firm and the proof of concept took literal hours to respond to queries and as such was shelved for all of eternity in favour of a specific old version of SQLWindows.

#

Considering what they were doing and the industry I have no idea how you could fuck up a rewrite that badly but I'm sure it was all very entertaining if you weren't paying for it or involved with its development.

cyan niche
#

Sounds like what happens when you run tools to convert.

boreal crystal
#

Hey does anyone know of a tool that scans old hard drives and pulls out the personal files?

Family has some old hard drives they want the pictures off but it's scattered all over the place in the os and I don't want to search through each directory

azure mason
#

I mean you can use file explorer to search file types

#

if they're pictures just search .jpg .png

#

or if they're camera photos you can search for the raw files

boreal crystal
boreal crystal
fiery void
# boreal crystal Hey does anyone know of a tool that scans old hard drives and pulls out the pers...
# Prompt the user for the source drive to scan
$sourceDrive = Read-Host "Enter the source drive letter (e.g., C:)"

# Prompt the user for the destination folder
$destinationFolder = Read-Host "Enter the destination folder path"

# Create a list of file extensions to search for
$fileExtensions = @("*.jpg", "*.jpeg", "*.png", "*.doc", "*.docx", "*.xls", "*.xlsx")

# Initialize a counter to keep track of copied files
$copyCount = 0

# Inform the user about the scanning process
Write-Host "Scanning $sourceDrive for personal files..."

# Use Get-ChildItem to search for files on the source drive
$files = Get-ChildItem -Path "$sourceDrive\*" -Include $fileExtensions -File -Recurse -ErrorAction SilentlyContinue

# Loop through each found file and copy it to the destination folder
foreach ($file in $files) {
    $destinationPath = Join-Path -Path $destinationFolder -ChildPath $file.Name
    Copy-Item -Path $file.FullName -Destination $destinationPath -Force
    $copyCount++
}

# Inform the user about the number of files copied
Write-Host "Copied $copyCount files to $destinationFolder."

# Ask the user if they want to open the destination folder
$openFolder = Read-Host "Do you want to open the destination folder? (Y/N)"
if ($openFolder -eq "Y" -or $openFolder -eq "y") {
    Invoke-Item $destinationFolder
}

# Script completion message
Write-Host "Script completed."
boreal crystal
fiery void
#

Powershell

fading osprey
#

wait, people know how to write that? damn, im impressed

red beacon
# fading osprey wait, people know how to write that? damn, im impressed

I worked at a small company as a developer and the sysadmin automated a lot of his work using Powershell, he even automated some of the dev environment's setup using it and wrote some tools to measure system load for our servers. I was really impressed by his use of it and how powerful it is if you're in a windows environment

fiery void
#

This is exactly why I know powershell as well

fading osprey
#

You see to me it is all just like trying to read nordic runes

#

I dont know it, I have little use for it, so im not gonna learn it

fiery void
loud storm
hexed salmon
#

I have done a epic procrastination moment and now have to get autonomous vehicle code working in Beamng.tech by thursday

hollow basalt
#

Someone can

nimble shore
cyan niche
#

It's pretty readable

cyan niche
#

So like, when you want to add comments, you want to add useful information

#

Avoid comments like "Creates record in database". But something like, "Also generates computed values [values] on creation" may be helpful.

#

Or like, "Records are also created from DB function Create_Record"

silk eagle
#

or for explaining math (unless your project is 90% math) or workarounds that might not be immediately obvious

grim wind
#
function permute(str, key, obfuscate) {
    const chars = [...str];
    const indices = Array.from({ length: chars.length }, (_, index) => index);
    const seed = fnv32(key);
    const rng = mulberry32(seed);

    for (let i = chars.length - 1; i > 0; i--) {
        const j = Math.floor(rng() * (i + 1));

        [indices[i], indices[j]] = [indices[j], indices[i]];
    }

    const result = new Array(chars.length);

    if (obfuscate) {
        for (let i = 0; i < chars.length; i++)
            result[i] = chars[indices[i]];
    } else {
        for (let i = 0; i < chars.length; i++)
            result[indices[i]] = chars[i];
    }

    return result;
}

Does anyone know how to make this algorithm go faster? It's performing very poorly on processors that do not support scatter and gather vector instructions

inner wraith
# grim wind ```js function permute(str, key, obfuscate) { const chars = [...str]; co...

Run a profiler and find where most of the execution time is spent, decide if those bits can be replaced with a less expensive alternative. If most of it's offloaded via FFI to C or whatever already and you can't change algorithms... good luck, pick your preferred compromise - consider if you can farm it out to a subprocess and return when it's done if you need higher throughput (will do nothing for latency). Else, decide if not running it on processors not supporting vector instructions can be unsupported, else... pick your compromise.

grim wind
#

I've done a profile now. Seems like the indices generation take up a lot of the stack temporality

#

I love how my friend was like hashing functions can be bad for performance

#

But the CPU doesn't even care. He literally counts it as 0 ms

olive ferry
#

My C++ winforms application is having issues with linking external resorce files. When setting the icon it throws this error:

  HResult=0x80131532
  Message=Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "CppCLRWinFormsProject.Form1.resources" was correctly embedded or linked into assembly "Program1" at compile time, or that all the satellite assemblies required are loadable and fully signed.
  Source=mscorlib
  StackTrace:
   at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
   at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
   at CppCLRWinFormsProject.Form1.InitializeComponent() in Form1.h:line 295
   at CppCLRWinFormsProject.Form1..ctor() in Form1.h:line 20
   at main() in CppCLR_WinFormsProject.cpp:line 19```

It is linked onto this line of code in the Form1.h file

```this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));```

I have tried adding the icon as a resource, regenerating the .rc file, diffrent .ico files and not setting the icon to anything. When it is not set the program runs as expected.

This is a C++ winform
raven nimbus
#

is it just me or is it not possible to create new gh repos rn

dense fox
drowsy elbow
#

Yay.... argumentnullexception on a parameter which isn't in my control... (No overload on either constructor or method...)

#

Anyone ever used this library?

cyan niche
#

Is it not Barcode(code, type, boolean)

rich trail
#

Is anyone able to help me figure out what I need to change with this python code snippet (uses pandas) so it still does everything but sum the values? Removing .sum() didnt work lol

drowsy elbow
cyan niche
drowsy elbow
#

new NetBarcode.Barcode(...) is the exact same.

cyan niche
#

Oh I see, it just set its to 128

drowsy elbow
#

Lemme try 128 and see if that works

#

Not even sure what a 128 barcode is tho

#

Nope same error

rich trail
drowsy elbow
#

Ok I managed to fix it by setting the boolean to false. Not showing the label.

#

Still a bit weird tho.. Anyways, I can continue now ๐Ÿ™‚

cyan niche
#

Probably has to do with this and what fonts you have installed

drowsy elbow
#

That's not an argument null exception, and the exception message is different. Anyways, it could be related if it gets caught higher up and then throws something else

cyan niche
drowsy elbow
#

Hmm, didn't think of that

cyan niche
#

Try running that code in a vacuum and see what happens

drowsy elbow
#

I assume that's the case

#

FirstOrDefault and then say it can't be null !

cyan niche
#

Unless the default is null lol

drowsy elbow
#

FirstOrDefault means if nothing is there, it's null

#

It would be better to just use First() in that case

#

That one will fail if there is nothing there

#

Oh well, it's fixed for me now

cyan niche
#

My brain parsed the ! not as code !

#

whoo, also I hate this slow mode

drowsy elbow
#

The ! means "I know what I am doing compiler, it's not null, trust me bro"

#

Cuz if they didn't add the ! they will get a warning with "Hey, this might be null"

#

It's a recent feature, but I don't really like it tbh

cyan niche
#

Ohhh yeah I'm not the biggest fan

rich trail
cyan niche
#

well you can't just have a variable floating around by itself

rich trail
#

are you referring to grouped_hours_rp1?

cyan niche
#

The code below it looks like it counts on the fact that it's already grouped, so you removed the group

#

Oh, does that print it?

cyan niche
rich trail
#

I guess in this case all Im doing now after the change is sorting the values yeah?

#

Ahhhh yeah I dont even have a reference to the federal wages anymore....

#

I updated it to this so I can still keep the federal wages reference, but still getting a new key error down the line

rich trail
cyan niche
#

I'm not sure why you would need the next part of the code if you're removing the sum

#

it's essentially joining a dataframe to itself based on its aggregate values

cyan niche
#

You're no longer aggregating, so there's no new data to join

rich trail
#

Ahhh ok, will try removing the second part
edit: Oh damn doing that will mean I have to rework some part a little further down. I am unequipped for this ๐Ÿ˜ญ

burnt spear
#

how do you add more than one webpage to your html website?

fading osprey
#

by adding another html file

burnt spear
burnt spear
fading osprey
#

Best source for anything HTML related:
https://www.w3schools.com/html/

burnt spear
burnt spear
midnight wind
#

Best would be to not open the html file directly but to use a server like VSCode liveserver for development

#

Still html, just gets rid of some quirks with using local paths

dense fox
#

https://kitty.addy.codes/

Been working on a little virtual pet to live at the bottom of my blog! So far it hangs out, gets the zoomies, gets tired, will sit by its foot bowl when it runs out each day and wait for someone to fill it up! It also tracks the global amount of pets it's received by clicking it, and get mad if you do it too much.

Yes this was a top priority before actually making a post template.

vestal spire
#

If in a database I have 2 tables:

Table student
-- id (PK)
-- student_id (string, not unique)

Table student_info
-- id (PK)
-- student_id (string, not unique)

Is it possible to join 1-1 in Java spring boot using either @JoinColumn or @OneToOne ?

Technically, there can be multiple rows with the same student_id in both tables (from the db schema) but it's not possible from my code implementation

red mulch
#

why is it a string not an int?

patent silo
red mulch
#

ehhhh

#

my main issue is the PK just says PK

#

so it's not clear

patent silo
#

I mean what's the issue with the primary key being an autoincrementing ID?

red mulch
#

no issue at all

#

but why would the linking ID be a string

patent silo
#

I mean, so long as there's a unique key constraint for the student ID that shouldn't be an issue

red mulch
#

If the ID is an int and the relational ID is a string, then that's stupid

patent silo
red mulch
#

and it doesn't say.

patent silo
#

That's true as well

red mulch
#

if it's an integer it should be an integer type

#

if it's an ID that's a string, sure, don't care.

patent silo
#

What's more concerning is there's no unique constraint on the student ID though

#

Why would you have two students with the same ID?

red mulch
#

yeah this is ... very bad

#

student id and student id

patent silo
#

Yeah, if you're gonna havea student table with identifier, the PK is given to be unique, but your student_ID should definitley be unique

#

Else how are you gonna make proper joins..

red mulch
#

I mean it has an ID. That's a duplicate field. and if it isn't a duplicate, your database is fundamentally broken.

patent silo
#

Only scenario I can think of is maybe you're relying on a GUID-like ID that's designed to be unique when generated

red mulch
#

ehh, I think you're overthinking it

patent silo
#

I mean yeah for this that would be overkill

red mulch
#

not that it doesn't happen, but even then it's stupid, because it should be named something like student_initial_id or whatever else to indicate it's something different

#

if it's not obvious, it's wrong.

drowsy elbow
#

Maybe id is the id of the student, and student_id is the id of their best friend ๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚

red mulch
fading osprey
#

I mean, even the naming convention isnt the best

if the table is called student then (to me) the obvious name of student_id is just id, because it would be student.id anyway, right?

none of this structure makes any sense to me, why is student_info being kept seperate to the student entity? surely thats the most important thing you are likely to query, so just having a table that stores the same data a second time under another name is a bit silly?

drowsy elbow
drowsy elbow
# red mulch True enough!
select * 
from student l
inner join student r
    on l.id = r.student_id
where l.id = @myId

(0 rows affected)

๐Ÿ˜ฆ

#

I think I joined it the wrong way around

#

Oh well, havne't done sql since I left my previous job

red mulch
#

meh, I get the point

ornate summit
#

So I have a Vulkan program that is supposed to look like this

#

Randomly it will look like this.

#

I have done the following debugging steps:

  • Dumped the buffers before handing them off to my buffer code
  • Dumped the bytes after being copied to the buffer returned by Vulkan
  • Rebound the buffer and dumped the bytes
  • Flushed the memory cache
    (All of them showed no corruption)

Nothing works, it just randomly does that. It sometimes takes a dozen tries but it always happens eventually.

Does anyone have any idea what might be wrong here?

inner wraith
#

I take it making the cave game will take you a while :P

cyan niche
#

I aint touching your graphics drivers with a 10 foot pole

#

or is it 5? hard to tell because graphics driver isn't finished yet

onyx gazelle
cyan niche
#

CSS needs some work

fading osprey
midnight wind
quartz walrus
#

That's a new one
monkaS

mental panther
mental panther
viscid glade
#

Nice and all. But, the only issue is that it sorta lags when zoomed in. Is there a way to mitigate this effect and what programming language I should use instead of css asnd javascript

viscid glade