#development
1 messages · Page 49 of 1
hmmm, doesn't seem to work
it's weird because right above it I'm accessing the count of ListBox.Items.Count and assigning it to an int without problems
Maybe if I define new variables in the global scope and adjust their value just before calling the new thread
Anyone know how i can make this generic C# repository function work?
public void Update(T entity)
{
_collection.ReplaceOne(new BsonDocument("_id", entity._id), entity, new ReplaceOptions { IsUpsert = true })
}
entity can be anything, however it will always have a _id property
Not specifically sure the terms for it in C#, but you probably have to restrict T to be a sub-type that is guaranteed to have a _id property
or if property inheritance is weird in C#, just make it have a method called id() that the subtype can overload
That seems a little complicated. Im just going to add another parameter and use that instead of the property
T could be 4 different classes
It's really not that complicated with OO
you just make those 4 classes inherit/implement one base class/interface
For example:
interface BsonEntity {
public String id();
}
class SomethingElse implements BsonEntity {
public String id() { //do whatever }
}
public void Update(BsonEntity entity) {
_collection.ReplaceOne(new BsonDocument("_id", entity.id()), entity, new ReplaceOptions { IsUpsert = true })
}
There's a java equivalent
ah yes. that makes sense. trying it now.
been thrown into the deep end with my project really. been an apprentice for 6 months and they are expecting me to know about generic classes and microservice architecture
thank you, it works 🙂
Maybe if I define new variables in the global scope and adjust their value just before calling the new thread
That worked
Anyone here tried cloud hosting a personal vpn solution?
what does that even mean. like installing a VPN on a VPS?
@buoyant oxide google google outline
@last ingot
trying to weigh all open source solutions like outline , wireguard and a few github repos i found. Outline seems to have a modern UI and multi platform client.
@last ingot Thanks for the suggestion
what about it?
what are the domains you need to block?
I mean really there's a reason why pihole doesn't block youtube ads
I mean you're missing a t
in your regex
and then 5hnedn7z doesn't match your vgqs
like your sample regex and the domain
it doesn't match because it doesn't match...
also the dots need to be escaped
since . is any char in regex
I mean regardless the trick to youtube is that they generate tons of random subdomains for ads and content
so that you can't block it efficiently 😄
like I said there's not even vgqs in your sample ad domain
what's a sample valid domain?
and you know which are which?
which are ads
and which are not
I'd go check with /r/pihole and what not
from what I understand it's not that feasible to block youtube ads via dns alone
they block at the html element level usually
or rather in addition to
also try ublock origin instead of ABP 😉
is there a server with one hundred thousand users about kernels and Windows DLLs?
i notice this in not even populated about it
anyone here dabble in golang?
anyone a C programmer lol
Rust programmer, Rust Analyzer, Rustacean
Does anyone want to help me with some garbled code
anyone a C programmer lol
@golden mural same haha
I have a semi-reverse engineered version of Ryzen Master's Device.DLL
Just over 70k lines of C
valid
I mean
It's fricken Ryzen Master
wait
Why am I not just compiling this and running it
like I only am looking at pulling one function out
@golden mural I am not one by trade but I have been working in c a lot recently
hey so I started writing code in my main branch that was meant for a seperate one, is there a way I can transfer my stuff to said new branch?
oh cool
also, I'm trying to create the ability for my c# program to be able to check for and install updates for itself but I'm not sure how to do it, like it would have to delete its own file whilst running and I'm pretty sure windows would error saying "the file is open in another program" or something
Someone else might be able to help you--I'm not particularly familiar with updating apps/deploying desktop apps, almost all of my work is in server-side
thats ok, but thanks for your help anyway
a lot of programs just run a separate installer to update. or separate updater program to do so
also learning to use git efficiently will go a long way for source control. maybe read http://think-like-a-git.net/ if you haven't already learned it
I'll check that out thanks
when I have my program update by downloading the new version and replacing the old one, do i need to update some kind of manifest windows uses to know what to remove when uninstalling?
or is that only when adding/removing extra files to the install
eeh that looks really confusing
an updater is really not easy heh
sometimes microsoft documentation can be less than helpful, like its informative, but for someone like me who learns as i go it isnt as tutoring as a blog or something
I'll just make a super basic thing and pray it works
I mean realistically you're not going to be distributing your software anyhow since it costs money to sign it
I hear electron apps have magic install and updaters
well no im not putting it somewhere for 10000 people to download
but I am distributing it to a few people and dont want them to have to manually download the new version, uninstall the old one and install the new one. not to mention one of the main reasons this program exists is so I can learn how to do this stuff
please don't use click once -- use squirrel https://github.com/Squirrel/Squirrel.Windows
Just give them a zip file lmao
And if you want you can have an in app notification saying there's a new version
if I'm going to the trouble of having a notification i might as well make the entire thing update in-app
and sorry but a zip file is irrelevant because as I've stated, this project is so I can learn how it works.
Programmable Bluetooth Controller or Raz Pi 4 PCB and a hacked up Joy Con thoughts?
Thinking about making a Pokemon Egg Hatching Bot
Reason for AI involvement is to make it programmable in a way that the AI can read key word data from the given screen dump, determine if the word is egg, do an action.. at the Breeder OR continue some other action. (likely go back to riding your bike in a circle and checking for hatched)
Check for NON EGG names, in the party.. *this could be pokemon name or anything which is not simply EGG) every so often and if found do a loop to move them too any free box.
Once in a while do a Loop down the party frame for key words egg and no egg is found go back to the breeder and check for a egg.
You get the concept from this.
AI could potentially handle the timing through learning using some basic loops to check down the party frame image for key words, and bascially a set of macro like inputs for going between the breeder NPC and running off a little to cycle around and hatch.
Using the starting point directly in front of the Breeder program macro using real player inputs and then its fine tune that and program the AI up to read dumped screenshots or screen read so to speak for key words.```
@last ingot there isn't a good alternative to git. Ideally source control would work more seamlessly rather than having someone understand graph theory in the worst case
Git is kinda awful
There’s so much that could be done to make the CLI actually, like, user friendly
I watch people new to it struggle to learn it when they're trying to just learn how to fix some simple bugs
it gets in their way more than not
Yeah 100%
I feel like most experienced git users can’t even do what should be relatively easy, conceptually, from memory, but is convoluted with Git
stuff like rebasing a commit to a different branch, fixing branch head sync issues
lol
yep, I have a plethora of git commands in a text file I keep handy
the random repack errors drive me nuts
haha sounds about right 😆
I've worked with teams that use the upstream master/user origin, PR across repos for changes + smash commits, and it causes so much hell syncing shit
I think I would be happier with a mono repo at work rather than the multi repo setup we have. but the tooling just isn't there for that to happen
Recognizing a tool has a lot of friction is not the same as not knowing how to use it 🙂
It's quite fallacious to claim that someone must not know something enough just because they dislike it
lol
I wouldn't say I don't know how to use git. In reality I've been using it for years
I'm still allowed to say it's awful. especially to new comers
👆
I would argue a steep learning curve is a significant negative to a collaboration tool
yeah, I've had to fix up people's branches before
it's not a pretty thing when they get stuck
Well then make a better tool
Again, a fallacious argument
Most people who use git know the basics, and have a saved google search for fixing screw ups
😄 I like this quote
but really the rest of the guide is good stuff. if you can understand git is applied graph theory then everything becomes easier. though it also means you need to understand graph theory lol
so I should just start teaching graph theory to the old people at my work who are now being thrown into git to track changes in documents
easy peasy
lol
sure they still sometimes message me about how to sign out of github desktop, but I'm sure they'll get graph theory
I don't know where you work but the old people in my office are fine at their jobs and learning new stuff
I work at a software company though lol
I mean, the reason they don't understand git is because they don't need to
yeah I agree with that one
99% of the time they can use it just fine without knowing exactly what it's doing
you shouldn't need to know as much about the source control as you need to know to use git
that's really my point
but that 1% of the time I get a meeting request and I can walk them through something in 5 minutes and all is well in the world
lol I see people amending commits when they're not supposed to and what not
and then of course gerrit vs github for code reviews becomes another problem
(I use both)
It would be really great if github desktop had better instructions and options to fix common mistakes
hmm yeah. I usually prefer git extensions but still has the knowledge
I do like the pull/rebase dialog in git extensions
has a pretty picture of what you're doing
merge commits vs rebases
pretty pictures are great
mmm love transparent images lol
lol the github model of working is a bit bizzare to me sometimes
branches vs forks I mean
I can understand the reason for forking though
that diagram is great but I feel like it only makes sense because I already knew everything
lmao
It needs some numbers to indicate order of operations
try to actually number the steps and cycles
yeah
but even then, it depends what you're doing
ie you need to fetch and merge master to local every now and again
and there's no conflict resolution
which is the other hell at times
especially when you use the wrong command 😄
you mean git checkout -b temp right? 😛
no checkout
I just mean create a pointer to LKG
and then do everything in your current branch
and if you screw up just reset to it
lol
lmao
then again I like reordering commits to squash stuff more sensibly sometimes
Here was the (well-intentioned!) advice from a GitHub maintainer of a project I’m working on (with apologies!):
1. Find the merge base between your branch and master: ‘git merge-base master yourbranch’
2. Assuming you’ve already committed your changes, rebased your commit onto the merge base, then create a new branch:
3. git rebase –onto <basecommit> HEAD~1 HEAD
4. git checkout -b my-new-branch
5. Checkout your ruggedisation branch, and remove the commit you just rebased: ‘git reset –hard HEAD~1’
6. Merge your new branch back into ruggedisation: ‘git merge my-new-branch’
7. Checkout master (‘git checkout master’), merge your new branch in (‘git merge my-new-branch’), and check it works when merged, then remove the merge (‘git reset –hard HEAD~1’).
8. Push your new branch (‘git push origin my-new-branch’) and log a pull request.
depends on the repo size since some of them I use ultimately just squash everything in at the end
This quote always kills me
lol
I mean that's the immediate drawback of using forks
vs branches
I mean branches within forks
Yeah
I can understand the forking for public repos though
Thee's definitely "simple models" of using Git that makes it relatively easy
yeah, we kept it simple for our internal repos
But as soon as you go past simple use, it becomes a pain in the ass
not too many people or too much traffic so everyone just branches
I kinda hope that one day I can experience mono repo hah
like a good mono repo experience vs everything is in the same repo and built together
I heard talk from some of my Google friends that they've moved to mono internally
I'm veryyy interested to see that
Theres one big project at my work that is basically a mono repo
it was very weird to me at first but it works pretty well
I mean do you have individual portions of it that are considered libraries?
not libraries per say but yes
like can you develop parts of the whole independently and then only at the time when you need to really consider the integration implications do you pay the cost
speed of the small repo but not the trade off of independent libraries is why I'm drawn to it
every branch is independent with some shared stuff although we don't automatically update that together, someone has to do it manually but it could be automated in the future
it's way easier to manage all the different things than 10 different repos
yeah taking a single snapshot of everything at once would be nice
whats the best way for microservices to request data from each other? messaging seems like a one-way communication. is it best to use rest apis?
That really depends on the data.
large json data to send to a website
Well, the data format is irrelevant. Try to explain your use case in a little more details.
Website -> API Gateway -> Services
The website requests data from a gateway. gateway communicates with service (rest or messaging etc). Service reads from database, parses it and the data returns back up the line.
Its a Purchase Order system
clients ring us saying they want to buy stuff. Staff enter it into the website and CRUD actions take place in the services to update the data and return new values
If you have any kind of API already in place, just use that. In the case of an internal tool, the delay is affordable. (Should be seconds at most, anyway) If not, some sort of post request should do the trick, you COULD make it REST compliant, but unless you are building more than that API function, I wouldn't bother.
still in the planning phase right now. first attempt of microservices
So none of the services actually exists yet?
but messaging is not the way to go in your opinion?
So none of the services actually exists yet?
not really, no
You could use a message queue service, but that's just one more service in your setup, and not really needed for simple things like this. Especially not when no queue will actually be needed. Last I used a message queue was for an asterisk server to pass data to a website, based on certain events (Eg. User entered data, call was answered by agent) The messages are quick to deliver, and if data is lost, it's no big deal. It's more important to process the calls as fast as possible, and when the message has been delivered to the queue, Asterisk can move and with more important things. 😉
The message queue could be the way to go, if you know already, that you might need to scale out, as you can have multiple processes listening to the same queue. In ActiveMQ messages are delivered round-robin, to listeners, other MQ servers might handle it differently. You can then have the messages be ack'ed when processed, and be redelivered to another processor if not ack'ed withing a set time.
and mixing communication methods is fine? like theres a service which emails a manager whenever new data is added. If this uses messaging, is it usually ok to include http too? Also, how would you return data usually? would this be a new queue with IDs?
wanting to follow most of the best practices for this
I usually uses whatever makes sense. 😉 Also if using a message queue, I would run ALL inter-service communications through the queue.
Need to make a manager? Send a message to the email service
New order? Send a message to the order processing service
What data? Send a request to the appropriate service through the queue, get a response back the same way.
I'm not entirely sure if all queues are unidirectional. I think I might have seen something that was bidirectional. But you could give each service a queue, and use them for communications.
The MQ would of cause be a SPoF, but you can plan for redundancy if needed.
No, one main MQ service.
With multiple queues/topics. (Different MQ servers and protocols uses different terminology, but it's kinda the same)
one last question, ive seen you mention activemq a lot. in your opinion, is this better than kafka and rabbit?
ActiveMQ just happens to be what I've used most recently. We have a RabbitMQ server running, but library availability in PHP and Python suggested using ActiveMQ. I have no preference for either. Never used Kafka. RabbitMQ and ActiveMQ are both easy to get up and running, securing ActiveMQ was a little more PITA than RabbitMQ, but it's all documented.
whats the best way for microservices to request data from each other? messaging seems like a one-way communication. is it best to use rest apis?
@obtuse night if it’s simple request response, use REST
If it’s more complex asynchronous tasks, use queues
If it’s 1->many broadcasting of data, use queues (Kafka)
Why kafka, over RabbitMQ or ActiveMQ? What benefits does kafka have the others don't?
A relatively high management overhead in the form of Zookeeper 😄
Can that be considered a benefit?
Apparently kafka uses it's own protocol for everything, instead of a more standard like AMQP or Stomp?
Can that be considered a benefit?
No, not at all. Kafka is actually quite useful if you are in need for a feature-rich and highly customizable queue system and have the capacity to manage it. I would qualify it as "enterprise-grade" and would reserve it for large-scale workloads.
Why kafka, over RabbitMQ or ActiveMQ? What benefits does kafka have the others don't?
@ashen sky The Kafka consumption model is extremely efficient (persistent append only log file, clients have a ptr to their position in the log)
So, especially when you're broadcasting data, this model works quite effectively, with low overhead
Also, the fact that the Kafka topic can be persisted allows you to do many things that are impossible with traditional message brokers--there are a lot of data structures you can model with a Kafka topic, you can even do SQL over it
Both RabbitMQ and ActiveMQ has persistence. I tried to look around, but can't find anything on my own. Does kafka support traditional protocols like Stomp and AMQP, or do you need to use a kafka only protocol?
Kafka has it's own protocol as far as I know
Both RabbitMQ and ActiveMQ has persistence.
I don't think either are designed to persist GBs of messages though? Correct me if I'm wrong
And in terms of performance, IIRC, Kafka >>>> alternatives
By like ridiculous amounts too, 1 Kafka node can do like 10x the throughput of a RabbitsMQ node
I don't think either are designed to persist GBs of messages though? Correct me if I'm wrong
@shy helm No, they seem to be mainly designed for a few KB of data.
By like ridiculous amounts too, 1 Kafka node can do like 10x the throughput of a RabbitsMQ node
@shy helm Which is nice, if you have a lot of messages, but that does not appear to be the case in this care. 😉
I haven't looked into the libraries available for kafka, but I suppose they are not much different from Stomp and AMQP libraries. The fact that it uses it's own protocol, however, makes it impossible to do in-place replacement of the message queue backend. While you can more or less switch between RabbitMQ and ActiveMQ with little to no changes to the application.
How can I run two batch files at startup in vsdev cmd?
By default it runs the vsdevcmd.bat file
I want it to run vcvarsall.bat as well. So I did something like
"....\Tools\VsDevCmd.bat & C:\Program Files (x86)....\vcvarsall.bat"
It cannot parse the second argument after C:\Program cause of the space
How do I solve this?
Put the path in quotes.
The whole thing? Like the way I've shown above? Or individually?
In other words, is it
"path/to/batch_file_1.bat & path/to/batch_file_2.bat"
Or
"path/to/batch_file_1.bat" & "path/to/batch_file_2.bat"
The second one doesn't work. I get a filename, dir name or vol label syntax is incorrect
Nevermind I got it 😁
can i make a list like
Bill
John
Mark
Jim
Name1
Name2```
and then i java read each line as 1 thing
and then i can use it to check if Bill or Mark is on the list
nvm
o.O
alright so i had to fix some other things
why wont list.contains("bill") work?
nvm
@cloud knot where tf do u find shit like that lol
@quiet tartan https://changelog.com/
blessing
Many API calls (code looks neater) vs a single API call (messier code)?
I have a microservice which is accessed by a API Gateway. This service needs to return 4 different shops' data. Is it best to bundle all these shops' data into a single response or call it multiple times from the API gateway? (no api limits and all local services).
I should add this is for a showcase project- not for production use
the question could be seen as readability or efficiency?
Well, from what I've done in the past, I'd say a single call would be better. Just break your code into multiple reusable functions, it will help your project a lot as you'll be able to extend your API endpoint with stuff like query filter and alike
Hi, I'm trying to create a reminder system in python with SQLite. The table has a start and end date as well as a frequency (in seconds), finally it has a next_reminder_time column. I'm trying to make it so that the next_reminder_time is updated by the frequency seconds
conn = sqlite3.connect(DB)
cur = conn.cursor()
cur.execute(query, ('+ ' + str(reminder["frequency_time"]) + " seconds", reminder['id'],))```
This results in next_reminder_time being set to null
I also tried
```query = "UPDATE reminders SET next_reminder_time = DATETIME('now', '+? seconds') WHERE id=?;"
conn = sqlite3.connect(DB)
cur = conn.cursor()
cur.execute(query, (reminder["frequency_time"], reminder['id'],))```
But I'm assuming in this case that the single quotes are overriding the ? placeholder.
The variable reminder is fetched from the database earlier in the code and has the existing frequency_time entry. I've checked and it has the correct value. Can anyone suggest a solution? Thanks.
Many API calls (code looks neater) vs a single API call (messier code)?
I have a microservice which is accessed by a API Gateway. This service needs to return 4 different shops' data. Is it best to bundle all these shops' data into a single response or call it multiple times from the API gateway? (no api limits and all local services).
I should add this is for a showcase project- not for production use
@obtuse night depends on the structure of the API itself
Generally I would go the multiple call route
Unless the device making the calls is an android device, they have shit pipelining
so I didnt realise that I use [] instead of () when trying to append a byte to an array
but instead of giving a clear error message like "use of [] not expected" or something
I get this
looks clear to me, you're trying to apply indexing with [] to a method :)

initialize class org.codehaus.groovy.reflection.ReflectionCache anyone know a fix?
a saw a github post that doesn't look good
Could not initialize class org.codehaus.groovy.reflection.ReflectionCache oops full error
nvm
@nocturne galleon I think you have two errors saying
- I can’t do that, I am the wrong variable type
- You put a thing here so I am a sentence fragment or misplaced value
So you are sort of right but instead of confusing the computer with your grammar, you are confusing it with illegal clauses.
‘Method groups’ are weird.
This is a pack i made for a modification of GTA 5 know as FiveM. https://gtapolicemods.com/index.php?/files/file/1337-blaine-county-sheriff-office-pack-texturelivery/
How commonplace is .NET
I just started making a calculator app and accidentally put two / buttons and no EXE button. 🤦♂️
Our updated voxel pipeline which is powered by 3970x and Houdini in Unreal Engine.
https://youtu.be/nAHNqpRDJF0
Blades over the Horizon is an upcoming action-adventure game set in the vast and ever mysterious blue sea.
Interested in learning more about this game's development? Come join our community!
https://discord.gg/BotH
any script to reverse youtube translation on titles/descriptions? It's really annoying and the script from github is really buggy, sometimes it leaves old titles on referenced videos and during livestreams it copies the description multiple times https://github.com/pcouy/YoutubeAutotranslateCanceler
I haven't ever seen auto translated titles o.o
Go play a game I made in your browser: https://oberzine.itch.io/dont-panic-corona-virus
No.
you guys want to see something painful? lol
Anyone who knows about SignalR, what does the Negotiation do? Everything works without it, and running an API on docker using SignalR doesnt allow negotiation so im wondering what i'm missing out on by not having it
does anyone know if the intel C++ compiler optimizes for ryzen?
Hey yall i got a question
im new to programming so bear with me plz
How do i turn my code into something that i can run on actual hardware?
like im trying to make myself a hex calculator. the coding part im fine with but how can i actually make a physical calculator
c++
yea i imagine i need some components and some other stuff
like any pocket calc
just hex
You probably will need to learn assembly
you will be using a microprocessor
the other components are the easy part
ok compiler turns the code into assembly itself right? can i just grab that?
yes, but if you are going to do that I would write in C
do you know much about microprocessors?
Somewhat
i can just change some syntax
yes
aight i'll get back to yall later i gotta learn some c first then
learning C aftrer c++ will be a breeze
yea i thought so
syntax is basically the same
the whole reason C++ was invented was to introduce Object Oriented Programming
C++ is just OOP C
with some extra libs
i know a little bit of oop that i studied myself for the full blown thing ima wait till next semester my class starts
also, research ARM processors
gotcha
It shouldn't matter, cause you will be writing in regular C anyway
which isn't OOP
also
aight ima go do some more research on microprocessors first then
got it
uh
It's what is used in the arduino
now im looking there's a whole lotta options lol
yes
yea ima be doing some research on this whole thing
exactly
all programming languages are similar with just some structural or syntactic changes 😄
Are there people accustomed to kubernetes?
what part? i know how to make docker images that can be used in k8s if thats what you are wanting help with. im not familiar with deploying it though
Deploying
I've tinkered with microk8s, kubeflow and docker images to achieve what I want and Wednesday I'm deploying a cluster on aws
Also when I'm launching jobs if ressources are not available they are waiting in a queue for pods to complete and free ressources
But the order of the queue if apparently random...
Like I have one gpu available, launch job1, job2, job3
Job1 will get the required ressources, meanwhile pods for job2 and 3 are pending. When job1 end, another job starts but it is random :/
@lone hornet want pain ?
return value ? true : false;
}```
😄
seen that in actual code
wtf?
Would it be a bad idea to use a single API Gateway for multiple unrelated projects?
i'm thinking it would be good for management as you could make a portal to edit the URLs in, and provide monitoring all in one place but not sure about the security of it. Would be deployed with many replicas which will help the reliability
As long as they're segregated on the gateway I don't see why not--no different then sharing other servers
C++ is just OOP C
@novel quiver FTIW this isn't true anymore
C++ and C are not compatible, the C++ syntax has been expanded far beyond what's available in C
C is mostly compatible with C++ as long as you respect the C++'s type system
the "mostly" is what gets you
particularly when dealing with not super super recent attempts to fix that
like if your compiler is a bit older
like most of the time you can paste C code into a C++ compiler and it will work
but not always
converting some POD style of coding in C to C++ is kinda trivial though, for small projects
shouldn't be that hard
yea what comes to mind is like, the way structs work
and you used to not be able to use the dot notation to init individual struct members in C++, might be able to now
and idk what happens when you just slurp a struct into memory in C++
as an example
structs as long as they're not in unions themselves are just public classes in c++
so they get to have their constructors, operators etc
not that different to plain old data structs in C
in a mixed C and C++ codebase my recommendation is just compile it all with the C++ compiler and code it as C++
that allows you to write safer/easier to understand code, use references, take advantage of raii
yeah the biggest advantage of C++ over C is type safety
and then any slight differences wont get you
like the general assumption with new C++ programmers coming from having learned C is that instead of malloc you use new
and instead of free you use delete
but the actual answer is to use references and smart pointers
or delete[] 
this is all to say, C++ having objects is really only one aspect of why it might be used over C, raii and references are a big deal
C++ is just a better language overall I think, it's constantly evolving
sure move semantics are important but there's much more to that
thinking of the new C++20 features for example
C is mostly compatible with C++ as long as you respect the C++'s type system
@round dome not really though, there's a lot of things in C that are not valid in C++, beyond typing related things
variable length arrays? non-existent
flexible member arrays? non-existent
and you used to not be able to use the dot notation to init individual struct members in C++, might be able to now
@novel spear I think that's coming, not here yet, iirc
variable length arrays are available as an extension in many compilers tho
you shouldn't really use VLA in C either way
It really depends what you're doing
there are definitely use cases that benefit from them
and there are significant performance benefits vs. heap arrays for computationally intensive code
Of course there are performance benefits from using the stack instead of the heap but that doesn't mean that people should use VLA. There's always a way to avoid using them in any case.
Sure you might think that VLA are justified for your use case, if you are 100% sure the variable you're going to use is initiated and a low number, but in most cases it just ends up bloating your .text and being worse than using an invariant
Just eliminate any risk factors about having to take care of the variable used to initiate the array and don't use VLAs at all.
does anyone here know x86 assembly and wanna explain something that i'm seeing in IDA?
I've made a .net core 3.1 app and built it in release mode however there is not a System.Runtime dll being outputted when there should be. Is there a way to force this to be generated?
Help building 1500$ Development PC 2d game and 3d pls
@obtuse night - why would you want that generated? it would be assumed to be there because you need the runtime there to run your application
sorry, forgot to update the question. I tried installing it using a new windows service framework and targeted the dll of the project rather than the exe
does anyone know if python has any GUI libraries. Am thinking of porting over a program i made in java a while back but since java has terrible GUI libraries. I'm looking for something that i could use
that actually looks good* java has swing and such but none actually look good
Hey guys any idea how I can convert my python application to a windows application?
@rough bridge wxwidgets is a common goto but there's bindings for qt and gtk and frieds if you want
awesome, thanks. will look into those @bright hound
Anybody know a good place to host a discord bot for free?
@rough bridge Tkinter maybe?
@nocturne galleon I do, not an expert but I learned something, what is it that you need?
tkinter might able to be used. Last time i used it, it was for a class project where I just made a visual. I dont think it will able to have any buttons or any interactivity which i kinda need
app.get('/messages', (req, res) => {
return res.send(Object.values(messages));
});
Is there a way to replace the ".get" with a variable? eg. if i am wanting it to say whatever is stored in a variable rather than .get, how would i go about this?
I am programming a soundboard app for android, and I would like to use sound bytes from LTT videos. Who would I talk to for permissions and(or) licensing?
regarding my question, i think i have found an answer. I believe the eval() function will be best for this
@calm lark try to get in touch with LTT at https://linusmediagroup.com/contact-us
@obtuse night what does app.get return?
@elder ivy This was an example using express for a web api. basically, i was wanting to change the .get to different http requests based on a database entry so the eval function will change a variable string into javascript code
following on from this, does anyone know of an equivalent function in c#?
Ugh. Anyone know how to send HTML with the express.js but this time the HTML is purely a string?
@obtuse night for express, use app.all ?
but in general, you can do this:
let variable = 'get';
app[variable]('/messages', (req, res) => {
return res.send(Object.values(messages));
});
sorry, i should have said its going to be an API gateway which supports all types of requests which contains the routes from a sql database. these requests might be a post, get etc so i needed a way to turn a string into js code allowing for different functions to be called
i was using the above code as an example of the sort of thing i wanted to do
and if you want to be sure if handler method exists, you can add an if:
if(typeof app[variable] === "function") { .... }
but yeah, app[variable] with variable set to get is equal to app.get
eval is pure evil
ohh no wonder. I misread the question. but yes what Parandroid said is correct api["get"] works
@obtuse night also for the callback, you could in theory have even the function code in DB, then use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function to create a function which you can then set as the callback method.
any iOS devs here? I'm curious if anyone knows of a Swift TicTacToe project with a resizable board (5x5, 8x8, etc.)
I've only been able to implement this using brute force check on every move.. wondering if there is a better way.
https://www.quora.com/What-is-the-algorithm-to-follow-to-win-a-5*5-Tic-Tac-Toe see the code response
Are you talking about verifying a win or writing the CPU player?
Hey, so I'm not into coding, but I know people here know their stuff about coding. I want to know exactly how bad the code from Yandere Simulator is, here's some of it a friend shared.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class IfElseScript : MonoBehaviour
{
public int ID;
public string Day;
void Start()
{
SwitchCase();
}
void IfElse()
{
if (ID == 1)
{
Day = "Monday";
}
else if (ID == 2)
{
Day = "Tuesday";
}
else if (ID == 3)
{
Day = "Wednesday";
}
else if (ID == 4)
{
Day = "Thursday";
}
else if (ID == 5)
{
Day = "Friday";
}
else if (ID == 6)
{
Day = "Saturday";
}
else if (ID == 7)
{
Day = "Sunday";
}
}
void SwitchCase()
{
switch (ID)
{
case 1:
Day = "Monday";
break;
case 2:
Day = "Tuesday";
break;
case 3:
Day = "Wednesday";
break;
case 4:
Day = "Thursday";
break;
case 5:
Day = "Friday";
break;
case 6:
Day = "Saturday";
break;
case 7:
Day = "Sunday";
break;
}
}
}
my eyes...
lol wtf
Wow. I like this code! So much junk!
Hey, @nocturne galleon, did you know there is a way to nicely render code -except on mobile versions, apparently-? You need to wrap it inside a code block and indicate the language. Here is an example:
```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class IfElseScript : MonoBehaviour
{
}
```
would render as:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class IfElseScript : MonoBehaviour
{
}
Ah, I knew that existed, just never knew how to do it. Cheers!
Hey, so I'm not into coding, but I know people here know their stuff about coding. I want to know exactly how bad the code from Yandere Simulator is, here's some of it a friend shared.
@nocturne galleon
We know. Anime sucks.
))
lua is easiest language
ik its much into maths but for a game its actually easy nl
ngl*
im deving on roblox
Does anyone have good resources to improve coding skills?
Out of my head:
- Practising: Advent of Code, Euler Project, Google HashCode, HackerRank, Google Interview challenges, CodinGame;
- Learning: Roadmap.sh (go crazy), meetups, blogs;
- Reading: https://techurls.com/, HackerNews, IncrementMag.
Resources unrelated to coding can help you code better. In any case, may I suggest contributing to an open source project? There is an infinity of things out there that could benefit the community and teach you cool tricks.
I guess you could always get programmer socks
@earnest breach A four year course at a recognised trade school?
Damn amateurs, thinking they can steal dev jobs from certified folks
?
Nothing like a bit of toxic elitism ))
o.O
as a dev, a four year degree won't help you code. but it certainly opens up doors to good jobs that need you to code
also google interview trivia questions do not make good code imo
contributing to open source would probably be a good option. but don't just code by yourself imo. find some way so that you aren't just doing it in isolation without anyone to bounce ideas/feedback off of. especially when it comes to architecture/design and even coding style really
is python good for coding games?
no
A four year degree, at a trade college, will give you the fundamentals on how to code efficiently, introduce you to a ton of concepts, and land you an apprenticeship in the real world.
I have no idea where your statement of
"A four year degree won't help you code"
I've gone from being very amateur webdeveloper to full stack.
@nocturne galleon It depends on what kind of game you are making. Some engines use python, but don't expect to make AAA titles with it.
I would much rather recommend you learn C# or C++ if you want to enter game development.
@wooden fjord I mean I've been through 4 years of uni. it doesn't teach you to code but rather forces you to teach yourself a few languages. it's one way to learn but I'd argue I learned a lot more on my own and on the job
To be fair I said trade college. Not university.
yup I know. I also know where my coworkers went to school. the type of school itself isn't what's teaching them imo
Let me guess, American?
no
as a dev, a four year degree won't help you code. but it certainly opens up doors to good jobs that need you to code
@elder ivy I agree, a four year CS or SE degree won't teach you how to write good code.
It will def teach you concepts that are rather difficult to learn on your own (most things relating to algorithms IMO). But this doesn't mean you write good code--I know plenty IOI kids who can't write production ready code to save their lives, but excel at LeetCode etc problems
also brain teasers in coding interviews are awful lol
I do want to take a moment to recognize the fact that both are actually acceptable though, we def need people in our industry who are amazing at algorithm problems and we def need people who can understand how to productionize and build solutions out.
also brain teasers in coding interviews are awful lol
@elder ivy Ugh yeah don't get me start on them, sadly though, it is a necessity in our industry to be proficient enough in Leetcode to get jobs
haha I know what you mean
it sucks though, because it's the IOI kids that kill all those interviews because they've already seen all the problems
it's honestly hard to sort through who would be good at what you need them to do. understanding of code aside
I agree with you about the differences between the type of roles that need to be filled
I don't agree with the Leetcode-whiteboard-interview stuff, but I do recognize that it's sooo difficult to really assess someones skills and competency in our industry
the one time I took part as an interviewer was when the candidate was on the phone. you could literally hear pages flipping when we asked a question
oof
lol
😬
YUP
TBH though, I wish more interviews would allow for the use of resources
Not stack overflow obv, but like, C++ and Java docs etc?
that too
I don't even care if it's stack overflow
it would be up to the interviewer to design a question that isn't just searchable lol
probably supplying a base template that needs implementation, and has some bugs
The number of times I'll have an interview in Java or C++ after coming off a bender of writing the other, and then get confused on function naming of basic things is far too high 😆
and just have people walk through how they'd solve/debug/design/implement
Hmmm, is it Vector.add? Vector.put?
Does ArrayList have an emplace... ?
😆
Shit is it length or size in CPP
lol
I mean I get thrown at various languages depending on where they need me. so yeah I just look it all up
and/or use IDE to help
I'm on the web side of things though
My fav interview question I had was about reflecting a binary tree, i.e. provide a mirror image of it so the left branch becomes the right etc
OH, no it was about determining if two binary trees were equivalent
Wrote it recursively, it looked great
then off hand as the interviewer was asking a new problem, he goes "Oh, what is the space complexity of this algorithm?"
I say, well, we have to check every node, so it's O(N)
Oh wait, no, it's log n, because we only need to hold the longest path
Hmmm... maybe it's O(N)?
and the interviewer was like "I ugh... I think it's.... uhhhh... lets just move on"
Later, I asked one of my profs and he goes "Oh, well it's obviously O(N)..... wait.... no it's log N.... uhhh"
😆
lol
Just pointing out.. Never gotten any of those awful coding questions people keep talking about. I've been asked to bring samples of my work, or work on a minor project and show off the solution.
And just going to reiterate my point since it is being possibly deliberately missed. I am not talking computer science or software engineering at a university. I am talking full stack developer educations at trade colleges, which involves mostly actual coding, not theory or selfteaching. It also involves actually working with code at businesses.
Just pointing out.. Never gotten any of those awful coding questions people keep talking about.
It probably depends on the companies you apply to
But all the major US tech companies ask those kind of problems
Everything from webdevelopment to backend solutions and database management.
yeah I work at a major tech company. they still do awful questions. but of course YMMV depending on the company
And the general competence of HR and interviewers.
Eh, most tech companies have engineers do the bulk of the interviewing, from my experience
I have yet to get an interview with someone who wasn't directly working with developers.
@shy helm That has been my experience as well.
as a company becomes larger, the screening they do tends to try and filter out people with some "easy" solutions
then off hand as the interviewer was asking a new problem, he goes "Oh, what is the space complexity of this algorithm?"
I would reply that the space complexity of a binary tree comparison isO(log2(N))if both trees are balanced,O(N)assuming the worst case scenario.
like Amazon with their text analysis of resumes (back when I was applying)
Sounds like a CS student
what's wrong with being a CS student?
Shrug Personal experience has left me with the impression that most of them are incompetent in most branches of programming.
Lots of theory, no practical experience.
Denmark. University students in general are pompous tits.
I should know, I was one briefly.
I'm from Canada -shrug-
Shrug Personal experience has left me with the impression that most of them are incompetent in most branches of programming.
@wooden fjord lol
Terrible take
pretty much
Terrible take, possibly. Just speaking as I see 'em.
I would reply that the space complexity of a binary tree comparison is
O(log2(N))if both trees are balanced,O(N)assuming the worst case scenario.
@foggy ginkgo For reference, this is correct. The issue was in the interview there was a bit of ambiguity on the nature of the trees 😆
Why even bother looking for a job? Harvest the energy of dark mystical x86 assembly and feed off that to survive
lol
long shot, but is there any ios app/tweak developer here that could help a newbie out? Stuck on custom UITableViewCell layout for almost a week now 😦
does clang produce smaller binaries than gcc
Hey I started learning Python yesterday .___. and uhh is
while Truean infinite loop until it's broken?
Always an infinite loop.
There is no pointer to what is false or true, so true in this case means the app is running
At least I believe that is a case. Do not do much work with python
Thanks
Also is there a way to change the state of a variable (True or False) if a condition is met in Python
If(variable1 == condition)
..... variable2 = true
Can someone explain why it says the car is already started even though I stopped it?
shouldn't line 15 be "started = False", one equals sign?
Because you never add start = false
Wait, dalt is right
Yea its a typo with the double equal signs.
can someone help me with-
if you type servers ip address then it will automatically forward to the domain?!
idk how to do it
html, php, htaccess?!
nginx config?
i want to redirect this automatically to
this
Yeah you can use nginx
Set the server name to be your IP
😮
i dont want to redirect from SOMEDOMAIN to ANOTHERDOMAIN
i just want to redirect the the domain if someone enters the servers ip
Yeah
server {
. . .
server_name XXX.XXX.XXX.XXX;
rewrite ^/$ http://www.domain2.com permanent;
rewrite ^/(.*)$ http://www.domain2.com/$1 permanent;
. . .
}
Create a new site
and add this
It's under example 1 in the link
You don't want to redirect the same site to itself
Hey does anyone know why all the 6s are still there???? Shouldn't they be gone
I'm trying to make a program that sorts a list so there is no duplicates
Nvm
Looks like you're never saving the new value
Yo I'm so confused can someone please explain to me how Python know which word to switch out ????
Does name become a new variable or something??
the { } around the name variable
specifically because of the "f" before the string in that print statement
which allows for putting variables in { }
notice how the text hilighting changes to signify it's different from the rest of the string
Does anyone know how to give "Person" a name? Also please tag me if you answer
@wild delta
person = Person("John")
person.talk()
huh
Ohhh I think I got it
Ok and one final thing. Why does it say "None" at the end??
because talk() doesn't return anything
just do person.talk()
doesn't make sense to print it
I think you need some kind of book or course Sirkolor
print(‘brrr’) ?
I think you need some kind of book or course Sirkolor
@wooden fjord
Yes
In WPF, is it possible to store an XAML context menu for later use like a user control?
On second thought, is it as simple as altering an XAML user control and set it as a context menu?
@wild delta so, right now, your find max function doesn't take any input
Right
so, how does it know what array of numbers to be looking at?
One of the most important ways that information is passed around in code is through function parameters
That was a stupid answer
the function that you made doesn't get to "see" that array numbers you have declares in the bottom of the file
functions only get to see whats inside of themselves
(this is called scope, but that's a discussion for another time)
What if I make a class called Numbers then I put that as a parameter
That is one way you could do it!
Then I can use different arrays for each time I call max_numbers
But, I would say, I don't think this function meets the criteria for being a class
Wait one sec I'll be back in like a minute
Instead, you just want to be able to give this function specific data, and for that, you need function parameters
Ok I tried something it didn't really work
So what are you saying I should do @shy helm
make numbers a parameter to the function find_max
i.e.
def find_max(numbers):
also get rid of the numbers = []
this way, people calling find_max can give their own array of numbers to search through
I started over and I still have errors
How come it only gives me 1 error even though there are 2 different errors
@shy helm Ok I did something but I ended up getting "None"
line 6
inside the function, write return max
that's how you get data back out of a function
essentially, function parameters take data in, return gets data back out 🙂
That was just a "simple" exercise in a tutorial dude jesus
Once you get familiar with the basic concepts it will become "simple"
Holy shit WOOOOOOOOOOOO
Kinda like, riding a bike is only simple once you know how to 😉
Ok but I still have some questions about the finished function
shoot
Ok wait one sec
before we dive in
the return needs to be unindented
right now the return is in the body of your loop
What's the difference?
if it's in the body of the loop it runs every time 😉
Yo xbox games showcase is starting 
but in this case, that means you actually just exit the loop immediately and return the first value
your code rewritten in pseudocode (essentially, code written in "normal" english) is equivalent to
function find_max(numbers):
max = 0
for each number in numbers:
if number > max:
max = number
return number
end for loop
end function
So I'm trying to work on parallelizing ffmpeg transcodes, but I'm having a hard time a) nailing down exactly how much CPU & RAM ffmpeg is using, and b) how to actually properly parallelize it.
I was initially thinking of just using parallel (https://git.savannah.gnu.org/git/parallel.git/) to do it as it's already installed (as it was apparently a dep of aurutils), but AFAICT that doesn't necessarily keep each process isolated to one core (or set of cores)
Omg dude ffs I just closed and opened up PyCharm and the package or folder or whatever you want to call it that I was using is gone
And instead the package that I actually did want to get rid of yet still don't know how to, is STILL THERE
"PyCharm is beginner friendly" my ass
pycharm is plenty beginner friendly
it'll re-open the last project you had open when you start it
That's the first thing you adress -__-

The there being no code part doesn't matter cuz I erased everything I had in there
It's just for me to practice things I've learned / am learning
Yeah and
In it is a folder called "Scrathes" and in that is a single scratch file
The thing I was using is called "Hello World"
gotcha
I still have the actual folder on my computer
right click on it and click reload from disk
Op wait nevermind I just restarted PyCharm and the thing is there
I've never seen that page before when I've started PyCharm 😅
Huh
Weird
@graceful silo Anyway thx for all the help today
lol
hey does anyone know how to delete a txt file in java?
hey does anyone know how to delete a txt file in java?
@dim shard https://docs.oracle.com/javase/7/docs/api/java/io/File.html#delete()
File file = new File(<FILE_NAME>);
boolean deleteSucess = file.delete();
does anyone know how to set up a Collider in Unreal using C++
i m trying to make this actor code
do :
player enter the collider
code run : increase the rust of the texture )
player exit the collider
code : decrease the rust of the texture
i already make the texture and nessasary part , just now sure how to implement it
do ping me for reply , thanks
@clever sparrow I meant delete a line in the file sorry
hello so i already have a website running on an apache2 server on my vps
now i was wondering how to without disturbing how could i make an image on the vps show with a url like...
https://neednot.net/image.png or something
i need this for a trick im doing
and it requires a changing image
so i'd need to be able to swap out image on the same url
Just created a custom gaming linux distro. ultralight openbox/debian idles at 90mb ram and can work on literally any processor
Code?
I just create a window manager in rust

it works in x because i use the xcb lib
hie
if anyone has worked before with electron and google cloud api's
I was trying to use node.js client of gcloud auto ml
I have always stuck on the part of authentication.. no matter what I do its not really working
this is one of the different 100 varients of errors... but this is without any authentication... because it says something about a way to do it... but I am not that of a web developer
it would be awesome if someone gives me hint about what is it telling me to do
lol not primarily electron dev... this is just a project... I thought electron would be good
🤷♂️ but I don't think this is windows problem
Some apps are switching from electron
@vernal marsh pretty much every google service requires you to create keys/tokens/log in via OAuth when doing stuff on behalf of user. while i never used it, i guess you need to set up https://github.com/googleapis/google-auth-library-nodejs
Question: Is this any development, or some specific project?
@nimble hemlock nothing that important.... its just for a competition.. for which I don't even have to make a client application but 🤣 I am that kind of person who would learn anything related soooo... yeah
@cloud knot yeah I did figure that..... the examples they showed which I just first copy pasted... is for a node.js normal app ... so they used 'open' lib.. which just opens uri on a browser and has callbacks and stuff... offcourse I can't do that inside a browser and it had webpack incompatibilities sooo... I found electron.remote could be the alternative
I will catch up on it... its been a long day of debugging codes
//pretty sure this line can be replaced.. with electron.remote
open(authorizeUrl, { wait: false }).then(cp => cp.unref());```
frikkk... fs doesn't work in browser too..... node.js and electron is a mess
Of course not. You don't want random websites snooping around your harddrive. require('fs'); is a NodeJS only thing for a reason. Electron uses Chromes Blink to render normal HTML and CSS, but uses NodeJS's V8 engine to run JS, so that you can actually make a usable PC app and not just a website framed in a slimmed down browser
So if you want to develop a website, that can also be used as a seperate app (like Discord for example) and want as much code re-usage, you have to make if statements around things that only work in browser and things that only work in Node/Electron
@grizzled steeple is there a way to use node.js libs and electron? I don't think its possible but I am new
so I am unsure about many things 🤷♂️
I haven't worked too much with Electron, so I can't say for certain, but it should be doable. Afaik you can use the fs lib in Electron somehow. Could ofc be that they're using something else with similar abilities
But it could also be that it's like Vue vs Nuxt, where some Vue libraries work without a hitch after importing into Nuxt, and others need some rewriting to work
so here is a thing.... when I read using fs.. it shows no errors or anything .. it works.. but when I include electron.ipc or remote... crash
any idea what else this would mean?
I could skip electron.remote too.. and use react portals but I would like to understand this issue 🤷♂️
You are sure fs is available in that function context?
That's like the biggest annoyance of JS
I never checked ... hold a sec
The annoyance is that JS doesn't tell you. You never know what this refers too
That's like the biggest annoyance of JS
@grizzled steeple https://cdn.discordapp.com/attachments/244230771232079873/735497591663624232/7XR6sg1.png
use typescript
Hey, that's what's part of the fun, Lima xD
don't use ==
const ipc = require('electron').ipcRenderer; I just imported ipc
and it shows up the error
Well, you wanna check if a variable is null and/or undefined? blah == undefined
i like javascript even tho its a bit messy
so if im working on something that isn't a small script i'll just use TS
!blah
I mean you can do blah ?? false if you want stuff like "" to pass
?? I never heared of that...
they've been trying to improve it recently but yeah a lot of proposals currently
I don't disagree that there's a lot of weird quirks lol
and terrible pitfalls
ohk.. its undefined
well... react portal it is
apparently there's a module called electron that isn't electron
the other option is that you're in the wrong context for requiring it...
iunno the the debugger and see what's inside? check your package.json?
ugh what's with electron and promoting automatic semicolon insertion
oh I see
And thanks to @logicalparadox for allowing us to take over the electron package on npm.
lol
I had a heart attack 🤣 lol... if I would be using wrong electron
well rewriting the same file for 3rd time
iunno last time I used electron I just cloned the quick start as a basis
@nimble hemlock nothing that important.... its just for a competition.. for which I don't even have to make a client application but 🤣 I am that kind of person who would learn anything related soooo... yeah
@vernal marsh I was talking about this chat channel :D
javascript is shit
jobs that use it pays more than most the other languages 😄 ¯_(ツ)_/¯
anyone who got some experience with C# and JS?
lol "hello world" uses 1GB. what are you talking about
javascript has its own place
😇
its a tool 🤷♂️ which has matured a lot, I assume, over the years... personally I like style of statically typed language but python and javascript cause no problem


I hate what electron does, all applications have inconsistent themes, better make applications using qt or gtk
forgot to say they consume more ram, i'm in a CLI app of discord now
6cord
discord have a cli?
hahaha
how do you see the chats?
stdout?
no seriously I am curious
@prime pine
you know IRC exists right
discord have IRC?
no I mean IRC is a thing before Discord
he said " CLI app of discord "
all I'm saying is that I would imagine it would look like IRC
no seriously I am curious
@prime pine
@hollow basalt https://github.com/diamondburned/6cord
thanks for that @prime pine
There's more
but this is the most popular
might as well go back to irssi
I moved off of it. meh
privacy be damned but having nice clients across my devices is better
@prime pine let me explain what electron does - it allows you to have apps on more platforms at decreased costs and developer time. You do not need extreme performance from a Discord chat client, so if you can do the whole app once for web (in HTML+CSS+JS) and bundle the same code (with minor extra native features) in EXE/DMG/RPM/DEB with Electron and as APK/IPA with Cordova/Phonegap/Capacitor/whatever else, then why wouldn't you.
Well, you explained something to me that I already knew
isn't vscode built in electron now
I don't use vscode I wouldn't know 
yet you use discord lol
VSCode, Atom, Discord, WhatsApp Desktop (probably, could also be React Native)
Just to name a few apps written in Electron
Microsoft Teams is Electron too
and Slack
and Skype.... heh, Microsoft actually owned Electron for a while, after the Github acquisition. But it was handed off to the OpenJS Foundation a few months ago
isn't vscode built in electron now
@elder ivy vim is my city
Microsoft Teams is Electron too
@granite river fuck microsoft, all my homies use BSD based
@prime pine I used to say stuff like that in the 1990s when I was running FreeBSD, then I grew out of it once I realized I'd be a lot more employable if I knew all the major platforms.
I got on the Windows 2000 Beta program, learned Active Directory (both admin and programming), and made, oh I dunno, $900k over the next ten years just with that skill?
So really the only person you're fucking with that attitude is yourself
lol
@prime pine well that explains it, you have no concept of how real world of SW development economy works. There are use cases for native, but majority of use cases is better served by not wasting money and time doing same UI 5 times for every major platform (iOS, Android, Windows, Mac, GTK/Qt) + web.
I don't need to try stuff, I get my salary for 20 years now from SW development. Your personal ideals are first thing you will put away once you start working in the field. Dart, Go & co you can play around when you have free time or you work at Google. Not in real world.
@cloud knot - depends on where you work - but you are mostly correct - we are using Dart for some internal projects - but nothing customer facing yet - there will always be new languages, but only 5-10% will likely see a new decade - the question is which 5-10%
Most big companies are 5+ years behind the curve anyway because they are too risk averse
well that and existing code bases make it hard. not too many companies are polygot
True
LMAO i'm looking at coding classes and learning courses on codecademy to see what they got and you can screw up some of their c# classes just by doing dotnet new console --force
run rm -rf /* --no-preserve-root in the console
Leave out the star to save character. It's not needed anyways.
# If you are already SU
rm -rf / --no-preserve-root
# If you are not SU
sudo rm -rf / --no-preserve-root
I'm not that deep into Linux, ok?
I'm more of a Windows/Web dev
@prime pine don't even joke about that at all, unless you never want to see certain discord servers ever again
Are u mod?
he's not mod he's mad
Don't arbitrarily run commands if you don't know what they do, eh? I see nothing wrong here.
I've never seen the mv / /dev/null before, that's pretty great
are there any other creative ways to delete everything?
Not sure what that means
dd is for converting and copying files. if is input file, of is output file. Thus he's idea was to copy a file that generates pseudorandom numbers over the whole partition sda. Not very pleasant, but it won't break all the HDDs, especially because even if you delete the meta table, you can still reconstruct it, not that big of a deal.
As far as I know, but I know nothing, so I could be wrong.
lmao. I think they're trying to ask if you're someone who uses *nix
nixie pixel is a linux youtuber
I think bc of my user he thought I might be her but I'm not
oh I see
Linus Torvalds its a god
I just make games i dont think any of my projects belong here tho
Is messing with adb stuff safe? Like using apps that needs adb permissions?
Or like in other words does the app can possibly see what processes are going on in the phone
Basically data?
or they can root your phone, install spyware, and then steal everything from you
your call... but just watch the permissions and make sure it's really specific to exactly what you think the app can/is doing
@limpid plaza i would suspect you are not adding the required JAR files in your classpath (and they are in classpath in the IntelliJ)
@wild bolt adb is just a developer tool; there is no such thing as "adb permission" really
I think he means using ADB to grant permissions
you need to do so for stuff like secure storage write and such
Hi, can someone answer this?
I am making my own program that converts custom measurements.
It uses breadcrumb sorts of things, each breadcrumb is a Scratch type thing that holds either a unit and a multiplier or just an operator. The multiplier is just when you times a unit like when measuring breath alcohol or using decilitres and things. You can also make the multiplier do its own function instead of timesing the measurement metric value.
I just made the multiplier also do functions of what ever you put in, rather than just the metric value of the measurement. My question is, it seems to do it twice so I have to put one multiplier as the function then the other as just x to divide it down and stop it from doing it. Why does it do it?
For example (unit done by output abbreviation simulation rather than actual user input)
Input = 2
From = 1 units(Pow(x,2))
To = 1 units
Output = 8
Input = 2
From = 1 units(Pow(x,2))
To = x units
Output = 4
My guess is it has something to do with it being broken back down at TO.
I don't understand your question
I made a unit converter which allows you to make up 'such and such per such and such' units (instead of the straight ones like on Google) and recently put the ability put in functions. But the functions fire twice/+1 power for some reason.
() means function, not tied with 'units' which is just a unit of measurement in itself which can be replaced by metres or something.
I am thinking it has something to do with it being over-divided on what you are converting to, so casting it to x units instead of 1 unit seems to cancel it out
read your code? run a debugger? don't know what you're expecting with such an abstract problem
either that or you need more of this: https://en.wikipedia.org/wiki/Dimensional_analysis
In engineering and science, dimensional analysis is the analysis of the relationships between different physical quantities by identifying their base quantities (such as length, mass, time, and electric charge) and units of measure (such as miles vs. kilometres, or pounds vs. ...
(By the way, I like making it throw an argument error below by dividing zero by zero.)
your call... but just watch the permissions and make sure it's really specific to exactly what you think the app can/is doing
@elder ivy ah right that was really what I meant, thanks
So I just need to keep track of the activities of the granted app right?
@hollow perch PP
indeed pp
wow development right above here
i need help in a python program
from discord.ext import commands
client = commands.Bot(command_prefix='.')
@client.event
async def on_ready():
print("Hi MrBloodBoy.")
@client.event
async def on_member_join(member):
print(f'{member} has joined the server.')
client.run('token')```
i am getting error
What's the error?
You are getting a 401 Unauthorized response on a http request that the package is makeing.
I would assume that there is an issue with how you are handling the token.

I once was going to use Unity for stuff, but I it didn't quite work because of VS versioning but I might use Programming or something instead now.
I used to use GameMaker but it is now a trialware.
why can't i put this in an email?
<!DOCTYPE html>
<html>
<body>
<embed type="text/html" src="https://neednot.net" width="500" height="200">
</body>
</html>
you gotta use the html email option probably
gmail doesn't render it
Embed is not supported as emails don't fully support html5. Stick with html4.01
but really you can't just put arbitrary html in an email. there's a heck of a lot they won't let you use (for good reason)
I mean I guess there's v2 coming https://developers.google.com/gmail/ampemail
Hello,
i am developing an app using android studio(java), i intend to make a pop up window (using popupwindow class) on touching a button, but when i press the button two pop ups are created instead of one.can you point out where i went wrong?
code - https://pastebin.com/znPP8U78
testing on oneplus 3t (a3003)
android 9.0
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.
@woeful shadow HTML email. if you think browsers are bad, then be prepared for the hell called HTML email. Every client renders it differently. Plus IFRAME/embed/... is a no-no in email. HTML email equals using tables for layout, minimal CSS support, images by default do not load and so on.
@thorn tangle set breakpoints in relevant places (for example at first line of onDataChange) and examine the stacktrace to figure out what happens. might be events firing multiple times etc.
@cloud knot thank you for the reply...will do that and get back
that is a general developer recommendation tho - debug your code
I found where i went wrong and fixed the issue , thanks @cloud knot .
hello
im having trouble with what my modulename should be
so is a module like a class or something
cuz there are classes that have shit like Uworld which has the world and local player info
@proper gale
im having trouble with what my modulename should be
its a string, put whatever you want there
wait wait wait
thats a module loading function
i have no idea what you need to put there
should be in the documentation
documentation being
idfk, whatever SDK you are using
ok thanks
they should have docs for it
@nocturne galleon why are you using this sdktest library?
to try and find something
A file, a word, find a what?
a word
in?
this library
Oh fuck! /I love sharades!!!/
help a mate figure something out
thats, not helpful here





