• Breaking News

    Saturday, September 4, 2021

    How does this website change it's URL as you scroll without a page refresh? Ask Programming

    How does this website change it's URL as you scroll without a page refresh? Ask Programming


    How does this website change it's URL as you scroll without a page refresh?

    Posted: 04 Sep 2021 07:44 AM PDT

    The website in question - https://amazonadviser.com/2021/08/31/carnival-row-season-2-not-coming-september-2021/

    Using latest versions of Chrome and Firefox, as I scroll down from one article to the next, the URL changes but the page itself doesn't refresh. This is a really cool little feature I'd like to implement for my own projects but I don't see in the source code where it is being done.

    submitted by /u/zynix
    [link] [comments]

    HTML Forms Submission To Heading??

    Posted: 04 Sep 2021 05:18 PM PDT

    Super noob here, I have a form box where people can paste links for twitch accounts. I just want to take the account name 'swagg' on https://www.twitch.tv/swagg and turn that into a heading for the next page. Is that possible?

    submitted by /u/kathan123
    [link] [comments]

    can someone explain me inside loop (sum = 0 ????????)

    Posted: 04 Sep 2021 09:42 PM PDT

     for ( i = 1; i <=500; i++) { for ( j = 1, sum = 0; j< i; j++) { if ( i%j == 0) { sum=sum+j; } } if(i==sum) { cout<<i; } } 
    submitted by /u/Infinite_Acadia761
    [link] [comments]

    What would be the best coding language to run simulations with?

    Posted: 04 Sep 2021 04:34 PM PDT

    I would like to create my own simulations (biology/ecosystem related ones) and have full control over everything.

    It's not going to be too complex just a few variables I imagine.

    submitted by /u/the1andonlyaidanman
    [link] [comments]

    How difficult would a person tracking system be to implement into a drone?

    Posted: 04 Sep 2021 07:51 PM PDT

    A system that can identify a particular individual, even if others come into frame, and determine their motion in order to react to it by following them.

    I believe OpenCV would take some of the work off my shoulders. How difficult is the rest and what's a good starting point?

    submitted by /u/NameSearchinnn
    [link] [comments]

    I want to make a website that automatically plays a video when visited. Best method of approach?

    Posted: 04 Sep 2021 07:43 PM PDT

    I have an NFC chip implanted in my hand. Oh yeah. You read that right. Well actually I have one chip with an 13.56MHz NFC chip and an 125kHz RFID chip in it but thats a different story.

    At the moment when a smartphone reads my chip, it plays the following video:

    https://youtu.be/dQw4w9WgXcQ

    It was easy, and I've had my fun with it. Now I want to tackle what my original plan was, being: A website that automatically plays a video I have (it's the game over animation from Rolling Thunder). The animation has audio that I would like to play as well. In addition, I'd like for a "Game Over" text to fade onto the screen. Ideally, this would take up the entire browser window.

    I took some web development in highschool, so I know the absolute basics. I'm rusty nonetheless.

    I'm dramatically better at video editing. So my idea was the following:

    1. Create a video formatted for mobile

    2. Put all of my desired visual audio effects in the video, including the fading in text.

    3. Embed? (Hope I'm using that right) the video, and have the whole thing automatically play when the website is opened.

    From what I've gathered, seems like GitHub pages is the way to go. Seems to be the best free option for what I need.

    So my questions are. 1. How would I go about making a video automatically play when a website is opened?

    1. Does anyone have a better angle of approaching this problem? Completely open to suggestions

    Thanks!

    P.S get Rick rolled

    submitted by /u/Bleach_Kidd
    [link] [comments]

    Any literature in solving the Chicken and Egg problem of Drivers and new operating systems?

    Posted: 04 Sep 2021 03:05 PM PDT

    Been browsing a few hobbyist operating systems and some of them look really cool. One of the problems they all face are having drivers for peoples peripherals. It seems to me like this will always be a problem for anyone developing a new operating systems. Is there any literature out there that proposes any solutions to these problems?

    I know NetBSD has a hardware abstraction layer to make creating drivers easier, but I don't know too much about it. It seems like it only covers porting drivers to other platforms running NetBSD. I guess I'm talking about an operating system/world that can eliminate drivers in the first place

    submitted by /u/Fibreman
    [link] [comments]

    Recommendations about Graduation project

    Posted: 04 Sep 2021 06:26 PM PDT

    Ideas and suggestions please ^_^

    submitted by /u/Mr-Baymax
    [link] [comments]

    Is a method in Java, basically the same thing as a Def function in Python?

    Posted: 04 Sep 2021 11:37 AM PDT

    I need to write a documentation for a style sheet system for my program, where can I do this?

    Posted: 04 Sep 2021 07:28 AM PDT

    I stream the development of this program and some people have asked if they could make a style for me. I have written the program in such a way that this was possible from the start. The style sheet is a css file or combination of css files. I just need to write a good documentation for the different classes and property names that are used withing the program. Where or how can I make such a documentation so it is available on the internet?

    (Program made in Python, with Pyside as the Gui Library)

    submitted by /u/DirectiveAthena
    [link] [comments]

    Is there a way to generate a hash of the directory of an app published to the app store.

    Posted: 04 Sep 2021 10:42 AM PDT

    Suppose I am trying to verify that an open-source project published the same exact code that is on their github repository. One way to do this would be to take the hash of the github repo, and one of the repo published to the app store.

    Do app stores release this type of data? If not, they should since it is not a risk to the source code since it should already be open-source.

    submitted by /u/EdgedSurf
    [link] [comments]

    Micro-frontend architecture: Is it worth it?

    Posted: 04 Sep 2021 10:36 AM PDT

    I'm asking this question because it seems more and more companies are turning to micro-frontends. In fact I have recently moved to a project using the micro-frontend architecture in full effect. What are the benefits of micro-frontend architecture? I just don't see them compared to the downsides.

    My opinion: It's not worth it. I believe that establishing a good structure in your FE application for delivering pages is way easier, more intuitive, and easier to work with, both from a developer standpoint and a DevOps standpoint. Combined with all the ubiquitous microservices most places have, I sometimes long for the time of the monolithic app.

    For example, a project I worked on had loads of microservices (this project had regular architecture for the FE, no micro-FE). Each performing one specific task. But all differed in their API contracts, some differed in their auth, and so we had to add another microservice, a back-end-for-frontend (BFF) to collect the information from all of these microservices and provide that to the front-end in the format the project needed.

    What are your thoughts?

    EDIT: Just to show how disparate these microservices can get, some are .NET Core, some are NestJS, others ExpressJS, others communicated with gRPC, some with websockets or SignalR, some send AWS SNS messages out to some topic where another microservice picks it up from a queue and calls another microservices and on and on.

    submitted by /u/angle_of_doom
    [link] [comments]

    Unreal Engine 4 problem

    Posted: 04 Sep 2021 08:01 AM PDT

    So I am using Blueprints (fastest way and the messiest) and when I crouch normally the player crouches. But when I release the crouch key it goes back up but the camera is a bit more down than in it's regular place. Like it has fallen down to the player's chest. Thank you!

    submitted by /u/MrgFffYT
    [link] [comments]

    OSSU CS Curiculum

    Posted: 04 Sep 2021 05:30 AM PDT

    Hi there. I have read a post recently about OSSU CS curiculum and instantly became fascinated. The questions now are if this is OK curiculum for a novice developer, is there enough math, and last but not least what do you think about it in general? I learn Python, C and Calculus by Gilbert Strang (first book). Is it worth that to use the OSSU curiculum instead?

    submitted by /u/Mike_Paradox
    [link] [comments]

    Can we only run a specific part of a game without running the whole game?

    Posted: 04 Sep 2021 10:30 AM PDT

    The game in question is Crusader Kings 3. It has a feature of ruler designer and it takes approximately 5 minutes for the game to load on my pc, can i just run the ruler designer so maybe it loads faster.

    submitted by /u/Kind_Maintainence
    [link] [comments]

    Help me think of methods of on how to learn coding without a computer

    Posted: 04 Sep 2021 06:00 AM PDT

    I have limited access to a computer. How do I learn to code?

    submitted by /u/Successful-Fee4220
    [link] [comments]

    Help with formatting in vscode

    Posted: 04 Sep 2021 09:36 AM PDT

    I am using ruby-prettier and on the README is gives you this:

    ./node_modules/.bin/prettier --write '**/*' 

    That goes through every file if it is a .rb file and formats it. How can I change that to just format the current file so I can create a shortcut to just use on the current document?

    submitted by /u/blockchain_dev
    [link] [comments]

    From Django Vue webapp to desktop App

    Posted: 04 Sep 2021 09:34 AM PDT

    Hi Reddit,

    I have a Vue, Django integrated project. I hosted the Vue project on Netlify and the Django project on Heroku. A python script (integrated into Heroku) is called on certain buttons which extract data and posts this to the Django API and PostgreSQL database to be viewed on the frontend.

    Now because the Python script can take quite some time to run, it would be more efficient if it would run from the PC power of the users instead of on the Heroku server. This is why I want to make a desktop application out of my project.

    How should I approach this, is it feasible? And do you have any recommendations for me?

    Thanks, appreciate all the help!

    submitted by /u/aubamejan
    [link] [comments]

    Can somebody translate this

    Posted: 04 Sep 2021 08:30 AM PDT

    I just received this jumbled up text and apparently it can be translated though I searched all over the internet for an decoding method but got stuck after trying to encode it into Hex. I think that this jumbled up text has something to do with coding, but if it doesn't please inform me so I can delete this Post. If someone knows what this text means, I would be thankful if you could tell me how to decrypt the Text.

    о««ÇT^&öÒí:~õq5Ý;Œ¿|÷\`Bʃ †kÒè%FrÕh´²[½ûŒÌS4£5"^ðÚ‚m©ƒGŽ¨‚K¼ÑN){8"æ‰ê.VÏ*| bÌJ¢ŒÍàbæÀ×

    '¥ã›Ñ@ÃüC§Ys£Ÿ#|lç/ÚVª

    ,ñ휰+v×G%ñbÕDÂÅ's²ŒgWRïEProceed*†,å ³ÿY¢šÝ'òóYAç"F4 ØrF1Ù#¢¯+ëÞà"ŒUÑHsY"×éÈT‰Ènþv}<…3ôO¥¼Æe Îû§$ŸäýÊ .n°­†VBŠkÊw>Gî>êP^ŠÂfÝ1¿š! ÔÁ½…7ðïÉ›Y,Ã?ë˜ØO½ Q^µ€^Ðï

    ››½ƒKýj§L©Éè'ÐŽxòCîB%ÉÊlÞ ¶sFÉò˸á9ý‰Ç+áÄcŸÏw¢Ø­•õ9§†CŽ¬7ü ž¤óålâòÉlq…† 3–=Øö'Ï'wš®Íäƒ4ÿi 'ñ¸|Í»}h^É_ÿˆv·4)á'WS>JÙì¤9Ë:MõãòU¨lƒE1!¥eízO'!zbŠf÷ñˆÓ­$á3+)»ôaçE¡ó5—'6‹Í©€6Eƒ]wnJ­#‚[O—/Ù)HõÐwith file/~•³'6Ú¦Py®_©¹

    ÷6;xÜ7tø»ãŽN]¦6'U2

    Htv¿˜ $W‡›¿€SÀdáï$)͘1-`¨r¯Žå×ä‡S™•ÊVîX-¾6l/äVsiáöc-ÝYÿÀûr±t\R)q'E 8# š

    CšÇºV§Šµsc>Vû" ¨‡_pTª/µ'éJÝŽª^É^Ìö]`µF(ìžT#Íàã^ç-!

    £ÁÈ3>Ħ'SòR|ÀŸçäÕ{ÜHŒiHöGjñ€~ T«ÏŸ"

    ÀQx›£ý° T¶aÀ¥êT…øñúm$€ƒ1jý"J±@Gïñ~%öhÏø9ÓAÍçX ¦AåëòHmòOàÈqòÄЙ•.-‰ô´†ì0ïU]cf È3õYX¾—÷…Üù@„Æ»ºVáM$<"Ë‹^ªÓfu*XvÙÍ;ípkižÐß

    Ê5²> ÛC1öŒ˜jþz£õÅŶ/©môép…‰@à2¬^­»ÙŸf‹‰gK$þ¤†åó öš ƒrO¤ä»81k

    4Ø<vÐ6ôŠxR{eØÝÄ…x5R½/¨ƒ1QwÁ£JQ"²eî&ôeã¹&ÆÚMÉ}uÉDÜiF± eRw™Î?ã§u¨ÖVxìNxóÏðÌ8ÝyÁ1âñF'Ún.L2zÉ'5¡:7f eƒó×Â%ÏßÊ8Ÿ

    §¶k#]^Ö¨3jNòqP.{ý˞߈2æ|Sø´?¾Ç!VÅ?ir»}VqB;HA÷I.3Úm‚PÀ,i±òCܽ¦5ðWŽ~×5Á€!Qz›!í¥êí<V¢2q2™³ì„ÉŠ¼žðÓ!Ü©É@‰@*R@sí,Aþç<s°¤-H/z;'

    œ»?h‹h´Ð5\¼„`†ê»n*´¸Äíü[

    §cO ºõmokSÏÛ=ÀßÍXEG‡,ðá^ýQ'ÐÀÿ8ÌÍQó§|åÈ!öST±Í»"eI‡Pk'Æ^¦ ½ÔÍVác4#_]1ïÝcP>Ï¿PB§üÑu›Ÿ{¿†E›àM»

    submitted by /u/XXLSpiele
    [link] [comments]

    Sharing Data on LAN Efficiently?

    Posted: 04 Sep 2021 07:00 AM PDT

    The situation, you have a directory and want to mirror that onto a remote computer. The goal is to minimize cpu/ram usage on your PC. The question is, to send the data from your PC to another computer on the LAN, which of the two options use less cpu/ram on your PC?

    1. Mount a share to your PC. Copy data from your PC to the share.
    2. Share data from your PC. Mount the share on the remote PC. Have the remove PC perform the copy.

    I've no clue where to find the answer or test results. There's numerous hidden variables and in some cases I believe 1 and 2 would be identical usage of your PC's resources. Also #2 poses a security risk as your data is upstream, that's not the question here though. I'm going to drill down into the problem to understand it more, if you have an idea of the answer or how to find it, please feel free to reply at any time.

    Both situations #1 and #2 above perform the same function. Your cpu/ram has to be involved in some way sending the data from the drive to the NIC, no matter if 1 or 2 is used. The copy method is a mirror, nothing fancy, just a mirror. But even for a mirror quite a few bit of things need to be found out.

    I'll call A the source and B the destination drive. I don't know how it works, but say the cpu receives an interrupt when the data on either drive changes. That assumption sounds a bit lame, as the source cpu should be less likely to know when the destination drive's data changes as there's no way to send an interrupt, or flag a change of data to my knowledge.

    1. A has a file that B does not
      1. copy A.file to B
    2. A has a file with a newer time stamp than B
      1. overwrite/update A.file on B
    3. B has a file with a newer time stamp than A
      1. overwrite/update B.file with A.file
    4. B has a file that A does not
      1. delete B.file

    It's not just a simple data stream from A to B, there's logic required. The goal is to minimize cpu/ram usage of this mirror. If there was another CPU in the PC that had DMA to A, maybe that'd be better. I believe that is possible with extra hardware or possibly in Windows 11 w/ DirectStorage. Without windows code I'm not sure. Heck I have no clue how to do a mirror without 3rd party software in windows. Two that I know of, WSL2 and FreeFileSync. The latter is not that efficient. WSL2 would be the linux kernel running alongside Windows, and the same command to do the mirror would be used for both #1 and #2 above, rsync. Which is open source. So I'm guessing it's a matter of testing transfer rates & resource usage with rsync for both #1 and #2 above.

    submitted by /u/blitz4
    [link] [comments]

    Should I go to school for programming if I’m bad at math?

    Posted: 03 Sep 2021 10:39 PM PDT

    I have been programming from home for around 4-5 years now. Started with Minecraft modding and have worked my way up to making websites, small indie games, and little programs.

    I love every aspect of coding and could sit at my desk for hours on end even if it's just for debugging purposes. The catch is that I'm awful at math, I'm worried that if I go to school then the math portion of everything will end up killing me lol. Does anyone have any suggestions? Should I just dead give up on my dream of being a programmer or should I take the risk? Or has anyone else's maybe even been in a similar predicament?

    submitted by /u/ThomasDZN
    [link] [comments]

    Please help me deal with Java Null pointer exception

    Posted: 04 Sep 2021 06:07 AM PDT

    I'm new to this sub, hope I'm not making a mistake, please tell me if I am

    I'm a student trying to make b+tree with Java

    new to Java, and just started writing this code

     value_pair compare_value=new value_pair(); compare_value = this.firstvalue; value_pair newvalue = new value_pair(); System.out.print(compare_value.key); while(true) { if(added_key==compare\_value.key) { 

    last line give me "Exception in thread "main" java.lang.NullPointerException: Cannot read field "key" because "compare_value" is null"

    But the print(compare_value.key) does not call any error

    key is integer

    value_pair is linked-list with value & key

    can you tell me what is wrong?

    Thanks

    submitted by /u/HYIS_
    [link] [comments]

    Dealing with large database queries

    Posted: 04 Sep 2021 01:34 AM PDT

    I work with a web app that queries user data in many different scenarios, but we will always end up with the same user data output (mostly). Some of this comes directly from the user table; name, phone number, email, but some will come from other tables, like work jurisdiction areas (zero to many).

    The app has been built by left joining tables, like jurisdiction areas, and more like it. However, this has led to buggy query code since the jurisdiction areas and other addon user data have certain conditions that also need to programmed into each query.

    My idea is to not join the jurisdiction and other user data tables to the query that gets the user data for each specific requirement. But rather have a class that calls user jurisdiction area by user and company (the selection includes another condition, but let's keep things simple). This is called after the specific case for the user data requirement is met. So we would pass the user ids to this user jurisdiction area class and have it return the user jurisdiction area for each user id. Finally, iterate through the first query (the one that get's the user data for the business requirement) and append the user jurisdiction area to each user.

    The plusses I see for this is that you always know what you are getting and that the data is correct. It is modularised and testable (I guess).

    The negative is that it probably requires a little more code, instead of just adding a join and a couple of conditions to each query that get's user data. I could of course create a method that appends the user jurisdiction area details to an array of user objects/arrays and put the iteration logic inside there.

    Anyway, what do you think of this. Is the idea somehow flawed? Is there some better way to approach this problem?

    Thanks.

    submitted by /u/hey__its__me__
    [link] [comments]

    No comments:

    Post a Comment