#development
1 messages ยท Page 77 of 1
put some labels on them
and write your update event handler to do the calculation
I'm not helping you with your entire assignment, you should figure this out yourself
this should be enough to infer the rest
@midnight wind ez onclick
eh
yes there is
lol
let me try
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
there
no more onclick
noice
@midnight wind "Its so simple"
then why does the code @ work look so garbage
xD
does anyone know what would be the best way to get information from postgresql where i have a column that is a timestamp (properly formatted with timestamp format) and i want to selection all of them with timestamps of current time to 30 days ago
SELECT * FROM db WHERE time > (now() - interval โ30 daysโ)
Does anyone know any good software for a virtual printer? I'm experimenting printing documents in C# .NET
Microsoft Print to PDF and Foxit Reader also has a Print to PDF function built in
i will have to look into BETWEEN since i need to get the data from the last 30 days, and then the 30 day window before it
i can toss a loop in there with a switch and then use bash variables to make the windows using date
do typescript
I mean printing on a sheet with a printer, but if the code for a virtual printer like Microsoft Print to PDF is the same as a real printer, I'll experiment with that
yes i know, you can use date in linux to output in basically any format you need so that is not a huge problem, and for the most part this is a call recording system so the times are the start_ts for the call, i just need to process out average calls per month along with storage and average handle time
all of the data is stored in a psql db
i dont build the software XD
im just the systems engineer
well i could always use our solr db to pull it but i was not wanting to go with that headache
if it takes 10-20m to run thats perfectly fine
like i said, i dont write the software, im just the systems engineer
im writing the automation script for gathering data on in place systems
i implement the systems, maintain them, upgrade them... etc
like when you call the vendor to have them take a look at your software and fix it, or you call and buy a server, im the person that designs the cluster and implements it or fixes it
no, our company writes the software, that is just not my role
i work with the people in the datacenters to implement the software
yes
its actually two full stacks running together
like its a full os being deployed sometimes multiple depending on the system load, largest so far i have played with was a 20 server cluster
yeah, im good on that one lol, I'll stick with the crapshoot of call recording software XD
yeah, i mostly work with voip integrations
cisco... such a joy to work with -_-
our systems are based on centos as the base os
so all of our systems are linux
we only deploy on centos 7 right now as we just dropped support for RHEL deployment thank god
for end user based stuff debian based distros are the best bet, however for the server space centos was the best thing you could use
remote thank god, i send them the server configuration design and they give me vm's already setup and i just go through and install and deploy all the software
i avoid any dev work on windows
if i have to write software that is running on windows i use node XD
that is standard for linux, if you dont know how to use ssh keys properly then you should not be working on linux
not like "oh never touch it again" just please go learn the basics before you start playing in prod
i can't tell you how many times i have had to refer customers to ps work because they were the ones who broke it because they didnt know what they were doing
hey, sounds like where i work ๐
our one stack is built on java.... so you can make your assumptions there XD
yep
because thats all our devs do XD
im a linux engineer, but if im doing dev i stick to node or c#, I'm just personally not a big fan of java...
why would you even store objects in pdf to start with?
ah
that makes more sense XD
i was confused, i thought you were saying you guys were storing objects in pdf format which just boggled my mind
may i mention too how much i hate parsing xml from bash without being allowed to use external tools
like this is a headache... but the only way i can do it from our stock system without external packages ```bash
lineDash
loopNum=1
cuEnt=$( xpath -p $sniffers ${xpSpecConf}jtapi${xpEqualGrp}sniffer${xpGrp}provider${xpValue}${cucmInf[1]}"'"] 2> $dvN | grep -o ${cucmInf[1]} | wc -l )
for info in "${cucmInf[@]}"
do
cucIn=${xpSpecConf}jtapi${xpEqualGrp}sniffer${xpGrp}provider${xpValue}${info}"'"]
entrynum=$(xpath -p $sniffers $cucIn 2> /dev/null | grep -o "$info" | wc -l)
startClm1=4
startClm2=6
tmpCounter=0
while [ $tmpCounter -le "$entrynum" ];
do
xpath -p $sniffers $cucIn 2> /dev/null | awk -F '["<>=]' " { printf( "%-10s%-30s\n", $$startClm1 , $$startClm2 ) } " >> $tmpfile
startClm1=$(( startClm1 + 7 ))
startClm2=$(( startClm2 + 7 ))
tmpCounter=$(( tmpCounter + 1 ))
done
done
welcome to parsing xml from bash XD
its the only thing i can use as its on our systems by default
here is the whole headache if you want to look at it XD https://raw.githubusercontent.com/1Jamie/discovery-zoom/master/discovery.sh
i avoid soap with a passion, like even when im writing node, i try to use sockets instead
like express in node makes soap not as bad, but i just dont have the patience to fight with the tls crap
all the nope on that one XD
i bet the api was a crapshoot to boot
at some point i want to take a look into using node with unity
would be interesting if you can use node as a backend
i think you could have some fun with sockets on node and unity for the actual client side
i have written enough libraries myself to not have a problem with using external libraries
the thing is i dont have any issue with that, my primary language has always been JS
so you learn how to work with it and shift datatypes as you need
like i said, that is what i learned on, so its not an issue for me, there are proper ways to work with precise datasets and there are full amazing libraries for it too
its a hobby, im not writing anything im going to sell to thousands of people
so watch me really care, i just prefer to work in node
yep
i know this
i have been playing with webGL based games for years so for me node as a backend is actually almost prefered
im old school lol, i learned back when ; were still required so my ts is horrible
i like promises personally, it was one of the best things js got
i dont know enough about ts to even give input lol
personally async is a god sent, like learning it was a pain, but once it works right and you figure it out, its a really great feature instead of being stuck in synchronous scripts
all that typescript does is types
I'm not sure where you are getting this from
yes
that's js
no it's js
that is js.... i do it all the time
yes, that's js
yes there is
i use .then() left and right with async on the twitchbot i wrote for my friend
that was before i had a good grasp on => which was so much easier and await
if you use .then() now most browsers will say its an out of date method in the console
i used it two years ago on that twitch bot
welcome to programming in a language that is very different than basically any other XD
you can chain the hell out of an async function
in front of the async stuff you just put await
but if you want 2 async stuff to run at the same time it's a little more complex
you can thread stuff in node.... its just very very interesting and convoluted
its usually easier to run a main script that can trigger and run the different threads via different scripts
Anyone ever host codeigniter 4 on synology nas web station?
running fine on laragon and lampp but getting this error on Syno, any idea?
Nvm it was class naming
hello lads, I have a source code that is not mine, and I want to do some tweaks in it so it could be a little bit different, its an opengl code that shows a triangle, anyone could help me on that?
what language is it?
i think he said it was in C
can we get like a github link?
Ight then idk much bout that, I'm more of website stuff n batch.
only have a text file, I can DM it to you if your privacy isnt disturbed o_o
hm, maybe you could create a repo?
if you are unable to share the parts where you want to change, i would recommend you check out stackoverflow and ask a question there as well
ok so what are you trying to change here?
things are pretty well commented, so what exactly do you plan to do?
the size and color I assume, my codeblocks is having some issues right now on the opengl, so I dont know what Im doing
lemme show you the output of this original code
glBegin(GL_TRIANGLES); // Color and position of the triangle's vertices
glColor3f(1.0f, 0.25f, 0.50f); glVertex2f(0.0f, 1.0f);
glColor3f(0.85f, 1.0f, 0.50f); glVertex2f(0.87f, -0.5f);
glColor3f(0.25f, 0.50f, 1.0f); glVertex2f(-0.87f, -0.5f);
this is where the color is declared
yes but Im new to opengl, so I dont know what exactly to change there nor test it, because it keeps showing me this when I compile anything
alright let me try and compile this
so when you run the code, nothing changes?
no matter chat you change?
and what are you running the code on?
I even tried some codes like the tic tac toe and the hangman game that I found on the a website, all show this triangle of doom
open gl project in codeblocks
hm
what i suggest you do is go to stackoverflow
have you heard of that site before?
you should go here and ask your question
there will be alot more people who are able to help you
have you compiled the code?
I tried to do it on visual studio
there are probably some dependencies that i am missing
is there any discord or community you reference me so that people would answer me asap, deadline's today
i don't know any C servers
but have you tried the programmers hangout?
they have a dedicated C channel
ok go to the side bar with all your servers
and scroll all the way down
at the bottom there should be the add button and a compass
click the compass and it will bring you to a server searcher
just type in The Programming Hangout
it will be the top result
appreciate it private guy!
don't mention it
Guys I need Help!!! I am confused if I should pursue vanilla CSE or CSE with Specialization in Data Science or CSE with Specialization in Blockchain Technology for my UG Degree?
Do you have to declare one the first year?
@hallow pilot yes before admission
I would imagine it wouldn't be a big deal to add a specialization during your second year once you better know what you want to do
I'd probably start with vanilla unless you're already super into one of those things
@hallow pilot Due to Covid the counseling is online and its shit. No support what so ever.
Sorry to hear that. I think the quality of counseling varies a lot between schools and between departments, even before covid.
When I went to school a million years ago I was lucky to be in a program where every student had appointments with friendly and knowledgeable humans to plan their classes. But I had friends in other degrees with no human support at all, picking their own classes and entering them into a computer terminal.
I would not bet on blockchain for a specialization... Other than that it depends what the data science specialization replaces in the base degree
If it replaces courses that you don't particularly care for anyway, go for it
The important thing is you get to learn what you are interested in.
From a CS/Math major, and CS educator.
That sounds rough. If I had to choose at what age to have a year of covid restrictions, it definitely wouldn't be college.
is it ok if i share my game here or do i have to do the self promotion channel
this is dev issues
i don't believe there is a self promotion channel
random question.. anyone know what "DIR C*.** " does in command line? It looks like it just displays a directory listing for Cache/temp files but I cant figure it out exactly
OMFG... Its for directories/files starting with the letter C
meh never mind ๐
@woven vault ok thanks
Working on an app based on an outdated google service
I'm working on the terms & conditions of an app I'm developing and that is using .NET. Does I have to mention Microsoft somewhere, since it use their framework?
Ok, thanks for the info :)
Yup, seems down, I'll check that later
I'm on .NET v.4.8.04084
Does anyone know any good code jams happening for the summer like in July or something
Im working on a c++ application in qt and I keep getting "Syntax error, missing ';' before '*'".
I read online that this is caused by a missing include. But as soon as I comment the line out and build the code (which ofc fails). And then uncomment that line and build it, its fully working until I make changes to the code.
The section of code where the error occurs at:
(The media_controller is initialized halfway during the setup of the parent class)
#include <mediacontroller.h>
private:
mediaController *media_controller;
isn't private supposed in some sort of class, or struct or whatever ?
(as described at https://en.cppreference.com/w/cpp/language/access )
This is just a snippet of the code. It is in the constructo
what ? again, properties are supposed to be in class or struct, not 'inside a constructor'. You are probably nesting something incorrectly, and compiler is freaking out because you have a property/variable definition where it is not supposed to be. You should probably shown the whole code, not just a snippet.
show more code
sometimes compilier shows the wrong error location
and the working/not working part is probably about compiling the object somehow, and it is not rebuilt until you change the specific file, when it fails again
How was it wrong? I pasted it from my editor directly into a codeblock
Can I pastebin it then? Or does that fall under evading the filter?
Use the "```" thingies
Im sure I did
they did?
You can pastebin it as well
I'm not sure what the problem is
it is
I got muted for 10 minutes because I hadnt formatted it
No I pasted another message
I guess I missed a ` then
Oh wow, im used to macos.. when you press it three times it does it three times...
On windows it only does two
Either way
what?
I most likely missed the last ``
I think i did this:
code
Huh
weird
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I did something wrong which most likely fucked up the formatting and triggered the bot
line 45 keeps erroring on compiling, expected ';' before '*'
wouldn't there be a ; on line 15
But commenting it out, compiling, uncommenting and then compiling did work though
wait no
How are you compiling it?
Trough qt creator
C++ header files is a rather mundane topic by most standards. Talking about header files is not as interesting as discussing complex search algorithms or debating design patterns . Itโs not an academically stimulating subject to teach, so most CS programs do not emphasize header file design in their courses. However, not having the correct โฆ
was issue no.7 of this list
Which C compiler do you use? Gcc, sdcc, icc,clang or msvc?
i used gcc
I just started learning C but gcc
someone here can help me with this error
<f:ajax> Unable to attach <f:ajax> to non-ClientBehaviorHolder parent
gcc is commonly used in the industry.
if I wanted to have a client/server model application that makes use of a database, simply creating a MySQL file through python wont be enough right? I've heard about database/sql servers, is that to enable the handling of multiple queries being processed/managed properly?
or is it not necessary?
@nocturne galleon
simply creating a MySQL file through python wont be enough right
what do you mean by this
like creating a .sql ?
wait I was thinking of sqlite
how come sqlite can just connect to a database as a file, but mysql cant?
and if I was to make an application with sqlite, wouldn't that be treating it like a file which can have issues if different threads/asynchronous things are making changes at the same time?
well, what do you mean "database" by that
Depends on the industry. Many companies use their own modified compilers(eg: - Activision). Many do use gcc, but clang and msvc are very popular
no because a mqsql server is a server
you give it commands, and it executes them
gives your program a lot more flexebility
sqlite isn't a server
it's embedded into the program
implementing sql
Hello!
I have a general question:
In a social networking ish environment, let's say you would have someone following or liking or whatever someone else
The problem is, how do you send this info from the client? I would not like the idea of exposing internal IDs, but at the same time I wouldn't use the email since it's personal info (and bye bye option to hide it). Username? Maybe, but what if while someone is checking out that profile, the owner changes username? Time for a cascade of exceptions lol
Any idea?
UUID
Just an id
@nocturne galleon sqlite is an excellent db that is meant for embedded databases. However, it is capable of being used for most low to medium traffic websites (ie: most websites). It can handle server-side multi-user, multi-process, multi-thread applications. The library takes care of all the locking and unlocking without a service/daemon being involved. https://www.sqlite.org/whentouse.html
Thank you all for your responses, youโve finally cleared up something Iโve been confused about for ages
yes, for e.g my uni uses dcc
I prefer clang for the error messages. They made the errors much easier to read. It's nice to see gcc start to improve their error messages.
So i was just watching this video from snazzy labs (https://www.youtube.com/watch?v=rJ0TrZ4kNis) and he recommended a program called ChangeMenuBarColor, its pretty cool, i did a fresh install of xcode and ran the commands - After entering the command; swift build -c release i get this error message
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH```
Anyone know what xctest is? I did some searching on stackoverflow and the apple dev forum but couldnt find anything usefull
Snazzy Labs shows you how to fix some of the most frustrating functional and visual changes in macOS 11 Big Sur.
ChangeMenuBarColor on Github - https://github.com/igorkulman/ChangeMenuBarColor.git
XtraFinder - https://www.trankynam.com/xtrafinder/
macForge - https://www.macenhance.com/macforge
Displaperture - https://manytricks.com/displapertur...
Anyone know about this and if the presentations are any good? I saw they have a progressive web app presentation and figured I'd sign up to see how good it is; https://developer.microsoft.com/en-us/reactor/
Microsoft Reactors are neighborhood campuses, where developers and startup communities meet, learn, connect and innovate.
Hey there, im making a Desktop app, my question is, should i store the app in program files or appdata?
use an installer and store it in programs, altho the installer will usually automatically do so,
something like this:
Cool, any installers I can use?
how can i add backslash afer space in python?
i used this:
ff="hello world"; ff.replace(" ", r"\ ")
and got:
hello\ world
yea
not sure what section to ask about creating elgato stream deck icons for Adobe and Autodesk products
Probably #creative ๐ looks like Elgato Streamdeck accepts 72x72 pixel JPG, PNG, or animated GIF files. https://help.elgato.com/hc/en-us/articles/360028237271-Elgato-Stream-Deck-Customizing-Key-Icons
So, I am trying to create hotkeys for the tools in Illustrator, Photoshop, and Sketchbook, but I can find the current Icons on the web. I thought they would be in the program files, but all I could find is the product badge icon...
I read somewhere that they (tool icons) may not be stored locally and if they are, they would most likely be in a DLL file.
I tried reaching out to Taran Van Hemert a while ago, but he didn't respond. I understand that he is busy....
I also reached out the Elgato, Adobe, and Autodesk, but all I received was the same link to the Elgato Stream Deck Key Creator.
I figured that I would ask developers just in case someone knows how to parse (decompile) DLL files.
That assumes the icons are even stored in a dll - if they're not, you'd be wasting time trying to do that. It appears that some Adobe applications straight up store icons as PNG files inside C:\Program Files\Adobe\Adobe Prelude 2020\PNG where the Abode Prelude 2020 folder is replaced with the name of the program you're trying to get icons for.
However, I checked my installation of Photoshop and don't see a PNG folder so they must be storing the files elsewhere. I've never bought anything from this site so I can't endorse them or anything, but it appears people sell pre-made icon packs specifically for the Streamdeck. Otherwise the alternative is to scour the internet looking for free icons to use. https://www.sideshowfx.net/products-stream-deck
could they be in an EXE file?
Icons can exist in exe or DLL files, but no idea where Adobe keeps their Photoshop tool icons.
It looks like they are onboarding the tool icons with JS or JSX
They might also be loading them from files inside this folder: C:\Program Files\Adobe\Adobe Photoshop 2020\Resources
No idea how you'd extract them, if you even can. Anywho, I'm heading off, best of luck. ๐
thank you anyways
Yea in the python CLI its look defrent
how
'hello\\ world'
That's cli
Does Linus know about this? He is in a game made by Dani.
i have an omron ej3m-r4m4-g sensor and struggling to get reliable readings on my RPI4, is anyone able to lend a hand?
how could I add a time limit to the Stdin or buffer; I tried looking for trivia games with time limits but there all too confusing & use outdated libraries. I code in C & c++
If your on a unix based system you could just do a file read for standard in and use something like this. (The green checkmark solution. https://stackoverflow.com/questions/2917881/how-to-implement-a-timeout-in-read-function-call
so WDC clearly hires beginner PHP programmers ๐ https://arstechnica.com/gadgets/2021/06/hackers-exploited-0-day-not-2018-bug-to-mass-wipe-my-book-live-devices/
Probably testing out the feature, but forgot to uncomment it when shipping

Anyone actually uses assembly language in work places ?
E.g MIPs
Or do they only get used in micro controllers industry
does windows actually support SCTP or not? Internet says no, ws2def.h from winsock 2 has a ipproto for it
I'm trying hard to start a unity project with progress on it on my windows PC, but it keeps giving me this error message does anyone know how to solve it? If not, that's fine : )
I know nothing about unity, but it obviusly says that the module androidjni cannot be found
Wow thatโs a lot of errors.
so you somehow need to install it
not really
it's just a dependency issue
Oh
the latest update for streamdeck (5+) app in windows actually includes a ton of new streamdeck icon packs that you can use, and adobe has an official package set with everything from CC in there
(from within the streamdeck 'store') -- i remembered wrong though they only have it for premiere, after effects, illustrator and photoshop it looks like at the moment
https://slideshowfx.net/products-illustrator - also it appears they are made by some third party company called slideshowFX that's the link from within the streamdeck store
if you try looking on somewhere like deviantart though you will find a ton of resources that work for streamdeck icons
any developer in chatter?
Iโm developing a custom pedestal for the O11D, CaseLabs style. Iโd really like some design feedback. Renders.caserise.us and instructions.caserise.us
if anyone knows c++ please dm me I need help
why not post your question here
Yeah, performance tuning
ey if anyone knows basic C programming, can u help me?
drop your question here
anybody knows good resources where to start with learning Azure? I have couple years experience with AWS, so i'm not totally new. But internet is full of stuff and it's really hard to figure out what is decent and what is not.
where's your code
im stuck only in putting inputs in the array, nothing else
int arr[99999][99999],xsize,ysize[99999];
int main() {
int w,x,y;
printf("Enter number for one dimentional array:");
scanf("%d",&xsize);
printf("Enter the size of each number one dimentional array:");
for(w = 0; w < xsize; w++) {
scanf("%d",&ysize[w]);
}
for(x = 0; x < xsize; x++) {
printf("\nEnter elements for set %d, with size %d:\n", x+1, ysize[x]);
for (y = 0; y < ysize[x]; y++)
scanf("%d", &arr[x][y]);
}
for(x = 0; x < xsize; x++) {
printf("\n set %d:\n",x+1);
for (y = 0; y < ysize[x]; y++) {
printf("%d ", arr[x][y]);
}
}
}
int arr[99999][99999]
yikes
i see
The way it's formulated it could be only printing out stuff.
It doesn't say you have to calculate anything
i was writing a c program and it didnโt work right unless one array was 1000 units big
not sure why that was
but no numbers would be entered into any of the arrays otherwise
c is weird 
i know dude 

you could sort the array first
but i reckon you could also not sort it
@safe cradle
i can sort tho
Anyone been able to gain access to GitHub Copilot yet? If so, how long ago did you sign up for it?
who agrees? who doesnt?
I disagree that JS is bad. I dont think its bad at all however I agree with the Angular stuff, and WebAssembly being the future
JavaScript was never intended for what it is used now. Just as Windows before Windows NT was not intended to be an actual multitasking OS.
WebAssembly might be future for certain use cases. A small section.
I would say moving forward webasm based languages/frameworks will grow, eventually over taking js. Hope it's within my life time.
And like mentioned js was never intended to do what it is now, so would that not imply that it's a bad language if not in itself then it's choice in the matter?
I've been wanting multi threading, and no web workers are not enough.
we have some storm ongoing (might be particularly in interest by open source software users)
https://github.com/audacity/audacity/issues/1213
JS is not the worst - you could always be stuck using Python. But it's not great.
but python is ๐ฅฐ
Blink twice if you need help
Send me c/c++ mentors quickly
I am forced to use Python for most of my AI/ML work using Tensorflow, holy crap just kill me.
I see, a AI python programmer
I use it for scripts and shts, and not AI/ML so probably don't share the grudge
using it for anything it's just horrible. We have a team who uses Django and I can not for the life of me figure out what posessed us to go down that route of using it in our stack.
I can not name a single thing Python does that Java doesn't do better, and even if you could find one two things you're grasping at edge-cases.
As much as I like python, I think some people are overdoing it
btw, what;s your main language then?
java?
Yeah. Though I do a lot in JS at the moment also.
I see, a java developer
Making a new level for my game
nice, what's the name @loud kelp
The game is called Snap the Sentinel
Peep my bio if you want to play the current release
Who wnats to help me make a LTT Store.com banner bomb virus ๐
or RansomWare ๐ where to unlock your drive you have to buy a LTT waterbottle lol
Starts Peeping.
Could somebody please help with making a website
I just want to know how to make something download from a button
I find python too simplistic in design, not enough language features, shoot there arent even much sugar in it.
I completely agree
C# primarily here atm
whats wrong with just creating a hyperlink to the file?
for one you would need a webserver to serve the file
then it's really ez
just have the webserver have access to the file
then it's just an ez
<a href="/assets/file.txt" download>
could I change where it downloads so it downloads instead of downloads it goes to pictures?
that's completly a client thing
you have no control over that
in chrome you can either make it download to downloads folder, or make it show a popup each time
could I make it show a popup even if the client has that setting off?
no
rip
so there's no way I could?
no, that's all client side
you can only request it to download
what do you want to do?
Maybe I can load the exe file with my webpage and from the client run it?
run an installer but the computer does not have a downloads folder on windows and the settings for chrome don't let me change them so it opens up file explorer
ok, so? the user downloads to where they want it
yes
how does one compile this app?
and many other projects that use other languages like css
Anyone knows how to extract de-crypted PGD file? Trying to make an english patch for a PSP game.
do you know gradle
AI powered voice changer I am working on, heres what my current progress sounds like. https://youtu.be/thoTlIldsaM
Visit our Patreon for more information:
https://www.patreon.com/NyVox
It uses a GAN on mel spectrograms, then a GAN for the vocoder
Can you not use bitwise for this ?
sounds kinda sus
what you want is a 0day lol
Oh this is a tough one, I'm thinking of writing myself a small webapp for which a DB would be the best storage solution, but I can't decide on which platform would be best to use for it.
For work it would be obvious: use Java. But Java is overkill for this project. I have no aversion to PHP. Javascript is horrible for that kind of thing because of promises and async requests/callbacks. Tough decisions...
If you are wanting something fun to learn, have a look at Go. If you are looking for something to get the job done, I'd suggest C#. It's nothing fancy but you can get something up and running relatively quickly
I have no desire to run this on infra that can run C# ๐
C# can run on Linux and containers too ๐
Just because it 'can' doesn't mean you should heh
But you're right. It's not the best to choose
I actually like C# as a language, but ASP leaves a lot to be desired.
it's module/library availability and ecosystem is lacking too, unfortunately.
In fact, the three languages I mentioned are probably the top 3 across anything as far as "oh, I need a pre-written module to do is-number?" ๐
Honestly, have a look at Go. It runs on pretty much anything, has high performance and you get to learn slightly lower level code
I suppose at some point in my career it's gonna be forced upon me, so maybe it can't hurt.
This got me thinking, I can't wait til the next time I'm actually in the market for a new job, and some interviewer asks me to write FizzBuzz, and I'm gonna have to resist the urge to not use
fb = require('fizzbuzz');
fb();
... or to write it using TensorFlow
So I have a JSON file with the following structure:
[
['Event 1', '06/11/2013'],
['Event 2', '10/11/2013'],
['Event 3', '11/12/2013']
]
I want to be able to have a python function which will run at midnight every day and then for one of these events which happened on the same day. How could I do this? If a database or csv file is easier than a JSON file, I'm fine with that
you can use cron to schedule the python script
and then from the python script...
- read file
- find event X where date = today's date
- call out to cron from the python script to run another script at date(X)
Powershell question... switch -regex -file $file fails to find the file, even thou it is supplied by Get-ChildItem. My first thought was too long path, but nothing about it in the error.
No files matching 'C:\CloneHero\Songs\Circuit Breaker\[Circuit Breaker] Tier 05 - Drop the Basestations\Pegboard Nerds - Self Destruct [Aren Eternal]\notes.chart' were found.
At C:\CloneHero\processSongs.ps1:29 char:25
+ switch -regex -file "$filePath"
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (C:\CloneHero\So...al]\notes.chart:String) [], RuntimeException
+ FullyQualifiedErrorId : FileNotFound
Any ideas?
Works fine with a bunch of other files before it too
And my code...
function Get-ChartContent ($filePath, $onlySection) {
# Based on this, slightly modified to work with .chart files, added to only get the data in one section
# https://devblogs.microsoft.com/scripting/use-powershell-to-work-with-any-ini-file/
$ini = @{}
switch -regex -file $filePath
{
"^\[(.+)\]" # Section
{
$section = ([string]$matches[1]).Trim()
$ini[$section] = @{}
}
"^\{|\}$"
{
# Wraps around section contents - Useless -_-
}
"^(;.*)$" # Comment
{
if ($onlySection -ne "" -and $section -eq $onlySection) {
$value = $matches[1]
$CommentCount += 1
$name = "Comment" + $CommentCount
$ini[$section][$name] = $value
}
}
"(.+?)\s*=(.*)" # Key
{
if ($onlySection -ne "" -and $section -eq $onlySection) {
$name,$value = $matches[1..2]
$name = $name.Trim()
$ini[$section][$name] = $value
}
}
}
$ini
}
Set-Location C:\CloneHero
Get-ChildItem -Include notes.chart -Recurse | where {$_.FullName -like "*\Songs\*"} |
ForEach-Object {
$ini = Get-ChartContent $_.FullName "Song"
$name = $ini["Song"]["Name"]
$artist = $ini["Song"]["Artist"]
$difficulties = @{
expert = $ini.ContainsKey("ExpertSingle")
hard = $ini.ContainsKey("HardSingle")
medium = $ini.ContainsKey("MediumSingle")
easy = $ini.ContainsKey("EasySingle")
}
echo $ini["Song"]
echo $difficulties
}
hi, im new to self and __init__ in python could someone please writ a __init__ method to this class as example or explain what do i need?
class config:
def red(file_name="config.json"):
try:
with open(file_name, 'r', encoding='utf8') as config:
return json.load(config)
except FileNotFoundError:
raise FileNotFoundError("Could not found file \"config.json\"")
def write(file_name="config.json", *, data):
try:
with open(file_name, 'w', encoding='utf8') as config:
json.dump(data ,config, indent=2)
except FileNotFoundError:
raise FileNotFoundError("Could not found file \"config.json\"")
that python code isn't valid, that * is an invalid char
also what needs to be initialized?
as far as i can tell everything is contained within the functions
@spring pond So way the IDE tell me need self, nned self in every method? I have used python like I send in the pass year but one thing I could not understand what is it init and self
Just lookup python classes
Geeksforgeeks or w3schools have basic explanations
Googlefu is the most useful skill in programming
init and self are different
self is like the "this" in java
__ init __ is the constructor
Bookmark manager design doc goals:
MVP (minimum viable product):
All functionality found in in browser bookmark managers including:
- adding and removing html links to a list of links
- sorting and organizing the links in a tree data structure file folder system
- searching for links based on the url that has been bookmarked
- importing and exporting the list of links that was or is created by the app or by other bookmark manger exporters ie: chrome export tool
- ability to share and retrieve the links stored as a generated shortened url, either as the whole list of bookmarks or a specific folder of bookmarks
Beyond this basic functionality, I have the following advance features that are the main motivation for making this as an app separate from the browser (either chrome extension or more likely react web app):
Stretch:
6) I want to store Metadata on each link as json objects in order for the user to filter not only by the name of the url but also by any piece of data that the website returns from a ping request. This includes the image of the website aka the fasticon.
-
beyond searching the meta data want to be able to create and search the bookmarks for tags that I created or that were automatically generated by the Metadata (ie all the lttstore.com related links would be shown if filtered by that url) that can be used to sort by tags themselves.
-
I watch the search functionality to allow for multi dimension filtering. For instance, all "linus tech tips" links that include the "Linux" and "Anthony " tag, with a search ui that is at least as intuitive to use as a desktop file folder search ui
-
I want to use css grids or other styling to allow for different view types. For instance, how the file explorer in windows allows for a image view, a content name view, and a details view with various columns of information. I want it to be responsive so that it is usable on mobile, tablet, and desktop device.
-
I hope to learn how to set up a way to distribute the app, ideally on my own website that I set up myself and host on a hosting service such as linode.
That's what I have so far for my project design doc. Thoughts/constructive feedback/criticism?;
Also the planned stack is Web Full Stack using html5, cc3, JS, React as the front end, React and Express for the routes, and MongoDB or possibly MySQL for the database storage and retrieval;
so
say i wanted to "convert" persay a java application from an apk i decomiled how would that work exactly?
the end goal is to turn it into an ipk
@midnight wind @hollow basalt thanks
anyone familiar with a consistent way to create lists like this in markdown? For a README in a npm package I'm building.
1. First section
1.1. First item here
1.2. Second item
1.2.1. First item in this group
2. Second section
2.1. First item here
2.2. Second item
2.2.1. First item in this group
you should try joplin if you work in markdown regularly and want a gui that simplifies the editting process for your markdown;
Free and open source tool and works with pretty much any os;
plus it doubles as an extremely handy alternative to evernotes for notetaking and managing;
huh, interesting
I found notable which is nice
but it's no longer foss for now
markdown by itself doesn't have that kind of nested numbered list
dumb questions.. anyone know what is "wrong" with this code: " Each <BR> word <BR> is <BR> on <BR> a <BR> separate <BR> line"
its just a simple line break at each word..
its not done normally but eh
wait do you have to put a / in the <br /> ?
i dont' think so but
BUT
you don't need to
er
i think its cause the line isn't enclose in a paragraph <P>
life
where the file that the command is looking on? (i need the Chassis info)
-> hostnamectl status
Static hostname: ehlemp
Icon name: computer-laptop
Chassis: laptop
Machine ID: 587578e076704f3ab6caac11f992e0eb
Boot ID: 3ab155f40c874642956fc1b191cfdd5e
Operating System: eharch (desktop)
Kernel: Linux 5.10.48-1-lts
Architecture: x86-64
Hardware Vendor: System76
Hardware Model: Lemur Pro
You could just use awk or grep to get the chassis info.
You can put this command hostnamectl status | grep Chassis | sed 's/Chassis: //'
where do I place my favicon.ico file for apache to use it?
the right place
web root
browsers will fetch example.com/facicon.ico
also use nginx
is Java a good programming language to learn?
depends what you want to do
program what?
Idc
web dev?
Nah
embedded systems? (microcontrollers)
Java is kinda pita
?
for web dev javascript is a must
Ohhh
hmmm
it's very verbose
Like?
kinda need to figure it out
hmmm
I have a free course that teaches Java that's why
Hmmm
I think Imma sign up for that and try it out
I can always quit if I don't like it
Cya now
๐
Free courses wont help much, trust me. Iโve tried them, it sucks. But actually making a discord bot helps you learn stuff ๐
Anyways, I need help. Code & Error in sourcebin, Discord.js
Oh, I misspelled permissions on a command so it didnโt work ๐คฆโโ๏ธ tyty
Can someone help me with regex expression
I want to find all the text between <script id="NEXT_DATA" type=application/json"> all text here <script>
for real tho you should probably try an xml parser as the answer suggests
regex for XML is the worst thing in the world.
If it works, it works
no
The primary purpose of your code is readability and supportability.
I ain't writing code for some MNC, it's just a fun project
whether it works or not is LESS important. - Because if it makes sense, someone else can fix it.
.... and that someone else is often you.
public BigSoftConfigAgent() {
this.mProps = new Properties();
byte[] encryptKey = (new BigInteger("71f920fa275127a7b60fa4d4d41432a3", 16)).toByteArray();
this.cipher = new Cipher(encryptKey);
}
I just read this in some decompiled java .... it's amazing.
Hello Iโm trying to change Minecraftโs authentication server how do I do that?
So instead of giving the information to Mojang how can I change it to an alternative server?
What are you trying to do?
Why would you want to redirect it
afaik you cant really change how minecraft authenticates without altering the game code
Yeah.
And even if you could, after changing them, you wouldn't be able to connect to other servers, that wouldn't be using the same auth servers as you.
Can I just in the windows hosts file I redirect the auth.Minecraft.net to another ip?
What do you think would be a good way to review Java? I had Java 1, 2 and Data Structures but its been a while and I lost some notes due to a hard drive failure. I was thinking most of my time would be best spent reviewing Data Structures after quick OOP review?
If you're not taking a java exam.
Why not just create a java program
we cant really help you without you telling us your end goal
pleas use XPath or DOM or another xml parser
I just used beautiful soup, much easier and faster than anything else
do someone know how to control disks in python?
wdym
uhh,, got any idea how to ?
AMD today in a blog post announced several updates to the FidelityFX Super Resolution (FSR) technology, its performance enhancement rivaling NVIDIA DLSS, which lets gamers dial up performance with minimal loss to image quality. To begin with, the company released the source code of the technology to...
I'm not surprised Unreal will support FSR, but I am about Unity though
now let's see how well and bug free their implementation is
I doubt that Unity's DLSS implementation will be really production ready which they've been working on for quite some time now
Is there anyway to use KVM hardware acceleration in WSL 2?
CPU acceleration status: KVM requires a CPU that supports vmx or svm
So you want hardware acceleration in side of an hardware accelerated VM?
WSL 2 is basically a virtual machine.
https://habar10.itch.io/save-the-shelter
This is my first game jam and first game! It may seems a flappy bird clone, but it's a puzzle game. Find the right key for jumping bumping 
how can i make a function recursive with folders? like this:
glob.iglob(root_dir + '**/*.txt', recursive=True):
I would have a function to handel a directory and a function to handel a file. If it is a directory it calls the directory function. If it is a file then call the file function. The directory function would go through the contender of the directory and call the appropriate functions.
anyone able to give me some python help?
Ye
just ask yer question m8
@nocturne galleon how do you install dual boot service
whats that
ubuntu I think just lets you click โinstall alongside your osโ
yeah
and then you can choose how much space you want to give each os
After that i think every time you turn on the pc you can choose from the grub menu which os you want to boot
or select a different drive and booting from that drive will let you pick which os via grub
ive never tried dual booting before though
its really straight forward, no biggie
don't worry haha I managed to work out what my problem was
thank you tho ๐
glad to hear ๐
published a blog after a long time tday
https://dev.to/akionsight/imagine-using-spotify-nerding-out-episode-1-32f4
can anyone help with c++ converting int to string, 'to_string()' function not working. and my 'getline()' function is not working.
What's a good database for holding json documents and non json data together (like excel - one line has various non json data and json too)
Hi, i found this at stackoverflow and i will love that someone will explain me what going on in logic spec (not about syntax)
def list_files(root_path: str=os.getcwd()):
files_list=[]
for path, subdirs, files in os.walk(root_path):
for file_name in files:
files_list.append(os.path.join(path, file_name))
return files_list
DBs is not with tables?
How's to_string not working? Can you show your code as well as the error message?
mongoDB is a fully json database, that could be a good place to start
Did you read os.walk's documentation? https://docs.python.org/3/library/os.html?highlight=os walk#os.walk
os.walk returns 3-tuples of the current path, its subdirs and its files. For all files, the code extends it via os.path.join and therefore creates a list of all files, starting from root_path (or the current working directory, if the argument wasn't specified).
I would prefer a generator variant with yield, though, e.g.
def list_files(root_path: str=os.getcwd()):
for path, _, files in os.walk(root_path)
for file_name in files:
yield os.path.join(path, file_name)
Or a single comprehension:
def list_files(root_path: str = os.getcwd()):
"""Return an iterator that yields all file paths, starting in root_path."""
return (
os.path.join(path, file)
for path, _, files in os.walk(root_path)
for file in files
)
@fallen gulch do you have the right library #include d
you have to do that in c a lot of the time to get certain commands - and I think itโs the same in c++
I need to stream on the desktop browser mkv files with nginx how can I do that?
I know, I want to know how its work not only in python
What do you mean by "how its work"? How os.walk() works internally?
There's nothing recursive in your given snippet, and os.walk isn't necessarily recursive. It may use a stack or a queue, for all we know. Also, recursive functions may not be costly, depending on the programming language, especially if the function is tail recursive.
Oh ok thanks
In case you want to test it yourself:
import os
import collections
from typing import Iterator
def walk_recursive(root_path: str=os.getcwd()) -> Iterator[str]:
with os.scandir(root_path) as it:
for entry in it:
if entry.is_dir(follow_symlinks=False):
for subcall_path in walk_recursive(entry.path):
yield subcall_path
else:
yield entry.path
def walk_iterative(root_path: str=os.getcwd()) -> Iterator[str]:
stack = collections.deque()
stack.append(root_path)
while stack:
current = stack.pop()
for entry in os.scandir(current):
if entry.is_dir(follow_symlinks=False):
stack.append(entry.path)
else:
yield entry.path
def force_generator(gen: Iterator[str]):
for _ in gen:
pass
if __name__ == "__main__":
import timeit
test_path = "/tmp"
number = 100
funcs = {
"recursive": walk_recursive,
"iterative": walk_iterative,
"os.walk": os.walk
}
for name, f in funcs.items():
print(f' {name:>9}: {timeit.timeit(lambda: f(test_path), number=number)}')
print(f'(forced) {name:>9}: {timeit.timeit(lambda: force_generator(f(test_path)), number=number)}')
There should be almost no difference between walk_iterative and walk_recursive. Both yield the same files as the previous code, but using the more low-level os.scandir. You can compare them to see how a stack can make a recursive function iterative. Note that the order differs, but that could get changed (but also depends on os.scandir).
So I'm trying to follow an online guide and have used this notebook: https://colab.research.google.com/drive/1dXj-hRUqukVQsLGJiv39fv0X8oNE-cqj?usp=sharing and here is the csv file I'm using to finetune it: https://drive.google.com/file/d/1-Ji_j5xRzg5gwP32cOQd7y0NxVrw4D09/view?usp=sharing
However, I get this traceback when executing the training:
Traceback (most recent call last)
<ipython-input-24-523c0d2a27d3> in <module>()
----> 1 main(trn_df, val_df)
10 frames
<ipython-input-18-aa20b6fc78bc> in main(df_trn, df_val)
61 # Training
62 if args.do_train:
---> 63 train_dataset = load_and_cache_examples(args, tokenizer, df_trn, df_val, evaluate=False)
64
65 global_step, tr_loss = train(args, train_dataset, model, tokenizer)
<ipython-input-16-67f62bb60333> in load_and_cache_examples(args, tokenizer, df_trn, df_val, evaluate)
2
3 def load_and_cache_examples(args, tokenizer, df_trn, df_val, evaluate=False):
----> 4 return ConversationDataset(tokenizer, args, df_val if evaluate else df_trn)
5
6
<ipython-input-23-87cf4adc3093> in __init__(self, tokenizer, args, df, block_size)
29 self.examples = []
30 for _, row in df.iterrows():
---> 31 conv = construct_conv(row, tokenizer)
32 self.examples.append(conv)
33
<ipython-input-23-87cf4adc3093> in construct_conv(row, tokenizer, eos)
6 print(row.tolist())
7 print(type((row.tolist())))
----> 8 conv = [tokenizer.encode(x) + [tokenizer.eos_token_id] for x in row.tolist()]
9 conv.reverse()
10 return flatten(list(conv))
<ipython-input-23-87cf4adc3093> in <listcomp>(.0)
6 print(row.tolist())
7 print(type((row.tolist())))
----> 8 conv = [tokenizer.encode(x) + [tokenizer.eos_token_id] for x in row.tolist()]
9 conv.reverse()
10 return flatten(list(conv))
TypeError: TextEncodeInput must be Union[TextInputSequence, Tuple[InputSequence, InputSequence]]
Does anyone know why?
thanks
Seems like df_trn isn't in the right format. Did you evaluate df with your new CSV values? That's missing from the traceback. Probably something like pd.read_csv("/path/to/your/file")
Thats done earlier in the code and then I split it so the model can be trained
What's df_trn.ndim's value?
to_string error.
yes. i even copied code online that uses the function but it did not work.
Hm. That looks like QtCreators older design, which indicates an older variant of both Qt and GCC. Which GCC version do you use?
Can you check whether the following function creates an error?
void foo(const std::string& bar) {
auto quux = bar;
}
If auto doesn't work, than either your compiler is too old for C++11, or it needs special settings. You might have to add c++11 to your CONFIG values in your .pro file, IIRC.
By the way, using namespace std is discouraged, see https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice, especially in header files.
most university lecturers teach students to use using namespace std in their classes and for assignments
unless you're sure that their lecturers are fine with the change, don't ask them to change it if it's obvious that it was an assignment (as seen in the window title)
some lecturer might even deduct marks if students don't follow exactly as taught, for example
_ _
if it was not assignment, why are you still doing using namespace std in this era?
I didn't ask for a change but only noted that it's discouraged in general. Whether that suggestion is applicable in their specific context is up to them. ๐คท
(Also up to whether the assignment had stuff like "only change between lines X and Y" and other similar statements)
Oof. Just found a nice exploit in some code written by my predecessor. It allows an attacker to pass in a url containing a parameter that then gets executed on the page. Big oof.
Thats how I got root access to my ISPs router
So there was already an ai autocomplete for programming?
first commit was october 2018 so yeah ๐
only complaint i have is you cant describe a function in comments and you have to pay $12 a month for more than one line suggestions
this is so complex i may spontaneously combust
hmm?
does anyone here use webstorm
I use IntelliJ for my web projects xD
trying to make a new project in webstorm and it doesnt show java on the left panel
Webstorm is for Frontend Development afaik. But as Java is Backend, I think you'd need to use IntelliJ for that...
You can check the Marketplace and see if there's a Java extension for Webstorm tho
i have intelliJ to and am having same problem here, i cant find console tab
That's curious... In IntelliJ, there should be an option for Java. And then there should be a tab for the Terminal/Console...
oh yeah i see java option on this one, i see the terminal, but it doesnt output
Weird...
eclipse works, using that for now atleast
i have a question
i got a "program" (idk if it even is a program) can i turn that into a exe file
so i can just open it and use it
I'm honestly more familiar with JavaScript and the sorts. I only really got into Java thanks to my current job where we mostly develop Spring Applications hosted in Docker, so I can't really help you with that ^^"
ah np
Turn java into just a plain executable?
yeah, i kind of did it using launch4j
It's def possible just defeats the purpose of java
wdym
One goal of java is to have one file for multiple platforms
For it to be cross platform basically
ah, for now i just wanted a exe, just testing stuff out
So I've got a conversational model posted on huggingface and a discord bot which acts as a chatbot and makes requests. However, the API to huggingface is constantly unreliable and goes down. Is there any way to fix this (or put the model somewhere else)?
So the model constantly goes down and needs to be restarted
Learn git first
Learn how to use Git and Github ๐๐ฑ in this interactive tutorial by sending a pull request to this repo in exchange for a free AngularFirebase sticker ๐ฅhttps://github.com/codediodeio/gimmie-sticker
One thing that is outdated is that you want to use ssh keys and ssh instead of https auth
Heyy! Quick question regarding web programming, so basically i want to add webpage theme. Btw Im using ghost website for the theme. I downloaded the files but not sure how to add on the webpage. If anyone knows how to deal with it so pls do let me know. And pls consider tag.๐
im just a starter so dont judge me ๐
you canโt just run it using the java compiler
seems like itd be easier than converting it to exe
well there are ways to convert java to native code but yeah it usually isnt worth it
ik vsc lets you just click a button and itโll pop up a terminal and run it for you
i assume eclipse has something to that effect
from what ive seen if you just install java it sets the file association and runs the jvm automatically
i can make it into a jar file
thats all you need
but when i run it nothing happens
its possible more advanced setup is required for the jar to run correctly
when an ide makes a jar file it usually isnt self-sufficient
you need to specifically set it to release mode
most likely, i looked up on stackoverflow (an old thread) said that i might have outdated jre/jdk
does your jar file have a file type of "Executable Jar File"
if it does then try running it from cmd and see if that works
if it doesnt then you need to install java
javac โversion
run that in the command line
if it doesnt work you need to install jdk
^
how do i run the jar file from cmd again?
try navigating to the directory in cmd then run java -jar <jar name here>
whats the difference between a jar and a regular .java file
java files are uncompiled
they're like .cpp files
they're compiled into .class files then linked into a .jar
similar to C++ .o -> .exe
so like c:\user\name\download\java -jar <the name of the file
we never used .jar s in the class i took
but it was intro level
are you in the directory in cmd
using the cd commands
iam in c:\users\name
yeah it created .class files when we compiled the .java programs
but not a .jar
maybe i was wrong java might just use class files and jar is only for distribution
that sounds more correct
jar might contain multiple programs in one
especially since java likes to use different files for different classes
would make sense
yeah
A Jar file is an Zip archive containing one or multilple java class files. This makes the usage of libraries (consisting of multiple classes) more handy. Directories and Jar files are added to the classpath and available to the ClassLoader at runtime to find particular classes inside of it.
yep
it would seem your jar was not assembled correctly
hmmm seems like something in the actual program is the problem
ah
this is before the main function is executed
it doesnt even know where the main function is
you will probably need to use something like maven to create an executable jar file
the setup process is complicated tho
is there a reason you want to execute this code outside of an ide?
nope just seeing if i can
you need to know that you want to do so at the start of a project
ah
trying to shoehorn in executable functionality isnt really an easy or practical thing to do in java
i see, its fine tho nothing important anyways
i only have 1 file in the whole project thing
like only 1 .java file
well it seems that youre currently learning so you shouldnt have to deal with this for a while
np
hey guys, I would anyone be able to help me with trying to make a powershell script as I have a very basic understanding of that im trying to do
it can be pretty much summed up by this reddit post https://www.reddit.com/r/mountandblade/comments/g0korl/how_to_easily_unblock_all_mod_files_without_the/
I know its pretty easy to just put it into powershell but i want to try to make it a 1 or 2 step process
3 votes and 2 comments so far on Reddit
Ok nevermind, I worked it out through some googling
Hi. I hardly use this server. But I need help with linux. Does anyone know any distro that runs visual studio, not visual studio code but visual studio specifically .net, and SQL server?
Any help is appreciated
Afaik there is no distro which would run Visual Studio, as it's relies heavily on some old windows stuff.
if you really wanted you could try to use wine but id only give that a 25% chance that it starts up at all, ignoring all programming functionality
.NET and SQL is pretty well-supported by vsc tho
Okay, this could be a reach but any SDE or SWE here with experience in system design interview questions?
I'm new grad, have a final round interview coming up in few days. They generally ask this specific question in system design round (as per glassdoor review).
"Describe how you would build an application for class and schedule management at a university."
Now I can design HLD for this but not sure how to approach if asked to create LLD for this question.
ok i am abit new to pytouch but how would u use https://github.com/lucidrains/charformer-pytorch
from charformer_pytorch import GBST
import torch
import torch.nn as nn
btyes_max = 266
def stringToTensor(string):
byte = string.encode('utf-8')
tensor = torch.tensor(list(byte))
return tensor , torch.ones(1, btyes_max).bool()
tokens, mask = stringToTensor("hhhhhhhhhhh")
tokenizer = GBST(
num_tokens = btyes_max, # number of tokens, should be 256 for byte encoding (+ 1 special token for padding in this example)
dim = 512, # dimension of token and intra-block positional embedding
max_block_size = 4, # maximum block size
downsample_factor = 4, # the final downsample factor by which the sequence length will decrease by
score_consensus_attn = True # whether to do the cheap score consensus (aka attention) as in eq. 5 in the paper
)
tokens, mask = tokenizer(tokens, mask = mask)
dont worry found it
Sure it's worth a shot
The design is very intuitive
The design:
Well it is coded with Microsoft Visual Basic 5.0 designed for Pre Windows Vista
For some reason, the older Languages that were not made for Modern Operating Systems are easier for me to understand than anything Modern..
Exept Python, Python is pretty easy.
I can add Images to the Application
Okay #development is inactive as heck lol
What do you consider "modern"?
Most languages post 2005-2012
This one i am working with right now is from the 90's
Meanwhile me, who started coding in a larger capacity using C#, prefers NodeJS over everything lol
I started Programming with Batch
And then i started with Virtual Base Script
Then Python
Then ASIC 5.0 to make DOS Programs
Now Microsoft Virtual Basic 5.0
Virtual Basic 5.0 is actually uses VBScript and VBA
Don't get me wrong, I see the benefits of other languages, I mean, there's a reason I'm mostly doing Java + Spring at work (and here and there C++ on the legacy software). But it doesn't change the fact that I feel most comfortable in NodeJS and thus, most of my recent personal projects have been written in Node. For example my Discord Bot, pure NodeJS with discord.js as the main library
Damn
You can test the Bot on my server, i want to rework my own server a little
I can also make you a quick Windows App that Allows The Discord Developer Portal to be opened quickly
I just realized that i had VMware running the Entire time
This is as 98 as a (Special) Development Kit can be.
but i mean

Requires Chrome ๐ค ? If there is a start (CMD) equivalent in VB, then you could use the default browser.
It is running start from CMD
wait
bruh lemme remove the part where is says chrome
Then Chrome isn't required, start https://reddit.com will work fine ๐
Thanks dude.
You're welcome. Let's see whether I can find a workaround for Discord too...
Nah, Discord always listens on localhost in order to capture discord.gg/?... invites or similar.
Well i entered %localappdata%/Discord/discord.exe in EXE = ""
That will work too.
No i think its Update.exe to run Discord
Thanks, but I have my own 2 servers. One being the public one where the main bot runs and then a second one where just me and the bot are in for testing. (have a second Bot account for testing too; can't take any chances)
But if Discord is already running, then you'd only want to bring it back to the foreground. There might be an API that one can use.
Running Update.exe when discord is running does litteraly nothing
Did you run it with additional arguments, e.g. Update.exe --processStart Discord.exe?
Check out deno
Well i added a "Open Explorer at Drive" Feature
"Turn off PC in <XY> minutes"
Okay ima write that in a VM first lol
Have a look at shutdown /? for the right command and arguments ๐
k
Best part of writing with Such a Old Language is that you can run the Applications on Older Windows Versions
Wait ill add a Shutdown Creator option that just runs shutdown -i and opens the Shutdown menu
Perfect
*laughs in LISP*
Whats LISP
Oh
"Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today."
A family of programming languages that dates back to the late 50s.
Excuse me
Yeah.
Either way, I mostly use Emacs' Lisp variant to configure the aforementioned editor.
I'm not really writing new software with Lisp ๐
I write software mostly with Virtual Basic, Python and ASIC 5.0 since their Old and Easy to understand... Mostly...
ASIC is pretty complicated in the Advanced stuff
And also is for DOS so a bit Crappy to use
COBOL: aka the Programming Language of the Dinosaurs and Banks
ยฐฬฌยฐ just made this myself
Hi everyone, I decided to test the difference between .NET Core and .NET Framework (also comparing 3.0 LTS with 5.0), I created a basic app with the same XAML between all and built for release, only the Framework exec seems to be able to run without any of the other files included in its build folder, and it's significantly smaller, how come?
I guess it is the Compiler
Meanwhile at Janlu HQ
what is the other files in folder? My guess is that framework.exe requires external dependencies to be installed, that is why it works alone. Dotnetcore caries all dependencies, so it wouldn't matter what is installed.
Except itโs the framework.exe that DOESNT need any additional files, core.exe DOES, it wonโt run unless I get the extra dlls with it, I wouldโve thought with 10x the application size that it would be the one that didnโt need dependencies but apparently it does
What i meant is that you have all the dependencies installed when you installed .NET Framework. Thats why it looks that framework.exe doesn't need any additional files. CORE frameworks by design are a lot more lean and a lot of libraries comes as NuGet packages. Thats why you have all those extra dlls
Technically you can build Core app in such a way, that there is only one output file.
hey peoples, I want to write a quick util over the weekend in to a node app that uses Facebook/Gmail oauth - anyone wanna recommend any npm packages (or anything else) that I can investigate to implement so I don't have too much overhead to implement myself?
There should be plenty of OAuth packages available on NPM. Other then that, OAuth2 is pretty easy to understand and implenet, so I don't quite see a reason why adding an external package for i-... Oh wait, we're talking about the same group of devs that use a seperate package for isOdd and isEven, one of which has the other as a dependency...
One day I want the opportunity to do
var fb = require('fizzbuzz');
fb();
I mean, something like that already exists for certain APIs. Take Discord for example. You can write a Discord bot pretty easily using discord.js. That's also what my Discord Bot is using.
But writing these "interfaces" for something as mundane and generalized as an OAuth API, is rather pointless tbh. It's literally one request to get the Token, and you'd just submit that Token with every subsequent request...
Well for learning purposes maybe it would make sense?
Hey, does anyone know a datatype that I can use in js (using react) that can handle >200 digits?
BigInt
use this ```js
import'https://raw.githubusercontent.com/[url]/[file]'
or you can just activate github pages and then load the file from actual generated website
im using code and the repos just not connected to the IDE there is away to download .vsix file from Microsoft?
I joined lowrezjam, here's what I did on the first day https://twitter.com/TimKrief/status/1421904075566850053
#LowRezJam started today! I'm going for a pet sim, here's what I made today ๐ #GodotEngine #gamedev https://t.co/aQGRcbBLRC
what are those
๐ฎ
programing languages

ok just stfu run the program
yea
Mayhaps...
hi um im pretty used to coding but im creating a github project for the first time in my life
could someone explain what the file structure is, and why it is like that? im new to git as well
like... does README.md have to be capitalised? whats .gitignore? please give a basic introduction as to what my code folder should contain before i put it up on github so that stuff wont mess up
Learn how to use Git and Github ๐๐ฑ in this interactive tutorial by sending a pull request to this repo in exchange for a free AngularFirebase sticker ๐ฅhttps://github.com/codediodeio/gimmie-sticker
super helpful thank you
Dear apple, eat an entire bag of dicks
turns out that from the browser, you cannot access unfiltered audio, but also the api doesn't even have capability to turn it off because it assumes the audio comes in unfiltered, because WHY WOULD YOU DO THAT
why does it crash
try {
clipNameAIS = AudioSystem.getAudioInputStream(getClass().getResourceAsStream("gas.wav"));
clipNameClip = AudioSystem.getClip();
clipNameClip.open(clipNameAIS);
}
catch(Exception e) {
System.out.println("Failure to load sound");
}
clipNameClip.setFramePosition(0);
clipNameClip.start();```
if an exception occurs within the try catch it will print a message but still try to set the frame position and start. This likely causes an exception since the clip is not set correctly.
do you have a stacktrace? that would make debugging it a lot easier
how to use <div> tags to divide a page something like this:
could someone refer me to good <div> documentation?
My first instinct would be to use display: flex, but I don't know of the top of my mind as to how to make each div stretch half the width
hth
I wrote a program in python to solve sudoku puzzles what do you guys think of it https://github.com/HiddenSquid321/SudokuSolver
display: inline; width: 50%
I've been using wayland enough to just hate it really bad.
why?
it's pretty damn good when it works
it's just when it doesn't...
on intel integrated, on my laptops works really well
just on nvidia, all sorts of bugs
Can't use zoom, discord, all electron based app, even the chrome it self doesn't work properly even though they already had webrtc plugin with pipewire. It's stress me out for months or even a year actually
Wut, I've had not issues like that
I also used to developing private gnome extension, but wayland doesnt allow gnome to restart
What distro?
I'm using ubuntu 21.04
Huh
Gnome?
yep
Huh, I'm running kde, and I had no issues with apps
And Wayland is so much snappier
yeah, I wish I had time to switch to kde based, but I have no time migrating everything
Yeah everyone has their preferences
snap is crap but flatpak is way better I think
I hate how heavy it is
so
<styles>
,myClass
display: inline;
width: 50%;
</styles>
<div class = "myClass">
</div>
like this?
Nothing about that sample is valid.
<style>
.myClass {
display: inline;
width: 50%;
}
</style>
Sorry? I'm used to java and c++ legit just made my first webpage yesterday
Thank you anyways
<styles> is not a thing. <style> is.
And the structure of your class definition is uhh... rather syntactically random.
Check out a stage I made for the upcoming Snap the Sentinel update https://ko-fi.com/post/Snap-the-Sentinel-Crystal-Excavation-N4N35LEAO
I made an algorithm to randomly combine body parts and select colors and shape to create random little pets ๐ ! https://fxtwitter.com/TimKrief/status/1423107307576172548
okay thank you for the tips ill keep that in mind
is it fine if i pm you in the future about html doubts?
<!-- in your <head> -->
<style>
.outer { display: flex; flex-direction: row; }
.outer > div { width: 45%; border: 1px solid black; margin: 1%; }
</style>
<!-- in your <body> -->
<div class="outer">
<div>Left</div>
<div>Right</div>
</div>
You'd need inline-block, not inline. width cannot be applied on inline elements, as inline elements don't introduce a block. Even then, you'd need some value slightly smaller than 50% in most browsers, as otherwise some hidding margin/padding will force the block to flow into the next line. (Unless you reset the margins/paddings to 0, like most frameworks do)
The padding and border are usually the greater problem, though, but that's manageable via box-sizing: border-box.
Cool! Did you use GDScript? Or did you use one of the other bindings for those?
padding is internal. It's still considered part of the object width. margin is not, which is just silly.
"hey, I have a box which is 100px wide". "So I only need 100px of space to show it?" "Well... maybe".
padding is not part of the width in CSS default box model, though.
width + padding + border + margin = total size. Unless you use box-sizing: border-box, then it's width + margin.
Although margins can collapse, which makes it a tad harder to work with.
oh am I thinking the other way...
so basically, it's stupid.
it's been a long time since I had to deal with that kind of thing... fortunately.
Either way: don't expect your site to be 100% the same on any device and you're golden.
If you really want to have the exact same experience on any device, provide a PDF (with embedded fonts).
Gdscript ๐,
I optimized my code and it can niw run at 144fps on medium hardware
honestly don't expect it to be the same on the same device
voicemeeter.remote(kind_id, delay=0.015)
Factory function for remotes. delay specifies a cooldown time after every command in seconds. Returns a VMRemote based on the kind_id.
Use it with a context manager
all caps rant got removed - the default delay is fucking 30ms
not zero.
why the hell would you put a delay on your API call. just... do wtf I asked, and let me do stuff
I wanna ask in python is there a way to preserve timestamps when copying files over on windows
oh hey, guys, i wanna learn java, so any suggestions for books?
try codecademy or something thats pretty good for getting started
E
Actually yes. The OCP books are actually quite good, and I can highly recommend "Concurrent Programming in Java" (Lea)
ISBN-13: 978-0201310092 ... holy crap it's over 20 years old!
When I did the OCA/OCP Java 8 exams I did nothing but read these two over once then sit the exam in like the space of a week.
I think it was something like Start reading on Saturday, sit the OCA exam on Wednesday, and for the OCP exam I think I did it the following Friday?
This was the other one I was trying to recall the name of which I'd recommend.
If you're German, you can get the book "Java ist auch eine Insel" (Java is also an island). It's like the German Java Bible so to say...
Anyone has an answer for this
prototype declare
Yo, people here know Java?
a normal text editor can read .txt just like .c .py etc because theyre encoded in utf 8 regardless of the extension right?
yeah .c and .py and .java etc files will open in any text editor
what's java
aight just wanted to confirm
It's a language, like English.
What country
Okay, can you give me a program question where Function Overloading would be useful?
I learnt what it is, how to use it, and stuff-
Now I need a question which I can try to solve using Function Overloading.
I used it in an Area program, any other example like this?
columbia
Hi, I'm wondering if there's a way to get data from my own Facebook page? An example of the data I want would be post reaches, interacts, etc. of EACH individual posts. Is it possible?
Should be possible with some form of web scraping, although a better solution to look for would be to see if Facebook has an api for such thing. . .
yo. i am thinking about getting into mobile and ui dev. And I was wondering if there is anyone here who has used flutter and can recommend for or against it. Or maybe if you have used another application and can recommend it to me I would appreciate it. Thanks
I've used it a little before. I've found if you want to create a basic app, flutter is quite easy to use, however if you are willing to learn a lot, I'd say React Native is a bit better. That being said, this was my experience from over a year ago. Things may be different now, or others may have different experiences
depending on what device you have i strongly recommend SwiftUI on iOS or Jetpack Compose on Android
if you dont care too much about cross-platform portability
iOS is basically the worst thing ever, and I want to stab myself in the eye
but for the moment, I'm working on this interface app, and the MS reference docs for the runtime API are really quite good
C:\Users\Matt\Google Drive\code\xtouchinterface>python nowplayingtest.py
Spotify.exe
{'album_artist': 'The Living End', 'album_title': 'The Living End', 'album_track_count': 0, 'artist': 'The Living End', 'genres': [], 'playback_type': 1, 'subtitle': '', 'thumbnail': <_winrt_Windows_Storage_Streams.IRandomAccessStreamReference object at 0x0000028CF1823310>, 'title': 'Prisoner of Society', 'track_number': 1}
foobar2000.exe
{'album_artist': '', 'album_title': '', 'album_track_count': 0, 'artist': 'Master Blaster', 'genres': [], 'playback_type': 1, 'subtitle': '', 'thumbnail': None, 'title': 'Come Clean (No Shouts Electro Mix)', 'track_number': 0}
chrome.exe
{'album_artist': '', 'album_title': '', 'album_track_count': 0, 'artist': 'the_kovic', 'genres': [], 'playback_type': 1, 'subtitle': '', 'thumbnail': <_winrt_Windows_Storage_Streams.IRandomAccessStreamReference object at 0x0000028CF1823470>, 'title': 'DOOM Eternal OST Remix (Remastered Soundtrack)', 'track_number': 0}
I am a winrar!
blahhhhhhhh
chrome doesn't let you change position with winrt, only play/pause as far as I can see
works perfectly with spotify
not sure if you're talking about end-user experience or programmer experience, but for the latter case I've loved working with SwiftUI recently. The end-user experience is more subjective so idk.
if you are working within what apple wants you do to, it's pretty good. If you try to take any step outside what they think is the right thing - it becomes obscenely difficult.
The microphone feed provided in webrtc is a processed feed, regardless of options. On every other system ever, you ask for audio, you get audio - if you want processing, you have to do it or ask for it. What this means in reality is that if you are trying to do music over webrtc (in a conference - the behaviour is different if it is purely playback) is that the gain control / frequency limiting applies and changes the sound during the conference. It also does NOT support stereo, and will cause horrific feedback if it's enabled.
ill be honest ive never worked with audio on any platform, but that doesnt sound fun
File "C:\Users\Matt\Google Drive\code\xtouchinterface\windows_rt_media.py", line 137, in prev
await session
TypeError: object _winrt_Windows_Media_Control.GlobalSystemMediaTransportControlsSession can't be used in 'await' expression
lol. cause of error: looks like I just got bored and didn't finish typing out the rest of the code for that function
Interestingly enough, winrt doesn't expose the volume of a media player. Also, chrome winrt does play/pause, and information, that's it
so cargo will just compile and link all rs files in a src directory? its not like make and gcc where you have to specify which files to compile?
Don't suppose anyone has any recent salary data for Atlassian or Canva for SE4/SSE/Tech Lead positions?
$105K/yr-180K/yr
Senior Software Engineer being the Second #, Senior Support Engineer being the first # since I didnt know which one you meant with "SSE"
