• Breaking News

    Saturday, August 31, 2019

    ELI5: What is XML and how is it related to HTML? Ask Programming

    ELI5: What is XML and how is it related to HTML? Ask Programming


    ELI5: What is XML and how is it related to HTML?

    Posted: 31 Aug 2019 04:54 PM PDT

    A bit confused. C is made of libraries but what are the keyword and reserved words like int, double, string, etc made of? I get that they are bits and bytes but like if time.h has a source file and they have components them what are the smaller components until we get to assembly code?

    Posted: 31 Aug 2019 06:26 PM PDT

    Is there code that makes up what a double, int, or string is? Where would I find it?

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

    Most worthwhile/lucrative language(s) to learn?

    Posted: 31 Aug 2019 05:59 PM PDT

    Work in my industry is drying up and I'm finding less and less well paying contracting opportunities. Pay has slowly been decreasing over the past 10 years.

    If someone could just give me a concise list of languages/resources I could dive into and learn with any spare time I have, I would be greatly appreciative.

    Thanks

    submitted by /u/33_RancidShite
    [link] [comments]

    Am I using an API for its intended purpose?

    Posted: 31 Aug 2019 07:15 PM PDT

    I'm new to WebApi and I'm a little shaky on what the "actual" intended use for it is supposed to be. As I learn more I keep thinking of ways I can incorporate it into everything and I'm wondering if i'm overextending what it's meant to do.

    For example: I was thinking about making an API for our internal website, which handles not only reports, but also business logic. This involves many tables and stored procedures across a few databases. From what I understand about WebAPI, is it bad to just have a get request that takes in a stored procedure from the query string (such as ?StoredProcedure=getInfo&params=1 where params is any variable). That info would come from when a user navigates to a page to request data.

    Is this a terrible idea? If so, what is a better convention to go with? Also, as I'm still learning, I'd be open to any literature.

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

    Why use AngularJS?

    Posted: 31 Aug 2019 11:52 AM PDT

    why would i need AngularJS in developing android applications?

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

    What do I need to know about to hand-optimise this function?

    Posted: 31 Aug 2019 08:57 AM PDT

    constexpr int N = 16; int popFMA(std::array<int,N>& x, std::array<uint64_t,N>& y) { int z =0; for(int i = 0; i<N; i++) { z+= x[i] * std::popcount(y[i]); } return z; } 

    I have this function in my codebase that looks like it's straight out of a textbook on code optimisation. I don't want anyone to post the solution because I think it'll be a great learning exercise but can anyone point me to relevant reading material?

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

    I currently have 1-2 spare Android devices which I don't use anymore. I want to reuse them in some creative/useful way. I don't know if this is the right sub-reddit to post to but I'm willing to reinstall some new systems, any roms etc.

    Posted: 31 Aug 2019 09:52 PM PDT

    The first phone is a HTC One M7 and the second is a ripoff China brand.

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

    Beginner Coder

    Posted: 31 Aug 2019 02:47 PM PDT

    I'm trying to learn how to code but I'm having trouble having to figure out what program to start with?? HTML? CSS? JS?

    Any advice on which programs to learn first to land me a great job?!?!

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

    Help with baby script

    Posted: 31 Aug 2019 08:37 PM PDT

    Not sure if this is the right place for the question, but with hope that someone can answer it, here it is.

    Basically I've been jacking around on a bitcoin provably fair betting site with their simulator, and they have a couple of built in scripts to auto run if you're interested. Well, they also supply the script writing to allow editing, and I want to make a change I can't quite figure out but should be relatively easy.

    Pretty much, if the payout exceeds a settable limit, it will stop the script. I want to change this to resetting it to the base payout (as is an option under a different part of the same script) rather than stopping it.

    I'm intuitive, but having a hard time figuring out how to cut and paste the code I want and getting it to work. If anyone wants to try, this is the script (martingale payout on bustabit.com):

    var config = {

    bet: {

    value: 100,

    type: 'balance'

    },

    basePayout: {

    value: 2,

    type: 'multiplier',

    label: 'base payout'

    },

    stop: {

    value: 20,

    type: 'multiplier',

    label: 'stop if payout >'

    },

    loss: {

    value: 'increase',

    type: 'radio',

    label: 'On Loss',

    options: {

    base: {

    type: 'noop',

    label: 'Return to base payout'

    },

    increase: {

    value: 1,

    type: 'multiplier',

    label: 'Increase payout by +'

    },

    }

    },

    win: {

    value: 'base',

    type: 'radio',

    label: 'On Win',

    options: {

    base: {

    type: 'noop',

    label: 'Return to base payout'

    },

    increase: {

    value: 1,

    type: 'multiplier',

    label: 'Increase payout by +'

    },

    }

    }

    };

    log('Script is running..');

    var currentPayout = config.basePayout.value;

    // Always try to bet when script is started

    engine.bet(config.bet.value, currentPayout);

    engine.on('GAME_STARTING', onGameStarted);

    engine.on('GAME_ENDED', onGameEnded);

    function onGameStarted() {

    log('betting', Math.round(config.bet.value / 100), 'at payout of', currentPayout, 'x')

    engine.bet(config.bet.value, currentPayout);

    }

    function onGameEnded(info) {

    var lastGame = engine.history.first()

    // If we wagered, it means we played

    if (!lastGame.wager) {

    return;

    }

    // we won..

    if (lastGame.cashedAt) {

    if (config.win.value === 'base') {

    currentPayout = config.basePayout.value;

    log('won, so resetting payout to', currentPayout)

    } else {

    console.assert(config.win.value === 'increase');

    currentPayout += config.win.options.increase.value;

    log('won, so increasing payout to', currentPayout)

    }

    } else {

    // damn, looks like we lost :(

    if (config.loss.value === 'base') {

    currentPayout = config.basePayout.value;

    log('lost, so resetting payout to', currentPayout)

    } else {

    console.assert(config.loss.value === 'increase');

    currentPayout += config.loss.options.increase.value;

    log('lost, so increasing payout', currentPayout)

    }

    }

    if (currentPayout > config.stop.value) {

    log('Was about to bet with payout', currentPayout, 'which triggers the stop');

    engine.removeListener('GAME_STARTING', onGameStarted);

    engine.removeListener('GAME_ENDED', onGameEnded);

    }

    }

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

    Building a linux shell in c++ for my portfolio as a student.

    Posted: 31 Aug 2019 02:11 AM PDT

    Hello, I have just finished my 2nd year in computer science at my university, as I'm starting to apply for jobs, I though about a project that could boost my resume. I have finished a course about "Operating systems" and built (homework assignment) a mini shell in c (only 4-5 shell commands were implemented). I though about taking it as a bigger project with a lot more options and variety of commands in c++. Of course I know a shell is a large project and I won't be able to fully implement an identical shell, but I though it would be a good practice and a good project to show case. I'd like to get some suggestions , is it a waste of time? should I do something else? Thanks

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

    I want to get into Neural Networks, where should I start?

    Posted: 31 Aug 2019 07:36 PM PDT

    I want to get into machine learning and neural networks, where should I begin.

    I've dealt with other programming in the past, I know python, c# and javascript, and have done some game development and web development.

    Where should I go to begin learning about Neural networks and machine learning?

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

    How do I turn my collection of classes into an API?

    Posted: 31 Aug 2019 07:24 PM PDT

    I wrote some classes in C++ that interact with each other to allow someone to write the rules for (almost) any card game in their executable file. Here is the code if you like to see it. (Any criticism or feedback is appreciated)

    What I am looking to do now is turn this code into an API. I'd like for someone to just be able to
    #include <card_game_api> or something similar in order to use the classes and their functions. How do I go about doing this?

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

    [C] Read specific line in text file

    Posted: 31 Aug 2019 11:41 AM PDT

    Is there any possibility to jump to a specific line in a file without having to iterate over every line using a fgets while loop or something with fseek using byte offset? (I've got a file representing an array and I would like constant time access to each element).

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

    Need help with automating excel sheet creation based on table of variable input

    Posted: 31 Aug 2019 06:01 PM PDT

    Hello! Not sure if this is the right place but I'm looking to improve my workflow; I have a set template that I use in word with input fields for name, date, etc. I want to be able to have a excel spreadsheet of that data, and have a program that runs that inputs each set of the data into its own respective word template so I don't have to manually fill it in to each document. Suggestions? VBA?

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

    How can I code a conflict-free event schedule generator using algorithms?

    Posted: 31 Aug 2019 04:19 PM PDT

    *event's times are certain like school classes with sections

    btw I don't want to use cartesian product

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

    IOS Programming Language

    Posted: 31 Aug 2019 12:18 PM PDT

    Which is the best programming language that is used to write apps for IOS Devices, and can be edited using IDEs which are compatible with other operating systems(Windows in my case)?

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

    No text showing up in bash terminal in VS Code on W Windows

    Posted: 31 Aug 2019 03:52 PM PDT

    https://i.imgur.com/e35Dkvg.png

    I'm using VS Code on Windows 10 with bash. When I run yarn run dev I get no output but the program still runs. My cursor moves down like there was some output text but it does not display. When I hit one of the endpoints I can see the GET command reflected in the terminal. I'm not sure this issue is isolated to Yarn, it seems like I've had weird terminal problems with bash on Windows in VS Code before too, but this is the first time I've been able to consistently reproduce it.

    Any ideas what my issue could be?

    Thanks!

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

    I wanna know what to learn before applying to a specific job

    Posted: 31 Aug 2019 02:31 PM PDT

    Hello, i'm recently graduated with a licence (equivalent of a BS) in IT along with a friend of mine, he got employed by the company in which he did his degree internship, he said they use .NET and Durandal (i know it's not really popular, i never knew about it either until recently) as their stack. As i am unemployed right now he told me to send them an email to apply for a job, he told me they use a custom framework they have for .NET, so in order to get myself accepted what do i have to learn as a minimum? I did some C# desktop apps programming during my course and i know how to consume and create REST APIs in other technologies (php/java) i never did so in C# or .NET though, i asked my friend if i should look up a tutorial on how to create and consume REST APIs using ASP.NET but he said ASP .NET is far from what they do/use. So i'm asking for advice from experienced developers on what should i learn? he might be wrong about what he said because we're both unexperienced since we're recent grads. Thanks in advance

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

    Big-O notation question

    Posted: 31 Aug 2019 10:27 AM PDT

    I'm stuck on a homework problem finding the big-O and T(n) of a nested for loop where the inner loop depends on the outer loops iterations. The loop is

    Outer loop for(int i=0; i < n; i++)

    Inner loop for(int j=0; j < i*i; j++)

    Statement under the inner loop cout<< j << endl;

    Being a nested for loop I assumed it was n2 but apparently that's not right according to my professor. Could anyone help explain this better to me? (Sorry If formatting is weird I'm on mobile)

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

    I need help with R

    Posted: 31 Aug 2019 01:51 AM PDT

    I don't know if this is the right place to post this question but I really need your help.

    I have a set of data with things like GDP, import/export rates, literacy rates etc. as well as HDI for 190 countries. My job is to determine which factor is the most correlated with HDI using PCA in R language. The thing is, I thought PCA is used to classify objects (like countries), not to find correlations. Any ideas?

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

    I want someone to guide me in competitive programming

    Posted: 31 Aug 2019 05:39 AM PDT

    I'm a final year CS undergrad. I have started competitive coding a few months ago. Sometimes I tend to get confused about some questions. Sometimes I feel that there could be a better approach to solve a problem than my solution. I would like to discuss the problems with someone who is experienced in competitive coding. My main language is Java but I can also do C++, C and am learning Python.

    Thanks! :)

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

    Inline Function in CPP

    Posted: 31 Aug 2019 05:02 AM PDT

    What Exactly is the Inline Function in CPP & How it is different from the function declared before the main function because they both don't really required a prototype

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

    Question about a file (Windows)

    Posted: 31 Aug 2019 03:04 AM PDT

    I am using an API where I download image files, but when I try to look at these files, they are "blank", so I can't view them. Like this: https://imgur.com/a/uhK8eFJ

    But when I run them through a website like http://checkfiletype.com/ , it says that the file is a png. How can i make it so the files are viewable?

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

    No comments:

    Post a Comment