#development

1 messages · Page 79 of 1

outer fjord
#

well, that unfortunately only makes it worse

nocturne galleon
#

hey, i'm receiving this crash

#
/////////////////////////////////////////////////////
//                                                 //
//                     BTS Bot                     //
//                                                 //
//             File: restartProcess.js             //
//                                                 //
//         Written by: Thomas (439bananas)         //
//                                                 //
// Copyright 439bananas 2021. All rights reserved. //
//                                                 //
/////////////////////////////////////////////////////

const log = require('./logHandler');
const Discord = require('discord.js')
const client = new Discord.Client()
const http = require('http')
const svrmgr = require('../server/serverManagerFunctions')

function restart() {
    log.info('Restarting...')
    // DESTROY DISCORD BOT SOMEWHERE
    svrmgr.closeServer()
    process.exit(2)
};

module.exports = restart;```
#
/////////////////////////////////////////////////////
//                                                 //
//                     BTS Bot                     //
//                                                 //
//         File: serverManagerFunctions.js         //
//                                                 //
//         Written by: Thomas (439bananas)         //
//                                                 //
// Copyright 439bananas 2021. All rights reserved. //
//                                                 //
/////////////////////////////////////////////////////

const log = require('../core/logHandler')
const uniconf = require('../configs/uniconf.json')
const express = require('express')
const e = express()
const http = require('http')
const app = require('./serverListener')
const { response } = require('./serverListener')
const server = http.createServer(app)

function createServer() {
    server.listen(uniconf.port)
        .once('error', function (err) { // If port in use, crash
            if (err.code == 'EADDRINUSE') {
                log.fatal(`Couldn't start the server on port ${uniconf.port}! Is there another application running on that port?`) // Fatal function calls always end the process no matter what
            }
        })
}

function closeServer() {
    console.log('yeet')
    //server.close()
}

module.exports = { createServer, closeServer };```
shrewd furnace
#

#the-wan-show for my browser extension which adds a download button to github

#

it’s fully open source, you can modify, build it, etc however you like

steep mauve
#

like what's the expected output vs the actual output

#

bc as far as I can see, the word gets replaced successfully

icy viper
#

does anyone know how to dynamically assign parameters in go?

#
cmd := exec.Command("MP4Box", "-dash", "5000", "-frag", "5000", "-segment-name", "'$RepresentationID$_$Number%03d$'", "-out", "output.mpd", "input1.mp4")
#

like here, we have one input parameter named input1.mp4, next time, I might have 3 inputs or 2, it dynamically changes, but how can I pass it in dynamically?

#

nvm, i found the answer. put all the flags inside an array and pass that to the command

#
cmd := exec.Command("MP4Box",commands...)
outer fjord
hollow basalt
outer fjord
#

Yeah, with the help of an online guide. I'm a beginner to C so I don't know a lot about programming

hollow basalt
#

Makes sense

#

What guide are you followig exactly

outer fjord
#

Let me see if I can find it.

#

This one

#

I've only had C lessons for 6 weeks now

hollow basalt
#

I don't want to give away yhe answer. So I'll simply hint that you re-read the part where he explains the printf

#

Nevermind, that's hardly a guide. That's just copy paste code

outer fjord
#

Yeah, like I said I don't know shit about C

hollow basalt
#

so?

outer fjord
#

I wanna learn, but I don't understand what is wrong. I tried multiple things in the malloc but everything I tried made it worse.

hollow basalt
#

you said 2 problems, what are you trying to solve first

outer fjord
#

I think that my memory allocation is wrong, but I don't understand what.

#

The first problem I want to solve is the output. This is it right now, but it has to be just one line without the artifacts.

#

So the first sentence means what word do you want to edit? and the second one is: What word do you want to replace it with?

hollow basalt
#

do you know how printf works

outer fjord
#

I only know the basics, that you define what you want to print, for example %d for int, and define which variable after the comma

hollow basalt
#

okay that works. do you know how while works

outer fjord
#

Yeah, it will keep doing something if some condition isn't met

#

not the best explanation

hollow basalt
#

okay now check where your printf is located

outer fjord
#

Oh damn you're right

hollow basalt
outer fjord
#

So now I just have to fix the weird 2222.

#

Could that have something to do with this?

hollow basalt
#

@outer fjord it's a warning

#

you should always try to check if the index is within the bounds of the malloc

#

but since you're a "beginner"

primal quarry
#

Python or js

hollow basalt
#

or

steep mauve
#

but looks like you already got some tips on that :)

outer fjord
#

No, but that was a stupid mistake I made but luckily with the help I fixed it.

#

Now I only have to fix the weird 2222

night flame
#

what does your malloc look like

outer fjord
#

char* newstring = (char *)malloc(i + cnt * (len1 - len2) + 1);

night flame
#

make sure that adds up to the length of the new string + 1

outer fjord
#

So could I do something with the original string + length word 2?

steep mauve
# outer fjord Now I only have to fix the weird 2222

i've got some ideas on that but I'm not sure if those will actually fix it:

c type strings (the char* ) are "Null terminated", which basically means that at the end of a string there is one byte with only zeros.
My first thought was that this byte was lost during the copying process. You can try adding newstring += "\0" before your print

outer fjord
#

Hmmm, I will try that.

steep mauve
#

hmm maybe try with ' '

#

cant test it myself currently

outer fjord
#

Testing it now

#

doesn't fix it unfortunately

steep mauve
#

hmm ok

outer fjord
#

But could I do something like that in malloc?

steep mauve
#

you could double check if the amount you're allocating is right by printing it

outer fjord
#

So printf malloc?

night flame
#

print whats inside the malloc

#

i + cnt * (len1 - len2) + 1

outer fjord
#

ah right

steep mauve
#

I'm counting 43 chars in the final sentcence

night flame
#

it looks like youre allocating for 45 chars but only printing 44

#

43 + \0

steep mauve
#

+1 for the null terminator, so its off by one

outer fjord
#

So the malloc is fine?

night flame
#

remove the + 1 in it

steep mauve
#

What I don't get is why there are 5 additional chars (so 49) when only 45 bytes are allocated

outer fjord
night flame
#

hmmm

outer fjord
#

this is with the 1 removed

steep mauve
#

sure the null terminator didn't work?

night flame
steep mauve
#

language chaos in my brain xD

outer fjord
steep mauve
#

bc for me it looks like there is no null terminator so printf prints everything from memory until it finds a \0

outer fjord
#

But can I add the 0 pointer, with something like newstring[i]='\0' ?

steep mauve
#

That's currently the only thing that comes to mi mind

outer fjord
#

That also does nothing

steep mauve
night flame
#

^ you just have to make sure the last character in the string is a '\0'

outer fjord
#

the last char in the string has to be \0, right. So if I know what the last char is I can set it to \0.

steep mauve
#

we could try checking for the null terminator like this maybe

steep mauve
#

in the case above this would be 43

outer fjord
night flame
#

strlen returns 54 because it's not null terminated I think. Where do you declare the initial string

outer fjord
#

In the main(void) I edit the string in a function

night flame
#

can you put a '\0' after dog

outer fjord
#

With the \0 after dog

night flame
#

hmmmm that is not good

#

the issue most definitely lies with the null character in the string. Are you declaring arrays anywhere for strings, make sure theyre + 1 in size to make room for the \0

outer fjord
#
{
    int a = stringreplace; 
    char search[100];
    char replace[30];
    char strzin[] = "The quick brown fox jumps over the lazy dog\0";
    printf("%s",strzin);
    printf("\nWelk woord moet vervangen worden?\n");
    scanf("%s", search);
    printf("Welk woord moet er voor in plaats komen?\n");
    scanf("%s", replace); 
    stringreplace(strzin, search, replace); 
    return 0;
}
#

This is the main function, in which I get the word to change and replacement.

#

But the allocation size for replace and search should be big enough right?

night flame
#

yeah the problem is probably where you declare the new string that's printed. Whats the int a = stringreplace; line for

outer fjord
#

I have to print the number of words that were changed, so return value of the function has to be a number. but I don't do anything with that for now

#

But with that gone the problem still persists.

night flame
#

you can remove the \0 from strzin, as ``` char strzin[] = "The quick brown fox jumps over the lazy dog";

is the same thing as ``` char strzin[44] = {'T', 'h', 'e', ' ', 'q'......'d', 'o', 'g', '\0'}```
#

are you trying to modify strzin in place or are you declaring a new string then using strcpy

outer fjord
#
{
    int i = 0, cnt = 0;
    int len1 = strlen(with); 
    int len2 = strlen(what); 
        for (i = 0; str[i] != '\0'; i++)
        {
            if (strstr(&str[i], what) == &str[i])
            {
                cnt++;
                i += len2 - 1;
            }
        }
        char* newstring = (char*)malloc(i + cnt * (len1 - len2)+1);
        i = 0;
        while (*str)
        {
            if (strstr(str, what) == str)
            {
                strcpy(&newstring[i], with);
                i += len1;
                str += len2;
            }
            else
            {
                newstring[i++] = *str++;
            }
        }
        size_t newstrlen = strlen(newstring);
        printf(" str length %d\n", newstrlen);
        printf("%s\n", newstring);
        printf("malloc: %d", (i + cnt * (len1 - len2) + 1));
}```
#

I'm declaring a new string and printing that

night flame
#

it works for me lol

outer fjord
#

Now I'm just sad

night flame
#

how are you compiling

outer fjord
#

I use visual studio, In a C++ project with the source file named practicum7.c

night flame
outer fjord
#

I'll try gcc tomorrow, and I will definitely ask my teacher why I have this problem.

#

Thank you so much for your help!

midnight wind
night flame
#

^ ubuntu in the windows store

outer fjord
#

Hmmmm, I'll look into that

#

I gave ubuntu a try once, but switched back to windows because of convenience

night flame
#

WSL just gives you the linux bash terminal

midnight wind
#

I have all my ssh keys

#

all my dev stuff works

outer fjord
#

It was a few years ago, and it also was the PC I used for gaming. But I might switch to linux in the future. Windows 11 doesn't look interesting to me.

midnight wind
#

I keep windows installed

#

only for games

#

proton/wine/lutris is pretty good these days

#

I can run basically most games on linux

outer fjord
#

I've heard great stuff about proton.

midnight wind
#

I mostly just keep windows installed cuz of storage

#

I have all my games already installed on ntfs formatted drives

steep mauve
steep mauve
tired juniper
#

hey so why doesn't this work in SQL Server: ```Alter table Countries Drop Constraint CHK_Phone_code

#

I want to drop the check constarint

#

nvm fixed it

last lance
#

using the python Google-Images-Search i would like to chose a random image from a search, so like a random image in the top 1000 results for the search cat, how would i do this

night flame
rare juniper
#

Went from this to this

storm cedar
#

If its supposed to be repeated calls then it might be worth doing some storing. For 1000 results it couls be prefetching and storing all, but for larger numbers id go with a limited cache

night flame
#

Yeah but i figured an array would be easier for a beginner to grasp

outer fjord
#

@steep mauve @night flame I managed to fix my problem. These 2 simple lines fixed the weird artifacts after my string.

last lance
storm cedar
#

it does seem that it loads everything into memory, so you could optimize using for example the paging query - use a pagesize of 1 and get the Nth page -> you get a page with one element which is your wanted Nth result

last lance
#

Sorry if this is a really dumb question with an easy answer, but how would I download that image?

storm cedar
steep mauve
outer fjord
#

Yeah, luckily I didn't have to change everything

solemn forge
#

How to find the locator of web element inside script tag selenium java

hollow basalt
#

really feels like this is a google search than chat

icy laurel
#

I was wondering if anybody could help me, I am doing a school project for a Database and can't make sense of where I am supposed to place my function/trigger for a table

chilly prawn
#

I’m wondering if i should learn C as my “first” language. i’ve dabbled in other languages ofc but I haven’t gone past loops and lists and if else statements and such yet

#

what do you guys think? people say it will teach me very valuable info but also i will instantly die upon starting to code (?)

spring pond
#

if you have a technical background then C is a good language to get started

#

be ready for a lot of headaches tho

night flame
zenith plank
#

Yeah C is kinda like the fundamental

frail badge
# chilly prawn what do you guys think? people say it will teach me very valuable info but also ...

My university used to do C as the first language, and now they're switching to teaching both C and Python first. I think it's not a bad idea to do it that way. Python is great at just getting your foot in the door for programming, but C will be helpful for learning more fundamentals etc.

Personally when people ask me a question similar to yours, I tell them to try Python first, and if they get into it and are interested in learning more fundamentals, to try C as well. Otherwise I see many people get too discouraged by C right away

fickle verge
#

Btw does Ajax work in Java

#

Because I wanna link a MYSQL DB with a PHP server to java for a Minecraft plugin

lucid pelican
#

I write computer forensics software for a living, and just published a blog post documenting the latest capability I added on the open source side (The Volatility Framework). If you want to see how deep-dive memory forensics and malware analysis is done, then give it a read! Comments and feedback appreciated! https://volatility-labs.blogspot.com/2021/10/memory-forensics-r-illustrated.html

rich trail
#

If anyone is looking to make a quick $50 Im in need of an Excel macro/script (VBA, Python, whatever). I need to combine spreadsheets where col. A would be identifiers, and col. B would be the values attached to said identifiers.
After combining, there will be cols B,C,D,etc (B from each sheet gets appended as a new col). The values need to be properly matched, or just left blank(null/0/whatever) if they didnt have a corresponding value attached from their respective sheet it was imported from.

Not sure if this even makes sense.....

pliant siren
#

So you want a vlookup?

#

Or an ODBC query?

rich trail
nocturne galleon
#

It's good to come into C with at least some idea of how a programming language works

#

Then you have a base to draw comparisons from

midnight wind
#

Nah c first

#

I like the way Harvard's cs50 teaches it

#

A little scratch to understand logic, then c

#

Then python

hollow basalt
#

C then python

pliant siren
#

holy hell please don't learn Python as a first language. You know how people talk about VB? Right, well Python is VB, 30 years on.

gusty oak
#

I learned Python as my first language

gusty oak
#

I just-

sick coral
pliant siren
#

I think you missed the point: python is the modern day equivalent of VB. It enables people without fundamental understandings the ability to do things they just shouldn't be capable of doing - and that leads to all kinds of fall-on effects.

#

In that context of course it's relevant in modern day development - just as VB was 30 years ago. It's become the drop-in replacement for development at that level.

sick coral
#

"It enables people without fundamental understandings the ability to do things they just shouldn't be capable of doing - and that leads to all kinds of fall-on effects."
Elaborate

#

This just sounds like "uhhh well unless you understand algorithmic complexity, complex memory management, data structures, etc. you shouldn't be writing code." Python is a very strong language to get tasks done in, has a strong ecosystem of packages, and is the defacto standard for machine learning and data processing right now. I think a language that empowers a user to get things done is absolutely a great beginner language. For someone struggling to learn programming, sometimes all that matters is getting to a working product which is valuable experience. And that's 90% of what matters in the real world anyways.

hollow basalt
#

I like python.
However I would still recommend c/c++.

#

That's what I've experienced

#

And i still recommend it

sick coral
#

I wouldn't recommend C or C++ for the vast majority of people learning to code. The barrier to entry is very high. Every time I return to writing C code, I spend hours just fighting with compiler issues because of convoluted complex rules about having headers and declarations just so. Nothing wrong with C/C++. It has its place in the world and its applications. But it's not beginner friendly, and its extremely unlikely that there isn't a different language that will serve a beginner much better.

In short, if you want to do web development, learn Javascript, maybe PHP. If you want to do game development, Unity uses C#, Unreal Engine uses C++ (iirc). If you want to do machine learning or data processing, use Python. If you want to do app development, I think Java is widely used, but Javascript can also be used; app development is a more complicated mess of things.

Start with what you want to accomplish, then pick the tool that will help you get going and stick with it. Once you build up fundamental programming skills your choice of language will matter less and less.

pliant siren
#

tensorflow.js. It's the only way 😄

steep mauve
#

From my experience, python is a great second language, but as @sick coral said, a programming language is just a tool and the programmer has to find the right tool for the job
In the end, I don't think it's that important which language you use first but more that you just start doing something

#

You will start learning concepts and patterns which will make it easier to learn new languages later on

hollow basalt
pliant siren
#

Current project in on is Python/django. Not by choice. It's a turd.

hollow basalt
vestal spire
#

I'm doing flutter and I need some help

I want to make a feature where the user can change the video (background) by picking it. Currently, I have:

Home page:

Stack() in body calling the BackgroundVideoPlayer(bgPath): bgPath is the path of the video background and also en ElevatedButton to choose cycle through the background:

      Center(
              child: ElevatedButton(
                  onPressed: () {
                    print('pressed' + bgIndex.toString());
                    changeBg();
                  },
                  child: Text('1'))),

In BackgroundVideoPlayer I have this:

class _BackgroundVideoPlayerState extends State<BackgroundVideoPlayer> {
  late VideoPlayerController _controller;

  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.asset(widget.bgPath)
      ..setLooping(true)
      ..initialize().then((_) {
        // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
        setState(() {});
      });

    _controller.play();
  }

  @override
  void dispose() {
    super.dispose();
    _controller.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return SizedBox.expand(
      child: FittedBox(
        fit: BoxFit.cover,
        child: SizedBox(
          width: _controller.value.size?.width ?? 0,
          height: _controller.value.size?.height ?? 0,
          child: _controller.value.isInitialized
              ? AspectRatio(
                  aspectRatio: _controller.value.aspectRatio,
                  child: VideoPlayer(_controller),
                )
              : Container(),
        ),
      ),
    );

How do I make it so that when the button is pressed, the background changes?

dense otter
#

Hi,I was wondering if someone here is very familiar with deep learning object detection, in particular video object detection. I grasp the concept of the backbone (e.g. resnet-50), however I am not sure when it comes to neck and head. How the pipeline differs in single stage vs 2 stage detectors. How and where to add methods such as optical flow (DFF, FGFA...), LSTM, tracking etc. I would really appreciate if someone could have a chat with me or point me the right way 🙂 (please mention me in reply, so I dont miss it. too many joined servers)

valid light
#

any other web developers in here?

#

o.o

hollow basalt
valid light
#

bruh

#

duh interwebs

thin valve
#

What do you recommend to learn programming, I just look at w3schools cause it has just enough

thin valve
pliant siren
#

Yeah. CS50x is the free, online version.

nocturne galleon
full socket
#
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}```
#

Does this work for this?

#

I know its a basic thing lol but I'm just wanting to make sure I'm doing this right

#

Dunno if I need a wrapper

icy viper
#

Have anyone used mongodb's change stream before?

#

I can listen to changes in one database just fine, but I can't find any way to listen to all the database in the cluster :( the documentation doesn't have any examples

unreal bluff
#

Hey, I'm new here please take good care of him

pliant siren
#

Alrighty, just ordered myself a new dev ultrabook, figured I haven't bought a new one since my 15" Dell XPS i7 6700 which was too big for what I wanted.
So in a week or so I get myself a new birthday present -Yoga 7i 13.3" Carbon White, i7-1165G7 16GB/512 😄
Now the wait.

#

Hell, I just realised it's been over 2 years since I upgraded from a desktop 6770 to a 3700X.

hollow basalt
unreal bluff
#

this code is wrong 🤦‍♂️

#

unless some language other than Python has print and requires ;

night flame
#

its accurate in Dart

gusty oak
#

Hold on

#

oh it's for web and mobile apps

#

I might learn this

#

looks cool

hollow basalt
#

imagine complaining about channel description

noble tide
# unreal bluff
function print(val) {
  console.log(val);
}

Custom functions exist...

valid light
noble tide
opaque wave
#

Pro tip: test in prod

plush valley
opaque wave
#

I do it all the time

#

I'd say it has a 40% success rate

pliant siren
opaque wave
#

testing is never an option. always go straight to prod

pliant siren
#

always run your functional test suite as part of your checkin pre-commit hook.

#

post-commit has auto-deploy to prod.

#

also, pre-commit must fail unless the code-coverage percentage is not higher than in the previous checkin.

plush valley
#

That way I can do development anywhere without needing the extra toolkits

pliant siren
#

I really hope you realise I was joking and that what I said is a terrible idea.

#

Also, having you build only work in CI is terrible too

plush valley
#

Ok good, I was being nice by just responding in general instead of going "U fucking what"

plush valley
hollow basalt
#

Just remove all tests, much easier

gusty oak
#

Alright I need help making something.

So my phone's reception is VERY bad in my room and my dad can't reach me whatsoever. I wanted to make something where he just presses a button on a website and I get a notification on my computer. Pretty sure this is possible but how hard would you guys say it is to make?

opaque wave
#

That would be much easier to do with Facebook Messenger or iMessage

gusty oak
#
  • I like to go the hard way on everything
obtuse night
gusty oak
#

frontend is easy, literally just gonna be a huge button and nothing else

#

tho I never worked with APIs before

#

other than making a call and recieving

obtuse night
#

Do you know how you would host it all? Would it all run on your computer?

gusty oak
#

it also hosts my discord bot but shouldn't be a problem since both are pretty small

obtuse night
#

Ok. So it all sounds quite simple. Do you have any programming experience at all with Node/C# etc?

#

Or even Python

gusty oak
#

I know Python and Javascript(node)

spring pond
#

well you can use your js knowledge to make an express server or something to handle incoming requests

#

you can use the browser push system to get a notification

#

on your pc

gusty oak
obtuse night
#

Yeah, sounds like you can get the front end done quite easy. The API could have 2 routes (post and get request). Your desktop could (although not the best solution) periodically call the API and check for changes. Your Dad would send a POST request to the API.

spring pond
obtuse night
gusty oak
midnight wind
#

webpack? rollup? tf are those

midnight wind
#

scss all of a sudden? urgh

gusty oak
midnight wind
#

gotta save that

gusty oak
#

yes yes

plush valley
opaque wave
gusty oak
gusty oak
spring pond
opaque wave
#

You could also just use an automation to send an email

gusty oak
plush valley
gusty oak
#

Guys....

#

Won't WNS require me to use Windows 10?

opaque wave
plush valley
#

Yes, but it was just an example

spring pond
#

but you need a desktop windows app for wns to work

#

i dont think he wants that

gusty oak
spring pond
#

yeah the browser stuff works across all platforms

#

because its browser standardized

plush valley
spring pond
#

not sure what you mean by that, so does chrome and firefox

#

they all support it afaik

gusty oak
plush valley
#

I mean to WNS, You can just send to Edge a Toast

spring pond
#

oh

#

well something like that requires a win10 client, so i just dont think its the most portable solution

plush valley
#

Sadly not 😦

#

Was just the first thing to come to mind

gusty oak
#

It doesn't really need to be portable, my phone gets great service literally anywhere that isn't my room

spring pond
#

how i would do it is i would have an express server that would host a dispatcher page and a subscriber page

gusty oak
#

But again, I don't really want to switch OS for this

spring pond
#

the dispatcher page would have a button to send the alert

plush valley
#

I would just use VoIP and do an SMS with a cheap af VoIP Number

#

¯_(ツ)_/¯

spring pond
#

the subscriber page would prompt you to enable notifiactions for that page in your browser

gusty oak
obtuse night
plush valley
#

You could program a big ass button to send a default defined SMS

plush valley
gusty oak
plush valley
#

but its a way to notify

gusty oak
#

true

obtuse night
gusty oak
plush valley
#

I have this stupid project I did with one of those Point of Sale Price Screen Poles that was attached to a GSM Modem, it would just read off the texts messages I got on that SIM's #

obtuse night
#

I would love to find out how places like Twilio send SMS messages... It just sounds cool

plush valley
#

Hmm? Its just a SMS Gateway

#

They are physically attached to the Mobile Carrier Networks/POTS Switching Units and offer the communication over Internet Services

#

This is my Home DID VoIP Number for example

#

SIP/VoIP has a native SMS Command

plush valley
#

Bandwidth.com is quickly buying up POTS Termination Space when it becomes avail and tying in to modern telephony networks where avail (In the US, AT&T is holding a monopoly on the POTS System to charge the State and Fed Govt and fighting the change to a pure VoIP System while other countries have moved already)

obtuse night
#

In going to look into that. I don't want to rely on a 3rd party API like Twilio

plush valley
#

They are not a 3Rd party, they are a legit Telephony Termination Provider

#

Twilio is Tier 2, same Tier as like... T-Mobile, Verizon, etc

#

AT&T is Tier 1

#

its just Twilio offers both SIP, REST, and various other forms of API Access to the same endpoint terminations

obtuse night
#

Oh, really. I thought Twilio was just a wrapper

plush valley
#

They are more aligned for Internet Services Automation and IoT

#

Nope, they are legit holders of the Phone #'s they use

#

If you were to take like... VoIP.ms or some other SIP Trunk/VoIP Termination provider, you could do a wrapper similar to what they have but you would be Tier 3 Reseller

#

Their webRTC API Is fantastic

sage robin
#

anybody got time to look over some json newbi problems ^^;

hollow basalt
#

no

midnight wind
sturdy ingot
gusty oak
#

I use Linux

sturdy ingot
#

Build a minimal node frontend with just a button, have a TCP socket in that application, and use nc host port | notify-send.

gusty oak
sturdy ingot
#

The latter might need some read wrapping in a shell script, but the whole solution doesn't need a lot of code, as long as your fine with everything basically being hot glued together.

#

Maybe play around with notify-send before you tackle the rest though. It's sometimes a diva and needs special care. It also depends on your WM/DE and other stuff.

nocturne galleon
#

Hi guys, moved to linux, just wondering what IDE you guys would recommend for c++ stuff? I used visual studio on windows and like the project style setup

rancid nimbus
#

Vim?

night flame
#

QtCreator is pretty good

rancid nimbus
#

Gnome builder (most generic name ever)

rancid nimbus
#

Why vs code?

midnight wind
#

Use cli for compiling with cmake

night flame
#

yeah personally i use vscode and g++

midnight wind
midnight wind
#

Cmake for more complicated builds

rancid nimbus
#

Vs code might be a good option because of there similarity. They are also very much different.

midnight wind
#

Vs and vscode are not alike basically at all

rancid nimbus
#

There UI styling and key mapping are similar.

#

There programing languages in vs code has been supported more by the community than visual studio.

midnight wind
#

Vs is an ide

#

Vsc isn't

pliant siren
#

yeah, vsc still falls short for a lot of testing and debugging I'm finding.

hollow basalt
#

Yes, people should use good old notepad /s

chrome rune
hollow basalt
#

not notepad++

#

just plain old notepad /s

chrome rune
#

oh wait u dont mean like pen and paper ?

#

do u ?

hollow basalt
chrome rune
#

if u mean the og notepad program .... its in everyway inferior to notepad++ tho

#

atleast ++ knows when im coding or just writing an invoice

#

u may aswell be coding on sticky notes

gusty oak
#

VSC is awesome

chrome rune
# gusty oak VSC is awesome

preference ... if im not building a form app i can code a command prompt app without the hand holding of an ide ... i prefer free form coding it gets the job done just fine in most cases

chrome rune
obtuse night
nocturne galleon
#

Yeah I've had a look at jetbrains and it does seem interesting

midnight wind
#

You can control gdb from within vsc

nocturne willow
#

i know barely anything about developing AI but i want something that gets images from a dataset and compares if it belongs in that data set or not by a likelyness score where would i start with that?

spring pond
#

well first you should research how ai works to get a baseline understanding

nocturne willow
#

what would you consider a baseline understanding

opaque wave
opaque wave
nocturne willow
#

what do i do with that

opaque wave
#

Whatever you want

nocturne willow
#

ok how do i do that

opaque wave
#

Google

nocturne willow
#

ok where do i upload a tensorflow.js model to google?

#

do i just put it in the search bar

opaque wave
nocturne willow
#

ok which tutorial do you suggest?

opaque wave
#

Google can suggest that

nocturne willow
#

which one do you suggest

nocturne willow
#

legit i ask where to start with ai and you tell me "google" you think i haven't tried that?

#

people don't understand that when you don't know something you don't know what to search or click

rancid nimbus
#

I don't know what that is, but it looks promising.

nocturne willow
#

that's not really what i want

#

i need something that takes multiple images in a dataset and then compares that to a random image and gives it a score on how well it fits into that dataset

rancid nimbus
opaque wave
nocturne willow
#

so lets say for example its a dataset of dogs and you have 5 dogs in one dataset with certain similarities id need it to take another picture and say how well it fits into that dataset

rancid nimbus
nocturne willow
#

ah thanks

nocturne willow
#

I know about neural networks but not how to actually use them

night flame
thin valve
#

corny joke: these c lions are really getting to me 😠 *

hollow basalt
#

I don't get it

thin valve
#

you don't have to

hollow basalt
#

That's what she said to you

thin valve
sage robin
# night flame https://dontasktoask.com/

i wasn't asking to ask i was asking for someone to look in real time, by time you even sent this irritating git of a reply i didn't have any time left to call out your call out

forest gull
night flame
frigid oxide
#

To anyone who knows python how do I show my current version of python in my .py file?

#

do i use print(sys.version_info) ?

night flame
#

make sure you import sys

frigid oxide
#

i tried that but the version didnt come up

#

i get name error

night flame
frigid oxide
#

so wait

#

ahhhhhh

#

yea i was about to ask

#

thanks

#

makes sense now thanks

sage robin
spark geode
#

anyone have a preferred liveserver for vscode besides this one (the maintainer is a little busy)

sturdy ingot
hollow basalt
#

Imagined if he simply asked. The world would be a better place

gloomy merlin
#

i'm trying to write a portion of a security script that will list users and present the user options to delete them, or change their account type (powershell)

#

im not that experienced with ps in general

forest gull
#

Wrote a new feature addition for my job. All of the unit tests I wrote for it, and previous ones, worked perfectly. No errors. Submitted it, it worked for my supervisor, but he wanted a function reformatted - no biggie. Clone the code back from GitHub a few hours later - all of the tests are failing. I've changed nothing. Thought it was my system, ran them on GitHub's service. Still failing.

pliant siren
#

is it transitive and/or determinitive?

#

does it utilise anything from the environment?

forest gull
#

Ran it again this morning, no reboot or restarting the application. Turned my monitors off and went to bed, then turned tham back on this morning. All of the tests pass

sage robin
#

you want me to provide more detail? great! i'd love to know what the details are too, can i be more specific? no, i havent got a clue, instead i have someone who expects me to know everything before i even ask

sturdy ingot
sage robin
#

thats fine, i only needed eyes not a lecture.
like i said from the start.

#

i'll have to put it off for now, only on here seeing i was pinged in my end of night routine again.
just glad theres been some understanding however slight it may be

#

:/ timezones suck. sorry i've gotta run along so quick

versed onyx
#

CSS issue
I'm using sliced images as a background for a table, looks like this, right

#

the issue is that when i resize the browser it looks like this

#

the middle parts overflows sides

#
#top-left {
    background-image: url("slice/slice_0_0.png");
    background-size: 50px;
    width: 50px;
    height: 50px;}
#top {
    background-image: url("slice/slice_0_1.png");
    background-size: contain;
    height: 50px;}
#top-right {
    background-image: url("slice/slice_0_2.png");
    background-size: 50px;
    width: 50px;
    height: 50px;}
#left {
    background-image: url("slice/slice_1_0.png");
    background-size: cover;
    width: 50px;}
#mid {
    background-image: url("slice/slice_1_1.png");
    background-size: contain;
    font-size: 25px;}
#right {
    background-image: url("slice/slice_1_2.png");
    background-size: cover;
    width: 50px;}
#bot-left {
    background-image: url("slice/slice_2_0.png");
    background-size: 50px;
    width: 50px;
    height: 50px;}
#bot {
    background-image: url("slice/slice_2_1.png");
    background-size: contain;
    height: 50px;}
#bot-right {
    background-image: url("slice/slice_2_2.png");
    background-size: 50px;
    width: 50px; 
    height: 50px;}
#
<div id="main">
  <table cellpadding=0; cellspacing=0>
    <tr>
      <td id="top-left"></td>
      <td id="top"></td>
      <td id="top-right"></td>
     </tr>
      <tr>
        <td id="left"></td>
        <td id="mid">
          sgjdsgjdtyk<br>
          atjoisrjoinj<br>
          atpksrpnkpskmpokponkpoxfksgpnjdpfnpodkcgnkpfocnk
        </td>
        <td id="right"></td>
      </tr>
      <tr>
        <td id="bot-left"></td>
        <td id="bot"></td>
        <td id="bot-right"></td>
      </tr>
    </table>
</div>
#

@nocturne galleon here it is

nocturne galleon
versed onyx
#

ah sorry then

nocturne galleon
versed onyx
#

i have to

midnight wind
#

why

versed onyx
#

dont question

#

well

#

school project

#

...

midnight wind
#

that's so stupid

#

literally the worst

versed onyx
#

i wouldnt know

#

dont know much about web development

#

anyway

midnight wind
#

don't use images for lines

versed onyx
#

i have to use images for the whole thing

midnight wind
#

just use a div and set a border corner radius

versed onyx
#

the point of this site project is using sliced images in a table

#

not my idea

#

ignore the fact that is is bad design

#

have you got an idea how to fix the overflow issue?

forest gull
#

I have a recurring dates unit test, but I need an alternative way of testing, compared to what I have currently...

Anyone have any ideas?

#

Above this section, I'm basically creating a recurring announcement using my system, and then this is just a test to confirm that it works. This kinda works, but I'm trying to clean up ugly code in several areas, and despite being fine with leaving this, I'm cleaning up other areas that prevents this specific test from working in it's current state...

full socket
#

Got 80/90 points on a coding assignment. Smfh. Because I messed up one word of code I got 10 points taken off

grand shale
#

is the @fervent orbit open source or??

nocturne galleon
grand shale
hazy marsh
# versed onyx the middle parts overflows sides

setting sizes of elements in pixels usually ends up backfiring when trying to resize the window, i would try using relative size units, 'rem' for example or percentages. Also what the hell using only images, feel sorry for you :/

versed onyx
# hazy marsh setting sizes of elements in pixels usually ends up backfiring when trying to re...
#top-left {
    background-image: url("slice/slice_0_0.png");
    background-size: 10rem;
    width: 10rem;
    height: 10rem;}
#top {
    background-image: url("slice/slice_0_1.png");
    background-size: contain;
    height: 10rem;}
#top-right {
    background-image: url("slice/slice_0_2.png");
    background-size: 10rem;
    width: 10rem;
    height: 10rem;}
#left {
    background-image: url("slice/slice_1_0.png");
    background-size: cover;
    width: 10rem;}
#mid {
    background-image: url("slice/slice_1_1.png");
    background-size: contain;
    font-size: 25px;}
#right {
    background-image: url("slice/slice_1_2.png");
    background-size: cover;
    width: 10rem;}
#bot-left {
    background-image: url("slice/slice_2_0.png");
    background-size: 10rem;
    width: 10rem;
    height: 10rem;}
#bot {
    background-image: url("slice/slice_2_1.png");
    background-size: contain;
    height: 10rem;}
#bot-right {
    background-image: url("slice/slice_2_2.png");
    background-size: 10rem;
    width: 10rem; 
    height: 10rem;}
#

does not fix the issue

frail jewel
#

out of curiosity does anyone know why directwrite for d2d1 have direct support for translating chinese?

#

i am just calling drawtextw, no idea why it is doing this on this project and not another one but pretty cool that it for some reason can translate everything to chinese.

#

nvm i am as blind as a bat, it is converting the text to chinese. i thought directwrite was doing some language pack shit somehow. well now this is just a generic annoying bug that needs fixing.

nocturne galleon
#

Hey, I am trying to implement Unity ads in a game I made, the test ads work perfectly when I am in editor but they dont work at all after publishing it on google play.. Any idea why?

obsidian mirage
#

Are you able to make a live usb with MacOS on it?

#

I can’t find any MacOS DMG or ISO to try it.. if anyone could point me to a reliable and preferably fast place to download some I’d appreciate that greatly also

forest gull
#

Actually I just found it. Apple's site, I guess they changed it to allow older downloads

obsidian mirage
#

I would’ve never thought Apple would allow that.. even their documentation still says you need a Mac

forest gull
grave jasper
#

I've just replaced my MBP16" 2019 with i9 with a new one with M1 Max

#

and ran the test suite of my client's project

#

i9: Finished in 616.244299s
M1 Max: Finished in 256.930086s

#

also the fans weren't even noticeable on M1 Max

#

it's ridiculous how much better the ARM chips are for development, at least in my niche

#

(which is Ruby on Rails app development and profiling)

#

now I know that the i9 in MBP16" 2019 is an older intel 9th gen mobile chip, and I don't even have the fastest version (mine is 2.3Ghz base clock), but still - wow

forest gull
#

I wonder how the M1 config would stack up against a desktop i9-10900K. We see the different between what I presume is an i9-9850H, but that doesn't tell all of the story perse. In development, would it still be better to have a desktop over a macbook, or have macbook passed even what some might consider a high-end desktop by modern standards?

#

I wonder if it would ever be technically possible to have 100% efficiency on CPUs and GPUs. Imagine a world without needing heatsinks, fans, or coolers.

#

A world of perfect silence, 100% RAM compatibility, and 100% PCIe compatibility. Every PC case is suddenly following the height of the tallest consumer GPU, and that's the determining factor.

valid light
#

best way to learn C++ ?

lament bridge
#

Anyone knows JavaScript here?

valid light
#

I do

#

but I haven't touched it in a few months

#

so i'm pretty rusty

lament bridge
#

oh 😦

midnight wind
#

Just ask

hollow basalt
#

The guy often asks to ask here

lament bridge
lament bridge
sturdy ingot
#

That's also a problem with many online tutorials, they will teach you C, then switch to C++ and in total give you a very strange "C with classes" variant. Many Udemy courses start that way, unfortunately.

#

I guess it's fine if you want to learn the language from the ground up, but with the overall complexity of C++, a top-bottom approach works better IMHO.

manic moon
# valid light best way to learn C++ ?

c++ is a fairly deep language at this point. If you're looking to start out, I would recommend finding some challenges like advent of code ( https://adventofcode.com/2020/day/1 ) which start out pretty simple and build up in complexity over time. Use this as a platform for building some simple c++ solutions that only really need you to know about the basic c++ syntax, some containers like vectors, and how to read files with ifstream etc.

Once you've built up the muscle memory of how to define classes, methods, header files, etc etc., then you can start tackling other projects to learn how c++ handles inheritance, templates, garbage collection with shared/unique pointers, lambdas, etc.

strong star
#

hey guys im new to php and im trying to replace some stuff in an SQL row

#
mysqli_query($con, 'UPDATE wledger SET usd = $newusd WHERE id = $tid ');```
#

$newusd is a decimal, $tid is a string

#

i printed them out before this statement and they look fine

#

I can put them into the sql table just fine directly through a command (using test values), but when I run my script, there aren't any errors or anything, but the sql table remains the same

#

the table has columns: id (varchar), utime (unix timestamp, largeint), amount(bitcoin withdrawal amount, decimal), usd(usd equivalent amount, decimal)

#

the table already has every value except usd

#

which I calculate to the variable $newusd

#

I also tried doing WHERE utime = $ttime, $ttime being a LARGEINT that exists in the table

hybrid sky
strong star
#

ohhhhhhhh thank you so much ill try that now

#

HELL YEAH it works now

#

thanks man, didnt know that

#

so if i have single quotes, variables inside dont get replaced

hybrid sky
strong star
#

alright php bros

#

hello again

#

so i have this mysql table right

#

and one column is a BIGINT

#

say I want to re-organize said table, so that it sorts the rows descending according to their value for BIGINT

#

I know that there is ORDER BY colName DESC;

#

but that just returns an organized table

#

is there any way to just re-organize the existing one, or do I have to a) make a temporary, sorted table b) iterate through it c) replace the old values with the new?

hybrid sky
#

Why would you want to do that ?

strong star
#

the int values are time

#

and i want it to be sorted by time

#

its unix timestamps

#

its like a transaction ledger

#

just ease

#

point is can i do it?

hybrid sky
#

You could do it like so : ALTER TABLE tablename ORDER BY columnname ASC; even though I don't think it's a very good idea 😉

strong star
#

why not exactly?

#

oh, cause its a database, and order doesnt really matter?

hybrid sky
#

The order is only important to the part of your program in charge of processing the data

#

The database itself doesn't care about order

#

It is much more efficient to just use ORDER BY when querying your db

#

Otherwise you'd have to reorder your database any time you insert/remove data from it

strong star
#

Fair point

hybrid sky
#

In the end, you do what ever you feel is best for your application 😉

strong star
#

Thanks man, you clearly know your stuff and are eager to help

#

appreciate it

hybrid sky
#

Only helping a brother out, good luck with your project

arctic tusk
# nocturne willow legit i ask where to start with ai and you tell me "google" you think i haven't ...

Youtube Channels:

Building neural networks from scratch in Python introduction.

Neural Networks from Scratch book: https://nnfs.io

Playlist for this series: https://www.youtube.com/playlist?list=PLQVvvaa0QuDcjD5BAw2DxE6OF2tius3V3

Python 3 basics: https://pythonprogramming.net/introduction-learn-python-3-tutorials/
Intermediate Python (w/ OOP): https://pythonpr...

▶ Play video
#

@nocturne willow all of these are ai/machine learning channels with actual programming examples.

obtuse night
sturdy ingot
hollow basalt
#

indeed, always prepare your statements

nocturne galleon
#

Any recommendations for vps hosting in Europe?

hybrid sky
nocturne galleon
strong star
#

this script is entirely internal btw, it runs on my server and is completely detached from anything else

sturdy ingot
# strong star I know about prepared statements, but what's so much more secure about them?

Prepared statements prevent SQL injections, as they cannot accidentally contain unescaped SQL. For example, if $newusd was 1; -- then all usd cells in the wledger table would get set to 1. If you instead use a prepared statement and bind to :newusd (or whatever the syntax in PHP's library is), then 1; -- would get escaped and the WHERE is still part of the query.

strong star
#

I see

split rose
nocturne galleon
#

ORMs might be overkill in certain cases

#

I don't really recommend them for smaller websites

#

it doesn't kill or doesn't harm but it's like using a sledgehamer to nail down a tiny nail

strong star
#

whats that

nocturne galleon
#

what's that what

#

a sledge hammer ? an ORM ?

pliant siren
#

ORMs CAN be nice. But they can also be incredibly restrictive.

#

For example I am currently working on a POC application using Django. One of the things I want to do is return all sections related to the version of a document having the highest revision number that matches a certain publication status. good luck pulling that in a django query/filter. I can easily write that query in SQL.

versed onyx
#

site basically is built like this, all out of divs, trying to make space between buttons with margin-top and margin-bottom makes white space above the header on the right container

#

like this

#

seems to only happen on firefox

versed onyx
#

As in

visual path
#

padding with css?

#
.sidebar button {
  padding: .7rem 0;
} 
#

on the button elements

#

note that will target every button in the sidebar

nocturne galleon
teal shore
#

Should i use Keil or Gcc for assembly coding with the pi pico?

split rose
split rose
#

Gcc is free software and you could get some experience setting up your own toolchain, tho

teal shore
split rose
#

You bought a tutorial?

teal shore
#

Ye

#

More a course

#

I wanted to learn assembly programming

#

So i bought a course

split rose
#

Rip

teal shore
#

No its quite good

#

I quite like it

#

And its worth it i think

teal shore
# split rose Rip

So i friend of mine who is a programmer got me a pi pico for my birthday

#

And i wanted to write for it

#

And i wasn’t sure

split rose
#

Well, if you want to explore, set up gcc, you will be fine either way

#

@teal shore Please don't purchase a tutorial or course for programming ever again

#

Just my advice

split rose
#

Because it is a waste of money

#

You could learn anything (especially programming) for free

#

Through the internet

nocturne galleon
#

Build your own curriculum, learn how to make your own knowledge system!

nocturne galleon
#

@split rose You are a life saver

#

Thank you so much

#

How do i make the code on the "Proceed" button actully "Proceed"?

split rose
#

Bind it to a js function

#

Alternatively, use a js framework like react

#

or, other small js frameworks actually

nocturne galleon
#

am i forced to use JS?

midnight wind
nocturne galleon
#

To make the proceed button actully proceed

midnight wind
#

what proceed button

#

for what?

nocturne galleon
midnight wind
#

or do what

nocturne galleon
#

well my intension was to use it as a "preloader

#

For this website

#

That i made for a client

#

or "client" / friend

split rose
#

Yes

#

You would need some kind of js to bind functionality to a button

split rose
#

That isn't a redirect

midnight wind
#

if you want an animation thing, I'm not your man, I have no clue with fancy frontend stuff

nocturne galleon
#

Seamless animation thing

#

no redirect

nocturne galleon
midnight wind
#

somehow hide the main website content and then make an animation, idk

nocturne galleon
#

Disable scroll on the page while the animation goes on, display it on all pages no matter where you go

and bind that button to actully proceed (not redirect, just a seamless animation and then boom fades into website after clicking button)

#

now thats the dream

midnight wind
#

why I hate frontend

nocturne galleon
#

Sadge

midnight wind
#

I can do all sort of bgp routing, ospf, networking, all that jazz to make websites run, but the actual development, nope

nocturne galleon
#

PogChomp front end development sucks

split rose
#

lel

nocturne galleon
#

Ok i have an idea

#

Can i make the "Proceed" button scroll down a single page?

midnight wind
#

Somehow in js, look it up

split rose
#

a scroll animation? you need js

#

You wouldn't with an anchor

nocturne galleon
#

Damn it

#

I just wanted to use anchor point

split rose
#

Css has smooth scroll, if thats what you are looking for?

nocturne galleon
#

Well can i force it to scroll down the page automatically after a certain amount of time (s/ms) ?

split rose
#

Idk

#

You can, I just don't know how

#

Tutorials def exist tho

nocturne galleon
#

Time to google/youtube this

#

ill make some popcorn

#

lol

#

Lets say i used JS then

#

can you give me some actual JS code i can paste

#

that will make the proceed button scroll down?

split rose
#

Redirect to an anchor prob

#

With setinterval

#

idk

split rose
#

Best to learn it

nocturne galleon
#

Sadge

#

Okay

#

Thanks tho

vestal spire
#

in flutter,

is there a way to use didChangeAppLifecycleState ? I'm using it with AssetsAudioPlayer() and the player won't resume when I come back into the app. Here's my code

  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    if (state == AppLifecycleState.resumed) {
      if (audioPlayer.isPlaying.value == false) {
        // isPaused = false;
        audioPlayer.play();
      }
    }
  }
peak acorn
#

Does anyone know the correct way to scale-translate in css for any scaling

#

for instance:

#
scale: 1;
transform: translateX(100%) translateY(100%);
and:
scale: 2;
transform: translateX(25%) translateY(25%);```
nocturne galleon
#

How to make a button go to an anchor in HTML?

nocturne galleon
#

Can someone code this button to jump to an anchor tag on my website?

frozen jacinth
#

Anyone have suggestions for entry level pythons projects to test my skills/knowledge with? I want something outside of the guided coursework

sturdy ingot
full socket
#

This college I'm looking at has an entire class for CSS. pepecide

#

Holy shit.

#

I can't see how that would be necessary

#

It's an elective so thank god

#

But weird

#

I feel like its not THAT hard to learn that you need to somehow stretch it out over a like four month period

#

Unless it goes incredibly in-depth somehow

full socket
#

Besides that, I like it. It looks pretty nice

hazy marsh
#

oh boy how many times i've asked myself "why is it so stretched out?" in college

midnight wind
#

college programming classes suck

hazy marsh
#

sadly i have to agree, most were bad, though it's more of the educational approach in a whole in my country

full socket
#

With the one I'm taking rn all the website designs look disgusting and extremely outdated. Been times where I was deducted points because I followed what I was supposed to do and assumed I fucked up somehow because it looked gross so I fixed it a bit. But it was just supposed to look bad

#

In community college lol

hazy marsh
#

ye outdated technology is an issue, when we got classes that would be useful then the teachers would screw it up

#

at least we learned how to look for info on the internet

full socket
#

There u go

full socket
full socket
#

Lol

hazy marsh
#

i didn't have these types of issues, the main issue was along the lines of "you need to look for an answer yourself, i can't guide you like a child...but if your idea is not what i thought of then you fail"

full socket
#

Oh jesus. I hate that lol

#

When they're really vague, yet theres actually a specific way they want you to do it. They just don't tell you

hazy marsh
#

i understand learning to think of ideas, sure most of the time you won't be reinventing the wheel, but you should develop some critical thinking and understanding of certain concepts, but that should come with accepting different ideas, not grading you based on how close you were to the one "proper" result

midnight wind
#

I'm lucky and my profs so far don't care how I did it

#

as long as the output is correct whatever

hazy marsh
#

i envy you

full socket
#

Yeah. There can be so many ways to do one thing and have it work, makes no sense to me to not just say the way you want that thing done

#

or better yet, let people actually think about it and solve it on their own instead of doing it that specific way

#

Lol

hazy marsh
#

then at the end tell them why it's bad/good, if it's unoptimal show where and a way to fix it

full socket
#

It's more frustrating for me to work within specific boundaries my teacher gives than it is to just figure it out all on my own

full socket
#

Theres been times where my teacher or textbook was wrong about the way to do something and I realized and corrected it pepeweird

midnight wind
#

you use textbooks...

full socket
#

Yes.

#

Had to pay $100.

hazy marsh
#

oh boy

#

i mean don't get me wrong, there are some good books out there

midnight wind
#

technically required for us, but I don't use it at all

full socket
#

Lol

#

Every single assignment we do is from the textbook

midnight wind
#

libgen

full socket
#

Its a digital interactive one or whatever

#

Would've done libgen if I could

midnight wind
#

rip

full socket
#

Textbook prices are ridiculous

hazy marsh
#

we had some textbooks in first and second year, but those were for more theoretical subjects (discrete maths, physics, basic of electronics etc) and were available in the library

#

no wait, we had to buy one textbook for english classes

full socket
#

hey, with CSS, if it says to "align something to the right", is it fine to do float: right;

#

Half asleep

#

Lol

visual path
#

you could also do right: 0;

#

really up to you

mystic birch
#

guys what programming language would u recommend to start with

#

i have no idea what i want to do with yet

#

or anything

obtuse night
mystic birch
midnight wind
#

C and C++

obtuse night
midnight wind
mystic birch
obtuse night
obtuse night
# midnight wind C and C++

Do you suggest these as a first language? Imo, they are the most difficult, so get the basics sorted first?

midnight wind
#

It's how I started

#

Lower level, very basic

#

I started with Arduino which is basically c/c++

midnight wind
#

They are markup languages

#

And only useful for webdev

obtuse night
midnight wind
#

Yeah, but still it's not html/css, it's the whole bundle, js/html/css

mystic birch
#

any good resources to learn golang

midnight wind
#

TABLE OF CONTENTS

00:00:00 - Introduction
00:00:49 - CS50 IDE
00:07:42 - hello, world
00:11:00 - Compiling
00:15:02 - Functions
00:18:38 - Return Values
00:19:03 - Variables
00:24:31 - Format Codes
00:28:29 - CS50 Library
00:36:03 - main
00:37:10 - Header Files
00:39:12 - help50
00:44:36 - Style
00:46:00 - style50
00:48:38 - check50
00:51:51 - ...

▶ Play video
mystic birch
midnight wind
#

only if you make it hard

#

it may be hard to do something complex, but fundametals are pretty easy

#

anything with a GUI will be a bit harder

#

but basic cli programs, nah

obtuse night
#

Finally!!!

full socket
midnight wind
#

literally has no logic

#

doesn't run

full socket
#

I didn't say it was

#

Lol

#

Its a good place for beginners who are completely new to any aspect of coding

midnight wind
#

I disagree

full socket
#

?

midnight wind
#

html doesn't teach much

#

just how html works

#

doesn't translate to anything else, maybe markdown but that's it

full socket
#

Can get them interested in learning further and learning programming languages. I dunno, I started with HTML/CSS/Javascript and then went on to Python

#

For me it worked that way

midnight wind
#

I started with arduino, C is simple

forest gull
#

just cycling through Code's color schemes.

#

wtf

nocturne galleon
#

Can someone help me what exactly is this?

obtuse night
#

You need to create an MX record with your DNS provider, and point that to the A record (hostname) of the mail server

#

Who is your DNS provider?

nocturne galleon
#

Where i run my server?

obtuse night
#

Is this for internal use or external? I highly recommend not exposing this to the internet.

nocturne galleon
#

External it's an email server

obtuse night
#

I will continue to help, but just so you know, you almost never have a good reason to run your own mail server for external use...
Do you have your own domain?

nocturne galleon
#

Jup

obtuse night
#

Ok. Who did you buy that domain with?

nocturne galleon
nocturne galleon
obtuse night
#

If you go to your DNS management console within IONOS, you should be able to set A records and MX records

nocturne galleon
obtuse night
#

probably not server. is there domain management anywhere? I haven't used IONOS before, so dont know how its set out

nocturne galleon
#

There is domain management

obtuse night
#

Ok. if you go there, does it say anything about DNS?

nocturne galleon
#

DNS settings found em

obtuse night
#

So, you're going to want to create an A record, and set that to the hostname of your server

nocturne galleon
#

Wait the hostname being the IP address correct?

obtuse night
#

hostname should be whatever you entered when you put "hostnamectl set-hostname {{hostname}}"

nocturne galleon
#

Ahh

obtuse night
#

it may not like you entering the domain with it. e.g. if the hostname is abc.xyz.com, you may need to enter just "abc"

nocturne galleon
#

And then

#

Points to is the server ip

obtuse night
#

Ok... that IP doesn't look correct...

nocturne galleon
#

No

#

It isnt

obtuse night
#

but as long as you put the correct IP, that's right

nocturne galleon
#

TTL is?

obtuse night
#

If you leave it as Auto, it should be fine. It won't matter too much

nocturne galleon
#

Jup done

obtuse night
#

Now create an MX record, and set the value to the A record (such as abc.xyz.com)

nocturne galleon
#

Hostname now?

obtuse night
nocturne galleon
#

Ah, okay

#

It says it conflicts with something?

#

Should i just say okay and let it deactivate the defaults?

obtuse night
#

ummm.. are you using IONOS for emails already?

nocturne galleon
#

Nope, this is pretty much out of the box

obtuse night
#

If not, make a note of the defaults and press ok

nocturne galleon
#

Okay, done

obtuse night
#

now, from your own PC (not in IONOS), you should be able to open "cmd", and type "nslookup abc.xyz.com"

#

it should return the IP address of the IONOS server

nocturne galleon
#

Well don't have access to a terminal rn, am working of an ipad in a bus

obtuse night
#

there are some online nslookup websites. try one of them?

nocturne galleon
#

Wure give me a sec

#

Yes that works 🔥

obtuse night
#

cool. Thats the bit that you highlighted done. Just to reiterate. I do not recommend using this externally...

nocturne galleon
#

Why not?

obtuse night
#

it will not be anywhere near as secure as something like Outlook etc

#

SPAM filters are much worse, and could be hacked

nocturne galleon
#

But obviously I'm not gonna use this as my main email

obtuse night
#

Making it secure initially is quite a lot of work, then the maintenance is very time-consuming. By all means, try it out, but I would not leave it exposed for long

nocturne galleon
#

It's too much of a hassle to keep up to date?

obtuse night
#

I mean... Places like Microsoft and Google have teams of people working on their mail servers, to keep them secure.

nocturne galleon
#

Yes, obviously, and this definitely won't be as good in any way, and i have been a customer of them until now, and will continue after this. This is just for fun

obtuse night
#

That's fine then

nocturne galleon
#

Yeah, i actually intended on buying an outofthebox solution with my custom domain, but i couldn't find anything cheap enough

#

And anyways i have like 6 hours left in this bus, its 10 pm now and i really don't think I'll be able to fall asleep ever so I'll just be doing this over the night

rich trail
#

Hey all, Im looking for someone that would be able/willing to write something that will pull data from an excel and insert it into pre-determined spots in a pdf. I have $75 I can pay with (cash or crypto). DM if youd like more details

night flame
chrome gale
#

Hi guys. I don't know if it's the right place. I just started learning Python two days ago in school. I'm in an intensive school program (meaning we have less time to learn than other regular program). I also suffer from ADHD-I, so it's kind of hardcore sometimes. I was wondering if I could ask for someone to help me during the semester (probably several times a week). I feel bad if I have to ask a thousand question here. Thank you.

chrome gale
#

No I don't think so, but I have to learn differently than a regular student. Like sometimes I need to be told what to do and how, take notes to have a how-to structure. I have a really hard time "discovering by myself". It's hard to describe. The regular school system is more like "discover it alone by yourself"

rich trail
forest gull
#

"Why do you love software development as a job so much?"
Why I love software development so much:

grizzled steeple
#

I love how descriptive those Commit Messages are xD

#

At least more descriptive then those of my colleagues...

midnight wind
raven sky
#

why do i do this to myself

forest gull
#

So a large percentage are usually "Update Commit" which I know is mostly useless, but I'm also a solo dev on this project with my supervisor mainly doing code review

#

Also a large majority of my commits are either "sending" them to him to check why something is broken, essentially quick help, and me switching between computers, so usually I'll comment something like "Update Commit - Broken" especially if it's in the middle of revisions

#

But other than that, I really have no idea how you're intended to use oil request comments. There's not enough space for actual useful information, but also it's there and I always have to put something

forest gull
grizzled steeple
#

I mostly work in a Team of 3 and both of my colleagues always just write "Update" and never describe what they did in a commit. If you're working on a project alone, it's fine, but not when the team has like 6 or 7 people in it...

vague vector
#

I guess it is rare to find people explaining with paragraphcs in the commit message why a one line change was made, and why it is the correct change.

last lance
#

In python, how would I take a string, then make another string that is the first string with just numbers, no space, no characters.

#

In preferably the simplest way possible

night flame
#

say you have a string named str

#

you can use str.replace('a', '') to replace a with nothing

#

do that for every character

#

dont forget uppercase

vague vector
#

might be easier to just copy all the numbers to a new string , there are fewer numbers than characters

night flame
#

no make him do every character

forest gull
humble hemlock
pearl heath
grizzled steeple
gusty oak
#

Github copilot amazin

ivory bear
thin valve
ivory bear
#

¯_(ツ)_/¯

thin valve
#

I'm assuming they either removed the malware or uninstalled the packages because password yoinkers are a no go

#

also prob changed passwords for good mesure

gusty oak
#

Which lang

#

Request the page, store the json, and format it

#

isn't that an API?

#

well you need to get the API's response

#

or you can't edit it

#

you can get the json with response.json

#

and use the json package to only get the value

#

the API returns a json AlexNeutral

#

yes

#

I fail to understand your problem

#

ok, make a request to the API, store the response and write that in a json file

#

oh wait I read your message wrong

#

Just make a variable that has code to get every line in the json file

#

and then use a for i in range loop with that to sort through the entire list

hasty bison
#

Hi, any JavaScript developer that knows why I can't access a variable from the parent class? I know that I need to use this. But that won't work.

nocturne galleon
#

Hi y’all 👋

cosmic turtle
sturdy ingot
#

Are you asking how to replace the url parameter in the request, or rather how to keep the URL part in the string flexible?

#

Nvm, just saw your final screenshot.

wild delta
#

Yo why doesn't this work :) I haven't used C# in a while and I wasn't even that good at it when I made this so I don't know why it isn't working. It's supposed to take in a sentence aND dO tHiS rAndOmLy

wild delta
#

The returned sentence doesn't change

#

But I don't get any errors or anything

#

I guess the first letter goes lower case

#

Does the code make sense?

night flame
#

you're only changing a letter to uppercase if the random number is 0

night flame
wild delta
#

It works :D

#

There was actually another file in the solution that had to do with it but from what I remembered that file made absolutely no sense so I deleted it. And now it's all just one file

#

Aight gn

thin valve
#

what if i just started programing in music theroy

steep mauve
#

Per default it's between 0 and 2147483647, so the probability for getting 0 was just really really low

#

you could have used random.Next(2) or random.Next(0,2) instead (2 because the upper border is exclusive) to get a 50/50 split

vague vector
#

are the directories in question able to be read and written by the owning group?

#

You can either run you script as the apache user or add your user to the same group

#

yes, but no. Using sudo without flags will run it as root and not the apache user.

#

there is a flag you need to give sudo to change the user to run as

midnight wind
#

www?

#

Look it up

vague vector
#

ls -la will tell you ownership info

midnight wind
#

Well just -l will

#

-a just lists all files

vague vector
#

just in case something is hidden

rough bear
#

does anyone know how to help me? i'm not getting audio when i run this code

#

gives me this error

vague vector
#

This would have been so much easier to read in a gist or something

rough bear
#

have resolved the issue now

versed dust
#

@cedar portal ask here

night flame
#

@cedar portal im good with C i can help

tough hill
#

what subject should 1 do for a levels i want be a game delvoloper?

brave spade
#

What's subjects do you have which can be associated to game development? Each school has different a level options

loud kelp
#

Join us for the release of what my gf and I have been developing all year!

thin valve
#

woah

deft sigil
#

what sort of a joke is this ? since when does a string need to be referenced?

fickle verge
#

Im wondering, will a certificate from Cisco , python institute help with my university application?

spring pond
#

that would help more with getting a job, for uni you want a lot of projects

#

or a few very big projects

fickle verge
#

sorry if this is a dumb question whats an example of a big project?

#

I have passion projects

spring pond
#

making some sort of web or mobile app with a backend, making a game with a reasonably large amount of content, lots of different things