C function Ask Programming |
- C function
- Swift: Do you use Storyboards?
- Raspberry Pi Home Security System - Request for Guidance
- IOS Coding App question from a newbie
- Need help verifying why code won't run
- First time working with HTML - trying to customize a script based on a GitHub guide for a ranked "favorites" picker, cannot seem to get filter portion of the script to function. (Links and code portions provided)
- Big O rule #4
- Why does JavaScript need objects when that sort of information can be handled by databases?
- Forms to Monday.com
- Python - better way for image manipulation?
- (JavaFX) having issues with updating total price labels when removing product from cart
- Using @SecondaryTables to display all data from beers table, categories table and styles table
- Syntax Error: Unexpected Token 'if' (Javascript)
- I feel embarrassed to say I'm a programmer
- [JS] Why is async better than sync?
- Guys i need help
- What is the best coding language for pattern recognition?
- Understanding XML Element Types
- Do the WebViews inside the Reddit mobile app contain a unique identifier I can check for?
- Beginner on ussing clases Pt.3 (This is not Stack Overflow thank God)
- Is it safe to trust the Host header sent in a request (I think not but need to know why)
- IDE for non-typers
Posted: 14 Mar 2020 02:28 PM PDT I am trying to make a function which would take 8 highest bits from given int and return a value from 0 - 255 Here is my code: unsigned char find_bits(unsigned int x) { return 0xFF00 & x; } But the result is 0 and it should be 18 when I call this: find_bits(0x1234) [link] [comments] |
Swift: Do you use Storyboards? Posted: 14 Mar 2020 09:38 PM PDT Hey - wondering what the view is on using storyboards and how to do so effectively? It seems like coding everything programmatically results in a ton of code and there's some middle ground? What have you guys seen from experience in your own projects? [link] [comments] |
Raspberry Pi Home Security System - Request for Guidance Posted: 14 Mar 2020 09:29 PM PDT Hello, all. I had a quick opinion question regarding a Raspberry Pi/Python based home security system I'm working on. My end goal is to have magnetic door/window sensors being monitored by a Raspberry Pi 4 server. If a window or door is opened while the system is armed it will play an alarm sound to the connected speakers. I would then have Raspberry Pi Zero W powered keypad panels (with LCD screens and a 12 digit keypad) that would allow me to see whether the system is armed or disarmed and allow me to input the passcode to arm or disarm the system. The Raspberry Pi Zero W panels would connect to the Raspberry Pi 4 server over the network. I already have a somewhat functional test system running in a single Python script with everything connected to the Raspberry Pi 4 (link below). However, I'm now at a point where I need to figure out how to tie in the Raspberry Pi Zero W keypad panels I would like to integrate over the network. My question for you all is how would you go about implementing the network connectivity portion of this? Should I use something like Node.js with some kind of database? Perhaps the socket module in Python for something low-level? Something else entirely? I'm up for any and all suggestions for how to go about this. Please let me know if you have any questions. Thanks in advance! Poorly Done Diagram: https://imgur.com/a/AnAVzLt Current Working Code: https://github.com/kevbo423/RPHSP/blob/master/Home_Security_System.py [link] [comments] |
IOS Coding App question from a newbie Posted: 14 Mar 2020 12:14 PM PDT Hi. My 12-year-old son is getting into coding. He wants an IOS app that can help teach him, and he's asking me to get him a premium subscription to Mimo (M1M0). It's not cheap ($100+/yr), but they have a teaser rate for the first year. Before I plunk down the $ for it, can anyone recommend good alternatives that might be less pricey? TIA [link] [comments] |
Need help verifying why code won't run Posted: 14 Mar 2020 08:55 PM PDT So I'm trying to run this code and its giving me an error with the f open function on line 39 "too few arguments in function call" also says to use fopen_s instead but that didn't work either. C code and im using VS 2019 [link] [comments] |
Posted: 14 Mar 2020 07:39 PM PDT Hi there! I'm coming in with zero experience doing anything like this so I appreciate your patience and assistance with this. I'm working off of this guide to create a favorites picker for Animal Crossing villagers. You can see a working version of this for picking one's favorite pokemon off of this website: https://www.dragonflycave.com/favorite.html I progressed in the guide far enough that I could get my own custom items in there (the "basic customization" section) and have the picker work perfectly fine when I opened it up. (Still need to get images in there and alter the UI, but that's an issue for another day...) The issue arises when I get to the "intermediate customization" section here when trying to implement a filter. I've gotten the body of the page to display the following just fine for checkboxes and such for all three categories I'm trying to create filters for (Gender, Personality, and Species): I have items defined as such (again, works fine before attempting to implement filter functionality): The trouble comes with the 'myPicker' and 'pickerUI' variables in my altered script. I'm comparing this to the section in the guide I was following and I'm failing to see what I am doing wrong. When I use the above code, the option to actually select any items completely disappears! If anyone can point me in the right direction - either correcting my code, providing a resource I can use to understand these variables better, or just pointing out something stupid and obvious in the guide I'm missing, I'd greatly appreciate it! [link] [comments] |
Posted: 14 Mar 2020 03:39 AM PDT Hello folks, I was wondering anyone could explain to me in simple terms what the big o notation rule #4 means (drop non dominant terms)? Thank you. [link] [comments] |
Why does JavaScript need objects when that sort of information can be handled by databases? Posted: 14 Mar 2020 07:31 PM PDT |
Posted: 14 Mar 2020 05:42 PM PDT Hey guys, a little background story for you all, I'm a university student with very little knowledge of programming, mainly VBA and MATLAB, but also a little html, python and Javascript. I don't know if you're all familiarized with monday, but it's basically a team management tool. I've been using it to organize my student association tasks and to make sure no one gets lost. We recently started a project where people have to fill out googleforms and I'm in desperate need of figuring out a way to automatically send the filtered info from the forms to the monday platform. I am aware that I'll probably require a database to gather the info besides those two. Monday has an API called graphql, but it's still in it's beta testing period and idk if I can use it Idk what else might I need to explain besides that, but don't hesitate to message me if you need to know more stuff. I have a lot of free time rn, due to covid-19 quarantine reasons [link] [comments] |
Python - better way for image manipulation? Posted: 14 Mar 2020 05:29 PM PDT I'm trying to animate a photo - it's a simple scroll animation that goes from one side of 3840x1080px photo to another. What I'm now doing is use imageio to read jpg into 3840/1080/3 matrix,and then populate 1920/1080/3 matrix by using a for loop that goes through each element + certain number of pixels in width for next frame. This works perfectly,but takes about 20 mins on my ryzen 3 1300x. Is there any faster way to do this "from scratch"? [link] [comments] |
(JavaFX) having issues with updating total price labels when removing product from cart Posted: 14 Mar 2020 02:05 PM PDT hi, i am making a menu ordering system , i have a tableview with some food with their prices. i also have some labels with the total price. i also have a separate listview which contains the foods that they have chosen. one issue i have is that when they want to remove a food, it will update the price based on whats selected in the tableview, not the list view e.g. Food1 = £2 - Food2 = £5 i have selected one of each, the total price is £7, i click on food1 to remove it but because my selection on the tableview is still on food2, it will take away £5 when it should recognise ive selected food1 and minus £2 how could i fix this? is there a way to look at what i have selected in the listview and use that to find the appropriate row in the tableview? [link] [comments] |
Using @SecondaryTables to display all data from beers table, categories table and styles table Posted: 14 Mar 2020 01:48 PM PDT I put the question on StackOverflow, when I tried to put it here it ruined the format if you could check it out in this link that would be great. To give insight on what the question is about, it is about using the Secondarytables annotation to map 3 tables in the JPA. Any help is appreciated, you can answer here or StackOverflow, I check each regularly. [link] [comments] |
Syntax Error: Unexpected Token 'if' (Javascript) Posted: 14 Mar 2020 02:26 PM PDT I am writing this program in Javascript and It keeps giving me this error. PS I would post to stackoverflow but I can't post for 6 days. Code: var i = if (i = null) { console.log('ERROR: NO INPUT'); } else { console.log(i); } [link] [comments] |
I feel embarrassed to say I'm a programmer Posted: 14 Mar 2020 10:38 AM PDT I am a CS student and roughly spent a year learning to code. I'm mostly into web development. I know JavaScript, Python and their frameworks like React and Django. But, every time I have to solve a unique problem using my programming knowledge, I get lost and can only get a solution after doing a google search about almost everything. Because of this, I can't start to write the first line of code for my next projects which I already sketched in my mind. It's not like I don't know jack shit about the coding solution. But, I feel like having all the ingredients to make a recipe but don't know how to make it. Is there anything I can read, watch to get knowledge about building problem-solving skills or what am I actually missing despite knowing programming fundamentals? [link] [comments] |
[JS] Why is async better than sync? Posted: 14 Mar 2020 07:46 AM PDT Everywhere you go, people say that you gotta always and forever use async because it's so good and this and that and god forbid that your 1kb .json file takes more than 1 picosecond to save and load. Like, I get it that people use it to save stuff in the background, but shouldn't that depend on the size of the project? Why should anyone deal with error fetching, exceptions, try-s, "promises", and such stuff when you can just write your code line by line and know that it will execute that way. Is there any other valid use-case for async stuff than being able to save and load stuff "dynamically", "on-the-fly", which is, let's be honest, fluff, and not some bare necessity. My focus are desktop apps without internet connection (classic "programs"), so if you could focus on that part in your explanations, that'd be great. Tnx! [link] [comments] |
Posted: 14 Mar 2020 07:15 AM PDT So im new in python I downloaded "Thonny" And start testing something's and i got error in: x = input() If x == 2: Print("hi") Problem is that when i give type in 2 (so now x = 2) Nothing gets printed. Can anyone explain it to me? [link] [comments] |
What is the best coding language for pattern recognition? Posted: 14 Mar 2020 10:04 AM PDT I want to code a program for pattern recognition that can take a long string of numbers and look for a pattern and then calculate how often certain numbers show up in certain parts of a sequence. What would be the best language to write this in? [link] [comments] |
Understanding XML Element Types Posted: 13 Mar 2020 10:17 PM PDT Having issues using a vendor soap web service and they supplied an example of a fix similar to the xml below. The integer value was coming back with a unserializable error. They said I need to set the type to int with xsi:type="a:int". In my code I have a series of classes built from their wsdl. I am able to set type="int" using something like myReqObject.$TypeInterface.setAttributes("type","int"), but that doesn't work. So I think I need to get it to match theirs exactly, but I don't quite understand xsi:type="a:int". I am using Gosu, which is pretty much Java. <?xml version="1.0"?> [link] [comments] |
Do the WebViews inside the Reddit mobile app contain a unique identifier I can check for? Posted: 14 Mar 2020 01:48 AM PDT I'm running into a CSS bug that only happens when my web site is loaded within the Reddit mobile app. I'd like to apply a CSS patch that only applies to Reddit app WebViews. Do the WebViews inside the Reddit mobile app contain a unique identifier I can check for? I inspected their userAgent string and I see nothing unique about it... Also, if there is a more appropriate subreddit for this question I would appreciate if someone could point me in the right direction. Thank you! [link] [comments] |
Beginner on ussing clases Pt.3 (This is not Stack Overflow thank God) Posted: 14 Mar 2020 09:17 AM PDT So guys today I share you my code for placing info about a student and it's average GPA with last 20 grades that you get on input (0 to 100 scale) here's the deal, I got a calc method that returns float type that is supposed to approve the student with a percentage curve, but there's a little surprise for you in the int main that is located right in the if section when I call for the method p1->apruebaconcurva(porcentaje), you guys give me any idea for why my float calc method is getting called as a boolean: #include<iostream> #include<sstream> using namespace std; class Estudiante { private: public: }; int main() { notafinal = (promediocalificaciones + promediocalificaciones * porcentaje / 100); cout << "El estudiante: " << nombre << " aprueba con una curva del: " << porcentaje << "% con nota final de: " << notafinal << endl; notafinal = (promediocalificaciones + promediocalificaciones * porcentaje / 100); cout << "El estudiante: " << nombre << " reprueba con una curva del: " << porcentaje << "% con nota final de: " << notafinal << endl; [link] [comments] |
Is it safe to trust the Host header sent in a request (I think not but need to know why) Posted: 14 Mar 2020 01:31 AM PDT I found something that seems odd in a product I use at work built by a vendor. To me it doesn't look right. I'm trying to figure out why it's insecure. Lets say I have a website, and that website outputs a form. i.e. The issue I've found is that the form's action is using the requests I think that looks really bad. The reason why is because it's letting the request decide where the websiite will send data to, and that extends to being able to send data outside of the vendor's service. However I cannot think of an example of how one would exploit this. One example I had is that a proxy could set the Host, and then alter where it comes back. But a proxy could re-write the response anyway. So that's not really an exploit. The vendor's communication is typical of working with an enterprise level vendor (i.e. really bad and very non-technical). I want to come up with a test to show why it's insecure, and use that as a means to get it changed. To summarise ...
[link] [comments] |
Posted: 13 Mar 2020 11:44 PM PDT Hi everyone. I used to code but developed carpal tunnel so I started doing other things. However, I enjoy coding and do it as a hobby. Right now I VNC into a Windows computer running IntelliJ on my iPad which I operate with a stylus.. It works but I'm wondering if something better exists. Does such an IDE exist that generates code for you? I mean, say, for-loops, if-then constructs, etc. - the basic elements of a language without having to type a million tabs, curly-braces,,etc. You could, say, drag and drop a for-loop and as you set it in place, a dialog pops up asking for particulars. I used to use C++ Builder and it involves rearranging components instead of typing so this may work but I think it's limited primarily to database stuff? I also looked at PWCT but couldn't get it to work but seems like it's in the same direction I'm going for albeit a bit higher-up. There's also that executable UML stuff, too. [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