#development

1 messages · Page 42 of 1

vestal glen
#

hm, should use a css keylogger to enter the message instead, would be so much slicker (but also more complicated)

kind portal
#

thanks for tagging me when I was expecting some help :(

rich cedar
winter salmon
#

Destruction 💯

feral tide
#

@rich cedar
I remember a kid at school making a calendar with alarms only using nested if statements. Not even a single "else" in the entire program.

rich cedar
#

:|

feral tide
#

Few months, and he had coded 5 years worth.
I walked over at that point, showed him how to do a 3d array, and he, I shit you not, crawled under the bench and cried.

#

Now my brother owns an internet café.
Wonderous world.

rich cedar
#

A friend of mine described a problem he had to solve, where he had to check that an ID was valid. He had a list of valid IDs, and was told to make the list easy to modify in the future. So he writes a Python script which generates a "minimal" switch tree, based on the valid IDs, which looked something like this:

 switch (id[0]) {
  case 'a': return false;
  case 'b': return false;
  case 'c': switch (id[1]) {
    case 'a': return false;
    case 'b': // ...
  }
  // ...
}

I introduced him to the concept of a binary search. He no longer speaks to me.

feral tide
#

just load the IDs into an array, and search the array for a match.

feral tide
#

@last ingot
Some people don't like moving from what they know.

inner wraith
#

I regularly come across new ideas and realise "oh hey that thing I made would have been much easier if I'd known how to do this".

#

Sometimes I'll refactor everything to do it the new way and just watch half the codebase drop off.

feral tide
#

@inner wraith
The happiest I've ever been was when I found a 20 line snippet in a random pastebin that saved me literally 850 lines of code to do the same thing.

rich cedar
#

I did say I introduced him to a binary search, yes

kind portal
#

probably wont get an answer again but Im gonna bump my question from above

#

if you scroll up a bit I have a noob question about how to use Graphics in a KeyListener in Java

cloud knot
#

@kind portal you can have a final variable in the method outside the listener, which you can then access inside the listener.

#

@kind portal a random image from internet with similar listener problem. If in that code he would make final Boolean flag, then he could access it from inside the listener

#

hope that helps

kind portal
#

Thanks! will try later when Im home

cloud knot
#

alternatively you could instead make an actual class for the Listener, which would have a constructor, to which you send the required objects in advance

kind portal
#

Essentially, in a nutshell, what I want to do is call a method from a class that draws an oval when I press enter

#

What are constructors by the way? Could you ELI5 it?

#

And how would I send Graphics to it in advance?

cloud knot
#

once again. if you want to do it in one class, you do final Graphics g = ....; before the panel_Game.addKeyListener call, and then you can use the variable g inside the Listener

#

using a class is just an alternative, might be too complex for now ?

kind portal
#

Yeah the class thing is a bit complex

#

But I understand what you mean now! Thank you very much!

kind portal
#

in retrospect I dont really understand it now lmao

#

What do I put after final Graphics g = ?

cloud knot
#

wherever you were gettings the Graphics object from

kind portal
#

huh

#

No fucking clue to be honest

cloud knot
#

are you drawing on swing panel for example ?

kind portal
#

ye

cloud knot
#

then you do final Graphics g = panel.getGraphics();

kind portal
#

OOOOOOH

cloud knot
#

i guess at least

#

i haven't touched Swing for a decade

#

might be a problem

kind portal
#

HOLY SHIT

#

it works holy fuck

#

Thank you so much

cloud knot
#

ok then 😃

#

no problem

#

i would recommend learning about classes, inner classes and visibility next

kind portal
#

Oh nevermind

#

Eclipse doesnt complain

#

but whenever I do run the app and press enter I get a fuck ton of exceptions

#

Ill just ask my teacher next week

cloud knot
#

ok

kind portal
#

But its at least one step closer

kind portal
#

Can I do final Graphics gx = panel.getGraphics(); in a different class?

#

that doesnt have the panel

cloud knot
#

as i said, i haven't touched Swing for over a decade, read the manuals/API documentation

rich cedar
#

Getting back into C for the first time in a while, anyone got any recommendations for projects?

worthy bone
#

Something you will use

kind portal
#

I tried that lol

#

Even asked a couple of classmates

feral tide
rich cedar
#

@feral tide That script confuses me on so many levels

#

In the printX functions, why do you pass a string in ByVal, modify it, and return it? Why does that parameter exist at all? Why do those functions exist at all? Why not just pass the string directly? Why is there a Sleep instead of any actual work? Why are all your colons preceded by spaces? Why do you have that If File.Exists when File.AppendText creates the file if it doesn't already exist? Where does chatclient come from? Why do you String.Concat with a single parameter? Why does GetIpAddress use globals instead of just returning a value? Why do you return the 2nd IP address in the list you get from the DNS instead of the 1st? Why do you overcomplicate New TcpListener(portNo) by doing that whole roundabout with limiting it to listening for connection attempts against specific IP addresses, rather than just anything hitting that port, when it's supposed to be a port bug? Why do you try to autoguess the IP address to limit by?

#

It's fractal confusion! You did "doing "doing things weird" weird" weird!

rich cedar
#

@feral tide I need answers

feral tide
#

I'd love to answer them, but.. I really can't.
All I can do is provide more source code for chatclient at a later time. (Omw to work)

#

8 years, and significant coding advancement (including changing language a few times)

rich cedar
#

oh thank Christ that's old code

rich cedar
winter salmon
#

Just to know, you can't push anyone to give you answers. Not everyone has time to help out and if they do, respect that

nocturne galleon
#

What are some project ideas to learn cross compiling between windows and linux?

round dome
#

Anything that uses linux / nt kernels

winter salmon
#

^

#

Windows 10 will have lnx kernel soon so better halt that type of ideas and wait for this to come alive.

winter salmon
#

lol

fallen vigil
rich cedar
#

@nocturne galleon Build a CLI using only standard (hosted) C/C++, then use a VM to test if you cross-compiled correctly.

#

@winter salmon Er, no. The Windows Subsystem for Linux will soon emulate a full kernel. Windows itself will still be built on the Windows kernel.

winter salmon
#

ok

odd cypress
#

@fallen vigil The WebSocket-Code looks okay to me, but I think there's a problem with your way creating the video output. Maybe each Zero takes a different time loading the video from the sd-card, because they all have a different bandwidth. I don't have very much experience on omxplayer but I think there is a solution. You could try to start omxplayer paused (maybe cmd argument "--start-paused" works) and then send after a constant delay (after final loading) either an media button or other keys ("p" or "space" can be used) with an node.js library. Good luck! 😂

fallen vigil
#

@odd cypress thanks for the reply. All the Pis are running the same SD card and the same power cord/supply so there should be no hardware difference. They’re also all running the exact same OS image and package versions. I’ll try your suggestion later tonight when I have time to work on them again

odd cypress
#

np ;)

feral tide
#

@fallen vigil
If they're networked, broadcast a stream and get them to view it?

fallen vigil
#

@feral tide Well actually, they’re all playing different videos of PowerPoints used for digital signage. So each video is the same length with each slide being displayed for the same amount of time. The players being synced ensure that the transitions all happen at the same time and the videos loop at the same time.

#

Let me know if that explanation didn’t make sense

#

For testing purposes, all of the players are using the same video clip, I’ll be implementing the different videos in the code later

fallen vigil
#

@odd cypress It doesn’t look like that’s an option https://elinux.org/Omxplayer#Usage. Omxplayer was built for Raspberry Pi so I used it, but I’m not glued to it or anything. Do you have a different suggestion?

#

There’s also mplayer, I don’t know much about it though

feral tide
#

@fallen vigil stream per slideshow, bash script to start and stop at request?

astral forge
#

Hey how do I install the Edge channel of Docker Desktop on Windows?

rich cedar
#

jesus Christ is it just me or is Unreal Engine really fuckin unstable

feral tide
#

@rich cedar
You know what I don't like?
Companies that develop things like the unreal engine, then buy out smaller companies who are developing next gen engines, and literally liquidate the staff, and destroy virtually all the work and references once the purchase happens.

rich cedar
#

I don't like when I go to save a file and my IDE crashes

#

I don't like when I open a dialog and my engine crashes

#

I don't like when hover-text popping up crashes my engine

#

I don't like when I'm doing something and the engine just decides fuck it, time to crash

#

I don't like that Epic made a bazillion dollars off Fortnite but apparently they can't be arsed to put any of that money into UE4

feral tide
#

@rich cedar
I don't like how the Euclideon engine isn't public Access.

vale maple
#

@open otter I work with Java on daily bases. What's your problem?

#

where is the file in your workspace?

#

and first and probably easiest way to fix such problem is using the absolute path instead of relative.

#

interesting....
i will look at code in about 10 minutes properly as soon as i am at university bit there ain't any obvious mistakes i noticed

#

but general thing.
But the file reader into a bufferedReader

#

mhh, okay. i will look soon and come back to ya

#

nah, no problem. I like to help and java is sometimes really bitchy about small things. (( like all languages actually))

#

another thing about the code. The step of first getting the file is not actually needed.

But yeah, ehm soon there and then it should take about 5 minutes to resolve the problem. Just try to rest a little bit. Late night coding is stressful

#

I just now arrived and just opened my ide.^^

#

Nah, no problem. I need to wait anyways about 30 minutes till my first lesson for this day starts. ((actually it is a test about R as a language which I will solve without any problemss.... so yeah I have time))

#

nah, needed just to switch workspaces away... Some of my workspaces are a bit... ehm automated which makes things stressful for new not integrated code 😄

#

first your writer never gets closed in createMonsteFile which can become problematic

#

I would advise also to user the PrintWriter

#
        File monsterFile = new File("./monster_table.txt");
        PrintWriter writer;
        try {
            writer = new PrintWriter(new FileWriter(monsterFile));
            writer.println("MonsterName HitPoints HitDamage");
            writer.println("Hydra 50 6");
            //and so on
            writer.flush();
            writer.close();
            System.out.println("Monster table successfully loaded.\n");
          
        } catch (IOException e) {
            System.out.println("That's a pretty dank error mate.\nSeems as if you can't write your monster table.\n\nOuch.\n" + e);
        }
    }```
#

like this

#

makes the string more readable and println instead of \n works on every system 😄

#

yep it is in io

#
import java.io.*;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;

public class Main {
    private final static String FILE_PATH = "monster_table.txt";
    public static void main(String[] args) throws IOException {
       
         File file = new File(FILE_PATH);
         if(!file.exists())
             createMonsterFile();
        BufferedReader reader = new BufferedReader(new FileReader(FILE_PATH));
        if(reader.readLine()!=null) {
            System.out.println("Was found");
            
        }
        
    }
    
    private static void createMonsterFile() {
        PrintWriter writer;
        try {
            writer = new PrintWriter(new FileWriter(FILE_PATH));
            writer.println("MonsterName HitPoints HitDamage");
            writer.println("Hydra 50 6");
            //and so on
            writer.flush();
            writer.close();
            System.out.println("Monster table successfully loaded.\n");
          
        } catch (IOException e) {
            System.out.println("That's a pretty dank error mate.\nSeems as if you can't write your monster table.\n\nOuch.\n" + e);
        }
    }
    }

#

I just took the "problem" part of the program

#

It works like this perfectly

#

one thing I noticed was that you looked for monster_table with file while your FileWriter created monster_table.txt

#

And another thing to know. The relative path usually starts outside of src.^^ ((I say usually cause there are werid systems.))

#

take ya time

#

Interesting

#

can ya send me the exception message and line?

#

mhhh, that would mean that the monster is not initialized anymore

#

well yep seems like that could be it^^

#

Yep, good luck.^^
I soon need to leave for about 4 hours because test and presentation but afterwards I should be able to help if there are any problems.^^
And it is a fun little program you created for yourself... Pen and Papers are fun :D
I did similar stuff or still do similar stuff from time to time.

#

((okay, this makes me sound way older than I am but pshhhtt.. ))

#

2 hour of R test and then a presentation about a program written in "REACT" which is a javascript package.

#

nah, i hate javascript and webDev is like the least interesting thing for me. At work I work at a complicated Product Information System with about 5k files... and in private usually with AI and weird microsystems... which makes that soo boooorrrriiiing...for me at least because I have a different field of interest

nocturne galleon
winter salmon
#

#oldbutgood

lost creek
#

the description of this channel insults me

rich cedar
#

yeah, it should be puts("talk about deving here")

proper gale
#

@rich cedar std::cout << "talk about stuff you found on stack overflow here" << std::endl;

winter stag
#

lmfao

rich cedar
#

@proper gale Was that supposed to be C++? There's not enough template metaprogramming.

proper gale
#

dont worry, i have plenty of that in my actual code

#

what is the longest line you have generated from a single macro?

#

my record is just over 11k characters.

winter stag
#

does anyone else here develop for the homebrew 3ds team

proper gale
#

for macros ive written ofc.

winter stag
#

from stack overflow right?

#

(:

proper gale
#

i wish

#

i dont even know what i would google for this

winter stag
#

just a little CTRL+C CTRL+V action

proper gale
#

i basically implemented reflection in C++, with templates.

winter stag
#

pfft, good luck m8

proper gale
#

oh, its already done

#

the normal types was the easy part

winter stag
#

its so messy

#

lmao

proper gale
#

also works for arbituary types, and vectors, and vectors of vectors of vectors of vectors.

winter stag
#

i love working with those vectors of vectors of vectors

#

why did you develop this?

#

for personal use?

proper gale
#

mhmm

winter stag
#

figures

#

Python or C++

proper gale
#

yes

winter stag
#

which do you think is more flexable

proper gale
#

depends

winter stag
#

without libs

proper gale
#

C++

winter stag
#

yeah python doesnt have too much to offer by itself

proper gale
winter stag
#

is this for a bowling game?

proper gale
#

just a scoring system

winter stag
#

for a bowling game

proper gale
#

for bowling

#

actual, physical, bowling

winter stag
#

woah

proper gale
#

where you, in person, pick up a ball, and throw it at pins.

winter stag
#

yeah that going outside stuff doesnt exactly suite me

proper gale
#

pros: money
cons: need to get out of chair.

winter stag
#

lmao

#

so this was a contract?

#

or freelance work?

proper gale
#

im making my own system, and plan to sell it.

winter stag
#

umm

#

yeah ok

proper gale
#

this is overkill for what i actually need, by a lot

winter stag
#

dont you think you could develop something more useful, something that everybody would use everyday?

proper gale
#

its useful to me

#

i get lots of money from it.

winter stag
#

how much demand is there for bowling systems

proper gale
#

centers pay a lot for their systems

#

demand quanity is low

#

but, because of that, price is super high

#

average center spends $600,000 to $1,000,000 on a system every 20-25 years.

#

just for the initial purchase, depending on center size.

winter stag
#

so its a get rich quick scheme eh?

proper gale
#

not exactly

#

note the 20-25 years part

winter stag
#

yeah i see that

proper gale
#

you need to provide support for that time, and, only get that sale every 20-25 years.

winter stag
#

so you gonna develop this for 20 years?

proper gale
#

could be.

winter stag
#

all for what?

#

VR bowling to take over?

#

Idk man

proper gale
#

i mean, money

winter stag
#

just doesnt seeem right

proper gale
#

also, physics

winter stag
#

do you own a nintendo 3ds?

proper gale
#

nope

winter stag
#

Switch?

proper gale
#

nope

winter stag
#

PC master Race?

proper gale
#

1000000%

winter stag
#

wanna know how people make sidecash

#

develop some homebrew for any console that can be jailbroken, and add an adfly link to it

proper gale
#

side cash is great and all, how about center cash?

winter stag
#

invest what you can

#

long term, short term

#

10,000 can turn to 400,000 in just 20 years

proper gale
#

right, but i need to get that 10,000 in the first place

#

and, i need to live now aswell

winter stag
#

you can do in small payments

#

like everyone else

#

setup a retirement

proper gale
#

what are you trying to get at?

winter stag
#

investment is good

proper gale
#

im aware

winter stag
#

and there are alot of smart ways to do it

#

some in come in the form of free phone apps

proper gale
#

im trying to sell a product that i can make relatively easily, get a relative lot of money for, with long term minimal work.

winter stag
#

the app rounds every purchase you make upto a the nearest dollar, and invests what it used to round up

proper gale
#

i would need to sell it to on average one center every 2-3 years and i will be making plenty enough money.

#

based on average center size.

winter stag
#

so 3.59 round up to 4 thats 41 cents invested

#

or pents

#

or rupels

#

or whatever

#

i gtg

#

anyways try to have fun once in a while!

rich cedar
#

@proper gale I wrote a (very inefficient and not-full-featured, natch) compile-time regex parser with C++20's template features. I estimated that a simple Regex<"[Hh]ello,? [Ww]orld!{,2}"> "expanded" to the equivalent of about 7k of code, including whitespace.

proper gale
#

still 4k short

rich cedar
#

lol

#

lemme finish

#

Regex<...>.match("hello world"), on the other hand, expanded to about 20k.

#

again, metaphorical, etc., since there's no easy way to really "expand" template stuff -- I basically just guesstimated how much code it'd take to manually unroll the templates.

proper gale
#

mine is an actual measurement.

#

of a single line

rich cedar
#

I was talking about template metaprogramming in the first place ¯_(ツ)_/¯

#

That's the kind of nonsense I meant

#

Where it just gets wildly out of control and you feel like some part of this has to be illegal somehow

#

fun fact, btw, my implementation of +/* made it basically unusable, because of the strategy I used to match variable-length sequences. In retrospect, generating out every possible path it could follow down the NFA was a bad idea...

proper gale
#

.*

rich cedar
#

If I were doing it today I'm pretty sure all the code would be cleaner and faster to compile, if not much faster to run

proper gale
#

in reality, regex is best done at runtime

rich cedar
#

I mean, it can be useful to run it at compile-time. And if you give me a couple hours, I'm sure I could even come up with some extremely contrived examples of when.

#

but yeah it was mostly just for fun.

proper gale
#

yea, this is for production use.

#

or, at least, its indended for that

#

not just fucking around, i have an end goal in mind, and i want to sell it.

#

see above convo

rich cedar
#

Neat

#

I'm making a game which I plan to sell

#

and I've already published a bunch of open-source packages, not that there's been much interest in them lol

#

I'm not excited for the stage where I have to start polishing that game. I've found plenty of assets that'll work fine for testing, but I think I'll have to hire an artist or something, and I really don't want to spend money on a personal project lol

proper gale
#

luckily, i can sell this before i do the graphical part

#

well, the primary graphical part

rich cedar
#

I mean, with luck I'll be able to get my school to invest in this just based off the proof of concept

proper gale
#

i can do the secondary/backup graphics, and that is enough to sell it.

rich cedar
#

Which will be ugly, but show the gameplay

proper gale
#

then i can get someone to do fancy graphics.

rich cedar
#

and then they'll basically pay for the artist for me

mossy ice
tardy pagoda
#

Ooh wait I'm onto something hold up

main root
#

🤔

rich cedar
#

Uhh... That's concerning for multiple reasons.

#

Number one, that dev's family needs to stage an intervention to get them off whatever drug they're on. Or manager, as appropriate.

proper gale
#

@rich cedar its a joke

kind portal
#

I guess you could say

#

that he got

#

wooooshed

winged obsidian
#

Anyone working with DotNet Core on Linux and have some suggestions for UI design libraries?

Really missing WinForms for bashing out quick utilities.

Please make my day and tell me there is a (at least somewhat similar) alternative. Thanks in advance.

#

Forgot to add I'm looking for other alternatives than using Mono.
The more I look, MonoDevelop seems to be the go-to. (I'm looking into it now)

rich cedar
#

@proper gale Considering I had a colleague who genuinely tried to convince me to implement that into a product used by millions of people to handle personal financial data...

#

looks like it's even source-compatible with the actual Microsoft WinForms, but I'm just reading their marketing copy

winged obsidian
#

@rich cedar thanks man, any advice helps. Dot Net Core is great for console apps and any non-WinForms/WPF solutions it seems. (When outside of Windows at least)

Hopefully they release an implementation for it in version 4 or 5
Rebranded .NET 5 has been announced without this (I believe)
Until then I guess I'm sticking with Mono

rich cedar
#

I'm not sure they ever will? I'm fairly certain .NET Core is targeting a different niche than Mono

#

.NET Core seems mostly targeted towards serverside stuff, so unless they change that I don't see them adding any GUI libraries

winged obsidian
#

@rich cedar Thanks for the info

I'm really hoping they add GPU support to the Linux kernel running in Windows 10, that way I can just ditch this dual boot and have a single workflow.

That will solve all of my problems. Until then Mono should suffice and it looks like you are right that they are leaning this way.

winged obsidian
#

Anyone working with Ubuntu (I'm on 18.04) and know a way I can force gnome-shell to limit it's VRAM usage or disable hardware acceleration specifically for gnome-shell only?

I need just a tiny bit more VRAM on my GPU to push data through this network the the ideal size. (I'm talking like 100-200MB more)

I'm only running:
Xorg <- 196MiB
gnome-shell <- 460MiB
firefox <- only 11 MiB and mandatory as it is the front end for now

Again, thanks in advance for any info or suggestions.

feral tide
#

@winged obsidian
Should change to 18.10.
Gnome-shell uses JavaScript for random things, and 18.04 is known to have a few memory leaks in gnome-shell.

inner wraith
#

@winged obsidian I honestly suggest moving away from Gnome.

#

Is there an explicit requirement for it?

#

Like- do you need anything bar Firefox?

rich cedar
#

So, for a variety of reasons, I strongly dislike Unity. It's... fine, honestly, for prototyping, but it's missing a lot of the features I've gotten used to from Unreal.

#

Now, I still strongly dislike Unity, but I'm also really fascinated by this. Why does Northrop Grumman want game programmers? Why Unity? How does C++ play into it at all?

#

I think I'm gonna submit my resume just so I can get more information...

vestal glen
#

simulator?

rich cedar
#

That's my assumption

#

Given NG's stuff, I'm assuming a flight sim of some kind

#

Ohh, then the C++ would be building a Unity plugin to correctly interpret the joystick/button input, and tilt the sim's cockpit, probably

vestal glen
#

or interfacing with their plane systems simulation or similar

rich cedar
#

Depends how it works, yeah

#

which I genuinely don't know, so

kind portal
#

Unity probably for flight sims yea.

kind portal
#

Hi guys, I have a slight issue

#

This entire time Ive been making my app in Eclipse on my MacBook (Java)

#

I decided to write a bit on my main workstation at home too (Win10)

#

So I installed Eclipse and installed the same JDK (1.8). I imported the GitHub repo of the app and ran it to see if it works

#

It runs right, but when I try to do anything the visuals just break down

#

This is how it is supposed to look. It looks right when I run it

#

And this happens when I do anything: use arrow keys, press the button, etc.

#

These issues do not happen on my MacBook, what can this be?

proper gale
#

@kind portal better question, why are you using swing and not JFX?

#

in reality, check your item registration code, looks like you have something being registered twice

#

use the debugger, it will help you find it

kind portal
#

Im using Swing because thats the only thing I know and Ive been instructed to use for the assignment

#

Item registration code?

proper gale
#

so, when you get the JFrame and register the buttons, and ellipsed, and text boxes, etc.

#

check that code, its probably being run multiple times.

kind portal
#

Im not quite sure if I get what you mean, sorry :(

#

I have this line when the panel code runs

#

But it runs twice when I start the app

#

hmm

proper gale
#

and thats going to be where the problem origionates.

kind portal
#

Huh

#

Weird how it happens here and not on the macbook

proper gale
#

the OS windowing libraries can have different behavior, where the swing library can have things be implementation defined

#

so, chances are, that showing or not showing up, is implementation defined behavior.

#

probably, havent used swing in a few years, and the last time i did, i had the code for it generated for me (praize UI tools)

kind portal
#

same here

#

My code is generated by WindowBuilder

#

Im just not going to bother and code on the mac

distant thicket
#

I posted this in one of the other chats but this seems more likely to get ideas from people doing coding also

Im going into my Final year of University after summer, and doing an Honours project and Dissertation etc

So i kind of suck at coming up with ideas for projects etc, dont ask how ive got this far, but yh thought id ask in here for some ideas

Im doing Software Development at Uni so, Computing Related, topics obviously so it would be a project of building an application of some sort and researching the topic too, any suggestions would be appreciated, Im familiar with Web Dev in PHP etc, Java, Android, C#, id happily look at new languages too, if thats necessary with any ideas etc :)

My own topics in my head to develop an idea around are to do with some actual interests of mine, Football/Soccer 😄 (least likely) Security aspect of computing, Animal Welfare and Environmental shit, Areas i feel id have a proper interest in doing the research and putting alot of focus into completing very well in all aspects etc but any other ideas just to get my brain going would be appreciated :)

I also know that they likely give a list of ideas but most likely its Data management systems, and id like to find something ill have a strong interest in doing

Can tell me to get lost if you want xD 😂

inner wraith
#

How can I have 16% CPU usage fairly consistently and no load average?

sturdy scaffold
#

When the CPU usage is caused by rendering frames to the monitor, and it just so happens to use 16% of the CPU during the small monitor window that the Task Manager Samples the CPU usage at. Short bursts.

#

Real CPU usage will be displayed in the load averages.

proper gale
#

@inner wraith what 16% that its showing in the list, is 16% of one core, so for my CPU thats 1% usage.

inner wraith
#

Two ffmpeg entries.

proper gale
#

what about them?

inner wraith
#

Read about halfway down, 8% each :P

proper gale
#

what CPU is that running on?

inner wraith
#

T2.nano

#

So some Xeon

proper gale
#

how many threads?

inner wraith
#

2.5ghz, one shared core.

#

One thread.

proper gale
#

oh, what the fuck?

#

that should be 1:1 then

inner wraith
#

Exactly.

#

Thought it was kinda interesting.

#

It's not an issue, just weird.

proper gale
#

like, on my computer, ive got a 1700x, so when it shows 100%, i know thats 100% of one core.

inner wraith
#

Load averages generally indicate how much time is spent using or waiting to use a core by threads.

#

A load average of 1 means that the CPU averaged one thread needing CPU during that time period. So an average of 1 from consistent load on a single-core system would generally mean it was being maxed out and >1 means there were at least some periods where stuff had to wait, with 0.7 per core usually being the target.

#

So that makes this screenshot interesting. It should be at least CPU usage percentage or more.

#

@sturdy scaffold I reckon you might not be far off, though this is a music bot. ffmpeg feeds Discord a frame per connection every 20ms.

sturdy scaffold
#

Considering that windows task manager on its fastest setting only update about every 250ms, there is a lot of room for error, especially since the task manager has to take up less than 1% of the CPU in an optimal configuration.

rich cedar
#

@last ingot That's not a C++ thing, that's just a code thing

#

You'll discover the same thing if you try to read bad code, or code in any language you don't know

nocturne galleon
#

how come there are 2 websites for w3schools?
there's https://www.w3schools.com/ and https://www.w3schools.in/
are they the same organisation and one is for more advanced concepts? because if so, why are their logos very different

rich cedar
#

Looks totally unrelated to me

#

But given that W3Schools already stole their name from the W3C they're not affiliated with, I find it hard to pity them

nocturne galleon
#

So which of those two would you consider ‘reliable’ in terms of the information they give in their tutorials

carmine hawk
#

@nocturne galleon my college used w3schools.com to help teach me HTML and CSS.

#

@rich cedar look again

shut grove
#

I actually learned HTML, CSS & JS from w3schools lol

main root
#

learning html and css by trying something and just having someone that tells you a keyword to make it better but not more,thats how i learned it

rich cedar
#

@nocturne galleon The W3C literally invented the HTML/JS/CSS standards and is their maintaining group, so, uh, them?

#

W3Schools is notorious for constantly being bad, either by not mentioning important things or by just being wrong about stuff

nocturne galleon
#

So would I be ok to trust the information I get from either website?

rich cedar
#

@last ingot Whatever you say, murderer. It's fine for me to call you that, right? After all, even if you're not one, it's just human nature being wrong. Forget that I'm claiming something is true despite probably mounds of evidence to the contrary and literally no evidence for it. I'm just gonna say it's true, and if I'm wrong... Oops. ¯_(ツ)_/¯

#

Except with W3Schools, they pretend to be affiliated with the standards body W3C, so it's actually more like I called you a murderer as a cop. And because until very recently W3Schools refused to correct any of its misinformation, let's extend the analogy by me refusing to ever admit I'm wrong and starting a public shaming campaign to ruin your life over it, as will happen to you if you blindly trust W3Schools to be right

#

MDN is far more accurate and some of the people who work on it are part of the W3C, in contrast to W3Schools.

#

And, when they're wrong, they actually correct it.

deep scarab
#

👀

proper gale
#

@last ingot C++ specific thing, you will need to watch for different object styles.

#

stack objects

#

heap objects

#

and stack object that hide heap objects.

#

i do that last one.

#

the main think is how acting on the objects does or doesnt change the state of other objects.

#

C++ doesnt have dictionaries

#

oh, ok.

novel spear
novel spear
#

python's dictionary is now an ordered dictionary too

#

as of 3.7 or 3.6 or something

proper gale
#

@novel spear while aware that exists, i completely forgot that the stdlib has that. everyone will be stupid every now and then

#

and, last i tried to use it, compiler gave me the finger for something something hash, not exactly sure

#

GCC is not

#

sense you are here, i dont need to ping you,
Mrmetech, i also know python, so im very aware of what a dictionary is.

#

oh, wait, i actually didnt know std::map was a thing, i was thinking of std::unordered_map, which does require a hashing function, and is still being a dick.

#

its gives you a horribly cryptic error message comapred to Clang

#

Clang is a drop in GCC replacement, for the most part

#

they help, but Clang gives much much better ones

#
                 from /usr/include/c++/7.1.1/bits/stl_tree.h:72,
                 from /usr/include/c++/7.1.1/map:60,
                 from gcc_variant_bug.cpp:4:
/usr/include/c++/7.1.1/tuple: In instantiation of 'constexpr const size_t std::tuple_size_v<long unsigned int>':
/usr/include/c++/7.1.1/tuple:1670:44:   required from 'constexpr decltype(auto) std::apply(_Fn&&, _Tuple&&) [with _Fn = const std::vector<int>&; _Tuple = long unsigned int]'
gcc_variant_bug.cpp:14:14:   required from 'main()::<lambda(const auto:1&)> [with auto:1 = std::vector<int>]'
/usr/include/c++/7.1.1/variant:1236:44:   required from 'constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...) [with _Visitor = main()::<lambda(const auto:1&)>; _Variants = {std::variant<std::vector<int, std::allocator<int> >, std::vector<short int, std::allocator<short int> > >&}]'
gcc_variant_bug.cpp:15:13:   required from here
/usr/include/c++/7.1.1/tuple:1271:29: error: incomplete type 'std::tuple_size<long unsigned int>' used in nested name specifier
     inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value;
                             ^~~~~~~~~~~~```
#

vs gcc_variant_bug.cpp:14:9: note: in instantiation of function template specialization 'std::__1::apply<const std::__1::vector<int, std::__1::allocator<int> > &, unsigned long>' requested here apply(v, 0ul); ^

#

same code

#

and, for me, CLion uses clang for static anaylsis, so its helpful to use the same compiler.

#

clang and GCC are written in completely different ways, they cant just switch like that

#

clang is an LLVM module, while GCC is a lot less separated.

#

ive had no problems with CLion clising windows.

#

also, you know it has remote development, right?

#

under toolchains, to the right of the name, dropdown, remote host.

#

thats how i write code for my raspberry pi

#

yea, this will do fily synch with sftp

modern pivot
#

Too bad CLion's Vim plugin is garbage

proper gale
#

using Vim

silent eagle
#

Hello , iam looking for Phyton/C++ developer(php and other are welcome too) ideally someone who have experience in windows developing or made plugins for Windows and MacOs based software.

silent eagle
#

It would be good if the person can also work on website backend.

#

Its not that complicated project, if there is interest i can write up what its for.

vernal marsh
#

VS code's python intellicode thingy takes 1:30 min to setup 😠... plus it used 1.5 to 2 gig ram

#

I am better off with Visual studio which also has intellicode (little worse) but uses less than 600mb ram

#

dissapointed 😕 and confused at the same time

silent eagle
#

Well, i need plugin for software (cinema4d) in Phyton/c++ and onther app on server for receiving and showing data from that plugin on website and android/ios app @last ingot

rich cedar
#

@silent eagle How much are you paying and what's the project?

modern pivot
#

wait what Python IntelliCode are you setting up @vernal marsh? In my experience, IntelliCode just works on VS Code

silent eagle
#

@rich cedar paymant is per project not per month. so i would like to get calculation for price based on more info what i would provide to interested people

#

as iam not programmer, i cant price such task 100%. but i have some number in mind since its realy single task( realy simple) program

rich cedar
#

so then what's the project

#

Although I'll admit I'm pleasantly surprised that you'd pay. You have no idea how many people demand free work.

silent eagle
#

i always try to pay as much as i can. give me sec. i will write whats the plugin will do.

rich cedar
#

I mean, yeah, you're doing it right, as far as I can tell. It's other people I'm complaining about, who think that just because I'm a programmer, I'll want to get into the ground level of their Facebook knockoff for "exposure"

silent eagle
#

iam designer so i have experience in that exposure payment industry 😄

rich cedar
#

Oof

silent eagle
#

So
Iam working on Cinema 4D plugin.
This plug simply need to read value from render engine ( time,frames etc.) and send it to server where its displayed in online app ( also showed in mobile app. what woud probably just show site )

Extra for later version is frame grabber. what would load last rendered frame from folder.
@rich cedar

#

the hard part for the person is to study ( well documented) documents from Maxon

#

to find the way to load it 😄 thankfully Maxon made lot of documents how things work plus they have support team for devs

silent eagle
#

anyone who would be interested in working with me, feel free to PM me. looking for longer term colab. on multiple projects

rich cedar
#

ah so you're basically trying to make a remote progress tracker?

silent eagle
#

you could say that

#

it is to track progress of rendering yes

#

with alarm maybe when its done

#

or well if its stops

#

build in guarddog

rich cedar
#

Sounds neat!

silent eagle
#

it does 😄 but iam lacking menpower 😄

rich cedar
#

Honestly it sounds like a good excuse to learn C++

silent eagle
#

i cant learn programing for shit

#

😄

#

i only do art

#

i would like to do all that myself 😄 but until i would learn C++ and Phyton i would be 80 😄

#

i have too many stuff on my hands having that on my mind would be too much

#

so i just want to find someone to work with

#

well web/app designs, and 3D, but in general i can do anything

proper gale
#

@silent eagle single task( realy simple) program never make this assumption, it is never correct.

#

anyway, i know python and C++ both, but everyone wants to get paid, soooo, do you have any idea what you woudl be paying?

vernal marsh
#

@modern pivot it's the Microsoft one... In visual studio... It's available for both vs and vs code

modern pivot
#

Huh, never had a problem with that one

vernal marsh
#

Really... How much ram does it use in your pc... VS code

#

With intellicode enabled

#

And python extension

#

@modern pivot

modern pivot
#

~200 MB

vernal marsh
#

Do you use numpy and tensorflow

#

And other ml stuff?

modern pivot
#

Not daily, no

vernal marsh
#

OOO... It seems like its analysing 4000 numpy and tensorflow files for autocomplete and type definition

modern pivot
#

Sounds like a configuration issue, maybe you shouldn’t scan all the files?

silent eagle
#

@proper gale hi if you wanna talk i send you pm

proper gale
#

no, its not.

#

but, if someone wants soemthing done, and will pay enough for it, i will take their money.

silent eagle
#

Thats called a job

vernal marsh
#

I am not really sure what it means by incorrect format

#

I have the dll in place

#

Otherwise the ide must have given me some exception about it.. plus intellisense works 😕

#
#include "cuda_runtime.h"
#include "device_launch_parameters.h"

#define _USE_MATH_DEFINES
#include <math.h>


__global__ void kernel(unsigned char* src) {

    __shared__ float temp[16][16];

    int x = threadIdx.x + blockIdx.x * blockDim.x;
    int y = threadIdx.y + blockIdx.y * blockDim.y;

    int offset = x + y * blockDim.x * gridDim.x;


    const float period = 128.0;
    temp[threadIdx.x][threadIdx.y] = 255 *
        (sinf(x * 2.0f * M_PI / period) + 1.0f) *
        (sinf(y * 2.0f * M_PI / period) + 1.0f) / 4.0f;
    src[offset * 4] = 0;
    src[offset * 4 + 1] = temp[15 - threadIdx.x][15 - threadIdx.y];
    src[offset * 4 + 2] = 0;
    src[offset * 4 + 3] = 255;
}

extern "C" __declspec(dllexport) void GenerateBitmap
(unsigned char* dst, int dimension)
{
    int size = dimension * dimension * 4;

    //allocate
    unsigned char* src;
    cudaMalloc(&src, size);

    dim3 blocks(dimension / 16, dimension / 16);
    dim3 threads(16, 16);

    kernel<< < blocks, threads >> > (src);

    cudaMemcpy(dst, src, size, cudaMemcpyDeviceToHost);
    cudaFree(src);
}```
#

that's my kernel which I am compiling as dll ^

#

Pretty straight forward

#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BitmapProcessingCS
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            int dim = 512;
            var bmp = new Bitmap(dim, dim);
            var data = bmp.LockBits(new Rectangle(0, 0, dim, dim), ImageLockMode.ReadWrite, bmp.PixelFormat);
            NativeMethods.GenerateBitmap(data.Scan0, dim);
            bmp.UnlockBits(data);
        }

        private void PictureBox1_Click(object sender, EventArgs e)
        {

        }
    }
}
#

That's forms1.cs

#
using System;
using System.Runtime.InteropServices;

namespace BitmapProcessingCS
{
    public static class NativeMethods
    {
        [DllImport("BitmapProcessingCPP.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern void GenerateBitmap(IntPtr src, int dimension);
    }
}
#

and NativeMethods.cs ^

#

jUST tag me if anyone gets a solution to this thing 😇... I will work on other things till that time

modern pivot
#

@vernal marsh 0x8007000B is bad format DLL, make sure you're compiling the DLL correctly

#

Make sure you're building for the right architecture (x86 vs x64)

vernal marsh
#

I think this is good... I have tried different combinations.. but doesn't seem to work out @modern pivot

modern pivot
#

@vernal marsh A traceback of what happens during compilation would be helpful

vernal marsh
#

sure.. first let me just go through all causes, and tweak things, I did a little before but I definitely didn't reach the end of the article

#

THAT one specifically

#

@modern pivot would you like to take a look at my code at kernel.cu ... I can turn on live session

modern pivot
#

I doubt it's a problem with the CUDA kernel

#

that being said, I'm not super familiar with DLL compilation, so I'm not sure I'll be much help on that part

vernal marsh
#

I still can't relate any problem given in that article with my issue... I also think that its just compilation issue... but like what? I have also never compiled a cuda type for c#.. pure c++ ones just

vernal marsh
#

@modern pivot got it... it was just a tick mark stating... prefer 32bit (x86) 😡

modern pivot
#

lol

vernal marsh
#

for the CS side.. no problem on cpp side

#

I spent 4 hours figuring this out ... turns out smashing buttong is best chance lol

carmine hawk
#

Please help. I'm working on an HTML/CSS/JS project and my page keeps making my paragraph element invisible every time it makes the table invisible even though the paragraph element is outside the table and I don't understand why

Here is my HTML code:

<!DOCTYPE html>
<html lang="en">
<head>
     <!-- Latest compiled and minified CSS -->
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
     <link rel="stylesheet" href="style.css">
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>iamthebull's Pizza Program</title>
</head>
<body>
     <div id="menuDiv">
          <span id="menu"><strong>Menu</strong></span><span id="menuListSpan" class="glyphicon glyphicon-chevron-down">
               <tr>
                    <table id="menuTable">
                         <td>Pizza</td>
                    </tr>
                    <tr>
                         <td>Wings</td>
                    </tr>
                    <tr>
                         <td>Sides</td>
                    </tr>
                    <tr>
                         <td>Pasta</td>
                    </tr>
                    <tr>
                         <td>Desserts</td>
                    </tr>
                    <tr>
                         <td>Drinks</td>
                    </tr>
               </table>



          </span>
     </div>

     <p id="pDeals"><strong>Deals</strong></p>


     <script type="text/javascript" src="script.js"></script>
     <!-- Latest compiled JavaScript -->
     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</body>
</html>
rich cedar
#

Or, if you're lazy, here's a hint: What's in the <table>?

carmine hawk
#

@rich cedar Or, if you want to be helpful, tell me what is wrong.

rich cedar
#

@carmine hawk Learning how to spot typos like this will help you far more in the long run.

#

And unless you're paying me, I see no particular reason to handhold you to the solution.

#

For being entitled, you can get the special rate. $150 an hour, 3 hour minimum.

carmine hawk
#

If you're reffering to the misplaced <tr> that doesn't seem to be the problem. I fixed it but didn't find it necessary to repost a whole screen of code just for a one line change

rich cedar
#

Try running your code through the validator.

carmine hawk
#

I did

#

Still did not solve problem

rich cedar
#

Seems like the issue isn't in the HTML, then

#

I'd assumed you'd already narrowed it down to that, since that's the part you posted

carmine hawk
#

And I assumed that people wouldn't like it if I posted 3 screens of code just to cover my HTML, CSS, and JS

rich cedar
#

You can post multiple files with their own names, download the lot as a bunch, makes it easy to share code around

#

Fair point, people -- aka me -- probably wouldn't appreciate you dumping the whole chunk of code

#

Whenever you want to ask for help, start by making one of those. It's a pain in the *ss at first, but eventually you'll either find the bug on your own, or isolate a code snippet that represents the key thing you're actually getting wrong, which will help you recognize the pattern in the future.

#

And as you get better at actually making MCVEs, you'll start to be able to do it "in your head", and isolate where the bug is coming from basically by examining the code. Makes bugfixing way easier if you can point to line 384 and ask, "Is this fopen not creating the logfile?" as opposed to "Is something in this massive chunk of code not creating the logfile?"

#

Apologies for being short with you earlier; I regularly forget that no one teaches this shit

carmine hawk
#

Thank you so much! I think I fixed it! One of the most helpful lines I read from one of your links was, "The problem might not be in the code that you think it is in."

rich cedar
#

Eyyy glad it turned out to be a teachable moment

carmine hawk
#

Sorry if I sounded dumb, I took one HTML/CSS class about 2.5 years ago and did terrible at the CSS, which has caused me to be spooked by CSS since.

rich cedar
#

lol fair

#

CSS is 3spoopy5me

#

I'm strictly a backend/embedded/security guy these days

deft crest
rich cedar
#

Learning chatterbot, nice

rich cedar
#

quick poll: How do y'all pronounce "*" (e.g. when reading out a command line like rm *.o)

#

quick followup poll: how do y'all pronounce *nix

obsidian ore
#

on its own I call it asterisk, in smth like the rm example I call it a wildcard, and just nix

vestal glen
#

star - and yeah, just nix

rich cedar
#

I'm the same as freak, I call it "star" unless someone doesn't know what I mean by that, and just "nix"

#

but someone recently said "star-nix" in conversation with me and that sounds way cooler

modern pivot
#

I have never felt the need to say either "rm *.o" or "*nix" IRL

#

if I needed to describe them over voice, they would probably be "rm all .o" and "Unix-like"

rich cedar
#

I was thinking more if you were spelling the command out for someone to write

proper gale
#

@rich cedar asterisk and Unix, yes i straight up just say unix even if its not exactly unix.

lament umbra
#

unix

#

haha

rich cedar
#

A friend of mine is a pentester at a pretty big company. He just sent around a phishing scam to make sure people can spot them, and his boss failed.

Friend: You need to be more careful about what you click on!
Boss: But it came from your email account. Why wouldn't I trust it?
Friend: Because my account might have been compromised, and even if it wasn't, they can still fake which account it looks like it came from. You need to look at the email itself.
Boss: But it turned out fine this time, right? So what's the big deal?

kind portal
#

Is your friend the Nigerian prince?

kind portal
#

Me when my java thing compiled without errors:

rich cedar
#

nah, just the IT security guy

junior dew
#

does anione know how to modify the login screen on a nextcloud (snap installation)

rich cedar
#

Just started at my new company and relearned the joys of onboarding

nocturne galleon
#

@rich cedar always a fun process :P

proper gale
#

@rich cedar what do you do?

proper gale
#

im happy, i wrote a thing specifically to be faster than my other thing, ended up about 5 times faster, doc time: 187578492 conf time: 1037710193 doc speedup: 850131701

bleak summit
#

@rich cedar "anything"

#

@junior dew Go into the source and change it however you want.

#

make a backup first so you can roll back when it breaks.

junior dew
#

@bleak summit yeah, i usually do a snapshot, Thanks!!

rich cedar
#

@proper gale I code things

#

@proper gale nice

proper gale
#

@rich cedar no shit, any more details?

rich cedar
#

for real tho, no

proper gale
#

Mmk

rich cedar
#

If I talked about what I'm coding I'd get fired, and possibly arrested for treason

proper gale
#

I was more asking about what position level it is

rich cedar
#

Oh, internship

proper gale
#

Ie, systems level c/c++, Java something, web js, etc

rich cedar
#

yeah no can't say that

proper gale
#

Sense you mentioned treason, I'm guessing it's at a company like Northrop Grumman

rich cedar
#

Something like that

proper gale
#

I one Northrop and Lockheed take interns

#

Not sure for general atomics and ratheon

rich cedar
#

I'm going to continue not giving details

#

No offense, I can't ¯_(ツ)_/¯

bleak summit
#

@rich cedar What kind of stuff do you work with / specialize in outside of work?

rich cedar
#

oh boy lots of stuff

#

I've been poking at a game -- a kinda depressing FPS where you fight as part of a guerilla resistance, which I'm trying to make realistic while keeping it fun

#

Right now it's mostly at the "figure out what I want this game to be" stage, with some mild prototyping to teach myself Unreal Engine 4

#

I'm also seeing if I can use my cheap SDR and RPi to build a stereo

#

At first it's just gonna be play/seek forward/seek backward, but I'm building it so I can pretty easily add remembering stations, playing from USB, maybe even ~fancy stuff~ like connecting to WiFi and playing from the internet

gloomy tinsel
proper gale
#

@gloomy tinsel professional drivers on a closed course, do not attempt.

shut grove
#

Driving in russia be like

winged obsidian
vernal marsh
#

He is a blender dude right?...

vestal glen
#

yes

vernal marsh
#

I think I watched one of his videos before when I started learning blender 😅... Nice

round dome
#

why does microsoft call QWORDs DWORD64

fallen vigil
#

Does anyone know of an open-source GNTP server/receiver for Node.js?

rich cedar
#

@round dome Because they took DWORD, then needed a 64-bit version

round dome
#

a DWORD is 32 bits a QWORD is 64

rich cedar
#

ngl I love my job but I kinda hate that I can't talk about it

#

The onboarding, aside from a meh first day, has been great, and the team is just genuinely fun to be part of

#

But I can't even say what type of coding I'm doing or what languages I'm working in

#

I literally can't even give a fake example of something I can't say because that would reveal too much

bleak summit
#

For not being able to talk about it. You sure talk about it a lot. opsec my dude. There are now however many people in here who now know that you are most likely a juicy target working with some kind of security-clearance-required DOD or other sensitive work.

These people would not have known this if you hadn't done all of this blabbing.

smh

#

@rich cedar

rich cedar
#

lol

#

You'd be right if you weren't wrong

bleak summit
#

Do you have a security clearance? It is not a violation for someone with a security clearance to say "I have a security clearance"

rich cedar
#

Security clearances just don't play into it

bleak summit
#

Based on what you have said. You are either lying or have a security clearance.

You mentioned that if you talked about the stuff. You could possibly be charged with treason.

There isn't a single thing in this context that could land you with treason charges without having a security clearance

rich cedar
#

...it was a joke

#

So, sure, call it a lie if you want lol

#

Clearly a bad joke, if it didn't even come off as one

bleak summit
#

I have a hard time believing it's a joke given the other things you were saying about the high level of secrecy of the work

#

point is. You are leaking info. You won't admit it to me but you do see it.

#

stop talking

#

this is srs

#

we will drop it here.

rich cedar
#

But I'm only leaking information I'm allowed to

#

well, "leaking"

bleak summit
#

Yeah, see how bad this got lol

rich cedar
#

insofar as it's a "leak" to say what I'm allowed to say about my job

#

Which is that it's very hush-hush, I do code stuff

novel spear
#

@rich cedar you are allowed to tell people you have security clearance, security clearance is common and does not give you access to information it just lets you access the stuff you need to access for your job on a need to know basis

#

that being said, often people who work at places such as three letter agencies will not go telling people they work there lest they become a blackmail target

#

but the same applies to like, people working R&D jobs

#

nobody wants the prototype iphone stolen

vernal marsh
#

anyone used trfl? I cannot get any starting up guides on it upon a quick google search

#

nvm found it... there is a link in the bottom of the readme

rich cedar
#

@novel spear I'm aware. I've also said everything I'm going to say: that I develop software, that I enjoy it, and that I can't talk more about it. I was venting here because it's frustrating to me to have fun at a job and not be able to talk about it.

novel spear
#

Meant to tag em not you

sacred shuttle
sacred shuttle
#

Nvm

kind portal
#

@rich cedar To be honest you should just not talk about it at all. It's much safer for you that way.

rich cedar
#

I'm done talking about it anyway

#

I'm tired of people who know literally nothing about it telling me what they assume is correct

#

Despite, obviously, having no idea

kind portal
#

I'm not assuming anything, I just think it's a better idea that you don't talk about it.

rich cedar
#

I mean I wasn't talking about you

kind portal
#

I get it

rich cedar
#

You aren't flatly stating that I'm not allowed to say things I've explicitly been told are okay to say.

#

I agree, not talking about it would be safer, but I'd rather vent vaguely than accidentally let something slip because I'm frustrated

long stump
#

@rich cedar yeah..sucks....go to a place that supposedly will have people that understand.....and just find more frustration and stress from the unexperienced/non-learned

wish u well

vernal marsh
#

anyone having this problem in vs code... its been, there for weeks now??

#

NOT just vs code but also "Hyper" and other electron thingies that I have used... Thinking it might be my system issue.. but its not making any sense to me

#

Also, atom

#

include that ^ in the list of not working 😅

#

I mean just terminal based...

cloud knot
#

have you tried "not insiders" version ?

vernal marsh
#

@cloud knot Seem like all the things I just told are insiders/beta bugs.... 😅

rancid wren
#

klasa documentation says nothing about where to install, so i assume it doesnt matter
nor does it say anything else about installing other than run the command

nocturne galleon
#

‘Undefined’ plus git arguments usually indicates git isn’t installed in PATH

#

I’d check your git install.

rancid wren
#

@nocturne galleon thank you, that was the issue
idk why but it mustnt have installed properly the first time, a reinstall fixed it

vernal marsh
#

same with running it on pycharm (which I downloaded just to see if VS is little mad)

vernal marsh
#

by results I mean visible output

ionic hull
#

What do you guys think about flutter? Should I give it a go? And is dart enough for API handling and stuff?

proper gale
#

@ionic hull flutter is a very dangerous problem that aircraft manufactures need to work hard to ensure doesn't happen when in normal operating parameter. what is there to think about it?
||yes i know thats not what you meant, but its the first thing that came into my mind when i read it, so i send this message anyway.||

ionic hull
#

I've gone trough the flutter and dart docs and it looks promising, I just wanted to know how does dart handle heavy tasks and such

ionic hull
#

Handling a lot of data through http

#

@last ingot

novel spear
#

yea the event driven nature of languages based around js usually means they are pretty good at processing requests

#

like compared to a forking server

ionic hull
#

Thanks guys

rancid wren
#

anyone had experience creating discord bots?
if someone knows how to mention everyone using the bot, it would be appreciated, i cant seem to get it to work

proper gale
#

@rancid wren you litearlly have the bot write out @everyone and it should work.

rancid wren
#

@proper gale thanks, i figured out what it was, theres a variable that gets passed through disableEveryone, it was set to true

fervent orbitBOT
#

LMG Floatboat is a moderation bot based on code written by b1nzy#​0852.

❯ Messages

5,090,691

❯ Users

45,348

❯ Uptime

a day

tropic grail
#

👀 I can Discord bots kappA

jolly pelican
#

@ionic hull coming from go, it's basically always going to be your connection, or maybe OS that becomes the limiting factor when dealing with a lot of http traffic

tepid zephyr
#

Heya, could anyone help me with .htaccess file on Apache?

tepid zephyr
#

to forbid access to a specific directory

#

everything from google didn't help

#

@last ingot also can't access root directory and change any settings there

ionic plaza
#

oh fuck who partnerd this server

#

sees this server get flushed down the shitter

tepid perch
#

@tepid zephyr can you describe your situation a bit, sounds fairly unsafe

tepid zephyr
#

@tepid perch basically one of the tasks for a final web app project is to disable /private directory inside project directory with .htaccess and .htpasswd, but no matter how i configure the file it just doesn't pop-up the login promopt

tepid perch
#

Dear God do not use that

tepid zephyr
#

it's literally a requirement in a project lmao

inner wraith
#

requirement in the project ouch. I hate the stupid, out-of-touch crap I've seen in assignments over the years.

#

I remember doing software design and development in high school. Visual Basic and "standardised pseudocode", because that makes sense.

#

Oh yes. We had to do IEEE 754 by hand in the final exam.

#

As one does as a programmer.

#

Basically. It stops being pseudocode at that point.

#

By hand in an exam? High-school level?

#

Also bubble+insertion sort.

#

The curriculum for that subject was mostly written 16-odd years ago at a minimum.

#

Teaching it in the form it was written and targeting students who are new to programming is just a bit BS. Nothing like what any programmer would be expected to do in the field.

#

I'm totally fine with this kind of content in a software-oriented uni course as long as they updated it so they didn't mandate VS 2008.

#

Not first year, maybe 2nd or 3rd.

#

I'm just a boring old IT networking student, YMMV. Intro to Python/NodeJS, basic database stuff, a bit of project management and communications (the between-people kind)? Then dig into algorithms, some useful maths and the like.

#

Practical stuff is good.

inner wraith
#

You don't need to have an advanced understanding of algorithms to be a reasonably effective programmer. I think that getting them into the habit of writing good, clean code in something, getting them to communicate with their peers better, and showing them how to manage a project is if anything more useful of a start.

#

Then you go off into the more advanced stuff.

#

That way even if they drop out they can use what they have learned to make something of themselves.

#

Had a startup interview me and a bunch of software dev uni students accross Australia. Apparently I was the only one to know what Git or any other version/source control software was.

#

That's absurd.

#

Git or something like it should be day one if possible.

#

I'd say that an intro to Linux course wouldn't be a terrible idea in a software dev degree either.

#

I had to sit through an intro to Windows 10 in second year, but the content covered features from 98 and even some that were removed.

#

Most uni students I know have never touched anything bar Windows.

#

GPLv2 doesn't really hurt deployment of Linux much on devices, it's v3 that makes deployment harder.

#

Plus support and getting some kind of GUI up is much easier, and the shell and utils are mostly identical.

#

GPLv2 from a Linux perspective covers changes to Linux itself made by you. Not your own stuff shipped alongside it.

#

Not anything that deals with the kernel, though you have a point.

#

I've torn down a lot of devices and haven't seen anything bar embedded Linux so far, BSD-only anti-GPLv2 environments strike me as rare.

#

Apple, yes.

#

Not a ton of other current scenarios or participating companies rise to mind.

#

TBF the China specials' just violate the GPL and don't care, so Linux is of no consequence to them.

#

Same for most big companies.

#

Switch is FreeBSD apparently. Fair.

#

Also on BSD networking being superior. There's exciting new stuff going on there for both sides with DPDK, but Linux driver support is better.

#

PF itself has upsides and downsides, most of which I do not pretend to know.

#

Anyways, it's late and I must be off. Nice chat.

proper gale
#

@dapper laurel "here's a language and how to write hello world, now you're on your own - use the documentation, we've got actual shit to learn" this is fine if they already know another language, but terrible if you dont already have at least one that you can use.

proper gale
#

no, but you will already have something to build on in the real world

#

also, just because it was small intro then newton's method doesnt mean that the teacher didn't design what things you were doing specificly so that you get the same things just, you learn them by doing not by lecture.

proper gale
#

so did i, doesnt mean that i recommend jumping in the deep end.

tepid zephyr
#

@inner wraith yeah and it seems it's their side that they fked up, as i can't access to root directory and change some settings for it to work. so i'm basically losing points on final project at uni because they're inacpable.

#

not to mention our database presentations were from '97. i mean 1NF, 2NF, 3NF and theory stuff like that doesn't change but it's just goes to show how any means of classical education can't teach you to write modern code.

#

@fierce quest just for a sake of mind, how much of floatplane's backend is written in php?

inner wraith
#

PHloatPlane

tepid zephyr
#

even php is so widely used i don't see much of future potential

#

I know it's not needed. Just wondering what's mostly used in modern web apps.

tropic grail
#

Found a registry key named startupsound or something while adjusting a few settings in a fresh Windows 10 install. Enabled it and rebooted. The Windows 10 startup sound is STILL the Windows 7 bootup sound! shocked

#

The key is in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation and it's named DisableStartupSound. Set it to 0, then reboot for Windows 7 throwbacks 😉

vernal marsh
#

Lol Nice... But isn't it changeable in control panel? @tropic grail

#

Setting was written as _"startup sound" _

#

I think

alpine talon
#

Is the a registry key to stop updates until I want to actually restart my computer

tropic grail
#

@vernal marsh doesn't work on newer installs.

#

@alpine talon there's a policy for not installing until you approve the update, but not sure of the key. Set your inactive hours to like 2-8am or something.

alpine talon
#

Hmm ok

nimble drum
#

Anyone experience with Laravel deployments using ansistrano and gitlab ci/cd?

timber anchor
#

To stop windows updates install Linux

proper gale
#

@timber anchor i actually did that

timber anchor
#

🤔 very nice

proper gale
#

you get used to linux pretty quickly.

native shoal
#

Is 16GB a good amount of ram for a programming orientated laptop?

proper gale
#

@native shoal no, 32

#

@last ingot ok?

odd cypress
#

@native shoal Which IDE are you using and how big are your projects?

native shoal
#

@proper gale @odd cypress It's for a friend but I think he mentioned maybe some Java and visual studio for intro projects. Nothing major right now

#

He's starting college

odd cypress
#

I'm completely satisfied with 8 GB on my laptop and I'm using VS and VSCode too, so 16 GB should be totally enough.

#

Most of the time my IDE only consumes 2-3 GB.

native shoal
#

Oh good. He was eyeing an XPS 15 that had 8GB

odd cypress
#

And if he finds out one day, 8GB are not enough, he can (probably) easily upgrade the ram.

inner wraith
#

@native shoal 16GB suits me well enough, but it'd depend absolutely on the OS, IDE/s, workloads...

#

Definitely go for a machine that can grow a bit if you need it to (more RAM, more disk, yada yada).

#

8GB's a bit low IMO for Windows + VS.

native shoal
#

Alright. thanks for the insight

carmine hawk
#

If I'm a C++/Python developer, should I get a Macbook just because Macbooks are what a lot of developers use, or should I go with Windows/Linux?

proper gale
#

@carmine hawk I say Linux.

novel spear
#

less so modernly

#

steve ballmer left

#

and suddenly notepad has unix linebreak support and windows knows what ssh is

proper gale
#

@last ingot use linux for most things, reboot to windows when you want to game.

novel spear
#

check out the new linux on-windows stuff

proper gale
#

or GPU passthrough VM that shit.

novel spear
#

you get all your tools and stuff

#

just no wayland

#

but for like compilers and shit its all there

#

and the new vs code remote stuff I think is meant to make it easier to run tools here but the IDE there

#

but I havnt tried it

proper gale
#

oh, there is xming, so you could use that.

novel spear
#

and most environments run on windows now outside of the command line

#

like gtk and qt and such

proper gale
#

still better on linux.

#

just use linux, its the better choice

nocturne galleon
#

yeah of corse

nocturne galleon
#

Linux has come a very long way. Desktop is super easy to use and you can learn commands at your own pace

vast palm
#

Howdy Anyone got any ideas where to find a memory editing program for editing flash memory Looking for something to edit a bios chip with i already have the aligator clip with the board for editing the memory of the chip

#

Just looking for a good flash memory editing program

#

Previous owner of this board i got for 2 dollars flashed the bios wrong and im gonna reflash it to factory default with the memory editor

tropic grail
#

If it's a winbond chip, it might be as simple as popping it into an identical working board while it's booted and flashing it while the system is online. Otherwise enjoy looking for an RPi or arduino flash encoder.

#

The other option is to check and see if the board has a fix-if-corrupt option for the bios. Some boards do.

vast palm
#

I already have the flash encoder with an aligator clip just was looking for a program for editing the flash memory with

nocturne galleon
#

lmao I have heavily underestimated how long this would take me. for our CS class we have to draw a story board to show what each window and tab will look like in our program and it has taken waaay longer than I thought, im already behind and it got graded already so my grade average got oofed

nocturne galleon
#

unfortunately we have to draw the story board for two alternative designs of the software we are creating then run them against criteria that we create, then program the one we decide is the best

nocturne galleon
#

whoops, I just realised that sounded aggressive, sorry about that

vernal marsh
#

Just an advice for whoever is working with CUDA lib using cuda C... USE THRUST LIB Instead of running and gunning with Runtime API or Driver API, saves a ton of time 😇

#

I believe it's even included in CUDA dev toolkit

main root
#

do you guys think it's possible to learn angularjs and nodejs in 2 days? 🤔
im a fast learner buuut i think its going to be not enough time 👀

ionic hull
#

No

#

@main root

main root
#

I'll see how far i get with exercises and nodejs that weekend 👀

#

because i really really need nodejs 🤔

novel spear
#

if you already know js its very easy to learn those two in two days in terms of enough to make something quickly

#

but there are likely best practices and design and special features and tooling in the api which will be missed

#

only if you are good at reading api docs, inferring a lot of stuff, and guessing

#

assuming you already know js, and are familiar with event driven design on the node side and data binding and good frontend dev practices already on the angular side

#

and are okay with making a pile of code which technically works but is not maintainable (be ready to code the whole thing again in 2 weeks when it blows up)

#

and html

#

like if I used the phrase "dependency injection" would you know what that means

main root
#

i did pretty much everything in js until now, but i messed my weekend up by sleeping until noon 🤔

vivid temple
#

@nocturne galleon still need help?

hearty shadow
#

Hello 👋

Anyone in here willing to help me with docker-compose?

Basically the situation is;
I have a few containers: apiserver, appserver, mongodb, mongopanel.
We can ignore mongodb and mongopanel.

I have two docker-compose files (setups) - development and production version.
When in dev, both containers have mounted volumes from host OS;

  • appserver has the ./app mounted to /var/server
  • apiserver has the ./api mounted to /var/server

'till here everything works just fine.

But the production setup... ...this one doesn't have any extra volumes.
Everything sounds about right... until I start the containers and apparently both containers (apiserver and appserver) run the same commands (script from package.json file) even though the actual files in ./app/package.json and ./api/package.json files are totally different (one for frontend and other one for backend).

Basically - the problem is that for some reason, files that should be copied from ./app to appserver and also copied to apiserver (and reverse)

The file scrtucture is something like this:

api/
\_ src/
\_ package.json
\_ yarn.lock
\_ dockerfile
app/
\_ src/
\_ package.json
\_ yarn.lock
\_ dockerfile
docker-compose.dev.yml
docker-compose.prod.yml

Please tag me if you reply.

vivid temple
#

@nocturne galleon what's the issue you're having with the catch-all entry?

tropic grail
#

@hearty shadow docker is notoriously insecure lately.

#

Also your dockerfile would be the one telling it where to copy from. If that same dockerfile sets both up, there's your culprit. Use separate dockerfiles.

hearty shadow
#

thanks for taking your time.
That's why I am so confused - I am using two separate files, each in itown directory, etc... I can not find the reason why it would not work as it's supposed to :/

tropic grail
#

Do you specifically specify ./app/dockerfile and ./api/dockerfile? Check for typos.

hearty shadow
#

The dockerfiles are correctly read.

#

Because the package.json and yarn.lock are correctly copied and modules are correctly installed.

#

The issue occures later on when the containers are started up
As mentioned above (even though very briefly) - when in development mode, everything loads up just right. Well better said when volumes are mounted from the host OS' filesystem.

#

but when the setup is running in production mode (no volumes mounted) the startup is somehow messed up and both containers start from the same image or something...
I don't know man - I'm giving up on this shit to be honest. I'll probably just remake the whole thing tomorrow.

#

(not the app. The "wrapper" layer - docker setup, etc..)

hearty shadow
#

^ I actually managed to fix this mess. 👌

nocturne galleon
#

hey, i need someone to teach me how to create a catchall aswell with AWS

tropic grail
#

Probably not gonna happen here. Not a teaching server.

proper gale
#

got my Radeon VII in an x16 slot, ROCm installed properly, and its beating a P100 (DGX-1) pretty handily (about 25% lead) on Resnet50 batch size 32

stable ivy
#

any prestashop devs?

ionic hull
#

@stable ivy what do you need?

nocturne galleon
#

working with userChrome.css

used '-webkit-transform: perspective(100px) rotateX(30deg) !important;' is there a way to add antialiasing to make the lines look smoother?

vestal glen
#

o.O -webkit-transform? Why not just transform?

#

but uh, iirc the best way to get slanted sides is to use an svg (you can data: URI it)

nocturne galleon
#

;-; well, im still new to css n all ^^

vestal glen
#

"-webkit" is a so called vendor prefix, it's an older practice where browser makers would prefix the features that weren't standardized yet with their own prefix.

#

these days you should rarely need to use a vendor prefix, especially not a webkit one in gecko/moz specific code...

#

either way, I wouldn't be surprised if you can't get good AA on tabs using transforms, due to how and where they're drawn.

#

The old "rounded" tabs used svgs, too

nocturne galleon
#

ah i see, maybe i should look into modern css programming like websites n all before i jump the gun into trying to redesign my browser 0.o

vestal glen
#

well, firefox's UI is also its own esoteric version of how you use css

#

(XUL and not HTML, which uses different layout rules, even though it uses CSS...)

#

so you'll need a different "css knowledge" either way

nocturne galleon
#

true, my only knowlege so far was trying to use xmal n that ended horribly ;-;

#

in terms of design stand point of course

main root
#

css is lovely

#

some people hate it

#

i love it

#

i could spend years at styling and won't get bired of it

visual oasis
#

ok so im reading a old html book to teach myself im stuck on understanding what <code></code> does at what its used for

ember kiln
novel spear
#

there are many elements in modern html you will find are mostly semantic. The semantic usage of html elements allows for easier themeing, easier processing for search engines or reformatting, and much better screen reader functionality

visual oasis
#

ok thank you

tropic grail
#

Just realized the manager role is a trippy shade of purple, lol.

inner wraith
#

if Discord is being compliant then stuff in single backticks will be wrapped in a <code class="inline">&lt;code&gt;</code> tag

#

@ember kiln Seems so.

vernal marsh
#

hey anyone got something interesting to read in terms of ml (something with math would be better).. I am taking a break from trying to implement a RNN to recognize a single stream audio.. with just 2 words 😑

tropic grail
#

Like why tf won't you let me PR my shit. This is why GitLab is superior you sellout shills.

vernal marsh
#

@tropic grail What went wrong?

#

was it pulled down by GitHub or something?

tropic grail
#

@vernal marsh no I'm trying to make a PR to something related to the bot, but GitHub apparently has a new bug that it won't push.

nocturne galleon
#

🤔 I think something is wrong can someone help me design a bit better

novel spear
#

@nocturne galleon use text sizes changes to indicate a change in importance or context rather tahn willy nilly

#

same with text color changes

#

you have a heading thats blue then you have a number thats blue

#

be consistent

#

also you might have a better time by putting the avatar circle stuff in the top left or right or very bototm, not middle

#

also if account settings is a button, make it look different from "xtreme ultimate"

#

I would also try to equal height yoru dashboards

#

thats all the advice I have for now

#

oh and for how unimportant it is the avatar dashboard square is really big

#

its the biggest one

#

if you want it to be big maybe avatar as one column, then the three at the top stack those as a second column, then the rest as a third column

nocturne galleon
#

Good idea ty

nocturne galleon
#

i hate ui programming

#

WTF

#

now python is giving me an error for code i commented out

novel spear
#

How did you comment it

#

Did you use quotes or did you use number sign

#

Quotes still parse. Number signs do not

#

Otherwise did you execute a file different from the one you are editing and not notice

nocturne galleon
#

why does PyQt5 not show my window icon? it's in the same path and everything but when I tell the program to use it it just uses the default window icon

novel spear
#

give it the full path, use setWindowIcon, wrap it in a QIcon

#

so like setWindowIcon(QIcon(fullPath))

#

full path being like C:\

#

you can use the python libraries to convert a relative path to a full path

nocturne galleon
#

hmm, still doesn't want to work

#

oh well, it's not really important for now,

nocturne galleon
#

does anyone know how to make a table in PyQt5 the minimum size it needs to be? as you can see this table takes up basically the whole window when it doesn't need to

ancient cave
#

With all due respect, have you tried looking at documentation? I find that reading documentation helps a lot.

novel spear
#

Be sure you understand what layouts are

#

Check the docs

#

Also its possible your icon is just a format that doesnt work for window icons

#

Again check the docs to be sure. Check the qt docs rather than pyqt itself they are basically the same one just wraps the other

#

But rather well documented

nocturne galleon
#

quick question in terms of programming; to get gud habit of programming in an industry standard is it okay to write big one line codes? when u could have split it up?

example:
ListBox2.Items.Add(TextBox1.Text & CheckedListBox1.CheckedItems(i).ToString.Remove(0, CheckedListBox1.CheckedItems(i).ToString.LastIndexOf("/") + 1) & " -- (" & (CheckedListBox1.CheckedItems(i).ToString.Substring(CheckedListBox1.CheckedItems(i).ToString.LastIndexOf("/") + 1) & TextBox1.Text & CheckedListBox1.CheckedItems(i).ToString.Remove(0, CheckedListBox1.CheckedItems(i).ToString.LastIndexOf("/"))) & ")")

novel spear
#

I a code review i would say the following things

#

Use a variable for checklistbox1.checkeditems(i)

#

And

#

Use a string format statement for readability with the individual substrings broken into named variables

#

But the length isnt the issue the issue is the readability and maintainability

#

Named variables are easier to read and repetitive access to the checkeditems(i) is a maintainability and readability issue

#

because like even TextBox1.Text & checkedItem.Remove(0, checkedItem.LastIndexOf("/") + 1) & " -- (" & (checkedItem.Substring(checkedItem.LastIndexOf("/") + 1) & TextBox1.Text & checkedItem.Remove(0, checkedItem.LastIndexOf("/"))) & ")"

#

is unreadable, I have no idea what that is doing

#

I would also suggest that there should not be so much manipulation happening inside the gui code. Like thats the kind of thing that should happen outside your gui code

#

like I think maybe thats path manipulation?

#

something like "{command} {fullpath} {filename}" is way more readable you know?

nocturne galleon
#

yeh i see what u mean, if i was using alot more different objects id have renamed them

#

but because its only 3, internally i know what im on about,

if it was a group project or some sort i know in the industry its best to always* name what each thing is

#

so as said, someone who has no idea and has never seen the code understands whats goin on

#

hmm for second part i guess ill rework the code to grab the file name with a function when u drag the file into the program, make it tad easier and cleaner,

nocturne galleon
#

the docs are a bit hard to understand because i use python and it looks like they use c++ in examples

proper gale
#

@nocturne galleon considering that qt is a c++ library, I would expect that.

#

Church for pyqt docs specifically

nocturne galleon
#

I can still somewhat follow it, but if I can find docs on pyqt that are actually helpful I use them

nocturne galleon
#

bruh
TypeError: addWidget(self, QWidget): first argument of unbound method must have type 'QStackedWidget'

novel spear
#

Be sure you dont call a function on a class call it on an instance.

#

It looks like you did QStackedWidget.addWidget

#

Pyqt assumes you understand qt so you should read both docs.

#

@nocturne galleon you may think that but wait until you step away from code for a month or years then come back to it

sacred shuttle
#

Ping me if you know what the issue is

novel spear
#

are there any errors in the console

#

I assume its because you used "let" which is not globally scloped

#

scoped

#

let icons = []</script> I think makes icons go out of scope

#

but your console should have an error, if not make it console.log(icons) and check if its just undefined

novel spear
#

@sacred shuttle I will note its a very unusual pattern to use templating for the html along with repeating scripts rather than just templating some initial seed data for a script to consume

#

but thats not why its broken

sacred shuttle
#

Icons is populated

#

Same for names and servers

#

@novel spear

cloud jay
#

welp need help, so this line of code as highlighted has an issue that says date does not exist in context. not sure what to add into the code

sacred shuttle
#

Also I need to have these script tags since in every ejs thing it needs a own script block

nocturne galleon
#

@cloud jay well, you aren't assigning anything to date or time.

cloud jay
#

yeah but I want to figure out what to put after date =

nocturne galleon
#

@cloud jay What is it you are trying to do here?

nocturne galleon
#

Because it seems to me that you can cut out all the select and iterate through the results stuff and just run a delete command.

limpid reef
#

Sorry, I have Windows only. Best to write apps so they're cross platform compatible.

ionic hull
#

@limpid reef sometimes apple ecosystem users give all them monies

limpid reef
#

Yup, sadly, this is too true, but it's also the reason I'll never be able to use apps like Notability because it's not cross platform compatible... which kind of defeats the purpose for some types of apps.

tropic grail
#

@nocturne galleon don't post shady things k thx.

nocturne galleon
#

@tropic grail ok

proper gale
#

@limpid reef i write some stuff linux specific, but not because im trying to not support windows, but because it doesnt need to, and im too lazy to support it with something that will never be run on windows.

#

in general though, cross platform FTFW!

limpid reef
#

Totally understandable - I mean, technically if you're really just trying to do one thing for a niche project or smaller community, writing for the OS you use makes total sense.

waxen leaf
#

Any linux heads around?

#

I'm getting so annoyed :/

#

I'm working on a cron job, to check and recover ark files if required. I need to get the biggest filesize of .ark files and if .TheIsland.ark file is smaller it'll auto backup and copy over the biggest size. Now while I have this working out side of crontab one part of the script fails. Which is: actualmap=$(find $PWD -type f -printf '%p\n' -name "*.ark"| sort -nr | head -1)

If I remove the \n it actually works but then it cant sort between them as it's not in seperate lines.

Any ideas on a workaround.

The output I get on cron job with \n is:/srv/daemon-data/da4aaa1b-0ce9-46d2-bd60-5f599cc089ae/ShooterGame/Saved/recovery.sh (which is the recovery script)
The same line of code ran in terminal produces the correct output of: /srv/daemon-data/da4aaa1b-0ce9-46d2-bd60-5f599cc089ae/ShooterGame/Saved/SavedArks/TheIsland_NewLaunchBackup.bak

Without \n using crontab I get: /srv/daemon-data/da4aaa1b-0ce9-46d2-bd60-5f599cc089ae/ShooterGame/Saved/SavedArks/TheIsland_27.06.2019_21.46.20.ark/srv/daemon-data/da4aaa1b-0ce9-46d2-bd60-5f599cc089ae/ShooterGame/Saved/SavedArks/TheIsland_28.06.2019_15.15.34.ark

Please help I'm tearing my hair out.

proper gale
#

i would use a python script myself

#

you also would want to use most recently modified not largest for a backup, as it could get smaller.

waxen leaf
#

I would but ark has a habit of over writing the file which would make it the most recently modified throwing that idea out the window

proper gale
#

you could look at creation then, should be logged too

nocturne galleon
#

fuuuck
my youtube downloader doesnt work anymore for some stupid reason

tropic grail
#

Gee, totally not because YouTube's EULA disallows the use of downloader tools SinisterEyes

nocturne galleon
#

hasn't it always been that way?

tropic grail
#

Downloaders are illegal according to YT's EULA. YT works daily to break downloaders to enforce this rule.

nocturne galleon
#

ffs

tropic grail
#

youtube-dl totally doesn't exist btw 👀

limpid reef
#

I know nothing about youtube-dl.... mind you, technically streaming the video through the YouTube HTML5 web player makes a copy on your PC, so you're still downloading it. They just don't want people actually transcoding or transferring it to anything NOT contained within their platform or web player.

tropic grail
#

@limpid reef there's no need for that SinisterEyes yt-dl can be used for streaming, and caching is different than downloading.

limpid reef
#

Righto, actually I always forget you can pipe youtube-dls output directly to VLC or any other media player capable of opening a network stream.

tropic grail
#

Almost every Discord bot/music bot uses yt-dl or FFMPEG (or both) to stream audio directly into an audio endpoint without caching whatsoever.

brave jungle
#

never knew that downloading youtube vids was illegal tbh

nocturne galleon
#

im starting to learn swift code:

#

import UIKit

class ViewController: UIViewController {

@IBOutlet weak var myWebView: UIWebView!
override func viewDidLoad() {
    super.viewDidLoad()
    
    let url = URL(string: "https://www.google.com")
    myWebView.loadRequest(URLRequest(url: URL!))
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
}

}

tropic grail
#

@brave jungle common sense.

tropic grail
#

We don't need the full explanation of how you can claim ignorance to the EULA though 👀 By using a site, you agree to their EULA, privacy policy, etc., which almost all major sites have because GDPR forces it.

brave jungle
#

Well, i used to be 12 a year ago, and i watched Youtube GWbruhTrolled

#

@tropic grail i dont understand why its common sense, i dont download music videos or copyrighted content, just normal ltt videos or something

tropic grail
#

Still under those same rules, but in the case of LMG, so long as the videos are for personal use and not reuploaded, you're fine there, as far as I am aware.

tropic grail
#

Nope. Once you agree to these agreements, you also agree to a non-arbitration clause, which means you couldn't even get it that far.

proper gale
#

I opted out of that shit with discord.

nocturne galleon
#

what is the difference between QStackedLayout and QStackedWidget, according to the internet they are both "provide a stack of widgets where only one widget is visible at a time"

#

im using PyQt5

#

im still confused

#

they seem to be the exact same thing

wind ember
#

anyone on here wanna help

#

im trying to make an http request that will be redirected by a 302 status code preserve its post method thru the redirect

#

as in

#

i send a post request

#

it gets redirected by a 302 status code (i have no control over this server)

#

and then i want to also make a post to the new url

#

and i cant do it thru two separate requests

#

like i cant just store the new url and then send a post to there

#

it has to be the same request

#

language javascript + node.js + electron

#

im using electron clientrequests

#

cuz i need to use their interceptors

#

im also not entirely sure how to add a body to an electron request

#

@last ingot 😩

#

:pepehands:

#

thx anyway

vast prairie
grizzled panther
#

Anyone here know which version of TensorFlow supports CUDA v9?

little knoll
#

I think the latest version of TF that supports CUDA 9 is 1.12 @grizzled panther

grizzled panther
#

Thanks!

little patrol
#

Tailwind or Bootstrap?

thin cobalt
#

ItemsSource="{Binding Source={x:Static core:RGBSurface.Instance}, Path=Devices}" worked fine in my WPF code
how would i make that work in UWP?

#

this is the whole code block

#
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Style="{StaticResource StyleTextBlockForm}">
                                        <Run Text="{Binding DeviceInfo.Manufacturer}"></Run>
                                        <Run Text="{Binding DeviceInfo.Model}"></Run>
                                        <Run Text="{Binding DeviceInfo.DeviceType}"></Run>
                                </TextBlock>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>```
#

the problem is, x:Static doesnt exist for UWP apps

#

whats my best option for a workaround

novel spear
#

dont use static access

#

make a view model and make that access whatever you need then bind to that

novel spear
#

the bonus of that is you can unit test the view model too

nocturne galleon
#

how can i securely make an application remember user credentials so they don't need to login every time they open it?

tropic grail
#

A cookie with a RSA public key that expires after a set amount of uses or time, that must come from a specific IP, and have the signature of your application in the user-agent, for starters.

sour flower
#

hey guys

#

i need some help with admob and android studio

#

please @me if you have some background with that

unkempt ermine
#

Wrong chat, soz

native shoal
novel spear
#

@nocturne galleon if you dont wanna mess with pki you can just hmac it