Might be a dumb question, but when you're compiling code, when you call the compiler on your terminal, is that itself a runnable file? Ask Programming |
- Might be a dumb question, but when you're compiling code, when you call the compiler on your terminal, is that itself a runnable file?
- How a service can give a subdomain to each user?
- Javascript help with Password Generator
- Is there a shorter code to do this continuous input? And shorter soultion?
- How would you solve this coding problem?
- dropdown svg arrow does not get assigned as ref in react useRef
- Writing data to COM port using WriteFile
- Which programming language do you consider most optimized for ease of debugging?
- I want to turn my old PC into a dedicated web server, what are the cares I must take?
- When/how to consider a new technology?
- Creating a Book Class
- Does anybody know of a way to compare data types in c++?
- Python/Numpy/PyTorch: How do I speed up a linear algebra operation by un-unrolling?
- help with dart language cli adventure game
- How to extract info from CSV file
- Generating a random number based off C code (x86)
- Trouble connecting Intellij, SQlite, java express and much more...
- HELP , im new to programming and i dont understand why my code keeps receiving "expected expression before ___" and "too few arguments" error
- Android project help
- Why do I have to pay for the internet?
- When installing plugin, text within terminal does not display properly
- Remote work: Are you sometimes rushed into a call?
- Are startups more picky than mid level companies?
- [C] When i put "54" in the Console it should give me an array [54] back, but instead gives me [5] [4] back. Can anyone fix that for me?
- How to prevent spamming the user with Notification / Email based on triggering of a Event ?
Posted: 10 Dec 2020 09:29 PM PST So I know that the typical process is something like this on the terminal (example will be c++): So I get that the -o flag creates an object file for the linker, which then in turns makes allows an executable to be created (in our case it would create a file called program.o object file and an executable called So... what is happening when we call I know that it's a command like grep or diff or ls (at least in a UNIX system). But like... what is going on behind the scenes? Does the compiler itself have an executable and [link] [comments] |
How a service can give a subdomain to each user? Posted: 10 Dec 2020 02:47 PM PST When I was a teenager, I was surprised how blogger or other blogging services like wordpress allow you to have a subdomain. I experienced a lot and found some CMS's have their tricks to create some sort of "network" (Specially wordpress, it's called wordpress network if I'm right). But recently, I saw it's not only done by blogging services, but by PaaS, SaaS or DBaaS services as well. I am really curious about this. How can I make a web app I developed make a subdomain for each user? [link] [comments] |
Javascript help with Password Generator Posted: 10 Dec 2020 06:08 PM PST I'm very new to coding and need some help finishing my first javascript assignment: creating a password of varying characters (uppercase, lowercase, numerical, and special) to a length defined by the user between 8-128 characters. All prompts and confirms run great, but I cannot get the actual password to generate in the text box! Any help with this would be greatly appreciated. var generateBtn = document.querySelector("#generate"); var lowercaseChar = "abcdefghijklmnopqrstuvwxyz"; function generatePassword() { function writePassword(password){ } [link] [comments] |
Is there a shorter code to do this continuous input? And shorter soultion? Posted: 10 Dec 2020 09:27 PM PST The number 3025 has a remarkable quirk: if you split its decimal representation in two strings of equal length (30 and 25) and square the sum of the numbers so obtained, you obtain the original number: (30+25)^2=3025 The problem is to determine all numbers with this property having a given even number of digits. For example, 4-digit numbers run from 0000 to 9999. Note that leading zeroes should be taken into account. This means that 0001 which is equal to (00 + 01)^2 is a quirksome number of 4 digits. The number of digits may be 2,4,6 or 8. Warning: Please note that the number of digits in the output is equal to the number in the corresponding input line : leading zeroes may not be suppressed. type 0 to end input Input: (miss 0 here) Output: my code: [link] [comments] |
How would you solve this coding problem? Posted: 10 Dec 2020 09:00 PM PST Given 4 arrays of integers and a threshold, count the number of possibilities for the sum of 1 element from each array to be <= threshold. [link] [comments] |
dropdown svg arrow does not get assigned as ref in react useRef Posted: 10 Dec 2020 08:55 PM PST Hope you all are safe and doing well. So I was trying to create a dropdown arrow which allows you to show a popup and close it upon clicking. I have even discovered the problem and but am unable to proceed further to the solution. Here are my codes 1.) // Please check from the DropdownArrowIcon code and useRef code // Main Header file 2.) Dropdown Icon The problem is from what I think is the ref does not work on a svg element, due to which when you click on the icon it changes the state twice making it in the same state all over again. TLDR:- useRef probably does not work on the svg icon, due to which when trying to change the state it gets changed twice and dropdown arrow does not function properly. here is an video link to check the problem. https://drive.google.com/file/d/1smp4DEGthi_jE33nWnR6L1m0AG1A1SQN/view?usp=sharing Thanks to kind soul in advance. [link] [comments] |
Writing data to COM port using WriteFile Posted: 10 Dec 2020 11:05 AM PST I am trying to write data to a COM port to which my Arduino is connected. I would like the Arduino to read this data and do some action based on that. By doing it like this, I think I am writing output to the port to which my Arduino is connected.And on the Arduino side, I am trying to turn an LED on. For example, if I send 1 using WriteFile(), I turn on that specific LED with high brightness: The problem I am getting here is it is not turning on the LEDs. That means it is not going through my ifcondition, that means Serial.available()>0is false. But my Arduino is receiving some data because the RX blinks. I am not sure exactly what is being received by the Arduino. I am trying to check if the WriteFile()is writing anything to the COM port. But I can say that the Arduino is receiving something because RX blinks. By this, I think I can even say my WriteFile()is writing to the particular port. Otherwise, I cannot see why the RX of the Arduino should blink. I certainly made sure that the Arduino is connected to the correct port which I am using in WriteFile(). Update: I removed RTS Hand control Shake but I am not sure what is default will WriteFile set? [link] [comments] |
Which programming language do you consider most optimized for ease of debugging? Posted: 10 Dec 2020 10:34 PM PST |
I want to turn my old PC into a dedicated web server, what are the cares I must take? Posted: 10 Dec 2020 12:34 PM PST Hi people! I have a good PC that i´m not using, and I'd like to turn it into my own dedicated server. I have a good Internet connection and the PC is better than the cheap tiers of the hosting/cloud services, so... That's it! JFYI, I think it will be running any debian based operative system when I use it as a server. It will be mainly used to offer a PHP website, and maybe some Springboot (Java/kotlin) service on the background... I don't know yet.... but I want to be warned about all the security and/or management aspects I should care about of doing this. AFAIK, there won´t be sensitive data on that server, but I have my everyday computers connected on the same LAN, which I fell is kinda weak point. I can answer your questions if we need extra data to discuss this. Thanks. [link] [comments] |
When/how to consider a new technology? Posted: 10 Dec 2020 09:55 AM PST Web developer, < 5 years professional experience. Something I've noticed about myself is, I'm generally reluctant to adopt a new technology. In my work I occasionally have coworkers suggesting a new language, framework, an Amazon service to try, etc. I am almost always against it, because what we have now seems to work just fine. And I don't understand the point of changing things up. If what we have now works and isn't causing undue pain, why bother with something else? "If it ain't broke, don't fix it." That said, I hate constantly shooting down ideas for new ways of doing things. And I'm concerned I might be hamstringing my team long-term by continually not wanting to try new ways of doing things. It's not that I'm against trying new things. It just doesn't strike me as practical. Why suddenly introduce a new technology that now the whole department will end up running into at one point or another and have to learn, when what we have now works? I can get needing to change if security is a concern. Or if it's a framework that is old enough there's really no more support or community for it. I guess what I'm asking is, are there principles to use when determining when to embrace a new tech, or say we don't need it? What kind of context should I have for making that decision? How do I know when to stick to what works, and try something new - without falling into the "hype driven development" where if it's shiny and new, it must be good? [link] [comments] |
Posted: 10 Dec 2020 09:36 PM PST With 5 fields title - String, the title of the book. Author - String, the author of the book. Pages - integer, the number of pages in the book. Publisher - String, the publisher of the book. Year - integer, the year the book was published. With 6 methods A constructor that accepts as arguments the values for the fields above, in the order listed. A copy constructor that makes a copy of a Book object. A getTitle method that returns the value of the title field. A setAuthor method that accepts a String argument, which is used to set the author field. An equals method that returns a boolean indicating if two objects contain the same information. If they do, it returns true, false otherwise. The objects contain the same information when their fields contain the same values. A toString method that returns a String that contains on separate lines (5 lines), the names and values for each field. Demonstrate the class in a program. Demo program is required to: Create at least two Book objects. Create a copy of a Book object. Use each of the other four methods to show they work properly. Do not explicitly call the toString method in your demo program. [link] [comments] |
Does anybody know of a way to compare data types in c++? Posted: 10 Dec 2020 05:39 PM PST |
Python/Numpy/PyTorch: How do I speed up a linear algebra operation by un-unrolling? Posted: 10 Dec 2020 02:55 AM PST Hi everyone, I am trying to implement an algorithm in python that has been published in a scientific paper. During testing I found that the most time-consuming part of the script (by far) is the following operation that I have written as follows: I suspect that having two loops written in python is responsible for the speed problem. However, I do not know how to effectively rewrite this function. For example, I am aware of Einstein summation, but am completely unfamiliar with how to write this formula using that notation (or if that is even possible). Any help is appreciated. EDIT: I have found a solution to the problem in case anyone is interested. The code is below. Using PyTorch, I was able to get substantial speedups when comparing the crude use of for loops to actual matrix operations. Variables: Method 1: For loops Execution time: 2.5 seconds Method 2: PyTorch without GPU Execution time: 0.61 seconds Method 3: PyTorch with GPU Execution time: 0.0026 seconds Method 4: Einstein summation with GPU Execution time: 0.00071 seconds Conclusion: Use actual PyTorch code, not for loops, and use a GPU if you can. [link] [comments] |
help with dart language cli adventure game Posted: 10 Dec 2020 04:07 PM PST Hello world, I am a beginner at programming and i am trying to create a cli adventure game in Dart and i am having some trouble. I know everyone hates these kind of posts and that i should google and just figure it out for myself and believe me i am trying. I am not asking anyone to do this for me, just to look at the code and tell me if it is shit or not and maybe nudge me in the right direction. if you are interested in checking this out please message me. I really dont want to embarrass myself by posting the code here. [link] [comments] |
How to extract info from CSV file Posted: 10 Dec 2020 04:03 PM PST Hi All, I'm a complete beginner at this and have trouble using the appropriate jargon, therefore, it makes it difficult for me to find the correct resources to read and learn from. That said, I'm hoping one of you can point me to some videos/online readings that'd help. I've been using python to scrape a bunch of info onto a CSV file and now I'm looking to incorporate that information into a website that I'd be creating. Essentially each container on the website would have a name, link, and image associated with it (all this info is in the csv file). How can I go about extract this data from the csv file to the webpage? Not looking for code answers rather I'm looking for resources that I can read/watch to better learn. [link] [comments] |
Generating a random number based off C code (x86) Posted: 10 Dec 2020 09:54 AM PST I'm supposed to emulate the following C code in x86 NASM assembly to generate a random number. I'm having a bit of trouble with the syntax, and maybe some of the logic as well. This is where I try to generate a random seed to use and pass in as a parameter to the assembly function. I will not be passing in a max as a parameter because the highest random number that I want to be generated is 16, so I will hardcode that in my random function. randomFunc, that lives in it's own separate file. I get an error currently where I try to multiply 1103515245, saying "invalid combination of opcode and operands" so I know my syntax must be wrong there. If anyone knows why this is happenening, please help! [link] [comments] |
Trouble connecting Intellij, SQlite, java express and much more... Posted: 10 Dec 2020 09:49 AM PST So I'm doing a note/blog web application project. Newbie here! I'm able to run the site via live server (Forgot to mention I'm using visual studio code as well) or localhost, but nothing I put in the input registers inside the database, the delete function doesn't work and the errors I find in the console log makes no sense to me. I've uploaded the project on GitHub https://github.com/Majonett/test.git if anyone want's to be so kind and take a look, I would really appreciate it. It's far from done but right now I'm stuck. THANKS!!! <3 [link] [comments] |
Posted: 09 Dec 2020 11:28 PM PST edit : this issue has now been resolved thank you to everyone especially u/Poddster i have done codes like these before i even clean copied some of them from my old codes but now they are getting errors in my new code. [link] [comments] |
Posted: 10 Dec 2020 12:25 PM PST Hi, I am a sophomore in college studying computer science and psychology, I am lookin for someone who is interested to work with me on an android app, I am trying to get experience so I can apply for internships, as of now I have almost zero experience, I am pretty comfortable with java and I stated learning android studio recently, if you're interested lmk. [link] [comments] |
Why do I have to pay for the internet? Posted: 09 Dec 2020 10:53 PM PST I was watching Eli the Computer Guy's video on VPN's, and he says that your data goes through many routers to get to a destination. Shouldn't everyone be able to just buy a router, and then we all use each others routers when sending things to places? Or, when I pay for internet, is my information only going through big routers that the isp company I pay owns? Thank you. [link] [comments] |
When installing plugin, text within terminal does not display properly Posted: 10 Dec 2020 02:48 AM PST Hi everyone, I am trying to understand how/why something is happening when installing an extension. (The program itself is Volumio, and the extension itself is SnapCast) I've noticed during the latter half of the installation, this is what is reported in the terminal:
What seems to be happening is <br> is simply not being interpreted as a line break. I believe it has something to do with the fact that the original SnapCast client is written in C++ but this version for Volumio appears to be "translated" by something else in the respository (I've cloned it and been messing around to try to understand) but if anyone was able to give some advice on where to start looking or how to automate the "translation" of <br> into a true line break I would be greatly appreciative! If links to the specific repositories would be helpful too I can post them [link] [comments] |
Remote work: Are you sometimes rushed into a call? Posted: 10 Dec 2020 11:08 AM PST I live in Miami where it gets incredibly hot and humid, and electric is also fairly expensive. I'm content at home with a fan just wearing boxers but would need a few minutes to put on work clothes before a call. Do you guys think I'll generally be okay with most work related video calls or do they tend to be more spontaneous than that when working remote ("Phil, we need to talk now, get on Zoom")? [link] [comments] |
Are startups more picky than mid level companies? Posted: 10 Dec 2020 10:58 AM PST I've had about 5 interviews at startups found on AngelList. 5 is not a lot but none have gone past the first round. I have had one interview at a mid level with a national presence and am on round 3. I should note I am only applying to companies who offer full remote. The startups all seemed to want more experience than my 2 years (React, Typescript, Node/Express, Postgres). The national firm probably would have DQed me by now if experience was an issue. As 6 interviews is not enough to really make conclusions I wanted to ask you guys if your experience was the same or not. I am actually thinking of devoting more time to Indeed.com remote job posts. There's more of them every day and I think maybe I didn't give non-startups a fair trial. My outreach plan focused on startups because I heard they were more flexible in general, with hiring and remote terms (About 2/3 of AngelList startups are at least partially distributed, so there's some truth to it on that level). [link] [comments] |
Posted: 10 Dec 2020 10:09 AM PST This Programm should give me an Array back when i write the Number eg. i write 54, it should put [54] in the console, but it only takes one Character each time for some reason and gives [5] [4] back. Can someone tell me where my error is? i think the error lies here: push(make_Value((input[i] - '0'), &stack, STACK_SIZE); because it pushes just one character, how do i fix it? [link] [comments] |
How to prevent spamming the user with Notification / Email based on triggering of a Event ? Posted: 10 Dec 2020 09:47 AM PST I have a use case where, based on a event that can trigger at anytime. The trigger in question is with respect to a access token expiring for an API. Would i store something like notification sent and topic and time in a Database somewhere, but wouldn't that cause extra latency on the request as each time it triggers the event, it will check in the database if the notification was sent and end up blocking the processing till it checks the database? I may have a large number of requests to process continuosly, so I don't want to bogdown the database with multiple queries for a notification check each time the event is triggered. Any help would be much appreciated ? [link] [comments] |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment