#development
1 messages · Page 68 of 1
I haven’t figured out vstudio free edition. And I dunno if it’s available at work either
I haven’t figured out BStudio free edition
It's a mystery to behold
Lolol. I am very much not a programmer. Scripting yes, programming no.
It's not like you're so far
Very true. But the concept of “you start with nothing, build it yourself” is such a drag to me. Like, I just want to look up a phone number in AD. I don’t care for libraries, garbage collection, static void, and signed integers.
...yet here I am in development. LOL
We all have strengths
I don't know anything about netwroking but I lurk in that channel
My ability to make scripts is built on the backs of those who build the tools I use. I salute to you programmers out there. Thank you for your hard work.
My ability to create web apps is built on the backs of those who handle the networking. I salute the networking guys, Thank you
while True:
print ("1. Utlåpn")
print ("2. innlevering")
print ("3. mine lån")
print ("4. Administrasjon av lånere")
print ("5. utstyr")
print ("6. utlånsstatestik")
print ("9. Avslutt")
print ("10. Ad bruker")
print ("11. Ad utstyr")
choise = input ("valg:")
print (choise)
if choise == "1":
print ("Du valgte Utlån ")
elif choise == "2":
print ("Du valgte innlevering ")
elif choise == "3":
print ("Du valgte mine lån")
elif choise =="4":
print ("Du valgte administrasjon av lånere")
elif choise =="5":
print ("utstyr")
import equipment_test
elif choise =="6":
print ("Du valgte utlånsstatestik")
elif choise =="9":
import sys
sys.exit()
elif choise == "10":
print ("Ad bruker")
import person_insert
elif choise == "11":
print ("Ad utstyr")
import equipment_insert
i need som help
i got it to worke
create a string switch or a list then you can just loop the list or switch instead of spamming if statements
thank you
what language is that even
norwigian
python?
yes
options = {
1: "Option 1",
2: "Option bla"
}
options[1] # returns "Option 1"
@indigo python ^
that's a more powerful way to describe this logic
ok
@indigo python you could replace the menu printing you do, with a loop
that loop just prints every option

we are supsos to do that it is a scool prodjeckt

?
Any nodejs devs?
It is statistically likely that there are
Yeah
anyone here working with lua?
hmmmmmmmmmmmmmm
@next light sometimes
print("how often")
when I need to work with lua
I've written in like a dozen different languages :P
Lua is a fun one, single datatype: table and indexed by 1. (not 0)
unless its native lua with luac, then its 0 
well i worked first with lua and that used index 1 and now im using luau and it still starts at 1
with luac you can have native arrays, these start at 0
didnt know about luac
only known about lua/luau
but it doesnt matter that much with the start index
well, it does actually
because in luac, you can have both 0-indexed and 1-indexed arrays xD
Hey guys, I have nodejs login / register but the db connection keep crashing while my server doing backups at night and that makes the app just crash.
How can I fix it ?
What is the correct way to use try and catch to fix it ?
What db are you using
Mariadb
ah idk how to work with that one, only done mongodb
lua isnt so bad
you should be catching the exception thrown when you connect to the DB, then your app won't crash
Hey guys! I’m doing a high school project for my business class (mock business pitch) and my idea was requiring an app, could any one here tell me how much something like that would cost, I read somewhere online that it is about 20k-30k. This is one of our final projects so I was hoping I could get some help thanks!
well depends on how complicated it is. You also have running costs
idk pricing really
My idea is an app kind of like social media and LetGo & Facebook Marketplace combined but instead people sell labor? It kind of hard to explain, so sorry about that but thank for the help!^^
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:209:20)
Emitted 'error' event on Connection instance at:
at Connection._handleProtocolError (/var/www/firebase2/node_modules/mysql/lib/Connection.js:423:8)
at Protocol.emit (events.js:315:20)
at Protocol._delegateError (/var/www/firebase2/node_modules/mysql/lib/protocol/Protocol.js:398:10)
at Protocol.handleNetworkError (/var/www/firebase2/node_modules/mysql/lib/protocol/Protocol.js:371:10)
at Connection._handleNetworkError (/var/www/firebase2/node_modules/mysql/lib/Connection.js:418:18)
at Socket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read',
fatal: true
}```
yeah, you need to catch it
yeah doesn't throw just crash it?
What part of it ? The throw error // or the under part ?
I never use throw
I just do console.error(e)
inside of a catch(e){}
maybe I'm doing something bad
ah As soon as JavaScript executes this line, the normal program flow is halted and the control is held back to the nearest exception handler
for throw
you never handled the error
@rotund plover is the throw statement inside of a try{}catch(e){} block
what I would do is have it try to reconnect and after like 5 tries stop and write that to console
instead of crashing
so it would look like this
Database connection lost: Reconnecting (1)
Database connection lost: Reconnecting (2)
Database connection lost: Reconnecting (3)
Database connection lost: Reconnecting (4)
Database connection lost: Reconnecting (5)
Can't connect to database!! Quitting
hey.. anybody know any WYSIWYG html editor.. like Dreamweaver?
I don't have one there I need to add
I mean, why do you really need one? Reloading a page doesn't take long
WYSIWYG is about creating the content a different way (visually), not auto-preview/refresh of manually written HTML and whatnot
I honestly don't know anything else other DreamWeaver
Bootstrap Studio?
how come that this works? line 11
does it work? if you run it do you not get an error?
String::length is the method reference, I don't think the assignment is valid though
Weird question, but is anyone familiar with programming in Windows 3.11?
@shy helm i know, no error, nothing, and the test pass.
i'm not a java guy, so had to read up about this as i found the question interesting
the keywords that will help you with this
functional interface
SAM
void-compatibility
Your ITextToScreen interface is a functional interface
String::length is an unbounded method reference (when it's invoked it will need an actual instance of a String, and that has to be marked as the first parameter, which your text method does.)
because of the void-compatibility rule, the signature of the functional interface is compatible in that assignment
https://kb.novaordis.com/index.php/Java_8_Lambda_Expressions#Special_Void-Compatibility_Rule
again, not a java guy, but it seems it's a java 8 thing, brought in with lambda expressions
@fallen cedar well that's exactly what i was looking for. thanks for finding the reason why it works,
think i should be possible to use any static method reference that need a string
yeah, so you can do sut.text("hello") and the return value (which in case of String::length is int) just won't be usable/discarded
same way as with any other method
you can happily call a method that returns something and just ignore the return value
So if I already set up TensorFlow
How could I write python code
To say like
If Human = In_Frame:
Then it unlocks the rest of my stuff
Maybe. Look into opencv. You can do person detection with that.
Ahh nice catch, am a Java guy and this sounds reasonable—haven’t thought about it too deeply though
I missed the functional interface, I blame it being late 😉
Ive never seen that :: in java before haha
from what i know you usually use a library like vulcan/open gl that does all of the math
or just follow a tutorial
In openGL you can just give it a point and a point to look at and it does the rest, or you can say here is the point and here are the rotations of the angles.
^ yeah
you should never have to do that math on your own because i'm not sure there even really is a way to open a window without using some type of library (unless you want to go really far down into the OS API)
anyone here good with FiveM and could fix an issue that i have?
Idk if this should go here. But I’m interested in learning JavaScript and eventually other languages. Does anyone have any sites you can recommend for learning JavaScript? I’m a beginner by the way
@nocturne galleon check out w3schools and see if it's your speed.
Thanks
@nocturne galleon w3 schools, mozilla developer network, free code camp and code academy
Javascript someone?
Tutorial are outlined a few messages above and if you need help we need to know what you need help with and the context around the problem. Javascript it common enough that there is likely a quite a bit who can help.
Has anyone heard of ECMAScript?
Im making a 3d engine and was only able to get X and Y axis rotation
This is my code for it so far
It only has X and Y rotation and I am not sure how to put in Z axis rotation
@next igloo you’re making a 3D engine in scratch? You absolute mad lad
For yall who work professionally in development, how much did you actually know when u got your first job?
scratch is easier to program into than javascript
but the math is the same
so i was wondering how i can change the formulas to allow z axis rotation
i will later port the game to the ti 84 plus ce
Can't you just write C and compile for ti84 or something like that
anyone here good at c++?
How does this work cpp LookForVal = (__int8*)malloc(sizeof(__int8) * 400000000); // if i dont do this it returns arr length 5 for some reason?
but not this cpp LookForVal = (__int8*)malloc(sizeof(__int8) * 4); // if i dont do this it returns arr length 5 for some reason?
i love c++
i dont know any other langueages
while javascript is more powerful, scratch has the drawing thing built in, so i wouldnt need to code that to test the engine itself
well tbf ive never written C or assembly on ti84 but im pretty sure ive read about it
i havent written in any of those
what is your target behavior
I would want to guess that the expected result is an array of length 5. It would be allocating a ton of ram in the first one and in the second one it would not allocate enough. Just a reminder that if you want help providing details of what you are expecting would be really help full. That can make questions turn into answers.
i dont have a ton of experience with C but are pointer arrays even bounded at all? they're just pointers
thats why you always have another parameter in functions to determine length
Well, yes, but also you could receive a segmentation fault if you ask for memory that is out of your allocated memory.
yeah so im saying how is he able to determine the length of the array?
You would have to store it separately. When you memory allocate you do size of item times count of items. Then your store that number somewhere that you can recall later. You store it latter because the memory allocate might fail.
You could create a struct to store both the pointer to the array and the length.
That is what I have done any time I have an array I check that the number is in bounds before calling it. It it isn't just write a debug statement.
I was bored so my friend created this
oh yeah btw it's written in php as well which is hilarious
But that's minecraft
yeah i know so that means that OP's question makes no sense
memory is what you make it in c
Anyone have any experience with node and express?
Basically I have something like this:
router.route('/join').
get(isLoggedIn, async(req,res)=>{
return res.render('join.ejs');
}).
post(isLoggedIn, async(req, res)=>{
//Do stuff
}).
get(isLoggedIn, isInRoom, async(req, res)=>{
//Do stuff 2
});
the second get is unreachable
how could I go around this?
have you checked that isInRoom succeeds?
yes
if I get rid of the first get then I can do stuff 2
alright, you need the next param in your handler
async(req, res, next)
in the first get()
have a look at the example there
yeah thanks, newbie with express
i haven't touched express in a year or 2 so it was a good refresher
while True:
print ("Hei jeg heter Iris")
navn=input ("Hva heter du?")
print ("Hei" ,navn ,"Håper du har det bra")
sporsmål=input ("Hva kan jeg hjelpe deg med?")
if sporsmål =="Hvor gamelt er universet":
print("13.8miliarder")
elif sporsmål =="hva er kloken":
print("se på vegen")
elif sporsmål =="":
print("")
else:
print("beklager vet ikke")
pyton script
yes, that's a python script
You know whats not python script this message for https://lttstore.com
nice
i18n 
@indigo python I swear, Norwegian sounds like a dutch guy who had too many drinks xD
ikke is 'me' in dutch/afrikaans
I guess navn=input ("Hva heter du?") means: what is your name?
Yes hva heter du= wats your name
@indigo python 50% dutch, 50% german, 100% european
Am I doing something wrong here? https://i.imgur.com/H4aWXvg.png
condition ? true : false
what the fuck is C# smoking?
I don't get it.
Doesn’t make sense. If that’s the official Microsoft explanation, then my advice is to steer clear of Microsoft’s documentation. For Windows, their documentation is 110% useless (which also includes the 10% wasted time reading it). So I’d imagine their programming documentation to be the same.
well this is the c# docs so its a bit better
but maybe c# is doing something weird with the "null" value
?
ive never seen this before
ran this test
using System;
class MainClass {
public static void Main(string[] args) {
String s = null;
Console.WriteLine(s == null ? "im null" : "im not null");
}
}
got this result
mcs -out:main.exe main.cs
mono main.exe
im null
so idk
you may want to check the state of your value in other places in your program
[message deleted, guy wanted to make a streaming service] thats a pretty big task lol
like enormous
Ich lerne deutsch!
Depends on the type of streaming. There’s an open source Twitch Alternative that you can self host. No idea how scalable it is or anything else other than “I’ve tried it and it works, but I have no real use for it”. I even forgot what it was called.
@empty sentinel Are you referring to Satyr?
Could be. I couldn’t find any screenshots of it.
@spring pond I did actually figure it out in the end, sorry for not posting earlier
@spring pond improperly implemented an operator overload
x is null ? "im null" : "Im not null" would do a direct null comparison
that makes sense
ok what am I doing wrong nothing appears on the page https://paste.mod.gg/atoliqexaw.xml
also I am using notepad++ so please don't tell me to use quotation marks or write body instead of BODY because that stuff doesn't matter in notepad++ trust me I have tested it
wdym nothing apperas
for one you have no doctype
well am I not supposed to see a rectangle
also I don't think that matters I have saved the file as html it knows what it is and everything else works
this works
it kinda does matter
I am using Edge Chromium
if you are running a web server then it may add DOCTYPE
<!DOCTYPE html>
<html lang="">
<TITLE>Operating Systems</TITLE>
<head>
<style>
.menu {
border: 5px outset blue;
background-color: lightblue;
text-align: center;
}
</style>
</head>
<body>
<div class=menu width=500px height=500px><p>hello</p></div>
</body>
</html>
use this
ok
well it ends it on its own but yeah I usually end it I just have forgotten
pretty sure it doesn't
just that you don't have anything below it so it doesn't cause errors
well I have done an experiment and when I open it and inspect element the elements I didn't close have the closing tag automatically but I will close it I usually do just forgot overlooked I guess I am doing a few pages
yeah but that's not good practive
also I did close my body tag this is not the whole document
I just didn't share it because I didn't want to get your attention away with a bunch of lines that don't matter for this 🙂
ok so does it work or no?
well same thing nothing appears
well no rectangle
oh
still show the entire doc, you may have forgot to close something things
Edge is basically chrome
shouldn't the issue
I know that's weird that it doesn't work https://paste.mod.gg/zujuwimuni.xml
works on my end
?
weird
just a sanity check, you saved right?
try making a new file and paste the content
alright
how?
xD
oh great when I closed the actual html file not the new one and reopened it it works
so refreshing I guess is buggy
yeah
well weird wtf but I am glad I solved it
also it works a sit was without the doctype and html tags I am pretty sure notepad++ or something else is just autocompleting them,what do you think? I am just curious
this is from inspect element
um yeah
because no one writes plain html anymore
but I am not sharing the html just the site
for popular websites
how is it done now?
oh I see,well yeah this is just practice for school. And then I am going to add css for design
things like vue, react, ejs, pug, etc.
oh, that's new
its mundane autocompete though
never really used notepad++
it completes keywords found elsewhere in the file
but you mean autocomplete as writing or autocomplete on save
@tired juniper the reason invalid HTML documents can still be read by a browser, is because the browser does a lot of hacky tricks
many websites use invalid html
so browsers are designed to be somewhat fault tolerant
faulty html, may render differently on different browsers
well that's good because you could get lost in the tags if you are writing a big website and omit some of them accidentally
@tired juniper no
@tired juniper you shouldnt omit any of them
you will get ranked lower in google search, and such
How does uptime give me an average CPU utilization of 10+ when it only has 4 core's? I though it would top out at 4.
well yeah but if you do it's good that at least it works
@rancid nimbus overloaded.
I definitely don't say you should
@rancid nimbus its per thread. so 4 cores 8 threads has a max load of 8.0
anything higher means that it has more load than the system can handle
and thus, programs are slower
I don't think it has multiple threads per core since it is a low end system.
@rancid nimbus do you know the program htop ?
Yes.
The number is near 80-90%
Also that was in top.
yeah top reports total cpu time
@tired juniper if you're looking for an editor to easily write html and css with, I recommend visual studio code
^ the autocomplete is great
it also has support for javascript, and npm should you want to delve into more advanced web development
and debugging/testing of a webpage, I always do with the chrome dev toolkit
as for what @midnight wind said about frameworks
writing your CSS and HTML, you don't really do
I have visual studio I have been using it for the other coding stuff c# mainly so yeah I could give it a try but I also like notepad++,but yeah if I do more advanced I will definitely try visual studio
yeah
you should use a framework, and the templates
not visual studio, visual studio code
@tired juniper visual studio code is a lightweight text editor
its different from visual studio
well I have both they come bundled up
it's not an IDE like VS, VSCode is more of an advanced text editor
or I downloaded both of them I don't remember but I have it
everytime I start it up, it forces a popup: there are updates available
that kinda shit is just annoying.
gets in the way of important workflows
It could read a file before, it can read a file now, updates is 
I've written my own text editor before :3
in lua
because the built in text editor of computercraft at the time, was total crap
well there is a setting in MISC. auto update maybe that will help
on my laptop I use gedit
Vim, nano, vs and some other generic sounding IDE are the one's I like.
or nano in console
stop with the popups and just autoupdate and don't bother you. Idk never had any annoying popups but I am not sure if that will solve it
@tired juniper main difference with those is how they get their updates
on windows, everyone reinvents the wheel and makes their own auto update
yeah I guess
@tired juniper as for frameworks
I recommend most first timers to try out bootstrap
Its a simple and easy to use responsive CSS framework
for designing desktop/mobile webapps
with interactive functionality, icon sets and bunch of css presets
like, if you want a menu with options, you just have to write the html, and provide some items in class=
that's it.
only thing you need to learn how to use, is the grid system it uses
You can use the grid system to align blocks on the page
so that if the viewport of the browser is different
everything scales accordingly
Just wondering, how does an Intel chip have a many bit address buss, but still has a really low limit. I'm looking at the x5-Z8330 processor and 36 bit address size and only 2GB( likely 2GiB) max of ram.
@rancid nimbus 36 bit, are you sure?
@rancid nimbus what kind of kernel are you running
I would want to guess that also it would be 64G word's. Whick would mean 64*4 GiB.
Linux 5.10.17 x86_64.
I have same basically, except much older kernel
address sizes : 39 bits physical, 48 bits virtual
That was physically. Virtual is 48 bit.
depends on the size of the total amount of memory the MMU can handle
it scales accordingly, to switch less silicon when running
less bits = less transistors
but this is all virtual memory!
The MMU sits inbetween this
and those tables it holds is OS magic
unless you do kernel development, you never have to think about this :3
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
wat
So cat /proc/cpuinfo is giving the number to the MMU not available to RAM?
Ignore that. It is just what it has to do differently than a perfectly normal system according to spec.
@rancid nimbus its a 64 bit kernel
so address space of 64 bit
would be unnessary for such a low power SoC
but dmidecode will reveal, let me find the command
@rancid nimbus
Handle 0x0013, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 16 GB
Error Information Handle: Not Provided
Number Of Devices: 2
Thanks for the links! I will definitely check it out
@rancid nimbus just run dmidecode --type memory
Handle 0x0014, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0013
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: Samsung
Serial Number: 00000000
Asset Tag: 9876543210
Part Number:
Rank: 1
Configured Clock Speed: 1600 MHz
and /proc is all virtualized
its userspace APIs
thats what the kernel presents to the programs running on the system
nevermind what the kernel is doing
-bash: dmidecode: command not found
what distro?
Please don't tell me to apt install.
yeah no, I am just wondering
LFS.
idk on which distros its preinstalled
Linux from scratch
leel
ok
actually, this decodes the info the bios reports to the system
I always forget that is there too
with EFI the lines get so blurred
My system is an EFI system.
I would try the npm install that it suggests. I don't know the tool.
Rephrasing:
Anyone here do Arduino development on Linux using Visual Studio Code?
I am having IDE issues
why is that caption stretching so much the width is 200 and I set the margin to 0
what is that yellow field
that margin though
yeah but it's 0px,it even says it in the thing on the right in the dev tools
why is it so big when it's 0px?
Yes
I use platformio extension on vscode
I love it
it seems like my issue really lies in a bad nodejs binary
yep
yeah I always had issues with that
hey if I have target=blank_ on a hyperlink html and then I open another html using that it opens on a new tab. But then the next html page also has a target=blank_ but it doesn't open a new tab.
if I close that page and click again on a hyperlink again with only one page open at the moment it opens in a new tab again. why can't it open more tabs?
You could just install the arduino IDE and make an extension that runs the build commands and another one that uploads the code. I had written a small project in vanilla GCC to build and avrdude to upload.
would you recommend using angular to start to learn web development ? i have some idea about html css js but haven't tried much practically . I know some android dev with kotlin , so angular seemed not as estranged as react.
i have to work on some basic web based assignments for college so i wondered whether starting straight up with angular would be a good idea or not
I'd recommend to try and learn without any frameworks at first, so you understand how the underlying systems work that the framework then abstracts for you
@real shell diving into angular without any basic web development experience is a bad idea
Its a complicated framework
and even for those who have some experience, it is still a mindbender
is ther any way to hided a import comand wen it is runing widut it sowing. in pyton
we got it to worke
nvm we got it
I have a cool gif I've made for you 🙂 I don't know how I managed to put all of it in like 8mB.The game is starting to feel richer with the visual and gameplay variety in each level I recently added! I'm working on this game using only free/libre and opensource tools!
Here's the last devlog if you want to see more than a gif https://youtu.be/UdYKLcMPDQM
anyone versed in python want to help make a windows client for a thing I wrote? I don't have easy access to windows but would like to provide a client for it.
It's for my "stadia over bluetooth" project. Basically all that needs to happen is accept inocming data over bluetooth (the library I used is in theory cross platform) and translate that into controller inputs windows will use
you'll probably have to use something like this for maximum compatibility https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/virtual-hid-framework--vhf-
which is no small feat
"Welcome to driver development. Good luck"
can i make a program open on my computer
Yeah I've avoided that so far 😂
when i plug in a certain device
i want this bat file to run when i turn my piano on (plugged in via usb)
Depends on how dirty you can stand it. You can find something that can list usb devices and have a program infinite loop checking for if the device has been added
There's probably windows api ways but that will probably take longer
Or you know, open the bat file when you plug it
is there a way to make a program instantly run when u plug a usb in?
im sure theres some sort of way if u get viruses that do that
Yes read the link I already sent
USBDeview is a software that lists all USB devices that connected to your computer, and allows you disable, enable or uninstall them.
isn't that disabled in windows now
no longer works for security reasons
If you mean autoplay.inf files yah that was disabled in like windows 7. Idk if that program works haven't tried it but nirsoft does good work and they say it works 🤷♂️
Haven't been to nirsoft in like 10 years I appreciate that he is still cranking out all those programs. Prolific developer
is it okay if i paste a code here of an attempt to raycast to my fov? i wanna know if anyone is able to help me with the logic

Hey, is anyone here able to tell me if app developed with mysql 5.7 in mind will work on mysql 5.5 ? client just told me he is not willing to upgrade from 5.5, but i developed the app and datab with mysql 5.7. does anyone have any experience ?
does anyone have any experience
Someone does
explain that to my client and his old apps that require that
apps that run on 5.5, should work on 5.7 with no problem
only thing that needs to change is the driver
the problem is that huge migration
server migration and multiple databases
and the apps that they use actually require 5.5, at least I have been told that
thought so as well, aparently its not if someone keep using it
like people who use win xp or win 7 lol
u will always find people like that
glad that that's not my problems xD
yeah right? lol
@olive merlin there's no technical reason for an app that runs on 5.5, to not support 5.7
only difference is the driver
but code-wise, nothing much changed
and 5.7 to 5.5 ?
I can do nothing with that if they are not willing to upgrade it
its not my server or my company
well.. rip
yeah I have never done that as well thats why iam a little worried
i guess the only thing i can do is to try it out
@olive merlin looking at the release documentation
as long as your app doesn't use any of the above ^
it should be fine
query code should remain functional as is
though they changed how GRANT's are done, and how users are stored in the database
DQL, DML and DDL subsets of mysql have not changed between 5.5 and 5.7
great news
not using grants or USER so i think i should be fine
yep iam
I abstracted away the database layer in my code, and write ANSI only
90% of my code is invariant to the engine
so it can run on mysql and mssql just as well
Hey, so I'm looking for a recommendation for an app, anyone know where I can turn?
You are looking for an app recommendation to do what?
Or are wanting people to review your app?
@rancid nimbus I'm looking for an app recommendation yeah, I'm pretty sure what I want doesn't exist and will have to be custom built. But I wanted to do a final check!
And the app I'm looking for is a sort of asset management tool, but nothing I've found so far fits, I need a bunch of non standard values.
well depending on your experience and how scalable it has to be, you could just build it yourself
Yeah I've looked into it using something like larvel, but don't really have any experience doing something like that.
@spice silo if you want a custom information system, you really will have to turn towards databases
and writing a program around that database, which stores and retrieves information
in essence, a relational database is just an excel spreadsheet on steroids
@spice silo There are plenty of asset management applications out there. Many which would allow customization, either though UIs or programmatic user exits. Is your use case business or personal?
@warm sleet Yeah I've figured as much, too bad I'm not really good at that kinda stuff.
@dapper flax I think I've seen them all when googling, the closet I got was SnipeIT, but you couldn't really change the name of the fields without modding it. But if I'm modding I think I might as well build / have someone build a custom app.
It's for business, have a bunch of phones I need to manage, certs CNs, S/Ns, who has it and so on. Also wanna be able to add an order portal later, but for now I just need to keep trace of them.
It also needs to be onprem
@warm sleet Yeah, leaning towards that, but gotta have someone build the app first : /
@spice silo quite the opposite in fact
systems like these, you start with a database
and then build your app around the database, which implements all your use cases
Yeah but I still gotta build the app around the database, looked around and snipeIT uses Larvel, which seems cool, any input on that?
Why not? And what would you recommend me using to build the app? I'm thinking a webb app since then my users will be able to access it anywhere on any device
For webapps
you might want to just have a lightweight node.js application
If you add an sql client to the server side code
you can interact with a database
Oh really, hm, is it hard to learn?
depends on what experience you have
it helps having done some HTML and CSS and know a bit of javascript
nodejs is basically javascript on the server
Yeah I know both of those, but never really messed around with JS
you can use it to build web applications
that tutorial uses express
thats a webserver for nodejs
like 3 lines of code
to spawn a webserver
Ah okay
.
express for webserver
express-session for session cookie handling
pug, I wouldn't use...
I prefer other libraries for that
Can I then use like some kind of template to build from?
well, pug is a template engine
so it basically represents a skeleton of HTML
with small fragments of code (not really code, its part of the engine) which fills in data
this is called a "View"
View + data = html page
I prefer using this: https://handlebarsjs.com/
Hm sounds similar to what I leard about Larvel, it uses views and partial view called "blades"
yeah, Laravel is a large application framework for PHP
As for a template I'm thinking something like this https://adminlte.io/
hah
I've used that one before
for a little attempt at doing webdevelopment in Java xD
Oh okay, how'd that go? Hah
Ah nice, is that using node.js?
Nah, that's Java
Instead of express, its using Spark (its also minimalist like express)
and template engine is handlebars
lemme find template code
Hm okay
Not a lot really haha
@spice silo so services on line 28
that's a variable from the controller (in this case my java code)
which holds a list of 'Service'
and with {{#each}} it just loops over the list
and generates html for each item
Ah okay, and then puts all the servers in the list view?
If we're talking web applications, I am specifically talking about MVC
@spice silo its a bit more complicated, and trying to understand this.. I may need to go back a bit
This is a powerful pattern when developing simple web applications
"MVC"
The user, interacts with the controller
like sending a HTTP GET request to the server, to fetch a document
the controller, executes code, like fetch data from a database
this data is then represented in a model
which is used to update a view
this view is then sent back to the user
Hm okay
so think of that template, as the view
and in my case, the controller is tiny
@GET
@Path("service")
@RequiresLogin
public ModelAndView getServiceStatus(Request request, Response response) {
Map<String, Object> models = new HashMap<>();
ServiceAPIClient client = session(request).getClient();
models.put("services", client.getStatus().getService());
models.put("servers", client.getServers().getServer());
models.put("page", "Status");
models.put("page_desc", "Services");
return new ModelAndView(models, "status/service");
}
@GET at the top, specifies to my framework that this is a webserver endpoint
this is different in whatever language you are using
at the last line
I return a Model and view
Yeah okay, but the MVC pattern would be the same right?
"status/service" is that template file you saw
@spice silo yeah, so this pattern isnt bound to any one language or toolset
its a pattern you can use in any language really
Right yeah
This is an easy way to seperate, control logic, data and views
if you don't structure it in this way, you get spaghetti
the models you will be using
will most likely represent the data in your database
so controller, loads data from database, puts it in a model and combines this with a view to get a webpage
I see, well I'll give it a try I guess. It's either that or keep using Excel haha
@spice silo funny enough
you can use OLE with excel
and hook it up to an SQL database
:D
Oh, and then display the data in excel? Or what? Haha
Yea
Hmm, okay so what's OLE?
excel would generate the queries for you
some fancy microsoft crap
that integrates databases
its from Microsoft Access
Access is fucking terrible
dont ever use it.
but its another way you can build database apps
with sql and macros
Hm okay, well I've never really used it so
my university made me build an app in access
Then node.js sounds like a much better option then
but access is so shit, it'd repeatedly crash during debugging
and crash, without saving.
so rip the last 10 minutes of work
Yeah that sucks!
@spice silo but setting up a simple node project
and getting hello world to print on a webpage
that shouldnt be so hard
I recommend building each part seperately first, and later integrating them
like database and controller logic are two components
Yeah, even I could probably do that, it's just creating the relations and displaying the data I'm scared of
@spice silo see I'm a total wingnut, and decide to build my own frameworks
I basically wrote my own MVC framework xD
Haha nice, that's wayy beyond my scope
its quite simple
only annoying thing was the routing provider
the thing that takes a URL
and decides what code needs to be run
Its messy, about 400 lines. but it works
Btw I would also want to separate data in my database, I don't want all customers to see everything. Say for example I have a phone, then I want them to be able to see the S/N etc, but not who's registered to it. Would that be hard to implement, or would it be easier to just have two separate servers/systems
you need user authentication for that
most likely, the thing that will seperate user groups
would be your application
so you just check, if a user is permitted to view something, and if not return a 403
Hm, yeah I messed around with routing tables in Larvel, so got a basic understanding of how it would work.
@spice silo yeah, its a method + path
its common to use path parameters as well
so you have /customer/{id}/details
id would be userid
so an actual url might be: /customer/123213213/details
and that number is used as a variable in your code
Yeah, say that I got like a tic box or something that would mark that data as not viewable for some users.
Ah okay
laravel does a bunch of magic stuff
I am not a big fan of those big frameworks mostly because its all so overcomplicated xD
Well yeah, if you need something complicated I guess you need a complicated framework for it haha
the thing is
laravel is great
if you know how to use it
@spice silo a simple prototype proof of concept application in node
is far easier to maintain
and if you build a simple JSON api
you can even make it available to other tools
Yeah, well I need something that's simple to maintain, since I'll probably end up being the one to maintain it for now anyways haha
This is how I actually build all my web applications
I usually provide a REST API
This API describes all the functions of the application, it also provides authentication
the webpage you saw earlier, it uses the API to fetch data
Fetch data from the actual server nodes then?
well, these are the functions it exposes
how it works internally, is not interesting
if your context, the internals would be database code
@spice silo what such an API can do is basically return structured data
Its XML in this case, but you could also use JSON, something which nodejs can directly consume as an object
So that would tell the server in what form to send the data from the server?
@spice silo well, think of it this way. If you had a product catalog
you may have a service to get /product/{id}
or a way to search
your webapplication, basically takes user input, decides what it needs to do
so if the user wants to view the details on a product page
the application calls the API internally, which makes a database request
the application then uses this data to make a response (html)
nice thing about having an API, is that the application using it doesnt have to be a website per-se
it could be another program, or even a mobile app if you wanted to
since you decouple the data layer from your presentation layer
Ah I see
Yeah then you can present your data anywhere you want
@spice silo well, this specifically, is a healthchecker xD
my minecraft servers ping the backend every 5 seconds
and if they havent pinged in 15 seconds, it marks them as 'DOWN'
so when you go to load this page, you can see what instances are currently running
And would that auto refresh? Or would you manually have to refresh the page for that to show+
? *
when you send an HTTP GET to that url
you get the 'current' status
so you'd have to send another request to get updated information
I see, just curios
@spice silo APIs are Application Programming Interfaces
its basically, a list of possible instructions for a program
Yeah I know that at least haha
but APIs are special, in that they are ment for other programs
not so much for humans
though we tend to design them in such a way, that a programmer can understand
xD
Well that makes it easier to read for a programmer I guess? Haha
@spice silo lol and the controller that generates that XML above
@GET
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Override
public ServiceList getStatus() {
return new ServiceList(provider.getStatuses());
}

and that provider
public interface StatusProvider {
List<Service> getStatuses();
void ping(Ping ping);
}
its just an interface :)
Yeah okay
internals of that are a bit complicated
:3
I can see why hehe
but if you clearly define your layers
like, a data layer with a set of functions
and a presentation layer, that uses said data layer
your code will be maintainable
and not turn into spaghet as quickly
Yeah, I will give it a shot and see if I'm able to create something that works, feels a bit overwhelming though, especially since I'm not used to working with data layers yet : (
@spice silo start by normalizing the information you want to track
So, what kind of entities do you have
What relationships do they have
Yeah, basically making map and plan of everything right?
Once you have that, it gets much easier to reason about what you want to build
In UML we call this a domain model
Which you can use to build an ER or Entity relationship diagram
Its just fancy words for a diagram that describes tables and relationships between tables
Like, for example a user id, is something that you use to make relationships
Hm yeah, so is there a tool or app I can use to do all that?
Its a desktop tool you can use
I use Astah to make uml diagrsms
But astah costs money
Though they have a free version too
Draw.io is more generic
Not just UML
@spice silo pen and paper help too
Draw a box, give it a name, and inside the box you have a list of properties/fields
Or something like MS visio would work too right?
Each box repesents an entity
I use draw.io for networking diagrams and stuff that astah sucks at
Haven't done much uml in that
But they have toolboxes for ERD's
Ill send you a screenshot in a moment
Im in kitchen rn, warming up soup
Ooo nice haha
can you ask to ask though
hi i'm learning how to use git and im having some problems. Anyone here can help me out?
I'm using vscode and git and seems like any changes I made both locally and on github doesn't sync up
git on my vscode says everything is up to date even though I made changes locally, added, committed, and pushed
also the merge conflicts doesn't show
<<<<< HEAD
and the hash. It is "hidden" under the highlighted line number
it seems to be working now somehow
How in the world do I select a range of colors randomly
what do you mean by "range", do you mean an array or something more abstract
like just selecting various yellow colors basically
im not even sure what I have to do in terms of UI and calculation for that
well if you have set values then you can just use a random index
if you have a fluid range of colors you'll need to do more calculations
How would I connect an arduino to a pi wirelessly
Use a bluetooth serial adapter.
https://www.amazon.com/dp/B07T7ZZ3S5/ this one would work for serial. You could also use an ESP8266 or ESP32 those booth have wifi.
Ah ty
You could also just stick with a USB to serial. or use the usb on the Arduino.
@umbral saffron NRL24L is nice
its a short range 2.4GHz wireless protocol
uses SPI to connect
which is supported by both a pi and arduino
that @rancid nimbus posted is regular RF
can someone pls remind me what this stand for in C# ||?
th u
operators like these are just truth tables
@nocturne galleon https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/boolean-logical-operators
|| is a conditional logical OR
which means if the left operand is true, the right operand wont be evaluated
if you do a single | it evaluates both
same goes for && and &
&& will not evulate the right operand if the left one is false
like, bool isNullOrEmpty = (foo == null || foo.equals(""));
if you had these operands the other way around, it would raise an exception
Th u so match
Ty crystal
true && (() => {console.log("Statement is true"); return true})() || (() => {console.log("Statement is false"); return true})()```
This takes advantage of the short circuit feature in javascript to do if else logic. The same could be done in c# at least in concept.
You could also do if, else if, else logic too.
Just to add more information about it, but | is a bit-wise or operator, & is a bit-wise and operator. The || operator is a short cut operator it is lazy. It only wants to do what is absolutely necessary. The || operator checks the left side first. If it is true then what ever the left side is it does not have to check the right side. The && operator is also lazy. It realizes it is not going to be true if it already checked its left side and found that the left side is false. This means that you can check if a pointer is null before then trying to check its value since it doesn't matter what that value is since it is not set.
Adding a custom olcOverlay in openLDAP with this ldif, but getting an error. Anyone spotting whats wrong with it? Of what I've gathered from googling around this should work
dn: olcOverlay=adminof,olcDatabase={1}mdb,cn=config
changetype: add
objectClass: olcOverlayConfig
objectClass: olcMemberOf
olcOverlay: adminof
olcMemberOfRefint: TRUE
olcMemberOfGroupOC: service
olcMemberOfMemberAD: serviceAdmin
olcMemberOfMemberOfAD: adminOf
This is the error:
additional info: <olcOverlay> handler exited with 1```
ok
listen here pro code formatters
Should there be a tab in this whitespace
or should i remove that white space?
or should it remain at nothing on the row
no flame for the open parenthesis on a newline plox

tell me
nothing on the line or fill it in with spaces/tabs to make it equal to the other lines
I don't
you dont ?
im confusin
Remember who you are
i know
Yes but should you leave the tab/ space in the source code
It took me too long but I finally got my testbench for AES128 CTR-mode working
im developing a line of more and more complex Minecraft storage computers, my first iteration is the v1 of my "C:Drive" line up, the lineup is my only current one as i have just gotten into red stone computer development. my most recent/second iteration is the C:Drive 2.0, which has 8 times more storage than the 2bit v1, and a 4x4 display.
what functions does the CPU have
its just a series of 32 'and' gates that turn 1bit of memory either to 1, or 0, depending on the users input
those switches choose which bits you want to change, and the two buttons on the right select the value you want to change them to
the C:drive, is less of a minecraft computer, and more of a minecraft solid state drive with a display that shows the value of the bits, and an interface that lets you alter the bit values
hence the name
i still cant believe this all only took me 12 hours to learn how to do.
Awesome
You should work on some more ALU operations
and a selector input to choose which operation happens
easy ones to do are OR, NAND, NOR, XOR, XNOR, and NOT
@nocturne galleon i actually help teach a college class in digital logic, which is precisely what you're doing. If you ever have any questions or need advice just ask me
i have examples of or, nand, nor, xor, and xnor in minecraft already, and building them into a system is going to take time and more effort, but ill get to it eventually. not 'NOT' though, ill look up and see what that is and how i can make it work in minecraft. and okay! id be happy to ask for help in that regard! ^^, thanks for the offer!
Yw
And NOT is just one input, not two inputs. It just flips all the 1's to 0's and vice versa
oh okay, nope, i have that already, just forgot x,)
i haven't slept for like 3 days now, i should probably get some sleep then get back to my development since i have the time to.
Oh yeah get some sleep
may i contact you via dm's if i have questions? or should i ping you here instead?
either is cool
if you wanna show off do it here 😛
minecraft redstone is cool and i'm sure other people here would like to see it
thanks
@nocturne galleon if this kind of stuff interests you: https://www.youtube.com/watch?v=fCbAafKLqC8
More on breadboards: https://www.eater.net/breadboards
More on the 6502 project: https://www.eater.net/6502
Here are the graphing calculator models if you'd like to play with them:
https://www.desmos.com/calculator/txls6jc88c
https://www.desmos.com/calculator/i75gnzi3jb
Support these videos on Patreon: https://www.patreon.com/beneater or http...
oh, okay ^^
Its a 35 part series on how to build a CPU from scratch using only logic gates
TTL, transistor-transistor-logic
okay, thank you!
it may not get you to tinker with electronics, but it does explain the reasoning process when it comes to designing an ALU
and I'm sure a redstone computer would do this along similair lines
i actually like tinkering with electronics already so ^^
ahh, then its right up your alley
Let's build a circuit that displays an image on a VGA monitor! In this video, I talk about how VGA signals work and build a circuit that provides the correct timing of sync signals so that a monitor recognizes the signal.
Support these videos on Patreon: https://www.patreon.com/beneater or https://eater.net/support for other ways to support.
-...
This one is also quite good ^ :D
ive seen that already! ^-^
it goes in detail on VGA timing and such
happy electrician noises
coil whine
xD
Hey, anyone know a bit about HTML and htaccess here ?
Nobody
HTML yes but htaccess no, because htaccess is Apache thing while I use nginx instead
Anyone with little knowledge in SQL?
i know how the relationships and stuff like that works but i dont really have experience writing queries
I'm stuck with sum between 2 tables
are you trying to sum a specific value in those tables or...?
well you could take the somewhat inefficient route of just SELECT *ing from both of the tables and using list comp to sum the value you want
i usually use an ORM for database access so idk what the exact commands are
I already did for both separately how can I combined between them?
well just add the two values?
SELECT movies.category + shows.category FROM `category` WHERE category.id='1' This is for example
this not working
let me do a bit of research
ok I'll keep my research to
it looks like this should be SELECT category FROM movies WHERE category.id=1 and another query SELECT category FROM shows WHERE category.id=1 then sum all of those values
you could use JOIN queries but idk how those work
ah right let me check I have an example of join I think
@dim lava how would i go about making a binary counter so that my computer can have a stopwatch of sorts?
You would need multiple addrs. https://en.m.wikipedia.org/wiki/Adder_(electronics)
An adder is a digital circuit that performs addition of numbers.
In many computers and other kinds of processors adders are used in the arithmetic logic units or ALU. They are also used in other parts of the processor, where they are used to calculate addresses, table indices, increment and decrement operators and similar operations.
Although ad...
Each addr would be a bit and rou would set the input on one side to be 1 and then have a short tem memory cell and a clock.
Actually multiple half adders.
In hardware or software?
its in minecraft ;-;
im building a redstone pc, to the best of my abilities
my last version just let you decide whether the bit was 1 or 0, and had a display to show the bit value
the memory needs to be updated since i figured out it causes 4 ticks of delay, and my new memory design only causes 1 tick
If it's just seconds it's easy. One register (4 bits wide and you can count up to 15. 8 bits up to 255. 2^n - 1), and one adder of the same width. Just have the adder only increment 1 or 0 (based on if it's counting), and the other input is the value of the register
You'll be dealing with clock cycles now at this point btw
oh okay! ^^ thank you, ill write this down for later, im taking a break from this for a bit (heh, nice)
Each clock cycle the stop watch may increment by one
okay
Remind me tomorrow and i can draw a block circuit diagram for ya
Once you get this working, you can probably get to work on a making a simple register file. That would be very fun. You'll be able to have variables and intermediate variables and start calculating equations of multiple operations
(frankly you can just make this completely separate from the cpu . It will be a good way to see how registers interact with clock cycles over time)
how do i put svg pictures into an html table that also randomize?
so i just need to replace these numbers with those svg code images that randomly change on refresh
so like img-1.svg img-2.svg ?
no the whole code
like this <i class="fi-rr-magic-wand"></i>
that doesn't make sense
elaborate your problem using sample code
sample code?
No
look my problem simply is, i have no clue how to change those numbers in the picture to like small svg pictures and i know u can use inline code to picture those svg pictures
google also hasn't been alot of help cuz i don't know how i can search it i tried a few things
@errant raptor well first you need the svg pictures themself. In a vector editing program like Illustrator, you can save the file as an svg
funny enough, SVG is just XML
describing vectors and curves
@dim lava he's talking about literal SVG in html, which is possible
this ^ is output from a python program
#!/usr/bin/python3
import xml.etree.ElementTree as ET
html = ET.Element('html')
body = ET.SubElement(html, 'body')
svg = ET.SubElement(html, 'svg')
svg.set('width', '500')
svg.set('height','500')
def line(start, end, color):
line = ET.SubElement(svg, 'line')
(x1, y1) = start
(x2, y2) = end
line.set('x1', str(x1+250))
line.set('x2', str(x2+250))
line.set('y1', str(-y1+250))
line.set('y2', str(-y2+250))
line.set('style', 'stroke:'+color+'; stroke-width:1')
N = []
E = []
S = []
W = []
for i in range(1,9):
N.append((0, i * -30))
S.append((0, i * 30))
W.append((i * -30, 0))
E.append((i * 30, 0))
for p in N+S:
line(W[-1], p, 'red')
line(E[-1], p, 'red')
for p in W+E:
line(N[-1], p, 'green')
line(S[-1], p, 'green')
ET.dump(svg)
@errant raptor take a look at those examples above ^
finally got around and fixed the last bugs on my rather strange homepage (yeah its a clock) (http://www.perbj.dk) if you want to see what it looks like
@dim lava just made my first full and half adders following this guide https://www.youtube.com/watch?v=1I5ZMmrOfnA
Take the 2017 PBS Digital Studios Survey: http://surveymonkey.com/r/pbsds2017. Today we're going to talk about a fundamental part of all modern computers. The thing that basically everything else uses - the Arithmetic and Logic Unit (or the ALU). The ALU may not have to most exciting name, but it is the mathematical brain of a computer and is re...
yee, its just so i can easily horizontally stack it
Ofc
I don't know if you knew, but there are designs on the minecraft wiki for all sorts of logic gates and RTL components
cool ^^, ill check that out, but for now, time to work on a 8bit ripple adder :>
||kill me||
oh hey, i optimized my adder to be 4 blocks less in length while keeping height and width the same :>
also installed a fabric and added 3 mods to make it the game run at 500+ fps on my computer, vs the original 90-120fps, the three mods are
sodium- big fps improvement
lithium- improvement to tick timing
phosphor- chunk loading time cut in half
just in case someone needs these so that their projects run smoother.
Are they saying to just use A >= 90, B >=80, C >= 70 and anything under 70 would also be a "C"?
You should get worldedit as well. It helps so much with designing redstone stuff because you can copy and paste stuff, and there is a ton of repetition on computers
To make an 8 bit adder all you do is take the full adder and copy it 8 times, with the cout each adder connected to the cin of the next
Lol
I actually changed it to that because i did short the main board of my tv i was trying to fix
oof o-o
well if it makes you feel better i shorted the heating wires on my 3d printer, and now it's mainboard is fried, but it can still be controlled by my pc, although the hot end doesn't heat up anymore.
also, new memory design, super compact and low latency :>
I have a 1x4 tall memory design iirc
BR <- I believe set is here but i kinda forget
TBT
BRR <- Data value here
BBB

