• Breaking News

    Monday, April 23, 2018

    What could I give/make for my male group mates? Ask Programming

    What could I give/make for my male group mates? Ask Programming


    What could I give/make for my male group mates?

    Posted: 23 Apr 2018 08:03 PM PDT

    Hey all! I'm almost finished with my a big group project. I've made small applications in other group projects before, but never have I been part of team where we made something big that took a lot of effort and actual teamwork. I've really enjoyed this whole collaboration thing. For our last day of class, I plan to give each group member a little card telling them thanks for the awesome experience.

    Do you guys have any suggestions as to what I can give to them? I wanted to buy them a special beer, but I think one of them is underage, and I don't feel like getting in legal trouble over something petty like that. I guess I feel at a loss because I'm the only female, and I would like to make/buy a small gift that they would like. What do you guys think?? Thanks! -nehsquidward

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

    What genre of bug could cause this banking error?

    Posted: 23 Apr 2018 02:24 PM PDT

    [C++] is there a way to shorten this statement?

    Posted: 23 Apr 2018 07:13 PM PDT

    if(ch == 'a' || ch == 'A' || ch == 'e' || ch=='E' || ch == 'i' || ch == 'I || ch == 'o' || ch == 'O' || ch == 'u' || ch == 'U') 
    submitted by /u/2kool4jewschool
    [link] [comments]

    [C++] Can someone help me understand how exactly this function works?

    Posted: 23 Apr 2018 09:36 PM PDT

    okay, so this function works perfectly, but im trying to understand HOW it actually works. The function reverses the words in a string (ex. if i enter "hello there" as input it will spit out "there hello")

    https://pastebin.com/TtcYBRit

    I don't understand the while loop - if I have a phrase like "hello there" won't the while loop break once it encounters the space since it says while(sentence[i] != ' '? If anyone could give me a step by step of how this works id really appreciate it.

    submitted by /u/2kool4jewschool
    [link] [comments]

    Looking for help/suggestions with JavaFX/mvvmFX

    Posted: 23 Apr 2018 03:41 PM PDT

    Let me preface this by saying I am pretty new to Java. I have a few years of C++ and C Sharp experience.

    I have been working on this problem for 3 days now, and I have yet to come up with a viable solution, so I figured I would try my luck here.

    I have a JavaFX application that uses the mvvmFX framework. The UI needs to have an Accordion container, which contains a dynamic number (read in from an XML file) of TitledPanes, which each need to have a TreeList that contains nodes.

    So, as far as I can figure, I have a viewModel for the base ui, and a viewmodel for each TitledPane.

    This might be easier to understand with an example...

    Say I have a list of Tasks. Each task has a set of criteria that needs to be completed.

    The name of the TitledPane would be the name of the task. The content of the TitledPane would be a TreeList of each task and/or sub-tasks. The TitledPane needs to change color based off of whether or not the task can be completed, and each item in the tree list needs to indicate whether or not it was completed (check mark... or something)

    I have gone through some of the documentation for mvvmFX and it lists how to load multiple viewmodels into a ListView, but I can't seem to make the transition to Accordion and TitledPanes.

    If anyone can just point me in the right direction (a guide, a video, or even just a simple suggestion, it would be most appreciated)

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

    C++ Trying to load a map into the game but no luck

    Posted: 23 Apr 2018 01:15 PM PDT

    Link to the level.cpp file and link to Map1.tmx file.

    So I'm trying to get a small platformer game to work by following tutorials on YouTube, but I can't seem to get the map to load even though the code is pretty much identical to the tutorial.

    I was following the tutorial from Limeoats where he remakes cavestory in C++ and everything was going pretty well up until this point.

    I tried to see if the loop just stops somewhere by using a printf("Hi\n) in the loop that loads the layers from Map1.tmx but it just prints Hi twice and stops. I assumed it should just carry on infinitley if it were working properly; and load the map as well.

    If anyone could have a look and provide some insight, I would be really grateful!

    Thank you for reading!

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

    Most computers are not using IPv6 global internet addresses. Is there something wrong with it? Should we fork to something else?

    Posted: 23 Apr 2018 06:56 PM PDT

    I ask cuz I feel the need to encode internet address into "micropackets" such as an int64 contains an ipv4, 4 bits to choose from 16 possible ports, 16 bits of data, few bits of time sync, etc. I'd use bigger blocks (such as 192 bits) if there was a good reason to, at the cost of efficiency, but if the world has basically decided to use ipv4 for the next 20 years theres not much point in trying to raise a dead horse ready for someone to ride it. BTW this network I plan to create needs gaming-low-lag and a network branching factor so high (hundreds or thousands of low bandwidth p2p connections each, for tiny parts of neuralnets) that computers must often cache eachother's micropackets to eachother.

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

    Best way to read text from an html text box and save it to cPanel filesystem?

    Posted: 23 Apr 2018 06:37 PM PDT

    I am designing a website for myself to practice html and JS. I am using nameCheap for hosting which includes the control panel with a filesystem, and I want to implement a simple calendar on the website using text boxes that saves input automatically as the user (me) types it in (I know there are easier and more powerful calendars I could use in the same way but I'm really just trying to see if I can implement it myself on my own site).I was playing around with simple forms in html but many sources Ive looked at say that I should be using php to process inputs on the website. I have a feeling that is overkill for what Im trying to do considering I'll be the only one using the calendar. Is there a simple way to read and save data using only JS and html?

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

    Nested Functions and Scapy

    Posted: 23 Apr 2018 02:26 PM PDT

    Back again for a new question about nested functions. In the following article

    https://realpython.com/inner-functions-what-are-they-good-for/

    It describes how nested functions work but I am a little confused on one part. In the section that contains:

    def generate_power(number): def nth_power(power): return number ** power return nth_power 

    Where does the nth_power function get 'power' from? that is what doesn't make sense. I have code that uses the SCAPY library and it uses a callback function that NEEDS to be nested (not sure why exactly.)

    Can someone help me out with this?

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

    Memory allocation for toString()

    Posted: 23 Apr 2018 11:43 AM PDT

    If I have an integer that is constantly updating and then I am printing it in the following code:

    i = 0 While(1): i = i + 1 print(i.toString()) 

    my question is, is that i.toString going to be given a place in memory every time or does Python destroy the memory that string takes up after its used since I am not setting it to a variable?

    The code I have is a little different but I am trying to find a memory leak and cannot run the code I have so I just need to read it and try to find the issue at the moment.

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

    Matlab conditional array call question?

    Posted: 23 Apr 2018 05:25 PM PDT

    I have a situation where I need to use a function to evaluate coefficients which are then multiplied by an array call and if the coefficient is evaluated to be 0 then I need a function or something that prevents that specific array call.

    an example is like this:

    T(i,j)=(Ce*T(i+1,j)

    but I want to make it such that if Ce is equal to 0 then T(i+1,j) is never evaluated/called at all.

    Thanks so much for any reponses!

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

    Sharepoint Upload File via REST API

    Posted: 23 Apr 2018 05:24 PM PDT

    Hello everyone - does anyone have an example of how to upload a file to SharePoint library with this library?

    Office365-REST-Python-Client

    It seems to be the only one that handles the auth token for uploads successfully, but they don't have an example of how to upload a file on the GitHub.

    Thanks!

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

    Is my current skills not good enough for a junior dev position?

    Posted: 23 Apr 2018 05:09 PM PDT

    I was wondering if I would be able to get a job with my skills and experience. I have a demo website at [ec2website!](2-18-188-193-208.us-east-2.compute.amazonaws.com:8080). It's a single page http / socket based chat app.

    It's not good or complete by any means but I'm just wondering if that amount of skill is not good enough. Thanks.

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

    Python objects overwriting

    Posted: 23 Apr 2018 12:08 PM PDT

    I just made a post but I wanted to ask a different question to go another route.

    When you create an object in a loop and use the same reference, does python automatically free up the memory for the previous object? In the code below:

    while(1): a = class1() 

    Will new memory be created for each instance (a) of class1 that is created or because the previous a is no longer going to be used, python will free up the memory used in the previous instance a?

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

    Java : Can't see a label within my GridPane

    Posted: 23 Apr 2018 11:22 AM PDT

    My Code :

    import javafx.application.Application;

    import javafx.geometry.HPos;

    import javafx.geometry.Insets;

    import javafx.geometry.VPos;

    import javafx.scene.Scene;

    import javafx.scene.control.Button;

    import javafx.scene.control.Label;

    import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; import javafx.stage.Stage;

    public class Table extends Application {

    @Override public void start(Stage primaryStage) { Loan userloan = new Loan(); //Create Grid (Putting Different Panes In Each Block) GridPane grid = new GridPane(); //Grid For EVERYTHING TextArea rateText = new TextArea(); TextArea monthlyText = new TextArea(); TextArea totalText = new TextArea(); rateText.setPrefRowCount(24); monthlyText.setPrefRowCount(24); totalText.setPrefRowCount(24); rateText.setEditable(false); monthlyText.setEditable(false); totalText.setEditable(false); //Creating Labels Label loanLabel = new Label(" Loan Amount : "); Label yearLabel = new Label(" Years : "); Label rate = new Label("Rate"); Label monthly = new Label("Monthly"); Label total = new Label("Total"); //Creating Buttons Button computeButton = new Button("Compute"); //Text Boxes TextField loanTextbox = new TextField(); TextField yearTextbox = new TextField(); loanTextbox.setEditable(true); yearTextbox.setEditable(true); //Other grid.setVgap(10); grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); //FIRST ROW grid.addRow(0, loanLabel); GridPane.setHalignment(loanLabel, HPos.CENTER); GridPane.setValignment(loanLabel, VPos.CENTER); grid.addColumn(1, loanTextbox); GridPane.setHalignment(loanTextbox, HPos.CENTER); GridPane.setValignment(loanTextbox, VPos.CENTER); grid.addColumn(2, yearLabel); GridPane.setHalignment(yearLabel, HPos.CENTER); GridPane.setValignment(yearLabel, VPos.CENTER); grid.addColumn(3, yearTextbox); GridPane.setHalignment(yearTextbox, HPos.CENTER); GridPane.setValignment(yearTextbox, VPos.CENTER); grid.addColumn(4, computeButton); GridPane.setHalignment(computeButton, HPos.CENTER); GridPane.setValignment(computeButton, VPos.CENTER); //SECOND ROW grid.add(rate, 0, 1); GridPane.setHalignment(rate, HPos.CENTER); GridPane.setValignment(rate, VPos.CENTER); grid.add(monthly, 1, 1); GridPane.setHalignment(monthly, HPos.CENTER); GridPane.setValignment(monthly, VPos.CENTER); grid.add(total, 3, 1); GridPane.setHalignment(total, HPos.CENTER); GridPane.setValignment(total, VPos.CENTER); //THIRD ROWS (Add Secondary Grids) grid.add(rateText, 0, 2); GridPane.setHalignment(rateText, HPos.CENTER); GridPane.setValignment(rateText, VPos.CENTER); grid.add(monthlyText, 1, 2); GridPane.setHalignment(monthlyText, HPos.CENTER); GridPane.setValignment(monthlyText, VPos.CENTER); grid.add(totalText, 3, 2); GridPane.setHalignment(totalText, HPos.CENTER); GridPane.setValignment(totalText, VPos.CENTER); //Set An Action For "Compute" Button computeButton.setOnAction(e -> { } ); //Set The Scene Scene scene = new Scene(grid, 750, 550); primaryStage.setTitle("Loan Calculator"); primaryStage.setScene(scene); primaryStage.show(); }//Start //Launch Program public static void main(String[] args) { Application.launch(args); }//main 

    Here's How It Comes Out : https://i.imgur.com/gO9vYJ5.png?1

    As you can see, the year label and buttons are "..." instead of what they are named. How do I fix this? I imagine its something super easy but I'm stuck :/

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

    How do I find the Global Min of a Traveling Salesman Problem?

    Posted: 23 Apr 2018 11:01 AM PDT

    There are 10 cities in the Traveling Salesman problem and I used the nearest neighbor method to find the local min, but I also have to compare it to the global min which I can get by calculating it in Matlab.

    The problem being that I need to calculate more than 3 million attempts to do so, and I don't know how.

    Can anyone give me advice on this?

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

    Proper, organized way to store data long-term (Android Java)

    Posted: 23 Apr 2018 10:56 AM PDT

    I'm currently working on a simple logbook app for myself, where I track the money I spend each day, and whether I've completed certain daily tasks for myself. I have the basic screen down, where I can enter money I've spent and it's committed to persisted values as text, and some checkboxes for goals are committed as booleans. However, there are two more things I'd like to accomplish.

    1. How do I implement some sort of calendar so that I can choose each day and record in it, in case I miss a day and need to go back.

    2. How do I store data in an array (or other datatype) such that depending on what day I am on, the correct value is edited.

    Thanks for your help.

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

    Is it possible to create a virtual crowd-funding website as a final year project?

    Posted: 23 Apr 2018 09:16 AM PDT

    For my FYP, I've decided to create a crowd-funding website, similar to Kickstarter/Indiegogo but focused to funding people in medical need, charities and donations around the world. For now, I'd like the website to be simple and workable. Of course I spent the time looking for information online, checking out whether this kind of idea is possible to execute within a short span of time. I know that creating a crowd-funding website is a very big deal, but I want to just develop a small-scale website to be workable when I'm demonstrating it to my lecturers. For that, what I'm asking is...

    Is it possible to execute an idea like this in less than 4 months?

    What are the essential tools I need to create a simple and virtual crowd-funding website?

    Can I implement Paypal(transaction) and Google+(logging in account) in my project to make it more realistic and not gimmicky?

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

    Is a course like this viable?

    Posted: 23 Apr 2018 12:12 PM PDT

    Not sure this question is appropriate for this subreddit, sorry if its not. I am in a situation where I need to get out of a poor living environment as fast as possible. Ideally I wanted to enroll in my local college for a CS degree. But I need to start making enough money to be on my own. I'm wondering if this program or any similar would even qualify me as a junior dev. Is it a way for me to get my foot into the door of a decent job? Currently I'm a waiter earning 1600 a month, would this course give me opportunity to see much more?

    https://suncoastedu.finalsite.com/career-pathways/business-it/net-app-development

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

    What is the best way for me to set up a development environment for a workshop?

    Posted: 23 Apr 2018 08:19 AM PDT

    So I'll be holding an Ethereum development workshop at a conference. It's an 8 hour zero-to-hero kind of deal... What I'd like to know is - is there any reasonable way to set up an environment so that everybody has all the tools installed?

    My ideas currently are setting up a bunch of VMs for people to log into, but I'm not sure how good of a solution that is. I also had the idea of giving everyone a USB with a bootable Linux distro installed, but that failed on logistic grounds...

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

    PHP executing queries to a database

    Posted: 23 Apr 2018 08:19 AM PDT

    Hi all,

    I have no code to post as I'm looking for a general answer. As a little background to my question, I am developing a website using packer and vagrant. I currently have PHP configured to connect automatically to our master database post vagrant install. I also need to write code that will grab information from a form, and submit it to a database(the one I set the connection to on post-vagrant install). So is there a way to execute MySQL queries to the already connected database without re-creating that connection?

    Please comment if you have any further questions on my question.

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

    NOOBALERT continue in if statement

    Posted: 23 Apr 2018 11:03 AM PDT

    So I'm reading Introduction to Java Programming by Daniel Liang and it's showing this

    int balance = 10;
    while (true) {
    if (balance < 9)
    continue;
    balance = balance - 9;
    }

    it says that the while loop is never executed because of the continue statement. But since balance = 10 isn't the continue statement never executed? So then it would move on to the balance -= 9, right? It's saying if you replace the continue statement with a break statement then balance-=9 is executed. I'm a little confused as to why the if statement is ever executed since balance is never < 9.

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

    Conformity to 12-factor app

    Posted: 23 Apr 2018 08:38 AM PDT

    Is there a code scanning tool that can review your applications code base and then validate its conformance to the 12-factor app guidelines?

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

    Do you see any future for Actionscript (AS3)?

    Posted: 23 Apr 2018 08:13 AM PDT

    I've since left my job as an AS3 programmer for a web dev position centered heavily in C#, but was wondering what potential future use my AS3 experience and knowledge might serve (what with the death of Flash and all).

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

    Do we still need vendor prefixes? Is CSS3 finally a standard?

    Posted: 22 Apr 2018 10:22 PM PDT

    We used to use vendor prefixes for border-radius, flexbox, border images, gradients, etc., right? They are now supported (even in IE and Edge), though, and more and more users are ditching IE for actual browsers like chrome and firefox, so we don't need to use vendor prefixes any more, right?

    Also, is CSS3 a standard yet? Everywhere I go, people tell me to use vendor prefixes for CSS3's features and specify alternate styles, and so on. So has it? And if not, then when will CSS3 be fully implemented?

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

    No comments:

    Post a Comment