• Breaking News

    Friday, June 14, 2019

    Question about writing to files Ask Programming

    Question about writing to files Ask Programming


    Question about writing to files

    Posted: 14 Jun 2019 06:42 PM PDT

    I can't figure out how to delete specific characters from a text file in python. Is there a method or a mode for that?

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

    Basic help

    Posted: 14 Jun 2019 03:29 PM PDT

    So, I have about one year experience programming with C, one year with C++, and one year with Python, so I'm new. I'd like to know how I can, say, connect a lightbulb to my PC and tell it to turn on or off from within the program? I know this is something REALLY basic but I have no idea what to do. It doesnt have to be a lightbulb, just basically giving something commands to move from withing a piece of code...

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

    Why am I having such a hard time getting started with C++?

    Posted: 14 Jun 2019 07:59 AM PDT

    I have VS19 and I bought Bjarne's book. I thought, like Python, I could sit down and learn syntax so I can master technique but everywhere i turn somebody is using a different syntax then the one I'm using.

    #include <iostream>

    int main() {

    std::cout << "Hello World!\n";}

    This is the syntax of the version of C++ I am using in VS19. Can anybody help set me on the right direction? It's not that I don't understand the concepts but how can I implement those concepts if I don't even know the syntax? Maybe I'm missing something here but I just feel confused.

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

    Is there a moment when a job as developer becomes "automatic"?

    Posted: 14 Jun 2019 12:37 PM PDT

    I never worked as a developer before so now I'm wondering, does the job became a routine after some time? Because I believe most part of the small and medium companies develop similar applications all the time. And when you know what to do, you work kinda becomes automatic and the "challenge" vanishes. Is that true in programming positions?

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

    Have no idea where to start...send help...

    Posted: 14 Jun 2019 08:40 PM PDT

    Im self taught and design the site for my business (soccer related). I know, to an experienced eye, it is probably a nightmare but I enjoy the challenge of learning how to do it myself. We have several pages where we post youtube videos for educational purposes. I just went to check out one of the pages and for some reason all the videos have disappeared. Maybe it is a coincidence but just yesterday we secured our site with an SSL certificate. Could it be related?

    I pride myself on finding answers on my own but honestly have no idea how to approach this problem. Any advice or suggestions would be greatly appreciated

    Page in question is: https://yptusa.com/tv.html

    Thanks in advance for anything anyone can tell me.

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

    Game development

    Posted: 14 Jun 2019 07:58 PM PDT

    I am attempting to make a simple text game, where you hit numbers 1-4 to continue the story, but when I hit the number to start the story but the menu will not go away I've tried system("cls") but it seems like no matter where I put it, the menu haunts my game

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

    What is your favourite starter application

    Posted: 14 Jun 2019 03:16 PM PDT

    C 89 warning

    Posted: 14 Jun 2019 05:03 PM PDT

    EDIT: Resolved. My professor made a cut and paste error. Thank you for the help.

    EDIT: I've sent my professor an email asking if he meant to include both the * & the []

    I'm working on my homework, and I've been trying to figure out why I'm getting a warning of 'warning: passing argument 1 of 'hexStringToUint; from incompatible pointer type.'

    unsigned int hexStringToUint(const char *str[])

    {

    /* function code here */

    }

    int main(void)

    {

    unsigned int output; const char testStr1[] = "1FF"; output = hexStringToUint(testStr1); 
    submitted by /u/Wise_Goddess
    [link] [comments]

    Can someone explain source code directories to me? (e.g., src, makefile, include, etc)

    Posted: 14 Jun 2019 12:32 AM PDT

    I've been googling this for two days but i can't figure it out. I compiled or built a Fortran package from source and don't really understand what I did or what each of the folders inside the source directory mean. All I know is the src contains the main instructions. But what is in the include folder? Why does it exist?

    This is a broad question, but basically I want to understand organization of source code and the process of compiling it or building it into an executable. Thanks!

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

    Dual list box with angular 7

    Posted: 14 Jun 2019 01:45 PM PDT

    Has anyone ever done one? The ones where you have 2 lists(left - right) and move items between them.

    I'm learning angular 7 and couldn't find any good example online all i found where done with jQuery or libraries that don't work anymore or are outdated

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

    [C#] [VB6] Debugging a VB6 dll using Visual Studio 2019

    Posted: 14 Jun 2019 07:20 AM PDT

    I'm currently working with a VB6 dll which is being referenced by a C#.NET WinForms application. I have all of the source code for both of the projects, plus the PDB files. However, I cannot seem to debug it.

    I have tried: * building the dll using no optimisation * enabling native code debugging in the c# project * adding the source code directory to the debug source files for the vs solution

    Unfortunately, I have hit this wall and can't figure out if there is a way around it. My current method for developing it is to have both the C# and the VB6 project open in their respective IDEs, but that is slow and error prone, since the VB6 IDE is quite old and runs into some issues no and again.

    Any help would be appreciated.

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

    Starting to study age 26

    Posted: 14 Jun 2019 05:49 AM PDT

    Hi r/askprogramming, i'm 25 and I'm setting up myself to stydy software engineering. For many reasons I chose to not go to college until this year and now here we are - This is the area I was always meant to be. Although I have extremely limited knowledge as of now, I remember the 10 year old me studying javascript and the 16 year old me dropping a webdesign (HTML, CSS) course. I made this thread because i'm quite the ambitious guy and I really want to get far in everything I do.

    So from what I heard, age is usually not a big factor in the area, and even if it was, i'm not exactly old, just late. Is that correct? By the time I end the course, i'll be about to turn 30.

    Also, most of my adult life was about obtaining stability. Most of my money will go in buying a new computer and paying the course, but I assume I'l be able to invest in my own projects around the 3rd year or so. How good is the autonomous approach in this area?

    And in contrast, do I still have a good age to build a carreer in companies? To be honest, i'm quite concerned about that. I'd like to know if i'm dealing with any sort od limitations for "being late".

    Anyways, I don't know if this is the right sub to do this, sadly I own only a phone right now and I dislike using it. (But hey, I won't rule out working on phone apps!) Thanks in advance

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

    [Android/Java] Simple question about setting inner/outer variables

    Posted: 14 Jun 2019 12:55 AM PDT

    So i've got a class like

    public class primary_fragment extends Fragment implements Agg_Adapter.ItemClickListener { 

    In that class, i've got 2 global variables:

    static List<GithubRepo> list = new ArrayList<>(); static List<String> List_body = new ArrayList<>(); 

    Now, in the inner class "Create" method that creates my view, I'm using retrofit to parse the json of github to get some repository names.

    I can get them just fine, but when I get the list<object> from "response.body" then parse it properly into string getting only the titles like:

    private void setList(List<GithubRepo> repo){ if (repo != null) { int counter = 0; for (GithubRepo r : repo) { String name = r.getName().toString(); List_body.add(name); counter++; } } else{ Log.d("test:empty", "empty"); } } 

    GithubRepo above is merely the object structure for the json, i get the names in the inner class, set them, but they remain null when i try to apply the new list to my views. How do I set the values of a global/static variable from my inner class? Here's the whole thing:

    public class primary_fragment extends Fragment implements Agg_Adapter.ItemClickListener { static List<GithubRepo> list = new ArrayList<>(); static List<String> List_body = new ArrayList<>(); @Override public View onCreateView(LayoutInflater inflater, ViewGroup viewGroup, Bundle savedInstanceState) { .... Some code call.enqueue(new Callback<List<GithubRepo>>() { @Override <------------------------- From here is the inner class public void onResponse(Call<List<GithubRepo>> call, Response<List<GithubRepo>> response) { // 1. start if (response.isSuccessful()) { if (response.body() != null) { list.addAll(response.body()); setList(list); }); Log.d("testedB2!:", (List_body.toString())); <------Should have the values set but it is null 

    It's probably something really simple but i'm stumped! Let me know if i need to clarify anything.

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

    Unsure if I need to write a parser

    Posted: 14 Jun 2019 12:37 AM PDT

    I have a small problem to solve and I am unsure of the approach.

    I think I need to write (or hopefully use a library for a parser.

    The problem is, I have a configuration table.

    function_a,1,2,3,function_b,4,5

    I need an output like this:

    function_a(arg1=1,arg2=2,arg3=3), function_b(arg1=4,arg2=5)

    There are many functions and each function has a variable set of args.

    Is there a slick way todo this without switch statements or string concatenation.

    I was looking at parsers and grammar todo this but I need a general approach to this problem.

    Thanks in advance!

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

    No comments:

    Post a Comment