#development
1 messages · Page 39 of 1
@last ingot appreciate the thorough response. Yeah I was trying to understand why it worked that way. I am more versed in powershell but looks like BGinfo does not accept ps1 scripts to gather info from
Someone sell me on using an ORM. I’m having to for work, and since I already know SQL quite well, it’s killing me. Is it wrong to hate the very concept?
Um nosql is vague... And it includes other non sql dbs....
And you saying python > c# basic... In terms of what?
Things like document based db are also nosql...
Also vb arrays start at index 0...
Its in this case 0 is reserved already
Document storage has its place, and when dealing with ginormous datasets with minimal relationships, its performance can’t be beat. But it starts to lose its edge when you get into smaller applications with smaller datasets, especially if the relations between those datasets have any order of complexity to them.
At least in my reading and experience.
Anyway, I’m not here to argue the merits of RDBMS over NoSQL. I’m here to complain about a really shitty ORM.
Document based databases can hold more complex relationshipd better than a structured one (like in sql) for instance graph databases
I will agree that there are places for everything
and in terms of speed for simple queries relational ones like the familiar sql is fast af
furthermore id like to state that there is a difference between the db that everyone is familiar with and the language sql
Care to provide a link where I can see an example of that level of complexity? Not arguing, that’s just counter to what I’ve read before, and I’m eager to see things done well by people who know what they’re doing.
sure thing
lemme see if i can find that video lol
WTF is a graph database - Euler and Graph Theory - Math -- it's hard, let's skip it - It's about data -- lots of it - But let's zoom in and look at the ba...
O.o lol
Hello everyone, I need your help. My friend and I have a intermediate knowledge of C# and we want to do a project to show off out knowledge.
For a project we don't want a Console Application but a Windows Forms app, and the project can include SQL Databases. Just don't give us a task of making a mobile app because making UI is hard AF for both of us(Android UI).
anybody know a place where I could learn SNES assembly
No fucking way
What the fuck
How long have you been in here
I don't think I'm best qualified to answer that question so I'll leave that up to someone else in here.
Does anyone know any website that can download automatically new instagram photos of people you follow to google drive? Ifttt doesn’t work anymore.
write a script
well that's neat
I have been looking at Graph Databases, but have not seen a good example where a properly written and indexed query in a relational database wasn't just as performant. Anyone have some good examples of scenarios where this would not be the case?
@cloud knot and people said that Microsoft would ruin github
Normally. Net but I'm talking purely database engine for this.
if (message.author.bot) return;
if(message.author.type === "dn") return;
let prefix = botConfig.prefix;
let messageArray = message.content.split (" ");
let cmd = messageArray [0];
let args = messageArray.slice(1);
if(cmd === '${prefix}hello'){
return message.channel.send("Zdravo!");
}
});
why aint this workin'
(Discord.JS)
Toss a message saying "Zdravo"
when what happens?
when I put "?hello" in chat
if(cmd === '${prefix}hello'){ {prefix{ = ?(set it up in JSON, JSON is linked to JS code
@vestal glen
Have you checked where the code gets to? For example if the author type check is false so it doesn't bail out?
I think I see the problem
You're using '' instead of ``
Everyone here refuses to touch jQuery. Not sure why exactly because I personally have never had the need for it.
Ah
I use frameworks so its basically useless for me lol Polymer.js and Vue.js mostly
jQuery alone is about 1/4 of our apps total minified file size.
Its a web app that gets deployed to well over 100k devices overnight so it does need to be as small as possible to not miss deployment deadlines. And then updated assets and 'settings' also.
Vue is <3 friends. It solves so many issues, thanks to being reactive. But sure, no need to do everything on the client side, agreed.
@nocturne galleon time to pull out the good old console.log to see where the code goes and what values it sees
I'm not sure that a weekday goes by without using my 'clog' template shortcut lol
also be sure to check your regular expressions, or you can end up like Sony 😄 https://twitter.com/ArtemR/status/1083441164034789376
Sony: whoops, regex is hard.
There was apparently some sort of kernel object ("ko") name matching and "com.kodi" got blocked by mistake. https://t.co/GNaJxJ2hup
anyone here experienced with Arduinos? just got 3 MKR wifi 1010 modules and want to put them to good use
if(cmd === ${prefix}serverinfo){
let serverIcon = message.guild.iconURL;
let serverEmbeded = new discord.RichEmbed()
.setDescription("Informacije o serveru:")
.setColor ("#15f153")
.addField ("Ime servera:", message.guild.name)
.addField ("Kreiran: ", message.guild.createdAt)
addField ("Pridruzili ste se serveru", message.member.joinedAt)
.addField("Ukupno članova", message.guild.memberCount);
return message.channel.send(serverEmbeded);
}
Why does this give : (node:6108) UnhandledPromiseRejectionWarning: ReferenceError: addField is not defined
at Client.bot.on (D:\DevBalkBot\index.js:26:13)
at Client.emit (events.js:182:13)
at MessageCreateHandler.handle (D:\DevBalkBot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (D:\DevBalkBot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (D:\DevBalkBot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (D:\DevBalkBot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
at WebSocket.onMessage (D:\DevBalkBot\node_modules\ws\lib\event-target.js:120:16)
at WebSocket.emit (events.js:182:13)
at Receiver._receiver.onmessage (D:\DevBalkBot\node_modules\ws\lib\websocket.js:137:47)
at Receiver.dataMessage (D:\DevBalkBot\node_modules\ws\lib\receiver.js:409:14)
(node:6108) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6108) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
in CMD
and nothing on my discord server
because you're missing a dot on the second to last addField?
also "serverEmbeded"
it's spelled Embedded 😛
Hiya all, im back with another programming question for school
#include "NXCDefs.h"
task main ()
{
while(true)
{
if (Random() <= 599);
{
OnFwd(OUT_A, 75);
Wait(10000);
}
else
{
Off(OUT_AC);
}
Wait(1000);
}
}
so far I see no question?
im typing it up 😃
i gotta formulate it properly
So, the code should make the nxt 2.0 robot drive in a circle if the number is below 600 and stop if it isnt
but for some reason the code doesnt work, (we use https://sourceforge.net/projects/bricxcc/ , but sadly i have no idea what the code language is)
Download Bricx Command Center for free. Bricx Command Center (BricxCC) is a highly popular Windows-based IDE for programming LEGO programmable bricks using NQC as well as MindScript, LASM, C++, C, Pascal, Java, and Forth. Program the new NXT brick using NBC and NXC.
we cant load the code onto a robot unless it "works" but i dont know why it doesnt work
what is "doesn't work" in this case?
it says one of the { is in teh incorrect place
oh, right, I see
you have a ; after the if
making it an empty block
(always include the exact error you get...)
im sorry, kinda new to programming 😃
describing a problem exactly isn't something limited to programming 😉
That fixed it, thanks
@brazen sluice when posting code, please wrap it in 3 `
```
code
You can also put a language after the first 3 `'s and it will do syntax highlighting
(All the details and examples at https://support.discordapp.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-)
that's C/C++ ish
Anyone here familiar with Docker?
Hello everyone! Is this a good channel to find web dev help?
Yes to both of you (@broken panther and @glossy bluff)
Hey. I have a Wordpress site built with docker-compose. What would be the best way to backup and restore it? I need to migrate it to a different server.
This was built on a version 1 .yml file and I can't find the Dockerfile. Whenever I try to docker-compose up on my other server, I keep getting an error saying it can't create a container for the Wordpress image, though it does create a container for the mysql image.
Thanks @broken panther !
I'm having trouble my usermeta custom fields in Wordpress. I was stuck trying top get them to update using a dropdown onchange but I've worked out the problem to only needing a proper SQL command. Here is what I have so far and it currently works but it creates a new row in the table instead of update the current value. Any SQL guru's out there that can help me out? It would be greatly appreciated.
include_once $_SERVER['DOCUMENT_ROOT'].'/wp-load.php';
ini_set('display_errors',1);
error_reporting(E_ALL);
$userid = ($_POST["userid"]);
$meta_value = ($_POST["refunddd"]);
$meta_key = 'refund_status';
$user_id = $userid;
$user = get_user_meta($user_id, '', '');
$refundstatus = $user->refund_status;
$prev_value = $refundstatus;
/* Start database connection */
$servername = 'servername';
$username = 'username';
$password = 'password';
$dbname = "database-name";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "UPDATE `wp_usermeta`(`user_id`, `meta_key`, `meta_value`) VALUES ('$userid','refund_status', '$metavalue')";
if ($conn->query($sql) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $conn->error;
}
$conn->close();
I think you meant to tag Ben
Can you share the error Docker is throwing when attempting to create the Wordpress image?
@glossy bluff, the UPDATE command is something like..
UPDATE table SET column = value, column_two = value_two WHERE id = id_or_whatever;
Keep in mind, a quick search of something like "sql update syntax" could yield an answer quicker than us (:
@split condor
Can you share your docker-compose.yml and Dockerfile?
Give me a sec
error500, something else to note about your setup: It looks like you're open to some SQL injection. Here is a bit of information on why this is an issue and mitigation for PHP: https://stackoverflow.com/a/60496
I'll show you the Dockerfile in a sec. Having connection problems
@split condor Thanks! It's easy to google something when you know what question you are looking for. This is literally pieced from other Google searches and reading as much as possible but I don't quite know SQL
@split condor I think I found the problem. I pushed the image to Docker's registry and the Dockerfile wasn't there 
I tried using the official images from Docker, but they don't seem to work with my environment
I meant I tried using the Dockerfile from the official image*
@split condor up for some help with Docker?
Sure, @broken panther
Alright, so I went a different direction this time. I bashed into the running container from my original server and made a dump.sql, then I SCP'd the Wordpress files to my new server (the one I want to migrate to).
I mounted the backup.sql files and the Wordpress files as volumes in my docker-compose.yml file, like so:
version: '2'
services:
db:
image: mysql:5.7
volumes:
- ./backup.sql:/docker-entrypoint-initdb.d/backup.sql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
wordpress:
depends_on:
- db
image: johnnyetz/wordpress:2
ports:
- "127.0.0.1:8080:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_PASSWORD: password
volumes:
- /var/www/html:/var/www/html```
This is my wp-config.php file:
```php
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', 'password');
/** MySQL hostname */
define('DB_HOST', 'db:3306');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');```
Then I have a long list of docker-compose --verbose up
I get some mysql errors and I can't connect to my server
I'll highlight some errors I noticed
This one repeats itself pretty often:
wordpress_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
wordpress_1 |
wordpress_1 | MySQL Connection Error: (2002) Connection refused```
After that the containers stay running, but I can't reach the server
@split condor
On the MySQL container you'll need to expose port 3306
expose:
- "3306"
expose allows access to connected services only, while port binds to the host machine
Depending on your setup defining it under ports may be a better option; though you will need to consider security a bit more in the latter
Yeah, that should be alright
Could it be some config problems from my old database?
Just to verify, you are able to simply ping the other service from either container, correct?
What do you mean? I usually get them up with docker-compose up
Yeah. If you enter them via exec are you able to simply send a ping request out to another?
For example, opening up a session with db are you able to ping wordpress?
Let me check
How do I ping other services from within the session? I bashed into db, but how I do I ping wordpress from there?
It says ping command not found
It's wordpress php7.1. The official Docker image
That one
I have a different repository in my .yml file because I thought it'd back up anything from there, but it doesn't :p
Also, just realised my wordpress image has "0.0.0.0" listed
Fixed that
Still not running, though
Yeah. The 0.0.0.0 is a mapping on your host machine.
You should be able to get ping via a apt-get install iputils-ping
Installed it. ping wordpress doesn't work. Does it have a different syntax?
Ah, no wait
It can, apparently
Alright, that's good
I'm mildly confused, haha
There's gotta be something small we're missing
Yeah, though, it's weird. I first tried this on my PC and it was working, only that it wanted to install Wordpress, meaning it wasn't taking my backup.sql file. I never know if I fixed that or not because I started changing the database passwords and usernames from both the .yml file and wp-config.php, but then I never got it to work
Does the database container startup without any issue?
On the database setup, you'll need a volume mount for the actual data too
It's giving that error I showed you:
wordpress_1 | wordpress_1 | Warning: mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22 wordpress_1 | wordpress_1 | MySQL Connection Error: (2002) Connection refused
You mean to persist data? I plan on doing that once I can start it 😂
There's a lot going on there, do you want me to CP everything? :p
2019-01-15T06:59:03.673238Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-15T06:59:04.045517Z 0 [Warning] InnoDB: New log files created, LSN=45790
2019-01-15T06:59:04.101238Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2019-01-15T06:59:04.161152Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 0b60024d-1893-11e9-be2d-0242c0a87002.
2019-01-15T06:59:04.162617Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2019-01-15T06:59:04.163305Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2019-01-15T06:59:04.508693Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2019-01-15T06:59:04.509195Z 1 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-01-15T06:59:04.509441Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-01-15T06:59:04.509695Z 1 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-01-15T06:59:04.509934Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-01-15T06:59:04.510158Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2019-01-15T06:59:04.510404Z 1 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-01-15T06:59:04.510627Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.```
It's also shutting down a bunch of plugins
2019-01-15T07:00:29.238845Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.```
That's pretty much all the note worthy stuff
Interesting
Those should be alright
At the end of the log it should say it has started successfully, correct?
2019-01-15T07:00:29.479243Z 0 [Note] mysqld: ready for connections.
Version: '5.7.24' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)```
That's the last bit of the log
I'm pretty confused
Me, too, mate 😩
We have established that MySQL is running, you have network connectivity between the two containers, and have exposed the primary MySQL port
That should be it
I'm a noob at this, but I'm usually able to find what I'm looking for after a few hours of google, but I've been on this for days, lol.
darn
Let's just go over it again
So listing all of your containers, for db do you see that port 3306 is exposed?
I fucked over this when I mounted the backup volume. I could try not doing that and see if it works 
excellent idea
Yep
Hey guys, I'm curious. Is it possible to code a meltdown exploit using C++ in visual studio simply for educational purposes? Like I'd like to try inserting a value in memory and make something to try and read the value at that address... Idk if this is possible in C++ though
Tbh I'm new to C++
Not new to scripting/coding though
Do you have the MySQL client on the wordpress container? mysql
Apparently not, but I just downloaded the official version, I'd like to think I have it on the image from my repository, given that I pushed a working image
haha
Try connecting to the db container with the mysql client
mysql -h db
@fiery onyx, here is a project that is aiming to check if a system is open to Meltdown; so sort of similar: https://github.com/raphaelsc/Am-I-affected-by-Meltdown
What's the package called? install mysql doesn't work
Try mysql-client
Something like mysql -h db -p
You will actually type out your password
or copy/paste it
ok i'm confused again
We have established that you can connect
For some reason Wordpress is having an issue doing so
Can you leave the port off from WORDPRESS_DB_HOST? It shouldn't be required as you're using the default port. Maybe it is having an issue parsing that; that's just a shot in the dark though.
Do I just delete the port or the entire line?
The port
Done it. Same thing, sadly
@split condor Thanks.
Who named Meltdown, anyways? And why does it have fancy logo? 🤔
The only thing I can think to do is try exposing the port on the machine as well
Replacing expose with
ports:
- "3306:3306"
Alright, let me try
I was under the impression that Docker compose linked these services together automatically
Maybe we actually need to define a link
Getting an error:
ERROR: Encountered errors while bringing up the project.```
I have this line in wp-config, should I remove this? 🤔
``define('DB_HOST', 'db:3306');``
Perhaps
It looks like you already have MySQL running on your host machine
no biggie
Jump back to expose then maybe we can try an actual link
Alright, done it. By linking you mean using links: ?
On the wordpress service?
Yeah
Do I delete depends_on: ? 🤔
I don't believe so
😩
Still broken?
Yeah
of course it is lol
Could you try restarting the host machine? Along with making sure everything is up to date.
Yeah, I'm gonna try the whole process again
@split condor so I found a new error (lol).
I made a new droplet on DigitalOcean just to try out something (have free credits anyway). I followed the official guide to install Wordpress and it works, then when I do the same in the other server, I get a version error.
Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1. For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
The funny thing is, I'm in the latest version
This is docker --version's output Docker version 18.06.1-ce, build e68fc7a
@broken panther Not sure its the version you actually have installed but the format of the compose file. https://docs.docker.com/compose/compose-file/compose-versioning/
The format is the exact same from the docker docs tutorial, works in one of the droplets, but not in the other one.
Double checking couldn't hurt I guess. There is an upgrading section but if that looks good IDK. Learning docker is still on my to do list lol
The only difference between the 2 .yml files was that one had volumes (I added them to backup my site), but then I modified both files to make them the exact same.
This thing's been driving me crazy, lol
Version 2 to Version 3 It said what changed was how volumes work so probably your issue then.
I fixed that issue. It didn't work without the volumes either. I don't know what I did, lol
Ah
guys I have the best Idea for version control
make a discord server
and put the code in messages
each branch is just a separate text channel
But how do you gonna merge branches with that...
Well, thinking twice you could write a bot to do that.... So i think this is a perfect idea.
Trust me, all the big name software companies use this. Even discord themselves
Lmao yeah good idea, let's put all our code on a messaging app with semi-frequent server outages and no guarantee that the server wont be deleted
thats the best kind of security
"insecurity"
isn't that how LTT manages their servers? 😛
Okay, so I built an endpoint for work that accepts JSON, and has a format validation component for one attribute in that JSON. A developer joining the team to help us launch complained this morning that the endpoint failed in error when passing that value as null. But in my testing, passing it as null has the desired effect and does not fail in error. That’s when I learned that the guest developer was sending everything as strings. So “thing”: “null” instead of ”thing”: null.
Is there any reason why he should be sending null in a string like that, or am I right in judging him hard for finding the one behavior that would cause my endpoint to fail?
(note, I fixed my endpoint to account for this, but I’m trying to see if I’m right to be annoyed)
"null" isn't null. If you want the null value, don't put it inside a string.
(though your endpoint should probably handle arbitrary json input gracefully)
A python AI I'm working on, I'll add timestamps and names later on, for now it asks questions. I answer them.
Maybe I'll add names now for future screenshots
BTW does this fit here? It is bot development.
Done
I'll try for time stamps, too
The bot main menu has a time stamp
(Using QPython, may port over to Linux and Windows when the Android version is finished)
anybody know if I can make a usb-hid device seem connected using csharp?
it needs to be a specific VID and PID
ofcourse it was a meme
hey, does anyone know how I can tell the sequence of line execution in a C program?
I need to know which line of code gets executed and when
they're linear
it starts at the top, and it goes to the bottom
1 by 1
@supple abyss
great, thought so
unless you have a function which calls another function, then the program will jump to the specified place, right?
yeah but it still follows the top to down thing, per function
void foo()
{
bar();//3rd
}
void bar()
{
//4th
}
//entry
int main()
{
int i = 0; //1st
foo(); //2nd
printf("hello"); //5th
return 0; //6th
}
very basically explained though
there's more going on
scopes and all that
but you can assume that if you write something first, it'll get executed first
great, thanks man!
another question I have; I need to check this piece of code if it has any errors and if it makes sense
my thinking is that the loop wont even be executed because 9 mod 2 is not 0
and i is decreased two times
then we have 7 mod 2, which again is not 0
no wait
it will be executed every 2 numbers
because thats when i mod 2 == 0
so the output would be 8 6 4 2
One message removed from a suspended account.
I'm sure that's an infinite loop @supple abyss 😛
its a subtle error
its not even a mistake logic wise haha
coincidentally I had such a mistake happen to me pretty recently
could you explain where the error is?
I mean.. I'd be doing your assignment haha
protip: ";"
line 2? but the compiler ignores whitespaces
ohhh
while loop
it has a ;
when it shouldnt?
yes
damn I wouldnt have found this error at an exam
know that {} can be used to create a local scope
the ; ends a command so the while(i > 9) is a seperate entity from the {}
so since i is never decreased since it has no code to run it'll loop infinitely
in other words; do things with {} not require ; at the end?
int main()
{ //function scope
{ //local scope
int i =0;
printf("Hello");
}
//i is destructed
int i = 10; //its fine since i isn't used yet
}
no clue, I main in C++
Curly braces are not required for a while loop. If you leave out the curly braces it will treat the next statement as the full loop contents
since the semicolon is immediately after the while loop it's just an empty loop that runs forever
and yes,
int i = 0;
while( i < 9)
i++;
is legit code
^ right like that
but it just treats the line right after
the {} aren't required, but are used to create a scope and execute blocks of code rather than a single line
not the whole list of lines for example in that code
though even that can be done by using , instead of ;
, does have the restriction of not being able to define new variables.
while(true)
printf("Hi"),
printf("This"),
printf("repeats");
No \n 😡
ah right haha, I usually wrap my printf's or use std::cout/endl
👌
good to know
so yeah whatever comes directly after a while or for is run
so if thats a {} it means it runs that entire block
now exercise for the reader.
int i = intreturningfunction1(), intreturningfunction2(), intreturningfunction3();```
What's the value of i
whatever is the result of intreturningfunction1() iirc
not 3?
Wasn't it 3? Now I'm actually not sure anymore lol
you could do that tho?
return values don't have to be stored
no
okay didn't think so but now im questioning everything lol
In that context you could do something like
int i1 = 1, i2 = 2, i3 = 3; to define multiple variables of the same type
But that's not a comma operator anymore in that situation I think
that is fine yeah
yeah. i mean like the first thing you originally posted @obsidian bluff was setting the one variable
but the reason the functions work is due to the fact their return values don't have to be stored.. It's just icky and potentially UB to change a variable that is used in the other functions as well
it's actually like this (intreturningfunction1(), (intreturningfunction2(), intreturningfunction3()))
for example
int Foo(int x, int y)
{
return x / y;
}
int i = 1;
Foo(i++,i++);
this is UB
the comma operator evaluates both expressions and returns the return value of the right-hand expression
Really? is it UB?
You'd think that they are avaluated from left to right
order of operations isn't strictly defined here
You probably know more than I do about that.
👻
Once you get in the territory of "indeterminately sequenced" things get spooky
This entire page is spooky
Reads like it's more geared towards compiler developers.
my example is in there
you know whats also UB, almost every bit of code that uses union
due to strict aliasing
union
{
int i;
float f;
}
//initialise i
i = 10;
//reading from or writing to f is now UB
though one would usually use this to use bitwise ops on floats
C++ is a place where dreams go to die
instead if you want to use bitwise ops on a float, you'd have to memcpy it to int, do your ops and memcpy it back
this is why we are moving our old c++ apps to c# lol
The graphic is wrong about the the version number only.
I think core was originally called framework 5, so that might be why. 
Oh yeah, in green it says asp.net 5
@last ingot using C++ doesnt guarantee platform support at all lol
it purely depends on what you have to do, but anything thats not command line and requires a window will automatically bind you to a specific OS unless you rewrite that piece of code for every platform you want to support
same for rendering
which is where libraries come into play
or engines
I haven't used C# in almost a year at work. Only when working on legacy code and most of our products are stable.
Our team has been using Go and I really enjoy it. If I ever have to get a new job, I'd probably look specifically for teams/companies that use Go.
Anybody good at ASP.net?
I have a file in the format of value1, value2 <crlf> value1, value2
And I want to display for every line in the file that value 1 as a <h3> and that value2 as the href of an <a>
This is a asp.net web pages btw
@stiff gull much of what is UB in C++ is in reality IDB, so get to know your compiler real well, and don't use a different one.
@proper gale this is very very ill-advised
the problem with UB is that the compiler is allowed to do whatever it wants there, even a update could break what consistent behaviour it had for it
UB is to be avoided, not embraced
It just means you have to be aware of what is and is not UB and work around it
@half forge before/after shots? Im not seeing the problem?
seems the grass is completely ignored from the AO pass
and it's being overlaid
resulting in the "transparant" look
discord channel: 35X6xw (can't post the full invite here)
it's Game Dev League, it has a lot of game dev people there, also channels dedicated to Unity, they might be able to help you
just put that behind .gg/
its quite a big channel, full of experienced people
get a role
by doing !role Coders for example
Nice work @upbeat frigate
It looks like you are one of the lucky fellas in the quote test group
Hello!
@split condor me?
anyone knows how to datamine an android game update?
no sorry
I'd assume, manage to get a hold of the apk, and the original, then diff it?
Hey, im completely new to visual studio and c++ and im following a tutorial, I tried to build a project and this error occured, anyone have any ideas on how i can fix it?
Nope
cause that'd be a hell of a start
lol.
Im not sure why its using .net
I may have installed it, but i dont think im using it
i am using someone the tutoirals framework
not sure if that has any CLI in it
So i tried doing another really short and simple program, but that build failed with no errors...
What made you pick C++?
Well, to be honest, I just wanted to learn a new language. The only language in my schools curriculum is python, and i wanted to try a new language.
I'd be welcome to any suggestions though.
@nocturne galleon
I would have a go with C# imo @warped inlet
@warped inlet if there's errors it should say so in the output window
however that program should run and pretty much exit immediatly, you might see a very quick CMD pop up if anything
in case you might have confused that with "the build failing"
But ya, the above seems like it may be the case. Just put this at the bottom:
std::getchar();
It will wait for you to press a key before exiting the program.
And also make sure to add a newline character
@warped inlet python to C++ is a bad idea, C++ is fucking hard (and about as different as you can get without going functional). As Eagle suggested, C# would be a good inbetween choice.
Alright, thanks guys.
@warped inlet Unity is a good start if you wanna get some games going and learn C# along the side
Ah, Il look into It, @stiff gull Thanks!
I love it when the UI developer overrides the API design because he can’t keep up and feels like he ideologically shouldn’t have to try.
But you're there to cater to all his needs, right? Lol
no, no, it is.
i code in it as well, consider perspective
to me its not particularly hard, but to someone coming from python, it is.
ok, doesn't mean its not a hard language
if you are a masochist and want to take the hard route, go right ahead,
C++ is a hard language, not because the language is hard, but because the libraries are confusing.
like, what is stoi, you know what that is, i know what that is, but it should still be called stringToInt or something similar.
most things are std::string or char*, no?
or at least have a constructor from that so you use std::string.c_str() then it makes its type from that.
how does this pertain to C++ (not) being hard?
ok, that was never my point.
i was saying that its a hard language to learn, and arguably hard to use.
ok, counter points
C++ is non garbage collected
C++ has a fuckall of buildsystems
C++ requires functions to be declared before they are used
the C preprocessor is a dick, period.
headers cause problems, and its hard for IDEs to properly show you how they will be included.
the language is not standardized across compilers.
operator overloads can sometimes be super intuitive, other times not.
libraries have a tendency to have confusing and/or overly long names.
namespaces are a necessary dick to work with.
and a big thing from python, its forced statically typed.
and this is besides the more minor syntax differences. the largest of which would probably be automatic this-> that python doesn't do.
Ofc, c# shares some of these, but probably best not to throw them all at someone at once.
nobody can be perfectly fact only.
and while yes python had different run times that do behave different, there is a standard one, C++ doesn't have that.
you could say GCC is the standard one, but its really not because of extensions, Clang isn't for the same reasons, and MSVC is horridly off.
Everyone look at how hardcore I am
I'm not making excuses and took that HARDEST route VOLUNTARILY. Because I LIKE DIFFICULTY
But at the same time the way I took wasn't hard at all because I am super hardcore
🤐
I would personally put time.time() on the left to make it clearer.
Like time.time() >= timestamplewhatever + 300
You would never say: this certain moment in time plus 15 minutes was after now so it hasn't been 15 minutes since the event occurred.
You would say: it is currently less late than 15 minutes after the event happened.
i would do it now - then >= 5 minutes
Even better
That's fair
Tbh I didn't even read all of it 😅
I've done a fair share of condemning people for being "lazy" myself
I have the same mindset
But it sucks
You spend years and years doing nothing productive
Or at least a lot less than you could've done if you took the easy route here and there.
I had such a shitty mindset that I refused to use a library for openGL context creation or even audio playback
I did it all using windows only function calls
And it was hell
True I did get a better understanding of windows under the hood
Not only did I spend time doing useless shit it was part of the reason that I'm still technically in what americans would call high school at 20 years old
And I'm still not learning about what I'm really interested in in school
People are passing me left and right and it feels terrible
Computer programming duh
And even my knowledge of computers is not where it could have been if I had just studied for school
Because I would be in uni by now
I respectfully disagree
Uhhh sure
I don't think I can't code
Well I barely know CPP
Most of those programs were written in it
But they're all mostly terrible
Cpp, c++, potato potato
Like cpp is freaking complex dude
I don't know half the things there are to know
That's why I say "I know how to use C++" and not "I know C++"
lvalues rvalues pass by reference copy constructor move contructor virtual destructor dynamic_cast vs const_cast unique_ptr shared_ptr weak_ptr etc. etc.
I can't see the forest for the trees
I would argue that C++ is more difficult than even some assembly languages
I reinvented the circular buffer on accident
While trying to code something
my problem is not problem solving
My problem is knowing all the tiny semantics
Like... Every time I want to get started on a big project I get lost in a rabbithole of cppreference.com pages
Every time you want to know about one thing you have to read about the next and then you have to read more and more and more
And I don't want to just "make it work" if the code is going to be shit
@obsidian bluff i have caught myself reading cppreference for well over an hour by accident.
all sorts of things.
It sometimes seems like with C++ that you either know everything or you know nothing
And in the inbetween you're just fucking around like an idiot.
Can someone tell me what I'm doing wrong with my hashing? AWS says I'm doing it wrong https://gitlab.com/wyoming/wyoming.gitlab.io/blob/master/experimental/python/hoback/pinpoint.py
I have a problem. I want to learn how to use CUDA, but my GPU doesn't support. Do you know of places on the net where I can run my code?
P.S.:Don't have money for new GPU now
I hear that using openCL is the better option.
@obsidian bluff cuda us superior in every way, OpenCl is what'd you use if you have a AMD gpu
@nova moth no since it would literally cost performance and power, and ppl would just run miners on em :P
I hear the performance difference is negligible if used properly.
And you have the added bonus of being more portable
Except OpenCL runs worse on Nvidia
I'd say that's NVIDIA's fault but okay.
why would nvidia invest in OpenCL performance if they have special hardware for the same compute purpose called CUDA
I just want send my cpp project and be given the results from it
I'm not saying they would. I'm saying they should
And if consumers say "We want openCL compliance and performance" they will have to answer
@obsidian bluff people choose the easiest and faster thing to work with, that is CUDA on both points
being able to write C++ on GPU is amazing
Hmmm if you couldn't tell by my profile picture I'm not a huge fan of vendor lock-in
well then AMD should just implement CUDA support huh :P
Well that took em a while
CUDA had it for years and is likely more matured
wait unless thats the document update date, in that case ignore me
It says version 2 so it's probably been a thing for a while
nvm that's just the openCL version
It was released in May 2017
can anyone help me install this
A simplified version of http://bit.ly/minecraft-servers-list :) - grohsfabian/minecraft-servers-list-lite
@stiff gull the OpenCL spec is maintained by the khronos group, these are the same people that maintain Vulkan, OpenGL, OpenGL-ES, SYCL, SPIR(-V), WebGL, and more.
These standards also need to be cross vendor which has caused many issues in their design by committee process, result is that it moves slower than others. However, just because its newer doesn't mean its less mature, the people working on these specifications, besides numbering in the hundreds, are looking at current competing APIs/Libraries in an attempt to make the best API they can.
Nvidia does support most OpenCL 2.0 features, and is making an attempt to update their GPUs (they have some issues with SVM afaik), besides their OpenCL resources https://developer.nvidia.com/opencl.
@proper gale I know they do support it, but doesn't mean it can match the CUDA speed yet :P
It's not that slow
never said it was slow, its just not as fast as doing it through CUDA :p
I mean, if you're making a bitcoin miner, would you use CUDA or OpenCL for NVIDIA?
the choice is pretty easy
same for anything else that needs performance, and thats basically when you step to GPU compute anyways.
Atom or VS Code?
IntelliJ vs Notepad
@lost creek I was using Atom for some years and I switched to VSCode because of its responsiveness and the integrated NodeJS debugger.
Eclipse vs Raptor
vim vs emacs
Notepad
@little knoll me too, also vs code has intellisense which is just extremely useful
anyone here familiar with filing/applying for a patent?
I'm very familiar with not doing it...
anyone familiar on opening .dds files ?
Oh, no! Microsoft is retiring MVA. :c
well someone can go ahead and start a movement to download/capture all the content before it goes down and reup it somewhere else?
Looks like they are sending it to Microsoft Learn?
Hey! Now sure if it's the right place to ask, but I'm currently in my 4th year of my Masters program and I am looking for a summer internship, does anyone know of good companies that offers that in Canada or Europe?
@night girder Any company you can get into really. Experience is experience imo.
Yeah, but not all companies have summer internships, what I was asking was for was companies recommendations
would it be bad to move from python or lua to c++
i like lua cuz you can easily learn it, taking c++ as first language would be pain since you cant just start off using unreal engine easily
I'd be willing to bet there are some decent online courses labeled something like "Learn c++ with unreal engine"
@nocturne galleon you already know lua, or you are considering them both as first languages to learn?
Hmm, i know Lua but... i hear its hard to move from Lua to C++. I don't know , i hope i can visual script over unreal engine with C++
i dont think random code bashing is good
when i write a line i want it to turn into life visually
the two languages are very different
almost anything that is automatic in LUA, is manual in C++.
Well i found roblox which allowes you to easily learn Lua. I wanted to go for Python first but there arent any supported bulletproof engines like unreal engine and unity for it, pygame is long dead so i figured id go with c++ but it takes quite the time to learn the engine before you can do anything
Hm
i need c++ fur security , well a pen tester told me so id kill 2 flies with one hit or how you say it
game dev and security
Hmm
How easy is the unity engine?
Can i start scripting and learning there or i have to stare at a console for months before i can use it
Its all about making coding enjoyable for me
languages decision is so hard
i been trying to figure out this for 3 years
@nocturne galleon C++ is not inherantly more secure than C#
C# yes
Hmm
If the engine is easier to start with i guss ill try it out
Godot has been mentioned to me but im not sure how long itll last
can someone help me with css
If you learn C# from ground up , you can create amazing games in unity. C# coding gives you a lot of control over unity, which you can use to do whatever you want in your game.
nice to read
and i assume going over to python from c# wouldnt be that hard later? @proper gale
@nocturne galleon it is not
Oh alright c# seems t o have the win to avoid any risks
we have to use C# for web development in my class right now. its so weird
@nocturne galleon The best stuff of learning C# is that you don't limit yourself to Game Development, you can switch easily to UWP, WinForms/WPF, .NET Core and other pretty stuff
@last ingot Just saying to him, He has things to win in both sides. C# is greatly modular as it is C++
@haughty owl i mean, all the languages listed dont limit you to game development. only langs like GLSL and HLSL are limited, but also specialized.
They dont limit you per-se, but what effort do you made to code a game with (for example) Ruby rather than C# or C++ is a deal breaker for most people
This channel is probably better for this, I created this small screenshot chrome plugin when Taran made that video about full page screenshots but didn't get a response, so here is it:
Posted the source real quick to github gist (getting the full chrome plugin onto the google webstore) https://gist.github.com/MarnixBouhuis/9d80eb6033b26359f2a2c1e103c5c685
It automatically zooms in, takes the screenshot and opens a save dialog
Seems to easy eaglebyte
^^^ Plot twist O_o
It's not quite the same. The stock market is still private because you still need to pay money to use/have it.

If it isn't owned by the proletariat, it's not publicly owned. ;)
dec

any body know how to convert a system.drawing.color to a hex code?
string color2hex = System.Drawing.ColorTranslator.ToHtml(colorDialog2.Color);
works sometimes but sometimes it returns a color name instead of a hex code
@thin cobalt ^^
@rigid jewel thank you I'll look into that!
Yet another odd issue
I'm doing find and replace in C#, it works fine on small files but on big files it doesnt do anything
{
string color1hex = textBox1.Text;
string color2hex = textBox2.Text;
string color3hex = textBox3.Text;
string color4hex = textBox4.Text;
string str = File.ReadAllText("template.cueprofile");
str = str.Replace("#ffaaaaaa", color1hex);
str = str.Replace("#ffbbbbbb", color2hex);
str = str.Replace("#ffcccccc", color3hex);
str = str.Replace("#ffdddddd", color4hex);
File.WriteAllText("generated.cueprofile", str);
}```
if template.cueprofile is a big file, it just copies it to generated.cueprofile instead of doing the find and replace
@nocturne galleon tell us
@thin cobalt are you sure all the hex codes will always be all lowercase?
Yeah, I made the template file
@nocturne galleon
The file loaded has several thousand lines though
That's probably the problem
Writing something up for you to use.
thank you
@thin cobalt
public void Main()
{
// File parameters
string originalFilePath = "template.cueprofile";
string newFilePath = "generated.cueprofile";
// Fetch the colors from the text boxes
string color1hex = textBox1.Text;
string color2hex = textBox2.Text;
string color3hex = textBox3.Text;
string color4hex = textBox4.Text;
// Read the source file
using (StreamReader reader = new StreamReader(originalFilePath))
{
// To write to the destination file
using (StreamWriter writer = new StreamWriter(newFilePath))
{
// Go through each line in the original file
int lineNo = 0;
while (!reader.EndOfStream)
{
// Read/Replace/Write to new file
string line = reader.ReadLine();
writer.WriteLine(ReplaceLine(line, lineNo++, color1hex, color2hex, color3hex, color4hex));
}
}
}
}
// Handles replacement logic
private string ReplaceLine(string line, int lineNo, string hex1, string hex2, string hex3, string hex4)
{
line = line.Replace("#ffaaaaaa", hex1);
line = line.Replace("#ffbbbbbb", hex2);
line = line.Replace("#ffcccccc", hex3);
line = line.Replace("#ffdddddd", hex4);
return line;
}
Will work with any file size*
@tulip pike im making my own distro since 1 year
Now im finally making my first build
feature list?
@nocturne galleon thank you so much!!! I didnt expect someone to just legit do it for me lol
No worries. Bored on a Saturday haha
You can add anything to your linux distro
Even make your own mirrors
im going to do that
😉
i need to use structs more ```public static class Launcher
{
public struct Game
{
//prefix for settings
const string Name = "";
//name of exe
const string EXEName = "";
//basic settings to get the game running
const string BaseCommandVars = "";
public Game(string name1, string exename2, string basecommandvars3)
{
Name = name1;
EXEName = exename2;
BaseCommandVars = basecommandvars3;
}
}
public static void LaunchGame(Game gameToLaunch)
{
}
}```
oh god
im adding a bunch of stuff to my script and im not sure it will work
inb4 i get 2000 run time errors
too late lol
xD
Landed a new job as a Software Engineer for IQVIA. 😃🎉🎊
@nocturne galleon Will work with any file size hmm I doubt that, seeing as you used an int for line number, there's a reason we usually use size_t (or uint64_t these days), 2.1 billion lines is still a lot but can be done in a 2 GB file
and then it'll overflow to -2.1 billion and crash 😛
Well, that's why I put an asterisk on the end haha
usually followed up by small print at the end 😛
Ya, oh well. Figured there wouldn't be a 2gb template file =/
thats a different matter haha
🎉 🎉 🎊 🎊 🎈 @nocturne galleon that's great 🎈 🎊 🎊 🎉 🎉
Hey, does anyone use eclipse here?
I just installed Eclipse to use instead of NetBeans
I also installed the dark theme that everyone uses
However while using the JFrame builder some colors blend too much, like when changing properties in the JFrame builder
Any way to change those specific things?
this properties window is what Im talking about
this
becomes this
You know, JavaScript’s async/await syntax is actually very Promising.
I moved to IntelliJ from Eclipse.
I use IntelliJ for Python and it's pretty decent.
const mockTwats = (str) => {
const characters = str.split("");
characters.forEach((char, index) => {
if (Math.floor((Math.random() * 10) + 1) % 2 === 0) {
characters[index] = char.toUpperCase();
} else {
characters[index] = char.toLowerCase();
}
});
return characters.join("");
};
process.stdout.end(mockTwats(process.argv.slice(2).join(" ")));
Because we all gotta be childish every now and then
call with
node script.js Your message here | clip
(you heard of .map? )
I have
This wasn't meant to be effecient or clean
It's literally something I wrote to mock my fiancee a bit 😛
I mean, it's a great idea... Though don't proper cool people WrItE aLtErNaTiNg CaPs?
It's to live up with that spongebob meme
const mockTwats = (str) => {
const characters = str.split("").map(char => Math.floor((Math.random() * 10) + 1) % 2 === 0 ? char.toUpperCase() : char.toLowerCase());
return characters.join("");
};
process.stdout.end(mockTwats(process.argv.slice(2).join(" ")));
There, cleaner for you 😛
Well, at that kind of length, might as well change it a bit more
almost a "one liner" 😉
const mockTwats = (str) => {
return str.split("").map(char => Math.floor(Math.random()) % 2 === 0 ? char.toUpperCase() : char.toLowerCase()).join("");
};
process.stdout.end(mockTwats(process.argv.slice(2).join(" ")));
Just a little past the 80 character limit so I'll let it slide
hm, didn't you break your Math.random though?
I did
wouldn't you have to Math.round() to have a 50/50-ish chance?
Math.round or add a * 2
Math.round seems cleaner
so that's what I changed it to
const mockTwats = (str) => {
return str.split("").map(char => Math.round(Math.random()) % 2 === 0 ? char.toUpperCase() : char.toLowerCase()).join("");
};
process.stdout.end(mockTwats(process.argv.slice(2).join(" ")));
God I need better things to do than this...
OH YEAH
const isRegularCharacter = char => {
const code = char.charCodeAt(0);
return (code > 64 && code < 91) || (code > 96 && code < 123);
};
const mock = (str) => {
return str.split("")
.map((char, index) => !isRegularCharacter(char) ? char : index % 2 === 0 ? char.toUpperCase() : char.toLowerCase())
.join("");
};
process.stdout.end(mock(process.argv.slice(2).join(" ")));
No longer breaks on special characters such as '
But doesn't really support other language characters anymore
Does anyone work with QT / C++ any maybe wanna have a look at my program and suggest possible improvements? ;-;
@keen tapir i work with C++, but not QT.
hi, I am reading through a pdf about "modell languages" (in correlation to the turing machine, finite state machine etc.) and I dont know what the succ is supposed to mean (not in the meme way pls)
also dont understand where the Z comes from and the B is never found. I'm guessing the prof. made a mistake?
also translated this means WHILE-language: addition/sum
succ(x) (usually) means successor of x, which is x+1
looping on WHILE succ(z) <= b is equivalent to WHILE z < b, and off the top of my head I can't think why it would be easier to do the former in a Turing machine either, but if it's an intermediate language then it might fit better with the model
the z is initialised to 0 before the loop, and is a count of what has been added so far; the loop runs until z=b, at which point you have finished adding b to x
(@supple abyss )
@ember kiln thank you! Clears a lot of things now
how put the code in those blocks?
If you just something like this then you just wrap it in `
one on each side
now, if you want code formatting you put ``` on the first line and the last line
the top line, immediately after the ``` you can put a language down like js, html, markdown, and like 90 others to get syntax highlighting
like so
const someCode = () => {
return 'some string':
};
In my text field this looks like
```js
const someCode = () => {
return 'some string':
};
```
@spring radish flexbox maybe?
(based on the text going out of the purple box this seems like images + text to me?)
The purple is a image that’s repeated over and over again to create. Background
That’s on the body element
The text is a h1 inside header, inside a div
Now, none of those elements have any margin, width, or padding
They all set width to 100% of the screen
Now, no matter where I place text-align:center or margin-left: auto;margin-right: auto; or boy
Both•
It produces that result you see on the screen
Can you put the code somewhere? I could give a better answer and help point you in the right direction
@spring radish kinda very spammy there bug. Could you try to get it all in a single message in the future? I ask because the anti-raid feature of the bot tends to smack users depending on their chat behavior.
It isn't that spammy actually, the messages are sent over a 6-10 min period
Discord just groups it together as if it was sent within a minute
I meant this bit, not that you were rapid-fire messaging, but that in cases where you're the only one chatting here, it gets flagged https://dooleylabs.com/-kjj58.png
Anyone around to take a look at my programming assignment? Unsure why its not working
#include <iostream>
#include <cstdlib>
int main() {
int series, input;
std::cout << "Which element of the series would you like? ";
std::cin >> input;
__asm {
geom:
push ebp;
mov ebp, esp;
sub esp, 16;
mov[ebp - 4], edi;
cmp[ebp - 4], 1;
jne a;
mov eax, 1; // base case
jmp done;
a: // return 1 + 12 * geom(n-1)
mov eax, [ebp - 4];
sub eax, 1;
mov edi, eax;
call geom;
mov edx, eax;
mov eax, edx;
add eax, eax;
add eax, edx;
sal eax, 2;
add eax, 1;
done:
leave;
ret;
}
std::cout << "f(" << input << ") = " << series << std::endl;
return 0;
}
@jade rain what course is that for?
Interesting. What degree?
Computer Security and Information Assurance, Im particularly focusing on Digital Forensics
Nice. Best of luck. Unfortunately I can't help you with assembly.
@jade rain not working how?
@jade rain what compiler?
visual studio obviously
thats the IDE
. . . . .
that follows part of both MSVC and GCC ASM syntax, and MSVS can use GCC
assuming MSVC, his original code is mostly syntactically
cant believe i didnt spot the semicolons on each line
but to be fair, i dont know ASM syntax rules for inlining, as i never do it. can read the stuff though.
well first he uses the MSVC keyword, and then in his screenshot uses the GCC keyword...
which is why i questioned what compiler
yes but you didn't get my joke :'(
what joke?
multiple people i know thought (or still do, idfk) that Visual Studio and MSVC are just different names for the same thing.

Using VS as both

your assignment expects you to use GCC apparently, aren't you supposed to work on a linux kerneled environment ?
oh, huh, that is GCC ASM syntax
just download VSCode and make sure you have GCC set up
@jade rain
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html
https://docs.microsoft.com/en-us/cpp/assembler/inline/inline-assembler-overview?view=vs-2017

Using the GNU Compiler Collection (GCC): Extended Asm
Bot broke xd
I get to die doing javascript today 😦
Hey yall. Like my Discord bot? Added advanced previews for PCPartPicker and NewEgg.
@tough adder pretty cool
Thank you
Public? @tough adder
The libraries I made to fetch data from Newegg and PCPartsList are. I added those to the NPM registry. The bot is not yet public but might become public (though it's not difficult especially since the modules are open). I'm trying to see if I can grow my own discord server. Hoping a quality bot will be a unique ish feature
Here's the modules. The PCPartPicker one I am still working on. It's not as nice as the Newegg one.
https://www.npmjs.com/~techsquidtv
can someone help me withdiscord.py?
import discord
token = "my token but i removed it"
client = discord.Client()
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
id = client.get_guild(521695063051468800)
channels = ["commands", "xd"]
if str(message.channel) in channels and message.content == "!ping" and message.content == "!users":
if message.content.find("!ping") != -1:
await message.channel.send("@293430838618488833")
elif message.content == "!users":
await message.channel.send(f"""Number of users: {id.member_count}""")
else:
await message.channel.send("tf u nerd fgo do commands in bot cammands channel or ban")
client.run(token)
@keen ermine
maybe could help
also
ok
anyone know where i can learn to develop i mostly want to do games im just starting out
@craggy acorn start with any language, do not focus on games right now. As soon as you start understanding how languages works and basic programing you should start making games ( that will take you a few months to a year ). Don't rush things because that is how we get crappy devs
ok thanks but what language should i start with?
c++/c#
@craggy acorn Get Visual studio along with the Unity plugins
C#
@craggy acorn you can go for the cs50 2018 on YouTube, then go for the language you want, cs50 is just to learn programming concepts then go use it in the language you want
Did anyone try to implement discord oAuth2 in browser ?
Yes
Anyone good with SQL who could explain more advanced SQL queries for me? Might be a long shot. Really stuck atm.
What do you need @sick wraith
@ionic hull Trying to do neste queries, but I have come to the conlclusion that I don't know howto to do it.
nested*
I need to combine "or" and "and" but I can't figure out howto do it.
Or if that's even how you do it properly.
you can combine and and or queries just using brackets, as you would in most programming languages
SELECT * FROM table WHERE ((a=3 AND b='q') OR r LIKE '%2%') AND z=1;
Now to use Mortis to update some old SQL calls in LMGbot that need bumping... lol
hey random question can someone confirm for me if i'm using this correctly because i'm unsure and cant see any good example code i am using python uu module and am i correct in thinking its used as such uu.encode(Path to file i want to encode as base64, path to where i want it to be output)
when you are doing programming homework due tomorrow and its got a really weird runtime error: angery noises
RIP
...
its working now
I dont know why what I did actually made it work but...
¯_(ツ)_/¯
edit: sorry I just realised a few people probs just got spammed, i wont do 5 word messages anymore
Hey, I'm really new to development and I was wondering if I wanted to have user submitted data (simple stuff like if someone rates something out of 5 stars) shared between an iOS app and an Android app, what tools and languages do I need to do that? Like I said I am very new and am just looking at what software I want to start playing around with. 😃
can someone help me im trying to get the li a little more above but i have no idea how
im also new to code
does anyone here use nginx with php?
If I want to try learning Java is this the correct version to download? https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html
@oak parrot always use pdo
@nocturne galleon windows
Hey, its the guy that doesnt understand java here again.
How do I set the state of a Radio button from like an if statement?
kinda like I can set a JLabel text via java label.setText("");
But I want to set the state of the JRadioButton instead
Thank you!
@craggy acorn add padding or margin to the ul bottom nav ul { margin-bottom: 10px; }
i have a feeling i should optimize my code's memory allocations,
for context, rest of the system is using about 5GB of ram, single application is using 45-60GB.
yes i knew it would do this, yes it is supposed to use that much, the problem is the variation, didn't really think about that
I thought my 16GB OOM errors were bad...
@ember kiln i mean, its not an error, it is working properly, just, slowly
and i didn't calculate usage correct, so it uses a lot more than i originally thought it would.
Does anyone know of any good OOP PHP MySQL tut's I can use?
^ the real answer
Stop shitting on php ffs
PHP 7 is really good and if you are an experienced dev you won't make any basic PHP errors
PHP is better than it used to be, but it's far too inconsistent (and far too easy to make mistakes) to be considered a good language
See also http://phpsadness.com/
@last ingot I am a web developer, I do freelance and most often I use the php stack. And php isn't a bad language, you just need to be really careful when using it. PHP has a bad name because of the half assed apps that are running rn. And when you use the term "kid" you just show arrogance and most often who says that is a kid himself
PHP is a cool language to learn.
I’ve never really gotten into it though.
I might, who knows.
Think I'll try that.
Javascript ftw
well, either it's not an error you coded it wrong 😉
(also linters, typescript, strict mode etc.)
@last ingot to answer your question of what I want to make is a Log book system for my community
What would you suggest I build this project on then? If not PHP?
(some language/framework you're comfortable in)
@last ingot that may be stupidest logic ive ever heard.
good amount of my own code, its a black box, i know what it does, and generally how, no idea how to fix it without re-reading everything.
nobody can keep an entire codebase in their head.
If i coded it their wouldn't be any errors :P and if their was i would know how to fix it because i would know the codebase. <- what im talking about
you will make errors, you are human (i think), and you wont know how to fix them any better than if someone else wrote the code if you didn't write it yesterday (figuratively)
yes it is If i coded it their wouldn't be any errors
so you are saying that its easier to work with a code base you have been working with vs something that you have never seen before, no shit
you used C++?
it will fail, and not tell you anything
C++ wont in debugging
unless you are using valgrind, and then it may
ok, that a debugging technique, because the language tells you jack shit.
you ever read a template compile error?
segfaults are fun, but debuggers are not complete shit at finding where that happened.
the real fun one is a memory leak.
i never said anything about an IDE
was talking about libraries i wrote, that were for a game engine, but thats not what im using them for.
i actually need to go over my config one, as i switched to a different object style, and it would be real nice if it used that.
for what?
what data?
salted hash
i would recommend the SHA512, SHA-3, or Blake2b algorithms.
yes
wait, no.
hashing is not encryption
you take the password, run it through the hashing algorithm with a unique salt, and compare the result.
you store the hashed password and salt.
that is exactly what i just said to do
and i have you one way hahsing algorithms.
one way hash with salt
see this video -> https://www.youtube.com/watch?v=8ZtInClXe1Q
Security of users' passwords should be at the forefront of every web developer's mind. Tom takes us through the insecure ways in which some websites deal wit...
@mossy ice lmao that’s so funny
GUYS .. react or vue?
@zealous kayak my vote is for React
hey, what is an ArrayList in java?
How did “Linus” steal his OWN 🧠. With 💴 and “brand power”
I don’t get “triggered” “doctors” got my 🧠 “messed” up by 2 💊 the “doc” gave me.
@kind portal an array that can change size, based on a normal array that it manages.
So is anyone here familiar with ROS?
robot operating system
Something like Alexa?
anybody here good at C# winforms?
I have a question
i have a ListBox, and I want to add items to the listbox from another class
how do I do that?
I want to be able to do listBox1.Items.Add("some log message");
but from a different file
hey @proper gale about that video on storing passwords, when talking about the hashing and salting. how do they decrypt the password for when they need to check it against what the user enters?
@nocturne galleon when the user enters the password, the code behind the login will get the hashed password stored in a database or whatever, then hash the password that the user gave. And just simply check if the hashes are the same
But if the password is salted wouldn’t it be a different hash?
@thin cobalt can you just put a static method on the class that the listbox is local to and call it from the other class?
probably not static
also, @nocturne galleon the test is hash(user_input + known_salt) == stored_hash
note that both stored_hash and known_salt are stored in the user row in the database
and will be different for each user
the salt is not particularly secret, since a hacker who has access to the db can read it in cleartext
it's only to ensure everyone has effectively a unique password
wrinkly
im clueless in blender
@hasty portal what is that, and why did you make it?
idk bored
blender is great!
check out Blender Gurus getting started tutorial
Hey question I know you can cluster raspberrypi CPU together but can you also cluster the GPUs? What I would like to make is a mobile retro mobile console that can do things like psp and Nintendo ds by clustering 2-4 pi zeros together in the hopes of combining the GPU power of all of them, then running retropi. Is this possible?
@solemn spade i highly doubt you will get the kind of performance you are looking for, Pi Clustering really kind of sucks
its more for learning, than for practical use cases
Welp it was just a thought....
you would be just better of using a Pi 3 B+
It’s not powerful enough to do psp and ds really
sure it is
I’ve tried
i run RetroPi on mine, i was playing Ps2 games even
Ya “some” of them I want all games to work
I have a pi 3 b+ and it has a hard time playing psp and n64 and ps1
you were using RetroPi ?
well the Pi Zero is far less powerful than the 3B
even 2 of them would not be as fast
Well from what I’ve notice the CPU is like never the issue even on my pi zero but the GPU is the bottleneck

