Jump to content

sample_text

Member
  • Posts

    7
  • Joined

  • Last visited

Awards

This user doesn't have any awards

Recent Profile Visitors

1,155 profile views

sample_text's Achievements

  1. You don't need jQuery for this. The reason why your code doesn't work is because document.getElementsByClassName returns an array of elements that contain a specific class. You would have to loop-over this array. Here is a quick example: // ------ Example using es6 ------ const elements = document.getElementsByClassName("test"); elements.forEach((element) => { element.style.display = element.style.display === "none" ? "grid" : "none"; }); // ------ An easier to understand example using es2015 ------ var elements = document.getElementsByClassName("test"); for (var i = 0; i < elements.length; i++) { var element = elements[i]; if (element.style.display === "none") { element.style.display = "grid"; } else { element.style.display = "none"; } }
  2. Maybe this will help: https://vulkan-tutorial.com. It will require C++. Low level languages are hard to avoid when working on these kinds of things. I also found this github repository that might help: https://github.com/justindriggers/vulkan-java-api Just google for "vulkan tutorial" or "vulkan sdk <Insert the language you want to work with>"
  3. Hi! In this post I'll be posting stuff about a vacation project I started a week ago. It's called plane engine (inspired by floatplane). I'm not trying to copy floatplane, I just wanted to try to build my own engine ?. It will be fully written in NodeJS (es6). I'm thinking of improving the performance of some parts (mostly the transcoding service) with native C++ bindings. What plane engine will do: Trans-coding media Serving media Handling metadata Handling extra info linked to the media (like comments, etc...) What plane engine will NOT do: It won't be a full video platform. I'm probably not making a frontend for it (I just want to build the backend. Maybe I'll do something in Angular or React if I'm still interested in the project ?). It won't handle any user account stuff It won't auto scale. You should probably implement this on the loadbalancer layer or use a central performance monitoring system. It won't handle payments, etc.. (This could be implemented in another microservice using something like Stripe, etc...) It won't be production ready. I don't have the resources to fully test this project without deployment. I'm not planning to use this in production. Idk, I'm just making this for fun The architecture The application uses a conveyor belt system design. The application is split in multiple microservices that each do it's own thing. This allows for easier maintenance, smoother updates, easy bottleneck cancellation (spawning more instances for a microservice that takes longer than others). Microservices allow for dynamic scaling, this is a big cost saver because not every service has to run 24/7. Also, when your site is on high load, it can spawn a couple extra services. Splitting the application also makes is so you aren't bound to run the full app on one platform. For example: you can host the injection service on a cloud provider (like AWS or GCloud) and host the transcoding service on your own infra. It's based around MongoDB. There are some reasons why I chose for this: It's nice to use with NodeJS It has GridFS (I'll talk about why this is nice). It's ok for temporary storage while processing. It's a bit slower than normal storage. But It performs great from my experience Like almost every other database, it scales nicely Here is the "path" the video takes when a creator uploads a video. First, it's handled by the Injection service. This service creates an entry in the database. This entry contains the video metadata (description, title, etc...). It also contains an unique ID that points to the video file in GridFS. I use this only for the conveyor system. Once the video is done processing it will be stored on a storage server (still have to do that service ?). It will also store a state with the entry, each service checks the database for entries with a specific state. This describes what to do next (eg. transcode, publish, etc...). This is probably not the best solution. A better solution would be to make it event based. The injection service doesn't do much more. It's focus is to quickly move the video into the processing queue. The second service the video will reach is the Transcoding service. This service transcodes the video (who thought ?). It checks the database for entries with the transcode state. It will transcode the video to the right formats for serving to the right platforms in multiple resolutions. It currently uses a simple solution based on ffmpeg. I'm still working on this service, I'm looking into native C++ bindings with some CUDA magic. I'm still working on the rest of the services, these will probably handle the distribution of the transcoded media to multiple servers around the world. It should update the database once it has stored the transcoded media on a storage server so another service (something like a content serving thing) knows what storage servers have the media. Once it has been fully distributed it should also remove the files from GridFS. It should also move the entry from the queue collection to a permanent collection for permanently storing the metadata. Storage servers should also check with each other for new files for faster distribution. This would also fix the problem that the distribution service can't upload media to a storage server that's offline. I'll update the source to GitHub once I have most of the services done or in a state that the full process works. - A 16y/o who loves to code ?
  4. Introduction In this topic, I'll show you how to get an SMS everytime LTT uploads a video without programming. Before I tried this method I wanted to make something using nodejs and whatsapp. But unfortunately, there aren't really any supported whatsapp libraries for whatsapp because this is against their guidelines. After that, I looked into twillio. But this costs money and I'm poor. So I tried iftt and I saw they had an SMS option and youtube integration. This was the reason for me to use iftt. Setting up the applet The first thing you have to do is visit https://ifttt.com and login/create an account. After you have logged in, go to "My Applets" and create a new applet. Click on the word "+ this" and search for "youtube" and click on it. Click connect and give iftt permissions to manage your account. Because iftt can do lots more than only watch your subscribers, it asks for higher permissions. Once you've authorized iftt, you will be redirected to the next screen. On this screen click "New public video from subscriptions". Select Linus Tech Tips from the drop-down and click "Create trigger". Now click on "+ that" and select the way you want to be notified. I've chosen for SMS. There is a limit on the number of SMS messages you can receive in one month. You can find more about this limit inside the phone number verification popup. It will now ask you to verify your phone number. NOTE: DO NOT USE A + IF YOU ARE FROM OUTSIDE THE UNITED STATES, USE 00 After that you can edit your message, I've chosen to use the default. Now click on "Create action" and "Finish". Congrats! You now receive SMS notifications every time LTT uploads something. You can also use this for other channels like Techquickie and Channel Super Fun.
  5. Hey 1080, It looks like there is something wrong with the fade class you've added to your slides. This class will be default set the opacity for your element to 0. You forgot to overwrite this. Have a look at step 2 on the w3schools page. - Marnix
  6. I love the new text to speech api from google!

  7. This project is really different than others. Others are usually heavy and large. I hope this will become the new standard! The only thing that would be even cooler if there is a (small) computer inside of the projector so you can use as one system.
×