• Breaking News

    Wednesday, January 30, 2019

    I remember times when we all eagerly played Flash games, my PC at those times (mid-end) did not start coolers or eat too much RAM for those games and websites. Now any light html5 canvas rendering seems to send my PC to space mission, due to the sound of the coolers. What has changed? Ask Programming

    I remember times when we all eagerly played Flash games, my PC at those times (mid-end) did not start coolers or eat too much RAM for those games and websites. Now any light html5 canvas rendering seems to send my PC to space mission, due to the sound of the coolers. What has changed? Ask Programming


    I remember times when we all eagerly played Flash games, my PC at those times (mid-end) did not start coolers or eat too much RAM for those games and websites. Now any light html5 canvas rendering seems to send my PC to space mission, due to the sound of the coolers. What has changed?

    Posted: 30 Jan 2019 03:22 PM PST

    My friends also noticed this.

    Canvas basically runs as it was some kind of Unreal Tournament 3 game or something.

    Maybe I'm missing some settings checkboxes in browser or something?

    I generally try to avoid canvas at all times now, because it just makes my notebook and PC lagging and heating, but at those times when Flash was popular I was pleasantly viewing and interacting with games and state-of-the-art websites build upon Flash.

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

    Side Project - General Direction Help

    Posted: 30 Jan 2019 06:21 PM PST

    Hey all,

    I am starting a side project that is going to involve detecting an object inside of an image. The object will always be inside the image. Once detected, I am going to need to calculate the area of the object. The max width/length of the object will be given by the user.

    Does anybody know which libraries would help me with this kind of project?

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

    Are any of these coding websites good to learn Python?

    Posted: 30 Jan 2019 05:38 PM PST

    Codewars, HackerRank, Codebyte, or CheckIO. I'm trying to learn Python and I learned pretty much the basics but otherwise I know nothing else to do to learn efficiently and correctly. I don't know how to move on so I've ended up re-doing tutorials over and over and making no progress.

    If it helps, I do want to learn Python in general (I don't know what job I'd want to work towards) and Web Design stuff.

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

    Object Oriented vs Functional Programming Languages?

    Posted: 30 Jan 2019 06:30 AM PST

    I've been reading a number of articles on Functional Programming Languages, and can't seem to wrap my head around the blaring difference between them and Object Oriented Programming Languages. The one thing I noticed is that OOL's combine data with instructions, while Functional Languages keep instructions and data separate, however, I do not necessarily know what that means.

    Can someone please ELI5 the difference between the two types of languages, and the difference in techniques used to develop with them?

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

    Idea for a school project

    Posted: 30 Jan 2019 05:03 PM PST

    What twist could I add to a travel manager website application that would require a large dataset?

    For school project, we are assigned a project of our choice with some restrictions. Whatever you build will need to use a large dataset, must have a practical use, and be different from other implementations that are already made.

    I am currently developing a travel manager website, and thought I could incorporate this project into it. So far I have designed a basic website with and registering and logging in system using PHP, MySQL, CSS and HTMl. But the problem is that this sort of website is too popular and I can't think of a twist to add to make it unique.

    Some of my ideas: use a dataset of tweets to check what people are saying about the desired destination, use a dataset with the crime information of the areas near the route to mark area to be careful of, and a dataset to list a selection of points of interests.

    None of these ideas seem too appealing because they don't provide a large twist on the main idea of a travel manager.

    Do you guys have any suggestions?

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

    New Job, New Language?

    Posted: 30 Jan 2019 04:18 PM PST

    I have been fortunate enough to get a new job with a small company where I will be creating software from scratch and continue developing/maintaining it down the line when I have a working product.

    I have mainly used C# and .NET Framework for any kind of programming work that I have done in the past but I am now presented with this opportunity that I am solely in charge of and I am considering the idea of developing the application in another language other than C#. I see it as an opportunity to gain further experience in software development and broaden my programming language range, if you will.

    There's a few months between now and when I am expected to begin development so there is a small amount of time to familiarise myself with the syntax and capabilities of another language. My question is whether or not it is a silly idea to consider writing an application using a language that I have never used before rather than stick with what I am more comfortable using?

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

    Netbeans IDE inline spellchecker?

    Posted: 30 Jan 2019 06:51 PM PST

    Hello, Does anyone know who to use the inline spellchecker for Netbeans 8.2? I have googled and tried plugins. But to no avail. I just want to be able to check the spelling of comments. Not the biggest deal in the world but it would be nice to have because I am prone to type-o...

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

    Is a multithreaded server that does no processing or IO faster than a single threaded one?

    Posted: 30 Jan 2019 05:08 PM PST

    Say I have a server that just responds to any request immediately.

    Is there any performance gain making it multithreaded? And if so where does the speed up come from.

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

    What's an introductory R project i can try doing to get to learn key syntax and functions that i need to mine data?

    Posted: 30 Jan 2019 04:39 PM PST

    I just started learning R and want to start with a project and learn as I go instead of sitting down and learning syntax piece by piece.

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

    Anyone know of any (worth listening to) programming Audiobooks or Podcasts?

    Posted: 30 Jan 2019 10:25 AM PST

    As the title says really. I do a lot of miles in the car and rather than listening to rubbish on the radio, I wondered if there was anything worth listening to relating to programming? Preferably C++ based, but any ideas welcomed! Thanks.

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

    Output in Datalog

    Posted: 30 Jan 2019 02:11 PM PST

    I have a particularly bad professor, so this question may be unanswerable.

    I have a set of relations and need to write a query that returns just a single atom (variable) as a result. I can get the query working, except that it prints all of my variables when I'm only interested in 1. I need the others to do some logic. I would normally solve this by creating a rule that just takes X and then that would print X, but we are supposed to just write a query, not a rule. Is this possible?

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

    ncurses refresh flicker

    Posted: 30 Jan 2019 01:26 PM PST

    I have been learning ncurses and all tutorials say that once I have completed drawing everything I need to call refresh() to actually make it appear in the window. All drawing is supposed to be sent to a buffer and refresh() flushes it.

    I have found that this isn't the case. In the following C program:

    #include <curses.h> int main() { initscr(); noecho(); printw("Hello World"); //refresh(); getch(); endwin(); } 

    Compiled with "gcc main.cpp -lncurses" the commented out refresh isn't called, yet the "Hello World" still appears in the terminal. Is there something I need to do to enable the refresh behavior? I have made a larger program and it flickers as it is drawing one character at a time rather than dumping everything to the window in one go.

    On Ubuntu 18.04 if that matters.

    Thanks.

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

    Python Programming Problem

    Posted: 30 Jan 2019 12:43 PM PST

    I'm doing a Computer Vision Project and which involves reading frames in a while loop but I want to access some of the values within that while loop during it's running period but I'm having no such luck. I basically want to monitor those "live" values for the distance and angles and that sort of thing that will be used within another method.

    I have written sample code which explains the current set up I have:

    def Test_Code():

    global x

    x = 0

    while True:

    x += 1

    x = Test_Code()

    print(x)

    I do realise that Test_Code will forever be in a loop but I'm unsure how to go about it for the results I want. If anyone else has any suggestions that would be fantastic, thanks :)

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

    Best solution for in-webpage form/widget

    Posted: 30 Jan 2019 12:09 PM PST

    I'm looking to create a form which sends the user to a url when they click "submit" based on their responses to the form. I also would like to store the response information for further data analysis. What is the best solution to build this form in a way that it can be used on multiple websites?

    I was considering writing an html form with a javascript function, but I'm not sure how well to translate the form onto the various webpage sources. For example, we would like to place the form onto our wordpress hosted site. We also would like to send the form code to our affiliates so they can place the form on their site.

    Essentially, what is the best way to build a form to place on WP and other sites, in the paragraph text area (not a sidebar widget) where the responses send a user to a URL, while also storing the responses?

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

    Malloc C String input

    Posted: 30 Jan 2019 07:23 AM PST

    So I have to ask a user for a sentence that is separated by spaces. However I'm not sure the size of the input. I have to use the address given to me by malloc in order to save their input. Any ideas on how to go about doing that?

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

    How to best store histogram data in a MySQL db

    Posted: 30 Jan 2019 10:09 AM PST

    I am trying to figure out the best way to store some data in a relational db and I have a few thoughts but I'm not sure if there is a better way or which of these is better.

    Here is an analog to my data:

    I will have one table which has a "Person" in it. Person picks 20 cards and I want to store how many of each card they have. The keys of this histogram are then just integers and so are the values.

    Example:

    Person: Name: Joe, Age: 35

    Joe has cards A, A, 3, 3, 3, 5, 5, 6, 6, 7, 8, 10, 10, 10, J, Q, Q, Q, K, K

    So joe's histogram looks like :

    0: 2, 1: 0, 2: 0, 3: 3, 4: 0, 5: 2, 6: 2, 7: 1, 8: 1, 9: 0, 10: 2, 11: 1, 12: 3, 13: 2

    Now I could take that string above and just store it as a varchar, but each time I want to do anything with the histogram, I'll need to parse it back out into an array.

    Or I could store each Key value pair in another table. One thing to note that is different about my data is that the number of keys is not constant. But it probably won't be any higher than 50 or so.

    Last, I could have a table with a column for each possible key I could have in my histogram.

    Any thoughts on which of these might be best?

    Thanks

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

    C# issue dealing with dates from US, UK

    Posted: 30 Jan 2019 09:05 AM PST

    Hello friends,

    I am supporting a C# app that deals with dates/times and the users are in both the US and UK. I am using DateTime.ParseExact thusly

    newdate = DateTime.ParseExact(inString, "M/d/yyyy hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture); 

    but users in UK were getting an error because of date format of d/M/yyyy. So I am considering changing code to this

    if (culture == "en-US") { newdate = DateTime.ParseExact(inString, "M/d/yyyy hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture); } else { newdate = DateTime.ParseExact(inString, "d/M/yyyy hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture); } 

    I am in the US and want to test it for the UK users before deploying but can't seem to figure out how to force my test system to the en-GB culture setting.

    Can anyone help, or provide suggestions on a better way to handle this? TY!

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

    Split a book into pages with Python

    Posted: 30 Jan 2019 03:50 AM PST

    (bear in mind this is partly just a practice exercise for me so it doesn't have to make sense)

    I am trying to write a script which I can pass a text file containing a plaintext book with a couple of hundred pages. I plan on making each page into a JSON object, and potentially each chapter too

    the script accepts the filename and the size of a 'page' in bytes (roughly 2500 in my google docs original). it could also be split by words if the file were to be split on spaces i guess.

    what is the best way to split a large string while retaining whole words? for example if you gave a page size of 2500 bytes and at 2498 of page 1 you began a long word that ran into page 2. Do you:

    - pick an arbitrary point in the current page and find the next whole word, stopping the page there and moving onto the next page? (e.g. in the above example page 1 would be 2497 bytes long and page 2 would then begin)

    - let the page run over until the word is completed and then begin the next page

    also, what is an optimal way to actually do this? read(pageSizeInBytes) and check the final character for a space - and if not, then keep adding to currentPage until it's complete? do while there are bytes remaining in the file?

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

    Migration from HMAC MD5 to SHA512

    Posted: 30 Jan 2019 06:53 AM PST

    So, how in the world do I do this? PERL looked pretty straightforward, so I wasn't super confused, but now I am. Part of the code says "use Digest::HMAC_MD5 qw(hmac_md5 hmac_md5 _hex);" but, I can't find anywhere in the code where the hex is to replace it with the new hex code for SHA512. I'm sure I'm doing this wrong, by the way. I'm kind of dumb. Help?

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

    Getting a "Declaration or Statement Expected" error

    Posted: 30 Jan 2019 06:09 AM PST

    My code is function validateTextBox(){ var mAmount = document.getElementById("iAmount").value var mCompany = document.getElementById("iCompany").value var mDate = document.getElementById("iDate").value

     if (isNaN(mAmount) == true || mAmount >= 1000000 || mAmount <= 0 || mAmount == null) { alert("The amount is invalid. Please key in a valid amount!"); return false; } else if (isNaN(mCompany) == false || mCompany == null) { alert("Company Name Should Not Contain Numbers"); return false; } else if (mDate == null) alert("Please Fill In The Date"); return false; } else { return true; } 

    But I get an error on the last "else" before "return true"

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

    I want to study computer science but..... (kinda in a hurry for responses and info)

    Posted: 30 Jan 2019 08:03 AM PST

    I want to study computer science but..... (kinda in a hurry for responses and info)

    Alright, so before i go to the point of this post, let me just introduce you a little of myself so you can understand the context. So basically, i'm a highschool student currently in my last year so it means that i will have to choose what i want to study next year, what i'm gonna major. Also you need to know that i'm not living in the US, (my school has the french system) and so in my education system, we have a website where we can choose what school we want to enroll (we need to write some kind of letter to the school and after that to see if the school accept or no. We have the right to write maximum 10 letters for 10 differents schools and the dead line is the 14th march).

    SO basically here is my current problem. I want to enroll to a school where i can learn programing and stuff, to learn how to code, etc... The reason ? Well even now i'm not sure what do i want to do in the future like i have no idea, but programming is probably the single thing that keep interest. Why ? Well my first thought was : ''I want to make video games'' but not only that, like learning how we can make a functional website or any programs that have a precise function or multiple. Anyway i just want to learn how to code, cuz i feel like it's a good thing for the future.

    But now the real problem is, what do i choose ? To enroll to a university ? An engineer school ? Well those were my thoughts but to enter an engineer school you need to have a good student file with good grades on it and appreciations from the teachers so the school can know what kind of student you are. But here is the thing.....I'm not a really good student. I'm not that hardworker student who get good grades on almost everything, no, i'm like in the middle (and maybe lower) i'm like your typical student who do all the work at the last minute because he laziness (BUT HEY that doesn't mean i can't change !! i hope...) And also currently i have trouble getting good grades like right now my first semester ended in december i didn't get very good grades. BUT ANYWAY to tell you, i kinda don't physics like i just hate how hard it is. For my math, i believe if i actually work hard i can get what i want, but most of the time i have difficulties.

    So i ask here, are there schools or universities that i can enroll to learn programming and stuff but without physics and difficult maths if possible....and also something for a student like me ._.

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

    I need help with a problem

    Posted: 30 Jan 2019 01:36 AM PST

    There are 50 contestants in a contest with scores ranging from 0 to 100. Write a program that shows:

    a) the highest score;
    b) the number of candidates with scores of at least 60;
    c) the average score obtained by the contestants.

    Hi! I need help with this problem. I don't know if this is the right subreddit to ask, so if it's not, please point it to me.

    The teacher gave this to us. She said we need to use vectors

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

    No comments:

    Post a Comment