Standard ML Help Ask Programming |
- Standard ML Help
- How would I use a lamba in this situation rather than using an override. (Java)
- Is Python a suitable language for parsing data and outputting to a preset template?
- I'm developing a user-interface that models scientific processes based off user input. What language should I use?
- How can I prevent submitting a payment twice?
- [NOVICE] At work I create databases using Microsoft Access and SharePoint at work and I want to come up with an alternative solution. Kindly requesting advice!
- [bash] How do I pass an array of strings to a Bash script and join that array?
- Trying to create a list of isolated Chinese words from a text file.
- Help using UART with GPS module - Embedded C
- REST API best practices
- How do I effectively ask a question about debugging my code?
- How do I check for last iteration in for loop java?
- Someone can explain very well what is a Constructor and for what is useful? Java
- Search function in a PHP script
- [VB] Basic log in screen synced to Access having error while running
- [C] When I call "sleep(1)" in my loop, the loop just stops working for some reason
- How can I learn programming in a fun way?
- Programming language that is native and cross platform.
- Are there any good articles on the merit of tracking the average age of all open bugs/issues?
- How to document request for change in application, so you liked it.
- [C] How to get two strings on the same line in a printf statement.
- Need help with a programming assignment:(
- Batch script - How to escape double quotes and redirection signs in this example? How to properly escape double quotes and redirection signs?
- Character-limited api call for a json object
- Need help with a programming assignment.
Posted: 25 Apr 2018 06:34 PM PDT I am currently taking a discrete mathematics class at college as I am a Computer Science major. But recently, we were all given the task of coding multiple functions/methods in SML as part of our last homework. Nobody in the class is even remotely familiar with the program besides for the basics he went over in class. The assignment is due in a week but I have no idea where to start. I know it's pitiful to ask for homework help but I could use all the help I could get. Here are the tasks: https://imgur.com/a/WcwTYwt If anyone knows how to do these problems please pm me or comment. Thank you so much. [link] [comments] |
How would I use a lamba in this situation rather than using an override. (Java) Posted: 25 Apr 2018 08:11 PM PDT
[link] [comments] |
Is Python a suitable language for parsing data and outputting to a preset template? Posted: 25 Apr 2018 02:47 PM PDT Hello /r/AskProgramming, The Question/GoalI'm looking to parse ASTM strings in an excel/CSV file to choose a Word Document template to fill, then to pull values from the same ASTM string to fill into the chosen template. Does this seem like a project a relative Python novice can accomplish? Is Python a good language for this idea? After hearing about the wonders of Python from friends, I thought I should look at it. The ProblemHere's a website with an example and explanation on ASTM strings. ASTM strings can be complicated. For example: ASTM D2000M5BG710A14B14E014E034F19 Breaking that up for the sections to parse and decipher: ASTM D2000 M 5 B G 710 (A14 B14 E014 E034 F19)* .* - Denotes special requirements which may or may not appear, may appear in various quantities, and may be completely different each time they do appear. The Work So FarI've been exploring python and associated packages, and believe I've found one that does almost everything I'm looking for: docx-mailmerge Testing it with the simple examples shown on the above-linked website works nicely, and I can see potential here. I figure I need an incremental function to break down the string to component pieces, check the standard requirements individually against specific "tables" to choose a template. Next I think it would check the special requirements section against another "table" for information to add to the template afterward--ideally it would create additional merge fields to simplify this process, but I don't know if this is possible yet. Once all of this is done, I imagine the script would pull the information from the string and write it into a dictionary to fill the template. Finally, the script would then merge all of the collected information into the word file. End QuestionSuggestions, comments, ideas, and (constructive) criticism are welcome! I didn't realize this would be as long as it is. If you've made it this far, thank you for reading! [link] [comments] |
Posted: 25 Apr 2018 07:43 PM PDT I'm developing a user interface that gathers specific input parameters from the user, runs scientific calculations, and then displays the output to the user. I've written a version using html, javascript, and css - however, I'm unsure if this is the best way to write it (what about java/c++?). I'm looking for a robust language that offers flexibility in design/layout and mathmatical operations. In the long run, the interface will be used as a teaching tool for the processes its modeling. [link] [comments] |
How can I prevent submitting a payment twice? Posted: 25 Apr 2018 05:18 PM PDT I'm working on a project where the user sees the amount to pay and the payment method. They confirm, which submits a form. It makes a request to a payment server, then once it gets a response back, saves a record in the database. How can I avoid problems like the user clicking confirm and submitting a payment, then pressing the back button before the response can be saved? Thanks. [link] [comments] |
Posted: 25 Apr 2018 01:58 PM PDT Hi there! I am a novice programmer working with VBA and SQL to create databases with user interfaces in Microsoft Access using SharePoint Tables as a back-end. I work in a government building with no programmers besides myself and have very limited resources at my disposal (pretty much just Microsoft Office suite, I don't have the ability to get MySQL, etc.) Obviously Access has its shortcomings and I really dislike how they have to use an Access file. My users definitely favor websites. I have a few ideas for solutions but whichever one I pick I know I will need to do a lot of learning so I want to make sure I pick the right one and not waste time. Publishing a web access file seems PERFECT but Microsoft is discontinuing Web Access support.... (very frustrating as this seems perfect) Another option is to master Microsoft PowerApps. This video gave me some hope https://www.youtube.com/watch?v=CO6xfbjnYwc The final option (and likely the most work) would be to learn Javascript and embed the functionality within SharePoint webparts. I have a feeling this is the best option. Anyone have any input by chance on what the best strategy for me to improve my business tools is? Any support is highly appreciated!! [link] [comments] |
[bash] How do I pass an array of strings to a Bash script and join that array? Posted: 25 Apr 2018 06:44 PM PDT I want to join an array of strings on the string But when I run I need to pass the argument as an array since I plan to pass more arrays later on. Something like [link] [comments] |
Trying to create a list of isolated Chinese words from a text file. Posted: 25 Apr 2018 06:43 PM PDT Language: Java. I also have no experience The gist of things:I'm a hobbyist language learner, not a programmer by any means. I'm trying to isolate individual Chinese words from a large jumble of text. Then I want to make a list of those words, separated by a tab or space. Additional background: I use a flashcard program called anki. I exported all my cards as a text file, generating something that looks like.... ...this huge mess. Some words are by themselves, like "欠". Others I want are in sentences marked by "()", like (侵占)公有土地. What I've tried to think of: Again, no programming experience, so I'm mostly guessing. I was looking at Java. My thought is to create a Scanner to read the original file. I also create a second new file. Then in a while loop, as long as the scanner can find new words, add the found Chinese words to a text variable. Add "text variable + tab" to the file. Main Questions/Problems (I think): How can I create a scanner that both (a) only returns Chinese words from a multilingual document and (b) will be able to isolate individual words in a Chinese sentence when separated by parentheses- i.e. the 侵占 from (侵占)公有土地 ? For "B" I was thinking maybe I have to create a second scanner that goes through the entire string of characters looking specifically for a "(". [link] [comments] |
Help using UART with GPS module - Embedded C Posted: 25 Apr 2018 05:15 PM PDT Hi all, so I got a hold of this GPS module called a Hornet ORG1510-MK05, and I'm trying to connect it via UART4 and UART5 on the STM32F303RE (ARM architecture). I'm having issues getting it to respond to anything at all. I have already confirmed that I have it wired properly. Here's what I've got to try testing this thing in main(): If anyone has idea for what I might do differently, that'd be very helpful. Or if you have ideas from scratch for how to interface with this thing, that'd be awesome too! [link] [comments] |
Posted: 25 Apr 2018 08:46 PM PDT Hey all, I'm in the process of developing a REST API and I've been in discussions with my senior about context, and neither of us are sure what the "best" or "most RESTful" way to do this is. I have an endpoint that is baed on the structure /device/{123}/action/, but under certain circumstances, actions may not need a device context after we've discussed it further. This leads me to either: A) providing the device ID in a querystring (/device/action?id=123) B) having two separate endpoints (/device/action and /device/{123}/action) and having the second subclass from the view of the first, adding an extra filter in to limit resultsets etc It seems to me that with A) we would have to account for having an ID and not having an ID, and in B) everything would be much more reusable. Are either of these "more" RESTful than the other, or are both equally as RESTful and valid as each other, depending on the sitaution? I feel like being explicit with the URI is the right way to go. [link] [comments] |
How do I effectively ask a question about debugging my code? Posted: 25 Apr 2018 01:55 PM PDT I have seen other people type text and then their code comes up in a white box but I dont know how to do that. Also, should I zip my code (in VB) and upload it for people to see? Finally, should I post screenshots of the whole piece of code for better context? [link] [comments] |
How do I check for last iteration in for loop java? Posted: 25 Apr 2018 01:52 PM PDT I'm trying to add numbers that are divisible by 3 and 5 for 1 through n. On the last iteration I want to get rid of the plus sign so it shows, if n = 10
` [link] [comments] |
Someone can explain very well what is a Constructor and for what is useful? Java Posted: 25 Apr 2018 02:54 PM PDT Really have problems understanding that, also I don't see the difference between a constructor and the getter and setter function (that also don't understand very well). [link] [comments] |
Search function in a PHP script Posted: 25 Apr 2018 02:39 PM PDT Curious how i would go about searching multiple items in a PHP Script? i have a string that is set to search a sheet for a phone number but i can only get it to search one item. I want it to search multiple items. Like Search my forwarded phone number against a google sheet. Then also search the number it came from on the sheet also. I tried setting the search string to $search=substr($_POST[ForwardedFrom|From],1); But that didnt seem to help. Here is a screenshot of the code. https://imgur.com/a/N6u0xv0 Thanks!! Much appreciated. [link] [comments] |
[VB] Basic log in screen synced to Access having error while running Posted: 25 Apr 2018 02:34 PM PDT I'm fairly new to coding and I have a project to do for school. I basically have to create a system for a fake business to store and edit data. I am using VB to do this and I want to sync it to Microsoft Access. I have tried to copy this tutorial for a login screen that checks with my database to see if the data entered is correct (http://www.visual-basic-tutorials.com/form/Login-tutorial-database.htm) My database is a bit more complicated than the one in that tutorial. Heres a screenshot of the database in relationship form https://prnt.sc/ja5goo Heres the code that I'm using with the error marked https://pastebin.com/vFYHLpJn This is what the error says: Exception Unhandled System.Data.OleDb.OleDbException: 'No value given for one or more required parameters.' [link] [comments] |
[C] When I call "sleep(1)" in my loop, the loop just stops working for some reason Posted: 25 Apr 2018 02:07 PM PDT Here's the code in question: I am doing an exercise regarding Multithreading right now. So when I compile and run this in the console, it prints:
And that's it. But I am trying to do an endless loop where it continuously prints this. When I remove the sleep(1) it works and does an endless loop. [link] [comments] |
How can I learn programming in a fun way? Posted: 25 Apr 2018 09:40 AM PDT What is a project I can work on that would be enjoyable to do in learning more code? Which language is the most fun and useful? I have experience in RStudio, and a little JavaScript. But I want to learn something useful (python, C++ or something maybe?) and do something enjoyable while learning (making a game perhaps?) [link] [comments] |
Programming language that is native and cross platform. Posted: 25 Apr 2018 04:37 PM PDT Hello, I am curious to see if anyone knows of a programming language that is native and cross platform. It must have the ability to be compiled for multiple platforms, without having to change code to support that platform. (assuming I don't use any platform specific libraries) It must require no dependencies to run on each individual platform. Suggestions appreciated, Thanks so much! [link] [comments] |
Are there any good articles on the merit of tracking the average age of all open bugs/issues? Posted: 25 Apr 2018 12:48 PM PDT My team has a sizable backlog, and some bugs are pretty old. We keep our eye on a number of metrics as a team, and I was thinking that maybe average active bug age would be useful. Does anyone know any good articles or discussions on whether this is a useful thing to do? Your own thoughts on the matter are welcome and appreciated as well, but if I pitch it to my team I'd like to be able to reference some articles, so that's what I really need. Thanks! [link] [comments] |
How to document request for change in application, so you liked it. Posted: 25 Apr 2018 12:33 PM PDT Hi, this is a question for working developers, especially corporate. I've been given a task of optimizing certain areas of a very large CRM. This has been developed almost every week for years. There is constantly something being done on it. Basically a worker has to click here, verify that, come back there and do something, because some data is missing. He/she is losing this much time doing that and this is the way how it supposed to work. Now, how do I document such request so you wanted to work with me. What information I need to provide you with so it was easily understood and you actually wanted to do it. I'd appreciate any information you can give me, or if you have an example of such document, that would also be tremendous. [link] [comments] |
[C] How to get two strings on the same line in a printf statement. Posted: 25 Apr 2018 11:22 AM PDT I tried to concatenate the two strings like so, but it didnt work. The ouput was still on different lines for first and last name. Thank you in advance. [link] [comments] |
Need help with a programming assignment:( Posted: 25 Apr 2018 02:29 PM PDT I'm beginner in this of programming, and I need to do a Proyect, would you guys help me?:( The thing is I need to make a program that a user needs to give a number, for example, "negative thirty-one" and what I need to do is that the program gives back a "-31". Thanks for your help:) (In Java, Im using NetBeans IDE 8.2) [link] [comments] |
Posted: 25 Apr 2018 03:04 AM PDT The user inputs the key, and we try to match it: This doesn't work. I've tried these examples with I think I managed to get the variable that's under double quoted to work somehow. But the redirection signs are just not working. How should I do this? Is [link] [comments] |
Character-limited api call for a json object Posted: 25 Apr 2018 01:42 AM PDT For context, I'm trying to write some javascript code that will be evaluated by a Twitch.tv chat bot (NightBot) that will take user input (A pokemon's name), then as output give a certain piece of information about that pokemon (Its type). NightBot has a function called urlfetch that I can use to load a JSON object from an api like this one: https://pokeapi.co/api/v2/pokemon/lucario/ . urlfetch will return the raw json data given, as a string. I'm trying to do this, then parse the json object to get the desired information. The parsing works fine - it's the loading I'm having trouble with. My issue is that urlfetch will return an error if the information given by the URL fed to it is more than 400 characters long. The API I linked above returns fairly large JSON objects. I haven't been able to find any other APIs for this period, let alone ones that return shorter objects. The vast majority of the information returned by the API is irrelevant - all I need is the very last item, an array containing its type information. Is there a way I can extract just this information from the API without loading all the rest of the JSON object, and reaching my character limit? Alternatively, are there any APIs that can execute javascript code I send to it, so I can avoid the character limit problem entirely? The command I'm creating (In NightBot's syntax) is: The javascript code being executed would be: I don't expect this to be relevant, but the entire command has a character limit of just under 500 characters. I intend to add more once (if?) the api issue is solved to deal with secondary types and such, but I don't expect to need help with that part. Thank you for any help. [link] [comments] |
Need help with a programming assignment. Posted: 25 Apr 2018 10:26 AM PDT We're supposed to make a password generator in javascript that would make a random string of numbers with the inputted length from a prompt. This is the shell that he provides. // Step 1. var passwordLength=prompt("Enter number in range 8 through 16"); passwordLength=Number(passwordLength) ; // convert var password="" ; // empty string initialized // Step 2. the loops passwordLength number of times // Step 3. the password document.write(password); What do I do? I am stuck. [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