• Breaking News

    Monday, September 23, 2019

    How to get better at competitive programming? Ask Programming

    How to get better at competitive programming? Ask Programming


    How to get better at competitive programming?

    Posted: 23 Sep 2019 10:15 AM PDT

    I'm a Computer Science major currently in my 3rd year of college. I started competitive programming this June to prepare for the internship season on campus in September and have enjoyed it over the past few months. I have a really good understanding of data structures and most common algorithms and I managed to get good enough in 3 months to bag the best internship on campus on the very first day.

    However, I'm unable to perform this well in competitions on Codeforces and the one Google Kickstart competition that I participated in. How exactly should I proceed to get better at these competitions? I had started out with InterviewBit and then shifted to Leetcode once I was done with it.

    Are there any particular resources I should refer to?

    Any help would be appreciated. Thanks!

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

    I want to write a script that takes an object I created in Revit (like a house) and automatically adds the measures of all parts of it. What language can I use and how do I accomplish it?

    Posted: 23 Sep 2019 11:11 PM PDT

    Need help modernizing an old project written in C

    Posted: 23 Sep 2019 05:37 PM PDT

    Hi! Sorry if this is the wrong place but this is as close to a place I feel I could ask

    I am working on an ancient project which was supposedly finished long ago (therefore no support exists) and am stuck at the programming portion of it.

    I am wondering if there is a place I could either ask advice or hire (or recruit someone to volunteer) someone for the topic. I don't think it will take long as the code is already (mostly) complete, just old and for obsolete hardware.

    I am only looking for directions on where I could post this and maybe a quote. I am aware of jobbit (and secretly I am hoping someone here will have mercy on me and help me) but I don't want to put it out there without also posting an appropriate pay amount.

    Link to the project

    This is everything I have found that's relevant to the project but basically the tl:dr is that the display in my car uses a protocol called IEbus. I want to equip a Raspberry Pi to the display using the stock interface, but need this part to work. I know an external signal processor is necessary in order to communicate to the RPi (preferably something easy to understand/program) and this is where I am stuck. When I try to compile the program, it throws a lot of errors and warnings and programming is impossible. I am moving towards purchasing a full Arduino to make this easier but I just want to know how much I should be charging whoever will fix the program.

    Sorry if that was too much. Thanks in advance!

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

    C# and .NET in current job market

    Posted: 23 Sep 2019 07:28 PM PDT

    Hi, I am new to this channel. Just want to ask something that may sounds really stupid.

    Based on current TIOBE, C# only has 3.399% of "market share" (https://www.tiobe.com/tiobe-index/). However, many of my friends use C# in their work; also, when I search job in Indeed, I also saw many companies use C# and .NET Core (e.g. our local government use it lol). Could someone explain to me why so many companies use C#?

    P.S. I am Java and Ruby developer mostly in web and software, and I like C# as a programming language as well as .NET Core Framework (currently learning it!).

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

    Problem recieving MIDI Signals and Numpad Key Events

    Posted: 23 Sep 2019 04:10 PM PDT

    Hello , i´m writing my first c++ windows service after this template :

    https://docs.microsoft.com/en-us/windows/win32/services/svc-cpp

    and everything went very well until I came across this problem... when the service main function runs it comes to the point when all initial tasks done. now the service should recieve midi signals and numpad keystrokes by using functions from the following apis:

    https://docs.microsoft.com/en-us/windows/win32/multimedia/midi-functions https://docs.microsoft.com/en-us/windows/win32/api/winuser/

    i declare the service as win32ownprocess and set the IO flag. Both functionalities are well coded and already tested in a normal windows process. my question is, are the functions of this libraries compatible with a Service or does it only work in "normal" applications ?

    if you can help thanks in advance :)

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

    What exactly does package-lock.json and package.json do?

    Posted: 23 Sep 2019 05:37 PM PDT

    Building my first app, need advice on how to store and retrieve 200-300 strings.

    Posted: 23 Sep 2019 04:47 AM PDT

    I'd like to build a Bible verse generator, that when you click a button, it generates a random verse on the screen. I'm self taught and don't know that much, I'd like to know what kinds of storage options are the best for this kind of app and why?

    There are linkedlists, hashmaps, arraylists, arrays etc...

    Do I have to physically copy and paste all my strings into one of these or into a file? Or do people use some kind of plugin that holds all these strings already? How would you go about solving this issue, and what data structure would you use to build this in terms of back end and why?

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

    Is floating point inequality comparison slower than floating point division?

    Posted: 23 Sep 2019 04:42 PM PDT

    So I have some nasty code where I sum up distances of line segments in 32bit floats. At some point the sum gets so big that it isnt precise enough any longer since I'm interested in the remainder of the sum (modulus some constant). So what I'd like to do is to 'truncate' the sum from time to time by sum = sum % constant. Since floating point division is expensive I'd like to only do it when the sum exceeds a specific threshold, BUT in order to check for that threshold I need a comparison sum > thresh. So checking for the threshold only makes sense if it is less expensive than division in order to amortize in terms of execution time.

    Is comparison even constant in execution time?

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

    Getting Re-Started on a Sizeable Program

    Posted: 23 Sep 2019 02:15 PM PDT

    Working on a D&D tool for DM's, and want to know if there's a better way to do what I'm doing. Either switching languages, IDEs, approach, or if there are other tools that will help me, all these suggestions and more are appreciated. Additionally, if there are concepts I should know that will make my life a lot easier, please let me know. Specifically, I don't really know how delegates work, and I feel like that might be good to know for an interface / event based program. I am most familiar with C# and Java, and only at a mediocre-at-best level. Please keep this in mind when you explain things to my damaged brain. Feedback appreciated.

    Project Github, includes link to .exe in google drive cause I'm an idiot and dont know how github should be used:

    https://github.com/Retroroid/SekaiNi

    Features needed:

    -Interfaces. Currently using WPF from Visual Studio, but its kind of slow. Not sure if this can be helped.

    -Save/load custom class objects from places they are referenced from in other custom class objects. I.e., load the editor for "Big Sword" from the inventory display in the editor for "Big Character". Data binding in WPF works for this, but not as well as I would really like.

    -Persistence of changes. If "Big Sword" is changed in it's editor, it should change the core database file, and then let that change persist wherever else "Big Sword" exists in these custom class objects. Data binding helps with this too, but again, I have some trouble getting it to work exactly how I want to sometimes.

    Features that would be nice, but not of prime importance:

    -Easy file sharing and viewing. Ideally, I would like text-based file saving, so that people can change things without needing the editor if they like. I think this will also help files be compatible between versions, as I am certain that there will be numerous changes to class objects, like removing or adding new parameters.

    -Easy data binding. WPF has a decent format for this, but if I want to update class parameters as they are changed, it's kind of a pain in the ass to mark each one with the "onEdited" event or whatever I did, I don't really remember.

    -Cross-platform compatibility. Since I'm using WPF from visual studio, I think that my program is pretty much stuck to windows, and I would eventually like to make MAC, linux, and mobile versions.

    General advice:

    -Am I just biting off too much at once? It's hard because by the nature of the program pretty much everything is interconnected, and it's really been difficult for me to identify the best way to approach this project.

    -Is there anything I am being a brain dead idiot about? Specifically I am interested in time savers because I have wasted SoOO much TIMe On THis HEHEHhAHAHAHahahahAGHAH

    -Is there anything else I should know? Any other advice you have for me? I want this to be as cool as it is my brain, so anything that helps is appreciated.

    -Would python be a good choice of language? I tried to get started but I'm already stuck at installation, I don't know what a unix shell is, and I dont know what an extension language is (page 1 of the tutorial). If python is a good choice of language, can someone give me a good place to get started? I downloaded the 3.7 thing from the python website, and have clicked on some stuff, but don't really know if it's an editor or if it's a command line or what. I'm a little lost on this topic and hopefully someone can hold my hand for a few steps before I find my balance.

    That's about it, thanks for helping out, in advance. Additionally, if anyone has any suggestions for finding people to help write or test my program, that would also be appreciated. I am at uni and have practically zero time available already, and this is the result of free time over the summer at my internship. In fact, I've wasted so much time re-doing this project that I'm actually pretty astounded that my mental state is as stable as it feels right now. Maybe the 100 hours wasted just hasnt hit me yet. Hmm.

    Programming is hard, bleh.

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

    Apache NiFI and Apache Camel differences between technologies

    Posted: 23 Sep 2019 02:01 PM PDT

    Ive been asked to look at the differences between the two technologies and im struggling to get the concepts and what each are actually trying to do different.

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

    Python and bash problem

    Posted: 23 Sep 2019 12:19 PM PDT

    Currently running on Unix and whenever I create a python executable and try to run it I get an error. The script is being ran as a bash file instead of a python script. I have the shebang in my python. I have python symlinked to python 3.5.2

    If I change the shebang to 3.4 it works, but not if it's 3 or just Python.

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

    I want to get started on creating an app for Window PC but not sure where to go

    Posted: 23 Sep 2019 09:46 AM PDT

    Hello,

    I am interested in creating an app to be used by PC. The idea is to create an application that will have buttons and other friendly UIs that corresponds to several frequently-used commands/lines in Command Prompts. As an example, one button could be labeled 'Go Back to Previous' which will do so by using the following cmd line 'cd ../'.

    I tried googling and other resources but most information is regarding how to make an app for Window phone. I read somewhere that either C# or .NET can be used for PC application and wanted guidance on a direction i should head.

    Sorry for the lousy explanation above... English is not my first language. If more clarification is needed, please let me know.

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

    How do you go about getting familiar with code written by someone else?

    Posted: 23 Sep 2019 09:34 AM PDT

    Or code you write ages ago and no longer remember?

    I inherited a legacy application that was developed by 2 or 3 different people over the course of it's history and of course there's very little in the way of documentation.

    Do you have any particular strategies for digging into a program and understanding what all the pieces are doing? Any guides on how to go about creating documentation for the next guy?

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

    Testing with Selenium in C# - Website which I need to test changes XPath

    Posted: 23 Sep 2019 12:24 AM PDT

    Hello,

    I need to create a testing automation tool in selenium with c# to test the website of my company. Everything works fine, except one thing: everytime when I reload a task on the website (like create new user), the XPath of some fields changes. The Email Field is as example not "/html/0EMail/user/" anymore, the new xpath would be "/html/2EMail/user/" and selenium does not recognize that field anymore like before.

    Is there a way to make a dynamic function to ignore the number before the email?

    driver.FindElement(By.XPath("//*[@id=\"0FirstName\"]")).SendKeys("Selenium"); 

    ...................................................................................^-> ignore the 0 or see if there is a field like that with other numbers

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

    Writing to OneDrive from Raspberry Pi Python

    Posted: 23 Sep 2019 08:42 AM PDT

    Hi, I'm new to Python/Raspberry Pi but I have successfully written a script that takes sensor data and converts that data and puts it into a .csv file. Now, I am trying to write a script that places that file either in OneDrive or some other external hosting service but most guides I find online are not user friendly. Just need some guidance on where to look or what to do to complete this task.

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

    From which position is easier to get into management, an Android developer or a back-end Java?

    Posted: 23 Sep 2019 08:19 AM PDT

    Can't figure out 'extra qualification on member'

    Posted: 23 Sep 2019 02:16 PM PDT

    jewwardsol is clutch and helped me thanks homie!

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

    Java notation?

    Posted: 23 Sep 2019 06:37 AM PDT

    Hi,

    I've just seen this piece of code in a java project. Neither me or my colleagues know how does this notation works.

    listSerialAlreadyExist:new ArrayList<>();

    Copy/pasted the lines as-is. The code does work as intended but nobody here knows this notation.

    Does anyone know how this is possible?

    Thanks a lot,

    M

    PS : Sorry for bad english, it's not my first language

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

    Apache Maven error during javadocs phase on build

    Posted: 23 Sep 2019 02:53 AM PDT

    I'm having an error when trying to build my project using Apache Maven version 3.6.2. Whenever I try to build it, using mvn clean package, mvn clean install, mvn package or mvn install, I get the following error:

    Error fetching link: D:\IdeaProjects\QuickSkript\core\target\javadoc-bundle-options. Ignored it. 

    The build still succeeds, however, it is mainly just annoying that this pops up when building. I have updated all my dependencies, plugins and Apache Maven itself to the latest versions, however this did not resolve this. My pom.xml is as follows: https://pastie.io/vzmytv.xml. My project is in IntelliJ IDEA Ultimate 2019.2.2. Any help would be appreciated.

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

    No comments:

    Post a Comment