• Breaking News

    Friday, January 5, 2018

    Games to learn JavaScript? learn programming

    Games to learn JavaScript? learn programming


    Games to learn JavaScript?

    Posted: 05 Jan 2018 10:05 AM PST

    Hi, I have a hard time learning JavaScript. Even on Codecademy (which until now was the best way for me to get introduced to a new language), I got stuck on the functions course. I also got stuck before on the flexbox/grid layout but I learned them very fast when someone recommended me flexbox defense and grid garden. Is there a game to get introduced to different courses In JavaScript(such as a game to learn functions)?

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

    I made an interactive Flexbox cheat sheet. Let me know what you think!

    Posted: 05 Jan 2018 10:52 AM PST

    http://flexmybox.io/

    I only used some basic properties for positioning as a gentle introduction into how to position elements with it.

    edit: Source

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

    WGU A good School?

    Posted: 05 Jan 2018 11:03 AM PST

    Thinking of going back to school to get a bachelors was wondering if anyone can recommend Western Governors University as a good school to go to. They have a few options in the IT field to choose from. I can do the entire course online so it works around me working full time so that's why I think its a good option but if anyone knows anything feel free to let me know.

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

    Where is the best place to start learning matplotlib, python for data science and vector programming?

    Posted: 05 Jan 2018 09:49 AM PST

    I need to learn as much python related to chemistry as possible for my thesis. I have no idea where to start. I also was recommended anaconda by my professor. I already know the syntax for python and have made some simple stuff like tic tac toe and battleship.

    What small projects should I be focusing on to improve my skills? They need to be related to vector programming and data science though.

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

    If I make a mobile game using Unity, is it paint me as a "novice" to Mobile App companies?

    Posted: 05 Jan 2018 07:39 AM PST

    So far i've done a bunch of scripting throughout the years, and I've made a somewhat nice GitHub portfolio. However, I want to make a mobile game out of personal interest, as well as to have a learning experience. I'd like, however, to add it to my portfolio in case I want to apply for a programming position one day. If I make an app using Unity, is it seen as "training wheels" or "wannabe" to hiring companies? Also, would they know?

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

    I'm a professional web developer but I know nothing about files and file types. Where do I get started?

    Posted: 05 Jan 2018 11:42 AM PST

    So I've been a professional web dev for almost 3 years and it's time for me to admit that I don't know much about files. For the most part, I've always done the prudent thing and outsourced this knowledge to production ready libraries (e.g. on the backend PIL will tell me if someone is trying to submit a non image, on the frontend jQuery-File-Upload will do the same). However, last night I was watching a YouTube video on creating a BitCoin transaction using just Python and seeing the raw transaction format (https://bitcoin.org/en/developer-reference#raw-transaction-format) made me realize that if I took an unknown file and printed out the byte output, I wouldn't know whether I was looking at a JPEG or a few thousand lines of BitCoin addresses. Well, I think most people wouldn't know at first, but I know that I don't have the tools to figure it out.

    At work, I built a really neat spreadsheet parsing tool that would cut hours upon hours of dev time. I was pretty adamant for some time that it would perhaps be my first open source project. However, after writing hacky logic that only worked for .xlsx files but not .numbers files and not being confident in my parser's robustness, I realized then that it would never be ready for showtime until I could do better than just guess.

    I'd like to be more knowledgeable on this. Big-endian/little-endian. Being able to find the content-type of an unknown binary. Perhaps even learning the ins and outs of a compression algorithm so that I can try and compress a raw image file because I always found that fascinating.

    Anyone have any tips, YouTube videos, books, articles? Thanks so much in advance.

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

    How to automate tasks over several programs?

    Posted: 05 Jan 2018 11:45 AM PST

    Example: Lets say I want to do the following tasks:
    1. Turn a jpg into a pdf
    2. Print out excel sheet into pdf
    3. Use a merging software to combine pdfs.

    How can I automate something like this? I'm not necessarily looking for an exact solution but rather any particular language or concepts that will help me develop a program that can link several software together.

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

    SQLite getConnection without creating DB

    Posted: 05 Jan 2018 10:00 PM PST

    I am using SQLite and Java. To connect to a database I use the following code:

    Connection con = DriverManager.getConnection(url); 

    The issue with this line of code is that if it is not able to connect to the database specified in the url it just creates one. This becomes problematic as when you try to insert data into already populated databases there will be no error even if Java can not find the database since it will just create and connect to a new one. When dealing with already populated DBs I need to know if I am actually inserting the values into the populated DB or if I am just inserting them into a brand new DB. So my question would be:

    Is there a way to try and connect to a database without creating one if Java is not able to connect to it?

    I already looked at the DriverManager documentation and the only method related to connecting to the database is the one I am using. I went trough the SQLite.org site and saw that you can do what I am looking for in C but I could not find anything about doing it in Java. I was checking here and at first I thought that passing the Connection into the try statement as a parameter would allow me to compare it and therefore check if it was null (unable to connect).

    Since Netbeans does not work with JDK9 I am not able to pass parameters on try statements so to work around that I just create a void method that took as a parameter a Connection and did exactly the same thing as they did on that tutorial. Even if I passed "con = DriverManager.getConnection(url)" as my parameter the database would still be created and therefore the connection would never be null.

    public static void checkConnection(Connection con){ /*Had to made the method static so I could call it from my public static void main Method in my test class*/ if(con == null){ System.out.println("Unable to connect to db"); } else{ System.out.println("WORKING"); } } 

    Here is how I implemented the method.

    public static void main(String args[]) throws SQLException{ /*Self made class and method that just creates defaults urls.*/ SQLResources sqlMethods = new SQLResources(); String url = sqlMethods.DatabaseUrl("pleaseWork"); Connection con; checkConnection(con = DriverManager.getConnection(url)); /*A database called "pleaseWork" randomly appears in the specified url instead of returning the "Unable to connect to db" message*/ } 

    Truly hoping at this point there is a method somewhere that I am missing and I am just making a fool of myself on the internet.

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

    Showing O(n^2) time complexity

    Posted: 05 Jan 2018 10:35 AM PST

    Hello all, I'm trying to show that this is O(n2):

    for(int i = 0; i <= N; i++){ for(int j = i+1; j <= N; j++){ O(1); } } 
    • I understand that the outer loop runs N times.

    • Is it correct to say the inner loop runs n2 /2 times since for every N it runs (n) + (n+1) + (n+2) + ... + 1 times?

    • Wouldn't that make O(n3 ) instead of O(n2 )? I think I'm messing up somewhere but not sure how.

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

    Is this a mistake by the professor?

    Posted: 05 Jan 2018 07:13 PM PST

    Hello, I was watching Harvard's cs50 lecture and I came across something peculiar. Here's a snippet of the code (in c):

    int main(void){ string s = get_string("before: "); printf("after: "); //important part for(int i = 0, n = strlen(s); i < n; i++){ 

    How does this program compile without showing an error for not initializing n in the for loop? I want to learn how to use this method because the professor said that it reduces memory required by saving the length of the string once instead of calling the function every iteration.

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

    Python or web dev with html/css/javascript/php for Project Manager

    Posted: 05 Jan 2018 02:50 PM PST

    Hey so I'm an IT project manager and I'm thinking of picking up some development skills which will be good for my career. I have some knowledge in networking, and systems but I think there is a need to add some programming skills which will enhance my role as a PM as more and more projects will require application development. Which do you think is better for me to start off on: standard web dev with html/css/javascript/php or a general language like python? At work here i will deal a lot with web apps, dashboards, data ware houses, but we also have a lot of vendor applications which i'd to have a deeper understanding in, in terms of the development process. And of course, i'd eventually like to dabble with it on my personal time and build something myself. Thanks

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

    C# Tutorial

    Posted: 05 Jan 2018 11:44 PM PST

    Hey!

    I'm looking for a really great C# tutorial that will start from beginner and lead up to advanced, preferably including more than just code snippets and small code writing bits, but bigger things (like a tutorial where a type of medium sized software is created and things are explained).

    I'm aware there might not be one dwelling into both, so one tutorial where you go from 0 to advanced and another one that goes into a software would be good as well.

    Thanks!

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

    [C# in Unity] Bool setting/comparing efficiency

    Posted: 05 Jan 2018 11:38 PM PST

    I have a bool that gets reset to false on a script at the end of each frame, it's specifically the last thing that the script does. My question is... Because I know I'm going to set it to false, is anything gained performance wise by checking what state it's in first?

    For example, is this:

    if (myBool == true) { myBool = false; }

    Any more efficient than simply having:

    myBool = false;

    Is it cheaper to compare a bool first? Or do they both take the same amount of time?

    I know that this is probably being pedantic, but I'm more asking in the name of trying to understand the underlying math.

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

    System.IO.IO.Exception: Process cannot access file because it is being used by another process.

    Posted: 05 Jan 2018 11:32 PM PST

    Just want to be able to run this program consistently without getting the error. Tried using Flush(), Close(), locking/unlocking, and even adding data to the file, making it read-only, loop starts, makes it normal for a millisecond for the code to be added, then read-only again. The error refuses to go away and I'm completely at a loss. (There are more things but I'll start with that...)

    using System; using System.IO; using System.Linq; public class Test { public static void Main(string[] args) { //2100 builds per second with 8,296,100,347,392,000 total builds //excluding merges 2 through 9, and all assists brings the total builds down to 56,680,604,971,200 File.WriteAllText(@"C:\\Users\\Nathan.NATHAN-LAPTOP\\Desktop\\All_Units.txt", String.Empty); double complete = 0.0; double total = 52488; double remaining = total - complete; string[] units = { "Abel", "Alfonse", "Alm"}; string[] weapons = { "Alondite", "Amiti", "Armorslayer+"}; string[] a_skills = { "Armored Blow 3", "Atk Def Bond 3", "Atk res Bond 3"}; string[] b_skills = { "AxeBreaker 3", "B Tomebreaker 3", "Beorc's Blessing"}; string[] c_skills = { "Armor March 3", "Atk Ploy 3", "Atk Smoke 3"}; string[] s_skills = { "Atk Ploy 3", "Atk Smoke 3", "Attack +3"}; string[] assists = { "Ardent Sacrifice", "Dance", "Draw Back"}; string[] specials = { "Aegis", "Aether", "Astra"}; int[] merges = { 0, 10 }; string[] summoner_supports = { "true", "false" }; string[] ally_supports = { "true", "false" }; var cartesianProduct = from unit in units from weapon in weapons from a_skill in a_skills from b_skill in b_skills from c_skill in c_skills from s_skill in s_skills from assist in assists from special in specials from merge in merges from summoner_support in summoner_supports from ally_support in ally_supports select new { unit, weapon, a_skill, b_skill, c_skill, s_skill, assist, special, merge, summoner_support, ally_support }; foreach (var name in cartesianProduct) { using (MemoryStream memory = new MemoryStream()) using (BufferedStream stream = new BufferedStream(memory)) { using (StreamWriter writetext = File.AppendText(@"C:\\Users\\Nathan.NATHAN-LAPTOP\\Desktop\\All_Units.txt")) { writetext.WriteLine(name); writetext.Flush(); } } complete = complete + 1; double total_progress = (complete / total) * 100; Console.WriteLine(total_progress + "%" + " " + complete + " out of " + total); } } } 
    submitted by /u/Ike_Greil
    [link] [comments]

    Newbie question - Crypto related

    Posted: 05 Jan 2018 11:13 PM PST

    Hi Everyone. I've been very interested in cryptocurrency, and love this whole movement in the industry. So much so that I'm thinking of creating a bitcoin/crypto fundraising site.

    I was trying to figure this out myself (This might be the wrong sub to ask, and sorry I'm not a web developer so this question might seem pretty lame), how do I implement a system in my website that shows a progression bar (like most fundraising websites) that shows data from the BTC address that you donate to, I can't figure out how to implement a progression bar that draws information from the balance of a BTC address. (Eg. like on vertcoin.org/donate/ )

    Any help would be much appreciated!

    submitted by /u/Cal-your-pal
    [link] [comments]

    How to determine deadlines of periodic tasks in Real Time Operating System - FreeRTOS

    Posted: 05 Jan 2018 10:44 PM PST

    I am currently trying to optimise the scheduler of FreeRTOS and in general Real-Time Operating Systems as a Project.

    In FreeRTOS, and I suspect other RTOS as well, we don't specify the deadline for the tasks, not to mention the tasks would mostly be periodic.

    How can we, if possible, generate the deadline for them?

    Maybe a constant added to the time task reached the ready queue? Where the constant depends on the priority.

    How should I go about it? Looking for suggestions...

    In short, how can we implement something like Earliest Deadline First?

    I am actually trying to implement Ant Colony Optimisation.

    submitted by /u/ninja-dragon
    [link] [comments]

    Could you point me in the right direction for learning how to download data from a cryptocurrency API?

    Posted: 05 Jan 2018 06:51 PM PST

    My goal is to download three pieces of information into a spreadsheet about historical cryptocurrency prices: date, closing price, and volume, literally just three columns, nothing complicated. Perhaps a date range like a year. I want to query a specific exchange for this information if possible.

    I'm a noob at this, I've been searching online for a while and honestly I'm lost which is why I'm asking here (right subreddit?). I can't seem to find some basic information to get me going. I'm willing to learn how to code this, but I could use a hand pointing me in the right direction. Thank you in advance for your advice!

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

    C++ WinAPI question about dynamically creation

    Posted: 05 Jan 2018 02:53 PM PST

    I'm even confusing myself on this question as I cannot find the correct way to word it to search for it. But what I'm looking to do is create a button. When the user presses said button it will give them an option to enter in information that will then be printed to the window showing the date in it's correct category. So some Pseudo code would be something like

    while the program is running when button is pressed prompt user for information take information and show it on one line repeat every time button is pressed but keep adding lines onto the screen unless the user chooses to delete said line. 

    Think of it like adding something to a phone application. You press an add button and it allows you to enter information and show it there. Then you keep it there even when adding more information, then you can choose to delete said information when clicking another button, usually next to it.

    I'm not describing this well but I'm sure you can kinda get the idea.

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

    Where to learn GRUB's syntax?

    Posted: 05 Jan 2018 06:12 PM PST

    I would like to understand GRUB's syntax to the point I can manually write the configuration file from a blank page (this is a bit of an exaggeration...).

    This includes booting the OS, selecting a theme...

    Are there any guides on this?

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

    Whats exactly express for?And why do people use mongodb instead of postgresql?

    Posted: 05 Jan 2018 09:53 PM PST

    I don't get it I'm reading the documentation so its not like I'm posting here blindly but is it just so you can use a database and other third party things? I'm confused what If you didn't use express how would you use a database or any third party npm installs. Also why do people use mongodb instead of postgres when using nodejs? How would I use postgresql instead of mongo I haven't found a course that uses something other than mongodb. Also why do database seem so abstract like you just install it setup a password and where the fuck do those files or databases get stored? What if I forgot my password? For example I had MySQL installed with Homebrew and to use it I did : "mysql -uroot" meaning I didn't have a password but what if I put a password and just forgot it what would I do? Also I'm sorry if this is to many questions badly worded all in one go.

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

    Where can I learn darkBASIC?

    Posted: 05 Jan 2018 09:39 PM PST

    For app game kit

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

    Advice on writing a program to generate .PPT files?

    Posted: 05 Jan 2018 09:27 PM PST

    I want to make a program which can generate a .PPT file by allowing the user to choose individual parts that they want in the whole, i.e. they select definition and then some word, and it adds a slide with the definition of that word from a dictionary included in the program. Relatively straight forward stuff, right? Well yes, except for the fact that the actual generation of the file is something which I can't find any documentation of. The format definition from Microsoft hardly seems helpful, feeling more like an explanation of PowerPoint features than what each byte of the file indicates. I tried looking at libre office, but was unable there to find the code dedicated to PPT file generation.

    So, any advice on where I could find information relating to generating PPT files?

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

    Eclipse IDE platform independence

    Posted: 05 Jan 2018 08:59 PM PST

    Eclipse IDE is written in Java. If Java is platform independent, why does the eclipse website have different downloadable versions for Windows and Linux?

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

    No comments:

    Post a Comment