Gladiator Fight Lab in C++ - Actual fight function seems to do nothing? Ask Programming |
- Gladiator Fight Lab in C++ - Actual fight function seems to do nothing?
- Web developers, how do you usually respond when people tell you how much more lucrative other programming fields like video game development and app development and other fields are?
- Java, How to establish a ring of server/client connections.
- How to know what datatype comes next in a text file with C
- Building an IOT Garage door opener/closer
- Need help with Intel Assembly language x86 program to print a 9x9 sudoku board/grid
- Easiest way to create a GUI in c++
- Declarative statements in Verilog
- Is there a way to use codes in conjunction with Google Maps Satellite images, to, for example, show me the addresses of every baseball field near me?
- What is the most straightforward way to pull data from a database to a website?
- VB.NET - Set a Form BackgroundImage to a TextBox URL
- How to develop on Windows?
- 1 For my C++ Data structures class my Professor wants us to implement insertBack, insertAt, deleteBack and deleteAt
- Best way to approach complex system with a lot of dependent variables?
- Working as a programmer as a high school dropout. Am I deluding myself?
- Compare CSV with .txt files
- AIY voice kit question
- "Computer Systems: A Programmer’s Perspective" book for experienced programmers?
- Automate calendar event creation for scheduling?
- Is making a collapsible cell in a table possible? Details inside (PHP and HTML)
- Need help with syntax design for a specific text file. Writing and parsing questions.
- Arguments against hiding state, using encapsulation, etc?
- Does an 'async' web/service framework exist?
Gladiator Fight Lab in C++ - Actual fight function seems to do nothing? Posted: 22 Apr 2018 04:09 PM PDT Huge thanks to /u/BeigeAlert1 for the help! :DI'm working on a lab where you use structs to make gladiators and then make them fight each other until one gladiator wins. I seem to have everything set up for the fight but when I run the program and get to the 'fight', it outputs "Fight Timeline" and then a system("pause"), meaning it skips over all of the takeTurn function calls and outcomes. Where did I mess up? I can't put my finger on it. [link] [comments] |
Posted: 22 Apr 2018 03:54 PM PDT |
Java, How to establish a ring of server/client connections. Posted: 22 Apr 2018 09:35 PM PDT I know messages between clients can be done with one server and multiple clients connected to it. But how would it be done if we want them communicating in a ring. I believe it takes "n" server sockets to wait on one connection. But this implementation makes me confused because the server is waiting for a client, but the same server will then be a client to another server. How would the server and client code be divided up into files in this case? [link] [comments] |
How to know what datatype comes next in a text file with C Posted: 22 Apr 2018 02:56 PM PDT So I have this text file that goes like this: Army 7234 Navy 5200 Marine 6500 Air Force 8765 Merchant Marine 345 Coast Guard 676 This is supposed to go into a struct array with a char array[16] in order to store the service and an unsigned int in order to store the number of recruits. So naively I did this. void main(void) { struct recruiting recruitRegister[SIZE]; FILE* filePointer; int i = 0; } So of course this works for the services that have only one word like the Army but with the Air Force it just reads in Air into the string and then looks for an int and everything gets messed up. How can I check whether what's next is a string or int so I know what to fill in, or any other approach that will make this work? Thanks! [link] [comments] |
Building an IOT Garage door opener/closer Posted: 22 Apr 2018 08:39 PM PDT I want to build an internet-connected garage door opener / closer using a raspberry PI. I will also build an Android app to control it. Conceptually this is simple, but I want to be sure that I'm considering security the "right way". I'm brainstorming architecture right now and was thinking about just SSHing into the webserver (raspberry pi) and just have that run commands (open / close) based on my external commands to it. I once did a project where i simply wrote to a local file on the webserver via SCP and it had an internal process that polled the file to see if it contained any commands. That worked but was ugly. I'm an embedded guy and don't have a lot of experience with web stuff and would really appreciate high-level pointers especially this early in the project about the "right way" to do this. What would be a good architecture that would also consider security? Obviously I wouldn't hard-code a password or something into my android app, right? HELP Thanks guise! [link] [comments] |
Need help with Intel Assembly language x86 program to print a 9x9 sudoku board/grid Posted: 22 Apr 2018 08:22 PM PDT So I need an assembly x86 Intel program to make a sudoku grid (just needs to be a 9x9 grid with random numbers in each box). I have asked this question on chegg and have gotten a code but it doesn't run on emu8086 nor dosbox. I found another code in some website and same issue. I also found a c file, then converted it to intel asm from some converting website and same issue. I think either the codes are wrong or im running it wrong? please help me fix the codes or figure out my issues. Im going mental trying to figure this out. Im using windows 10 btw Code Verison 1: chegg; https://pastebin.com/Wkp1m7zR Error codes on line 19,23,23 (19) mismatched: data Ends (23) wrong parameters: MOV ax,data (23) probably no zero prefix for hex; or no 'h' suffix; or wrong addressing; or undefined var: data Code Version 2: chegg: https://pastebin.com/UcApF676 Errors on lines 37,45,45 (37) mismatched: data Ends (45) wrong parameters: MOV ax,data (45) probably no zero prefix for hex; or no 'h' suffix; or wrong addressing; or undefined var: data Code version 3: some site: http://www.kernel-panic.it/software/sudokiller/sudokiller.asm.html Error on line 250. (250) duplicate declaration of: .RETURN HOW I RUN PROGRAMS Where everything is on my PC: So idk if im running asm correctly but heres how my C drive looks like: in my c drive, i have emu8086 folder, TASM folder(i directly save my .asm files here and run them via "tasm filename" in DOSBox). My DOSBox is located in my D drive: D:\Program Files (x86)\DOSBox-0.74 Please help me figure out whats going on [link] [comments] |
Easiest way to create a GUI in c++ Posted: 22 Apr 2018 05:57 AM PDT Hi, I code in c++ and I have tried Gtk+ and Gtkmm but I have to change a lot my code. I would like to implement a basic GUI changing as little as possible of my original code [link] [comments] |
Declarative statements in Verilog Posted: 22 Apr 2018 04:01 PM PDT For some reason, I can't figure out the syntax to write out simple declarative statements for boolean logic in Verilog. How would we, for example, write an [link] [comments] |
Posted: 22 Apr 2018 08:57 AM PDT I'm just wondering if something like this would be possible. Where the code would automatically highlight certain things like baseball fields, strictly based on the visual images (since all baseball fields look similar I'm guessing we would tell the computer to just look for that specific shape and pattern of the grass/sand/chalk-lines/etc that make up a baseball field). [link] [comments] |
What is the most straightforward way to pull data from a database to a website? Posted: 22 Apr 2018 06:17 PM PDT Thought this would be a simple question but my Google searches have turned up nothing helpful, probably poor wording. I know at the most basic is creating a table in HTML and populating it manually, but what would be one step up from that? What language(s) would I use to save a spreadsheet as a separate file and then access it with HTML? [link] [comments] |
VB.NET - Set a Form BackgroundImage to a TextBox URL Posted: 22 Apr 2018 12:01 PM PDT So, I am trying to some code so that when you hit a "Change Form Background" a TextBox and a Submit button pops up. I know that, but I do NOT know how to make it when you enter a direct image URL in the TextBox, it changes the form's background image to the direct image URL. I have tried one thing because I have not found any posts like this. The code is: Me.BackgroundImage = (textbox name, ex: TextBox1).Text and that gives me the error: Value of type 'String' cannot be converted to 'Image'. I understand what this error means but I do not know how to solve it. [link] [comments] |
Posted: 22 Apr 2018 11:52 AM PDT Hey all, Since I've been programming I've worked exclusively on my laptop which runs Linux. Recently I've been wanting to develop on my desktop instead which is more comfortable to use, however, it runs on Windows. I've dual-booted it in the past, however, at this point I just want to develop in the Windows environment, however, I just had some questions about the best way to do so. When I program in Linux I write all of my programs in vim, and am able to quickly run them from the command line using In place of vim I'm trying to use Pycharm, however, I'm still unsure of how to make a single file using it. In vim you can make a simple Python file for a one-off program. However, Pycharm works in projects and will create many extra files to accommodate a small Python file when I only need the one file. As best practice, is it better to create a new project for each of these small programs, or should I make one project in a parent directory and make multiple small programs as part of that? Any other tips or tricks for developing in Windows are appreciated, as I'm just getting started and would prefer to start off with good habits! [link] [comments] |
Posted: 22 Apr 2018 01:45 PM PDT The files are located here: https://github.com/PaulConradSBVC/CS265_SP2018/tree/master/SingleLinkedList In the Snode.h file he has this code: SNode<T> *next ; // Pointer to the next node public: SNode(T); SNode<T> * getNextNode(); I'm very confused here. I know SNode(T) is the constructor. But what are SNode<T> *next and SNode<T> * getNextNode() why does it need to be SNode<T> *next and not just T *next? I don't get that what kind of data is that? And why does it need the class name? [link] [comments] |
Best way to approach complex system with a lot of dependent variables? Posted: 22 Apr 2018 01:31 PM PDT Like the title says. I have a project that involves a lot of dependent variables. I haven't started yet, I'm still in the how the heck do I approach this phase. I've done some similar work before but nothing of this scale, everything I can come up with is too rigid and would affect the simulation. [link] [comments] |
Working as a programmer as a high school dropout. Am I deluding myself? Posted: 22 Apr 2018 11:12 AM PDT As in the title. I am twenty and I left high school when I got a 1-year contract as a penetration tester. Since the contract expired, I have not been able to find a job - just extremely low-paying freelance gigs. Since I feel that sites such as Freelancer.com are a developer's hell - you need to compete with a number of developers, some of whom are from third-world countries, and some even accept one-digit hourly fees - I am searching for a better option. Problem: everyone is requiring a degree, even for managing Wordpress installs... this frustrates me a lot. I have been studying programming for six years, I know a number of languages and frameworks - from web languages down to cold x86 assembly, even on bare-metal, passing through C and Python - I am a proficient Linux user, I know how to assess the security of web/desktop software and a couple of other things. I am clearly no Dennis Ritchie, but I feel like I may be skilled enough to land a junior position somewhere. It's not like I am sending CV to the NASA... So the question is, am I deluding myself? Won't I be able to find a job? Should I return to school and spend two years on school subjects instead of investing my time into software development? Even then, without a degree, wouldn't it be hard anyway to land a job? [link] [comments] |
Posted: 22 Apr 2018 07:16 AM PDT I can use either powershell or python 3.6. I have a list of csv with thousands of router names and and IP addresses. I need to compare the data of the csv with corresponding txt files i have(the txt files are thousands of programming coding each txt file are programmed differently). I need to see the IP addresses in the csv is found or not found on the corresponding text files and produce results like pass/fail. [link] [comments] |
Posted: 22 Apr 2018 09:35 AM PDT Which raspberry pis work with it? I got a voice kit without a Pi and target sells one with a Pi Zero WH, and I want to get a Pi 3 for myself. [link] [comments] |
"Computer Systems: A Programmer’s Perspective" book for experienced programmers? Posted: 22 Apr 2018 10:19 AM PDT A few weeks ago I was asking about reading material on high performance C++ coding and I was recommended "Computer Systems: A Programmer's Perspective by Bryant et al.". I've a BS degree and a few years experience of using C++ professionally. I've perused the TOC of this book and while the topics are very interesting, they're all covered in detail in BS degree. Is it still worth it to read this book for an "experienced" programmer? The reason I am asking is that I've a lot of reading material on my plate these days and this book is more than a thousand pages long. [link] [comments] |
Automate calendar event creation for scheduling? Posted: 22 Apr 2018 06:04 AM PDT So I have a dilemma, actually two: 1) My work schedule is not currently syncable (is that a word?) 2) I do not have a lot of experience programming. I am looking for help making a script or program that can grab my currently known schedule from my work calendars' site using my login information 1x a day, whether it being directly from the site or reading the information from a printed PDF copy of the calendar site's home page. Is this possible, and can someone help me? [link] [comments] |
Is making a collapsible cell in a table possible? Details inside (PHP and HTML) Posted: 22 Apr 2018 09:44 AM PDT I'm a student and still learning about programming and making a system for our project. This is my table . My problem is I wanna try make the 3rd column (of each name) turn into a single cell. So instead of appearing 5 times, each name(student) will only occupy one row, and then just a clickable item or something on the third column. So the table will look like something like this. Name1 ||test || +Collapsible item here that will expand and list the 5 items The items are files uploaded per user. Here is my database . And my code Thank you so much. Sorry for my grammar :( [link] [comments] |
Need help with syntax design for a specific text file. Writing and parsing questions. Posted: 22 Apr 2018 05:22 AM PDT I'm build a page based on GitHub pages and as usually there will be code snippets. The problem is that both Pygments and Rogue do not work well with C++. They get confused on complex syntax and do not recognize new keywords. And since the website is going to be also about new stuff, I need my own syntax coloring tool. Both Pygments and Rogue work by transating Markdown to HTML giving tons of Here is an example (not real code, just variety of things for the example): And here is how the syntax highlight specification would look like for it: The first line of generated HTML would be: How it works:
The problems
Currenly the solution I have come up with is Alternative solution: 4. For the code file: Such color file would be incorrect: because there is no space after
[link] [comments] |
Arguments against hiding state, using encapsulation, etc? Posted: 22 Apr 2018 12:00 AM PDT Something that came to mind was the idea of encapsulation, of hiding the state of some code from other pieces. It started to not make much sense to me, except for hiding it from external programs. Internally, there doesn't seem to be any point, if the program is coded decently. Want to alter a structure or set of data? Use a function or something that can do the job safely, etc. What are the best arguments against the idea of encapsulation and state-hiding? [link] [comments] |
Does an 'async' web/service framework exist? Posted: 21 Apr 2018 10:37 PM PDT During my career, I've had a few instances where I've been part of projects ripping apart a monolithic prototype/proof-of-concept that got successful. The pattern is usually this:
The best example I can think of is Facebook. Zuckerberg wrote it as a college kid in PHP and years later the FB mega-corp is wrestling with that legacy. Inventing crazy but cool things like PHP-to-C cross compilers to help scale it. Now this makes sense. A single person writing something as a trial balloon isn't going to make some premature SOA architecture for scale that may never come when it's more important to make sure the functionality is useful. This is why microservices is a current hotness, try to break the services up sooner rather than later and think about decoupling early. Anyways like I said, I've done a few of these refactor projects where we work to decouple some big piece of functionality from one of these monoliths. One of the biggest challenges is that so much work is done in the HTTP request scope and there are lots of assumptions tied to that. So large fundamental changes have to be made to accommodate a new work flow such as throwing image uploads on to a queue to be processed asynchronously. No one starts with message buses, event streams or queues out the gate because it's a lot more work to provision all that infrastructure which you might not need. This is because when the simple prototype is made it's done with a well-known web framework where everything is about responding to HTTP requests. Is there a framework out there that will allow for simple async message/event management? For example, I could easily create Does this framework exist? Anyone seen something like it? [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