• Breaking News

    Sunday, March 14, 2021

    Have you ever thought to yourself: "Why does this API exist? Why would someone or a company provide the public with this kind of data"? Ask Programming

    Have you ever thought to yourself: "Why does this API exist? Why would someone or a company provide the public with this kind of data"? Ask Programming


    Have you ever thought to yourself: "Why does this API exist? Why would someone or a company provide the public with this kind of data"?

    Posted: 14 Mar 2021 05:41 PM PDT

    There was a point in time where Yahoo Finance would just let you take their data through an API. I always wondered what they had to gain by letting people use their service and drain their servers without clicking on any ads. Of course, there are other examples that are much stranger. I'd like to hear about them

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

    How does the PC turn lines of code into transistor actions and back?

    Posted: 14 Mar 2021 09:25 AM PDT

    My question is pretty basic but I can't really get to the ground of it with just googling. Basically the logic in a pc works due to activating some transistors and reacting to the output they deliver.

    So when a chip is manufactured it's just the hardware. What kind of code is used to turn lines of code into really giving volts through some transistors and interpret the result from knowing some give a 1 back and others a 0?

    I ever thought that the BIOS is used for this but as my understanding the bios is just there to make the big OS run on it. It seems like there has to be some kind of fundamental program that can transform lines of code into real hardware actions. What is this kind of code called ? It does have to be different on every different chip right? I mean if I just hav 5 billion transistors instead of 6 it needs to be adjusted to the right number and has to be made for one chip only.

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

    Gathering info from audio file

    Posted: 14 Mar 2021 09:46 PM PDT

    Hey everyone, had a question. Never worked much with audio, curious on your opinions.

    Is it possible to gather complex information from an audio file. For example, if someone is talking but they're sad, or angry, would it be possible to determine that, without going off of the words theyre using?

    What would be the way to do this?

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

    monolithic and client server achitecture, how laravel is related ?

    Posted: 14 Mar 2021 08:59 PM PDT

    hi, Im a bit confused about these concepts, I know that in a monolithic architecture one physical machine encompasses all three fundamental business application areas: presentation logic, business logic, and data logic. In a 2 tier client server architecture it divides the existing monolithic architecture by placing the server in a physical location separate from the client.

    My first question is: when Im using xamp to create my local web and database server, it means that Im creating a monolithic app ? because all elements are living in my own machine?
    Now my second question is how is monolithic architecture is related to client-server architecture ?

    A laravel app that I create using xampp could be a client server app ?
    If I deploy my laravel app in a server, and Im not using localhost anymore, what does it mean? now my laravel app is using a 2 tier client server architecture ? because clients can access to my app from all over the world ?
    If I deploy my laravel app in a server and my database reside in a different server? Would I be using a 3 tier client server architecture ?

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

    Needs some advice/suggestion

    Posted: 14 Mar 2021 08:28 PM PDT

    Hi all, I need some suggestions from the pro/experienced here, on from where do I practice coding problems.

    I have recently completed learning about recursion and was wondering where I can get started with its hands-on practice. I know a couple of sites like Hackerrank, geeksforgeeks, leetcode etc. but my question is how did you start when you were in a similar phase as mine. Did you also directly went to those websites and started coding or you followed a different approach?

    In other words: Let's say I completed the recursion concept (theory wise) now where do I go from here to practice that?

    Thanks :)

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

    Updating mongoDB documents after migration

    Posted: 14 Mar 2021 08:22 PM PDT

    I have a property called avatar in my mongoDB documents that holds a link to the user's avatar on aws s3, but I'm about to use cloudinary and would get new links after migrating data, how do I do a massive update changing the property for all users.

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

    C++ Valgrind Memory Leaks

    Posted: 14 Mar 2021 08:17 PM PDT

    This is a simple connect 4 game with a editable rows and columns. Arguments are (1/2, 4-20, 4-20) for (players, rows, and cols). It will ask for errors in runtime so don't worry. I used valgrind to check for memory leaks my C++ program and my character array is still leaking. Does anyone see where the problem is and either point it out or give me a hint? Using g++ 4.8.5, Valgrind-3.15.0, and LibVEX. cpp file is uploaded and linked via discord. https://cdn.discordapp.com/attachments/796893801728835655/820857535472599080/Assignment5.cpp

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

    Many times it happens when my good working USB or memory card suddenly gets write protection without any reason.

    Posted: 14 Mar 2021 08:16 PM PDT

    Me and my friends have some USB and memory card and everyone has the same story that one day their good working device stop storing data and data which is already stored in that device are unable to delete. Can anyone tell me why this cause and it reason?

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

    Typescript/Angular dynamic class binding.

    Posted: 14 Mar 2021 06:43 PM PDT

    Hello! So I'm trying to learn typescript/angular and I'm watching a tutorial series. In the tutorial the instructor is using glyphicons from bootstrap and he displays a star using this code:

    <span class="glyphicon glyphicon-star"></span>

    When I type this code nothing is displayed. I am trying to research how to use glyphicons but maybe things have changed in the last few years. I was able to display the star using this code:

    <svg> <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.283.95l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/> </svg> I want to make it work the way he does because in the next example he binds the classes to methods to make the icons change when you click on them. I'm still very new to typescript and I have no idea what I'm doing. Any help would me much appreciated. Thank you! 
    submitted by /u/RAINGUARD
    [link] [comments]

    Drupal 8 - Problem while updating modules

    Posted: 14 Mar 2021 06:12 PM PDT

    Hey guys, I'm sending kind regards.

    I will go straight to the point. While I was updating modules for drupal site, it encountered an error that says: "This website encountered an unexpected error. Please try again later."

    That is what I get when I try to log back in on admin panel. And also, I cannot access reports nor logs on the website. Meanwhile, the website itself is working properly.

    Console errors:

    Status: 500; Internal Server Error; Version: HTTP/1.1;

    Status: 404; Not Found; Version HTTP/2; Referrer Policyno -referrer-when-downgrase;

    Has anyone encountered something similar? Is there any way to fix this issue ? How can I revert the updates ? Thanks.

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

    Streaming Video without Port Forwarding?

    Posted: 14 Mar 2021 06:01 PM PDT

    I'm currently working on a group project for a class. The project consists of a react-native app that works as a device manager for various "IoT devices". One of which is a security camera. All code to run the security camera is carried out on a raspberry pi with the webcam connected, and the recording is currently being done with webrtc. Our current solution is working, but very hacky and requires port forward in order to connect to the raspberry pi and receive video. Our professor said this is a no-go and that we should be able to do all of these connections without port forwarding.

    My group and I have no idea where to get started. We've looked at MQTT for establishing connections to a central server first, but that solution wouldn't allow us to stream video. Does anyone know of any technologies or libraries that would allow us to stream video / audio like this? Would sockets be viable if we are able to make that from the pi to the central server?

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

    How to create this recursive method?

    Posted: 14 Mar 2021 05:18 PM PDT

    I've been struggling with this problem for a couple of days. I need help understanding this.

    1. Write a recursive method called writeChars that accepts an integer parameter n and that prints out a total of n characters. The middle character of the output should always be an asterisk ("*"). If you are asked to write out an even number of characters, then there will be two asterisks in the middle ("**"). Before the asterisk(s) you should write out less-than characters ("<"). After the asterisk(s) you should write out greater-than characters (">"). Your method should throw an IllegalArgumentException if it is passed a value less than 1.

    Test your method in the program 2. For example, the following calls produce the following output:

    writeChars(1); *

    writeChars(2); **

    writeChars(3); <*>

    writeChars(4); <**>

    writeChars(5); <<*>>

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

    Can partially complete minimax searches be used?

    Posted: 14 Mar 2021 03:44 PM PDT

    Let's say a chess engine has completed an 18 ply minimax search. It now begins the 19 ply search, ordering moves based on the 18 ply data to maximise alpha-beta cutoffs.

    Part way through the 19 ply search, a move is demanded from the engine (due to time constraints). Is there a standard strategy to use the partially complete 19 ply search? Or is it discarded, and the move (with an evaluation of alpha) from the 18 ply search used?

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

    What interesting desktop application development framework/librarie should I use ?

    Posted: 14 Mar 2021 03:21 PM PDT

    Hi so I'm at a point where I just want to create a desktop application and I don't care at all about the language I use. I want to discover new things, use interesting technologies, have fun while making my project, but at the moment I'm blocking on the framework for the desktop application. I have some exeperience in Java and Scala and I found JavaFX/ScalaFX as well as Swing pretty boring and uninteresting.

    So if you have frameworks/libraries to advise, I'm all ears, I don't care about the language.

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

    Need help building a basic login , signup and logout system using express , sessions and mysql.

    Posted: 14 Mar 2021 03:05 PM PDT

    CONTEXT - so I am new to web development and have been trying to build a login/signup system for my website using express , sessions and mysql and ejs for templates. I have a few questions :-

    1) My post route for signup is not redirecting to user dashboard page . It shows an error as "can not post /signup". Also the sql queries in the controller are not getting executed.

    2)how do i redirect user to dashboard view (get route) after signup or login.

    3) Any good articles or resources for accomplishing these tasks along with setting cookies and logout functionality would be helpful .

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

    Data entry bot

    Posted: 14 Mar 2021 01:54 PM PDT

    Hi everyone,

    I work for a company that was affected by the recent fires of the OVHcloud center in Strasburg and we lost all of our data, luckily we had an excel sheet with all of the information we had on the website.

    We asked the company that created our website for the excel sheet form that they used in the database and they provided it, it has around 105 rows of information to be filled and our data contains 1274 columns.

    My question is, is there a bot that we can set up to fill these 105 rows with the info from our excel sheet automatically so we can get up and running ASAP?

    Any help is appreciated and thank you!

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

    Writing a program in python that converts an input of hex numbers to ASCII using a for loop and the divmod function (beginner in python)

    Posted: 14 Mar 2021 01:25 PM PDT

    I am trying to write a program that returns a string when passed a list of 4 hex numbers (16 bits). I must use a list and a for loop in my program and my conversions can only be done using bitshifting/ divmod. I have been trying various ways to get something like this to work but i am so lost and cant seem to find any help online. currently i can take the input from the user, but i cant decode the individual letters and i am not sure how i would structure my for loop to print out each letter individually as it ran through the entire input. Any help is appreciated thanks!

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

    Android Java. Where do I find what data type should be used with Recycler View adapter?

    Posted: 14 Mar 2021 12:57 PM PDT

    I'm looking at the official documentation and can't find it. I can only infer from tutorials that it should be a type of List

    MyRecyclerViewAdapter(Context context, List<String> data)

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

    IP Protection (and risks) when using 3rd party consultants

    Posted: 14 Mar 2021 12:45 PM PDT

    Apologies if this isn't the space to post this. I'm a non-tech business professional in the early stages of engaging a software development company to prepare a scope document for business software that I want to develop. Essentially they are going to take 3 weeks to prepare a technical spec as well as some wireframes. They have requested a brief business plan as well as how I intend to monetize this product. My questions for the community are; 1. Should I get the developer to sign something to protect the IP? Is it a usual request to ask how the solution is to be monetized? Thanks!...Any advice would be greatly appreciated.

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

    Need some help in solving this!

    Posted: 14 Mar 2021 08:29 AM PDT

    struct TreeNode{ int num; TreeNode* left; TreeNode* right; }; TreeNode* cons_tree(int num, TreeNode* l, TreeNode* r){ TreeNode* tmp; tmp = new TreeNode; tmp->val = num; tmp->left = l; tmp->right = r; return tmp; } TreeNode* ordered_insertion_tree(int num, TreeNode* t){ if(t == NULL){ return cons_tree(num, NULL, NULL); } else if(num < t->val){ t->left = ordered_insertion_tree(num, t->left); return t; } else{ t->right = ordered_insertion_tree(num, t->right); return t; } } 

    Binary Decision Diagram (BDD)Binary Search Tree (BST)

    The code above shows how to create a BST. But, I would like my program to act like a truth table shown in the BDD image.

    Differences between the 2 diagrams:

    1. The dotted lines in the BDD image represent a "0" and the filled line represents a "1" in user input.
    2. For the BST, when the user input is less than the root node it represents the left tree.
    3. Root node for BDD is a string "x1" and for BST is an int 8.

    For example, if the user inputs the string "000", "011", "110" and "111", these leaf nodes will have the string "1".

    ***The input will be appended into a vector of strings named values. So, values[0] represents "000" and so on. ***

    My questions are:

    1. How should I rewrite the ordered_insertion_tree function? Initially I was using int which allows me to compare values but now it has changed to std::string and I can't figure out how to make the comparisons.
    2. How do I change the values of the nodes? From "x1", representing the first integer, to "x2" ... "xn" for n number of integers and finally to 0/1 representing the truth table.

    Thank you for reading!

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

    Coding help with Unity? c#

    Posted: 14 Mar 2021 12:07 PM PDT

    So I'm very very very new to the coding scene but I want to get into it. I'm trying to follow this video series on YouTube that's bringing me through the steps of making a simple game. It's a collision code that's supposed to stop the player movement script on collision. I have his code exactly but unity does not respond the same way. At this stage of writing, In Unity, it's supposed to open an empty slot under the player collision script allowing me to drag the player movement script into it. but it doesn't and when I press the play button unity says that I have a compiler error. It's a pretty old video so it's hard to tell if it's just me or if the video is outdated can someone help me out? I've been trying to figure this out for hours.

    Here's the video I'm following:

    https://www.youtube.com/watch?v=gAB64vfbrhI&list=PLPV2KyIb3jR53Jce9hP7G5xC4O9AgnOuL&index=6

    https://imgur.com/a/tRWTuJV

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

    inserting tel: in to google doc?

    Posted: 14 Mar 2021 11:37 AM PDT

    Hi there, I'm aware you can't insert it as a hyperlink however I was curious if I created an html page and hosted it myself if I could automatically push the tel: function.

    I'm making a google doc for my toddlers daycare and would love for my phone number to be a quick tap and dial. Do I accomplish this via .htaccess or do I need them to click through to the page and then click 'call'?

    Thanks!

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

    Botanical Programming Inquiry

    Posted: 14 Mar 2021 11:36 AM PDT

    I'm looking to set up an automatic plant watering system that activates when the humidity reaches a certain point. I plan on using some pump with a spray nosel on the end, somehow powered by a pi. What materials do you think I need to make this happen on the electrical side? Eg. Humidity sensor, pi zero, ect. Once I get all these parts, where should I be looking to learn how to code what I need to get this all up and running? I'd appreciate any ideas and feedback.

    submitted by /u/Own-Garbage-6362
    [link] [comments]

    No comments:

    Post a Comment