• Breaking News

    Wednesday, May 30, 2018

    How can I gauge the value of an application I wrote? Ask Programming

    How can I gauge the value of an application I wrote? Ask Programming


    How can I gauge the value of an application I wrote?

    Posted: 30 May 2018 12:06 PM PDT

    Probably not the BEST place to ask this sort of question, so if someone can direct me to a proper sub-reddit, that'd be Bill Lumberg.

    I've never actually SOLD any software that I've written ( it's always been software written for other people ), and I know that that the value of something is usually "Whatever people are willing to pay for it", but is there some way to know if a program is worth anything if I decided that I wanted to sell usage rights to it to other companies, besides getting screwed over a bunch of times?

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

    Just need a place to start

    Posted: 30 May 2018 04:28 PM PDT

    Hello, I've never programmed before but have a good bit of common sense and can pick something up quickly and atleast work my way through it.

    I am a 4th year pharmacy student and had an idea to create a program where you can check boxes for disease states and then subsequently check the drugs that the patient is on (commonly used drugs for those disease state). This would then generate a word document or pdf with preset pictures and educational text that way when we counsel patients we can easily make a patient specific handout to educate our patients.

    I'm not looking for someone to hold my hand. I honestly just need a point in the right direction. What language could this be easily done on? Could you do it with C++ and java?

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

    I'm not always sure how to satisfy the "just one method" mantra in unit testing.

    Posted: 30 May 2018 04:16 PM PDT

    I've run into this in a number of situations, but it seems most common with objects that have internal collections that are only partially exposed through a public API.

    For example, I have an object representing an archive (think something akin to a zip file). The underlying collections of files and folders are not directly accessible in order to maintain referential integrity and so forth. Files cannot exist apart from directories, and moreover, the object graph is maintained separately from the objects themselves for a variety of technical reasons. In short, directory objects do not directly refer to their file objects, nor vice-versa. Only the archive object posses all of the knowledge necessary to correctly maintain the graph.

    So, I have a method like AddFile(IArchiveDirectory dir, IArchiveFile file). One precondition for this method to succeed is that the specified directory must already exist in the archive. One post-condition is that ContainsFile(file) should be true. Let's presume I want to codify that in a unit test. In order to do so, the test method must call AddDirectory(...) to set up the pre-conditions and must call ContainsFile(file) to verify the post-conditions. Neither of those methods is directly under test as such, but there's an indirect dependence. If anything is wrong with AddDirectory(...) or ContainsFile(), the unit test for AddFile() will fail.

    I'm not sure how to resolve this. It's certainly possible to expose the internal collections to the test class to avoid this entanglement, but at that point I'd be testing the implementation rather than the contract, which sounds like a bad idea to me.

    Am I over-thinking things, or is this actually integration rather than unit testing?

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

    How to make this monte carlo simulation more efficient?

    Posted: 30 May 2018 02:14 PM PDT

    So I don't have a ton of experience with programming, but I'm trying to learn IDL and get familiar with it. I was given a practice assignment to create a monte-carlo simulation in order to calculate the value of pi. I have a picture attached of the code I wrote. I was asked to make it more efficient so that I could input over a million points and have it calculate the value for pi quickly. I'm not sure how to go about this, but I was told that it would be slow to use a for loop for this which is what I have. Does anyone know how to go about this? Thank you!

    https://imgur.com/a/TvmJrPT

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

    How to insert stammering into text dynamically in a way that looks and reads right in the English language?

    Posted: 30 May 2018 04:10 PM PDT

    Context: so I'm making an adventure/narrative game about animals. You play as a baby Hedgehog, and there's a part where you play a conversation minigame in which Hedgehog tries to combine topics and emotions to create sentences. Throughout the game, Hedgehog gets more anxious and nervous, resulting in stammering speech.

    So I have a bunch of dialogue lines ready to feed Hedgehog along with an anxiety meter (say, 0 to 5). When anxiety is at 4 or 5, Hedgehog should stutter and stammer more:

    e.g. "Maybe I should be practicing more..." turns into "M-Maybe I should b-be practicing more."

    The current implementation searches for adjacent consonants and vowels ("(po)rridge", "por(ri)dge", "porrid(ge)". if it finds such a pair, it inserts a dash and a repeat of the consonant.

    However, that results in some weird outputs such as "practice" turning into "pr-ractice", which doesn't look like a stammer in text form. Instead, the correct output would look something like "p-practice" or "pr-practice".

    I was wondering whether it'd be possible to identify parts of the English language that are "stammerable".

    TL;DR need to insert stutters into speech for a game and don't really know the best way.

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

    Question about Cloud Foundry

    Posted: 30 May 2018 02:25 PM PDT

    So I want to get started with app development through Cloud, and thinking about using Cloud Foundry as my starting platform. Do you guys think this is a good idea, also, are there any good online tutorials or courses out there that you might suggest? I'm looking for more thorough ones, not just basic tutorials. Thanks

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

    Best programming language to send commands to Linux terminal?

    Posted: 30 May 2018 12:10 PM PDT

    I am using a Raspberry Pi to send gcode text files to a TinyG controller, and I have been using the Linux terminal to do so up to this point. However, I need to make a graphical user interface on the Raspberry Pi screen, and I am confused on the best language to do it in, and how to go about it. There are 12 different gcode files that can be sent to the controller, so I would like to have 12 buttons. I can easily make the GUI in Java, but I don't think Java is anywhere near ideal for this project. I am wondering what the best programming or scripting language to make this in would be. The gcode text files are all in a folder on the Raspberry Pi deskptop.

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

    How to solve a Nan error in Java?

    Posted: 30 May 2018 05:15 PM PDT

    Hey! So I'm starting to learn how to make Swing GUIs, so I figured I would make a simple pythagorean theorem calculator just to test my GUI knowledge.

    However, I've run into a problem. I can correctly calculate a hypotenuse of a triangle, but I am not able to calculate a leg, with NaN being returned. I know that this is a "not a number" error, but can anybody help me find a fix?

    This is the section of the code causing the error:

    else if(bInput.isEditable() == false){ aValueUse = Double.parseDouble(aInput.getText()); cValueUse = Double.parseDouble(cInput.getText()); temp = Math.sqrt(Math.pow(aValueUse, 2) - Math.pow(cValueUse, 2)); bValue = Math.sqrt(temp); answerOutput.setText(Double.toString(bValue)); } 
    submitted by /u/imperialpidgeon
    [link] [comments]

    Can you explain all of the class access modifiers and how they work?

    Posted: 30 May 2018 03:55 PM PDT

    Developing a marking server for an introductory Computer Science course

    Posted: 30 May 2018 11:54 AM PDT

    This summer I have a project to develop a marking server for an introductory Comp course.

    Basically it is going to: - Get the student to login - The student will then upload a zip of their source code. - The server will test the code with tests that the prof I am working for will provide then provide a mark.

    Right now I am thinking to just make a Java RESTful backend using Jersey and Tomcat. Java is easy if anyone wants to maintain the server after I am gone. I am most concerned about marking multiple submissions at once when everyone submits their code right before the deadline.

    So I have 2 questions: - Does anyone here know of libraries that can help me with any of this - General design/language suggestions. I just chose Java because it is easy but I would say that I have good intermediate full-stack experience- I worked as a full-stack server developer for 2 years using Scala-play.

    I will apply the frontend using REACT.js in the future.

    submitted by /u/olive-man
    [link] [comments]

    How do I pull data from a web onto Excel or txt file?

    Posted: 30 May 2018 11:31 AM PDT

    I'm working on a project that requires the name of all the classes and the professor that teach it. I found a website that have it so how do I pull all of that onto my computer? https://shop.uofastore.com/courselistbuilder.aspx

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

    Developer requesting a zip of a certain file to debug why their app is not working on my computer/iOS.

    Posted: 30 May 2018 07:33 AM PDT

    I apologize if this is the wrong subreddit to ask this question, as I have little knowledge of programming. (If this is the wrong subreddit, what subreddit would be more appropriate?)

    I've recently started using an app on my MacBook and they released an iOS version which syncs the data between the two. I was part of their beta testing of iOS, and the app is not working correctly.

    This is task-management/project/calendar app.

    Communicating with them and tried several fixes and nothing works. They are now requesting a zip of the following file:

    ~/Library/Containers/com.???????.???????.macos/Data/Documents/??????/Stores/Settings.???????-settings

    The ????? represent the name of the program as I do not want to besmirch their name if the request is legitimate.

    They have worked hard to help me with the problems I've been having. The MacBook app has become fundamental to my workflow and the iOS app would help greatly.

    They said it would only contain information regarding the devices. The problem seems to be a bottleneck which is preventing the iOS app from syncing and causing it to freeze.

    Would there be passwords or other data in this type of sqlite file that would be irresponsible to send to a developer?

    I also have information regarding my work in the app that is confidential. They said this file would not contain said information.

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

    Best way to quickly setup a decent looking site using Django, Stripe, and shipping APIs?

    Posted: 30 May 2018 11:15 AM PDT

    Hello there! (Calling r/PrequelMemes.)

    No but in all seriousness, I actually have a little bit more questions about different parts than what's already in the title. See I'm developing a prototype/MVP, and I just want to get it out there fast. In the beginning it's not as necessary, but I'd like to also include user accounts and proper management for such accounts, while also allowing the ability to view users and probably extra social content (nothing too heavy, mostly followers, picture for the user, and just their username plus name).

    Primarily I'm looking at Pivix for some quick hacking together, but I'm not sure whether that's the best option. Honestly for starters I'm going to offer one service (think of it as e-commerce but I'm only offering one thing), and I was going to add a bit of a social element as well; whatever the best way to go about that though for a quick solution is what I'm unsure of.

    And for the payments screen, what's the best way to achieve that? I'll be using Stripe and probably cryptocurrency, but there must be an easy way to have both of those be populated with whatever price of my choosing and have it go smoothly, right?

    Pretty simple to begin with--I mean, the minimum I could do would just be to have a user sign up with specific information, and then have them be able to buy that one service and input information that's relevant to the purchasing process.

    Any recommendations/suggestions for the best way to go about this? Thanks a ton!

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

    Having trouble with small project with Javascript, ajax, and PHP

    Posted: 30 May 2018 09:02 AM PDT

    Hello,

    I am trying to attempt to give users the ability to write a text file to a directory on the website's host server. A usage case would look like:

    1. User visits www.example.com/createtext
    2. User types in a text bot what they would want to be saved, "Hello" for example
    3. The server that the website is hosted on creates a text file in one of its directories.
    4. On the server, there is now a text file in C:/somedirectory/textfiles/ with whatever they wrote in the form written inside of it (in this case, "Hello")

    Here is what I have so far:

    createtext.php

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <title></title> <meta name="description"/> <?php include 'newtext.php' ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <form id="form" class="topBefore" onsubmit="download(this['name'].value, this['text'].value)"> <textarea id="message" type="text" placeholder="Hello" name="text"></textarea> <input id="submit" type="submit" value="Download Text File"> <script> function download(filename, text) { $.ajax({ url: "newtext.php?name=" + filename + "&content=" + text, type: "GET", dataType: "jsonp", async: false, success: function() { document.write('It worked'); }, error: function() { document.write('It didn't work'); } }); }); } </script> </body> </html> 

    newtext.php

    <?php if(isset($_GET['name']) && isset($_GET['content'])) { $filename = preg_replace('#[^A-Za-z0-9_-]#', '', $_GET['name']); $file = $_SERVER['DOCUMENT_ROOT']."/textfiles/$filename.txt"; $f = fopen($file, 'w'); fwrite($f, $_GET['content']); fclose($f); } else { echo 'Error.'; } ?> 

    This dir C:\xampp\htdocs looks like:

    createtext.php newtext.php styles.css textfiles (folder) 

    For some reason, it always come up as "Error" when the page is reloaded, as if newtext.php does not wait for any form input. Also, it as if the ajax function never get's ran, because I never see document.write() go off anywhere.

    At this point, I really don't know what to do and if any of you have any suggestions it would be greatly appreciated.

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

    Making a makefile generic

    Posted: 30 May 2018 06:47 AM PDT

    I am trying to make a makefile of mine more generic and running into trouble.

    I have files such as:

    abc.o abc_test abc_test.o abc.c abc_test.c

    and so on. I am trying to make them more generic so that the 'abc' can be interchanged with 'def' for instance.

    I know how to use * (*_test.c) but is there some way to say for instance that *_test with no extension after?

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

    iOS Safari wont send touchstart events

    Posted: 30 May 2018 08:20 AM PDT

    I'm working in Safari on an iPad running iOS 9.3, the page has a canvas which I'm trying to scroll with one touch (at the clients request). I can handle multiple touches, rotate, pan and scale no problem. Any code to handle the one touch case shows that it receives the touchstart method after about a second. I tap the screen, or hold my finger on it, and nothing happens until after the one second delay.

    I've been searching for answer for quite a while now. It might have been waiting to decide if the touch is a click, except the canvas is not a clickable element. I can go to other sites with touch interfaces and see that they are getting the touch events correctly but the code is so obfuscated that I have no idea what they are doing that I am not.

    Any hints? Any ideas what I might look for?

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

    Any algorithms that can split words that were combined incorrectly?

    Posted: 30 May 2018 02:57 AM PDT

    For example: the quick brownfox jumpsover the lazy dog. To this: the quick brown fox jumps over the lazy dog.

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

    How do I, as a non-programming, extract my data from an expense tracking android app?

    Posted: 30 May 2018 05:36 AM PDT

    I use M-trakr (an expense tracking app) and have been updating it for over a year. However, as of late, there seems to be some error in the way it is calculating an account and their export details doesn't seem to export all the data. I have tried to contact the developer but with no luck. Now I am trying to figure how I can get my own data out of my phone so that I can at least switch apps without losing a year's worth of data

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

    What is a methodology, pattern, principle or point of view you consider nearly or fully omnipresent?

    Posted: 30 May 2018 01:15 AM PDT

    For example, after diving into object-oriented programming, I realized I see everything in modules, with extendability as a primary and undoubtable priority.

    While I'm aware this isn't always vital, I benefit from this principle heavily.

    During your career, what are those principles that you think will always, or almost always stand and help?

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

    Two questions about "style" on the console (C++)

    Posted: 30 May 2018 03:16 AM PDT

    First question: how can I make a timed output on the console, so that it seems like the computer is writing in real time?

    Second question: how can I make a new line using the input? I want the program to print a phrase, then waiting for the user to press enter (preferibly without any input, at most a space) before printing a new phrase.

    submitted by /u/Yama-no-Maku
    [link] [comments]

    What is code editor?

    Posted: 30 May 2018 06:25 AM PDT

    I can't find explanation. What is Visual Studio Code and CLion? What's the difference between them and Code Blocks? Sorry for stupid question

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

    GDPR question: registration and emails

    Posted: 30 May 2018 02:13 AM PDT

    Im working on bussiness application that doesnt have any analytics or anything only entries in database about users email/password that we manualy provide. User can't register themselves. Am I as EU citizen required to do anything? Is this gdpr compliant? If it is, does storing name/last name in db along side email/pass constitute breach of compliance? At what point do i need to do that privacy policy thing?

    Emails would ever only be used for registration and to log in. Same as name/last name only for verificaation of user and for access control. Nothing else

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

    Can you help me on why I got these true-false questions wrong?

    Posted: 30 May 2018 01:02 PM PDT

    1. When an operator is overloaded as a member it requires one less argument than its number of operands.

    2. Precedence or associativity can be changed through overloading

    3.To be accessed from a member function of the publicly derived class data or functions in the base class must be private or protected

    1. To be accessed from a member function of the publicly derived class data or functions in the base class must be private or protected

    2. A derived class may not contain objects of other non-parent classes

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

    how are these "anonymous usage reports" implemented?

    Posted: 30 May 2018 06:42 AM PDT

    Please bear with me, I'm a student!

    When you use Firefox for example, you get asked if you wanna participate in improving the software by sending anonymous usage data. I need some clue on how such functionalities are usually implemented. Books/websites/source code...etc. are welcome!

    Specifically(!) for desktop app, one needs to

    • collect data (special functions in code?),

    • send it over the internet (how can a desktop app send data over the internet?)

    so you can analyse it and know what users are doing with your app

    Thanks a bunch!

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

    Possible programming platforms and languages (or/ combination of languages) for the different type of application developments ( Web-based/ Desktop app/ Mobile app).

    Posted: 30 May 2018 06:21 AM PDT

    Hello all! I am a computer science student with the experiences of only class-related projects. Now I want to work on my own on developing applications (brushing my skills plus learning new languages/frameworks). However, I am in a limbo of what path I should choose. So, I want to try out different things before I settle on one and try to get better on that platform. I would be grateful if anyone was kind enough to give me a list of different types of application with the platform and languages I should work on. Thank you!

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

    No comments:

    Post a Comment