• Breaking News

    Wednesday, February 26, 2020

    How many of you meditate? Have you found it helpful (or even harmful?) for programming? Ask Programming

    How many of you meditate? Have you found it helpful (or even harmful?) for programming? Ask Programming


    How many of you meditate? Have you found it helpful (or even harmful?) for programming?

    Posted: 26 Feb 2020 07:19 AM PST

    I'm starting to look into meditation to help reduce stress and anxiety in my life, and I've started to wonder what sort of impact this may have on my programming productivity.

    Thoughts? Has it helped any of you specifically with regards to programming?

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

    Geolocation Api for Game Buildings Colliders

    Posted: 26 Feb 2020 11:18 PM PST

    I need to implement a web- based game that uses geolocation to retrieve building data so that I can construct colliders for the buildings so that the player will not walk through them. Do you guys know any api that would help? I've seen Google maps api and Mapbox api but I'm not sure they will help since they provide 3d models but I don't think they provide 2d models.

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

    Python Doubt

    Posted: 26 Feb 2020 10:09 PM PST

    How can we write a program to take a 2-digit number and then print the reversed number.That is, if the input given is 25, the program should print 52?

    Please explain it in as simple manner as possible.

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

    Help me understand this problem

    Posted: 26 Feb 2020 10:03 PM PST

    Bot that buys items on ebay

    Posted: 26 Feb 2020 08:59 PM PST

    I'm looking to purchase/build a bot that can autobuy items for sale on ebay. If anyone can point me in the right direction that would be much appreciated.

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

    Can anyone help me with a tic-tac-toe Python script for a 100-level CS class?

    Posted: 26 Feb 2020 06:33 PM PST

    If you have some extra time on your hands and would be willing to offer any help before 11:59pm EST Thursday night, I'd really appreciate it. You might have to see what I've written already and what I've been assigned to do exactly in order to help, so please PM me so we can figure out how to share that stuff. Thanks so much.

    submitted by /u/throwaway-python
    [link] [comments]

    Just an Idea

    Posted: 26 Feb 2020 01:15 PM PST

    A Question for Coders

    I am a highly novice programmer who is very curious about a potential "bot" or program that could be made for my work.

    If you want this post elsewhere and want me to go away please let me know, I am new to reddit and this community.

    WHAT I DO:

    I work in marketing and sales for my job. What I do basically consists of creating easy copy paste templates for emails that I personalize and send to very specific clients/customers. I often will spend a few days sending a couple hundred emails and then follow up the contacts by calling and asking to speak to the safety manager giving my usual lead. I sell a very specific electrical safety class that is required by OSHA (the safety standard for any workplace) so I really just need to get my message to the safety managers, who more times than not are looking to outsource their safety training to us for a cheaper price, or are outdated on their safety training and just haven't found an electrical safety provider.

    WHAT I'M ASKING:

    Is there more efficient way to reach my customer base? Are there any of you who would want to offer me an efficient process to farm email lists of safety managers? I typically will find a few safety managers emails or contractors emails and I will search those to find bid lists or public documents with many contacts to engineers or safety reps. I just feel I need to explain my process in finding these lists to help a programmer better streamline the process in their head.

    WHY I'M ASKING YOU GUYS:

    People who are fluent at code are tech savvy at the very least. I come here to humbly seek your knowledge and possibly brainstorm together on a new process to get more valuable contacts. I am not here to try and sell anything or offer up a job. I just feel compensation may be necessary if someone were willing to take the time to really help me out on this process.

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

    Is there a way to get the source code of a Selenium-based exe that you didn't create?

    Posted: 26 Feb 2020 03:34 AM PST

    Someone created a Selenium exe for me like 4 years ago. I'm not in contact with them anymore, but I would like to try modifying a part of it. Is there any way to "crack it open" to try changing some of the code? Or is this just something I'll have to pay a new person to entirely recreate? Thank you. (If it matters, I think they used Python)

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

    Programming language standard which is meant to be safe for string eval() (cross platform / language agnostic)

    Posted: 26 Feb 2020 03:43 PM PST

    Hi all, Based on previous research, I am guessing something like this does not exist yet, but, just in case...;
    I am trying to determine if these exists some type of very limited functionality language, for the purpose of
    performing a kind of vectorizable operation. The functionality available in the language would generally support
    math functions (+-*/ abs sin etc), if/else, and maybe loops. I would expect a generic parser to be available
    for most scripting languages, for example, for python, the string of pseudocode like:

    code_str = """
    declare float abs_plus_one(float x){
    return abs(x) + 1.0;
    }
    """

    Could be converted in python to a generic function like:

    >>> new_func = GenericLang.parse_to_func(code_str)
    >>> new_func(-2)
    >>> 3

    I assume this could also still work in static languages like c++, but Lua or boost would likely need to be leveraged.

    ---

    The closest standard of similar functionality I have found is something like compute shaders in openGL, or perhaps an openCL kernel.

    The motivation for thinking about this is daydreaming about possibly creating a generic type of filter / mode for raster graphics programs.
    In this case, the function would for example always take arguments for RGBA values for two pixels, and return some kind of output, in order to
    blend the layers. I was thinking this could be made generic, and defined as a kernel in file, instead of just having a certain name (like "multiply",
    "hard-light", etc) and expecting all programs to implement in the same way. (There could be new novel modes in the future)

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

    Website featuring embedded chessboard?

    Posted: 26 Feb 2020 03:27 PM PST

    I understand C and know python quite well. I've enjoyed experimenting with different AI methods in chess using python. As a personal project, I would love to make my own website consisting purely of a chessboard, on which you could play against various the AI that I have coded. I was wondering where a good place to start might be? I understand very little about web development and am unsure if flask/django would be up to scratch for this, or whether I should be learning new languages? If so which ones? Any advice is greatly appreciated, thanks!

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

    SQLServer "Object reference not set to an instance of an object" although query is tested and working.

    Posted: 26 Feb 2020 03:18 PM PST

    I'm getting a NullReferenceException when trying to update a table in my database. I have tested so that my query is correct. What is wrong? I am trying to access my SQL Server using .NET and C#.

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

    Question regarding setting up a server

    Posted: 26 Feb 2020 01:32 PM PST

    Hey all, novice here. I've been toying with Node and Express for the last week or so and was wondering:

    Is there any fundamental concept I should know about when setting up a website on a server? Certain standards and things to know? If so, where can I look or read about them?

    The documentation and resources online are great but none of them get past setting up a "local server tutorial", and I really can't fathom how to set up a server with that local server example. Thank you in advance.

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

    Need help deciding what to do degree-wise

    Posted: 26 Feb 2020 01:11 PM PST

    I don't know if this post belongs here, but I'm hoping you all might be able to help.

    I already have a bachelors degree in cello performance, but I don't know that I want to continue that career path anymore. While getting my degree I took every predicate logic class (grad included) that my university offered and excelled at it. I don't know why I didn't consider looking into programming at the time, but now I'm very interested in pursuing it.

    My dilemma is whether to pursue programming through higher education or something like codeacademy. I love going to school, but being in the US it is the cost for a degree is exorbitant and I don't know that I will have the financial means to get another degree.

    I would appreciate any thoughts on the matter, thank you for your time.

    submitted by /u/--kitsunefen--
    [link] [comments]

    [ASP.NET + React Native] How can I hit my local api on my mobile phone

    Posted: 26 Feb 2020 08:32 AM PST

    Hello Everyone,

    I am trying to develop a mobile application using the React Native framework. I have used React before and have used the startup project type in Visual Studio to create an app with a React client side and a ASP.NET Core server side. I noticed that a lot of the same code works on react so I did not have to replace my stores at all. The issue I am having, however, is hitting local API from the expo client on my phone. I can hit public APIs fine, but when it comes to local ones I get messages like "TypeError:Network request failed". I have looked into the issue and have not been able to find a direct solution online. I found this one video of someone using PHP and React Native and the local API was fetched fine. I tried to follow the same procedures for ASP.NET core. I changed my launchSettings.json file to have my IPV4 address with port 80. Furthermore, I changed my react native app to fetch the same address with the same port. Unfortunately, this did not solve the issue. Any ideas on what would solve the issue?

    I am currently in class, when I get home I will post a link to a repo of my code in case you would like to see what I am directly working with. I haven't done anything major. I created the server side using dotnet new webapi and I created the client side with create-react-native-app.

    Please let me know if you have any questions or if I didn't explain something enough. Also sorry if my grammar or punctuation is terrible this is the result of sleep deprivation.

    Edit: Forgot to mention what versions/devices I am using

    dotnet: 3.1.100

    npm: 6.9.0

    phone: iPhone XS

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

    How to make images that change slightly when scanned with phone camera?

    Posted: 26 Feb 2020 11:53 AM PST

    Hello

    For example, let's say I drew a flower. How to make it so when I scan it with my phone the colors change to red or add a text over it?

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

    (Efficiently and easily) find central node in a network, such that removing it would make the graph fall into two components?

    Posted: 26 Feb 2020 10:56 AM PST

    Hey,

    I am trying to find an easy and efficient way to check if, in a P2P-Network specifically, a single node exists, with the property that removing it would make the graph fall into (at least) two components.

    Every node in the graph corresponding to the network can be assumed to have a minimum of 2 and a maximum of 3 connections/neighbours. A simple example would be a node with 2 or 3 "triangles" connected to it.

    The hacky solution I'm thinking of (requiring a lot of sending forward and backward and comparing and other ugly stuff) can't be it. Maybe a variation of BFS would work, but that is already more than I want to do. Maybe a combination of deleting edges and performing BFS afterwards (to check reachability) would do the trick, but that's already too expensive I think.

    The idea is to detect such a "critical" node and shift connections a bit, such that a(n) (un)expected quit of that client won't cause the network to fail its purpose.

    I would have asked on SO (and might still do so), but I am sure the answer is out there somewhere already. I just don't know how to find it.

    Thanks!

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

    [JS] Why can't Date() just read the time and date off of my computer?

    Posted: 26 Feb 2020 10:45 AM PST

    It's so peculiar. I mean. I am pretty sure all those time formats are just calculated from that milisecond time from 1970. Where does that time come from? Can't be from the internet if it works offline. That means that the time is read from somewhere on my computer.

    Does my computer also use the milisecond time and it itself converts this time according to the timezone? How do I then read the user timezone and adjust the milisecond time to get the real time? Wouldn't it be just easier to just read the already calculated and visible time of the user and gg?

    I mean, for servers it might make sense to have one time regardless of the timezone, but if I want just the user time, why do I have to jump through so many hoops? Is this not a common use case?

    Tnx!

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

    Programming noob here. Need help with batch file.

    Posted: 26 Feb 2020 10:25 AM PST

    Let me start by saying that English isn't my first language, so sorry for any mistakes. Also, maybe the following question is pretty obvious/basic but I'm a total noob when it comes to programming.

    So... I'm trying to make a batch file that (among other things) stores as many URLs as the user wants (I'll omit some parts that are not relevant to the post). It goes something like this:

    First, it asks for the URL you want to add:

    echo Insert URL: set /p urlx= 

    After that, it adds 1 to the URL counter

    set /a urls+=1 

    Now, here comes the question: I want to assign urlx to another variable but depending on the number of URLs added previously (urls), so first time it will assign urlx to url1, next time to url2 and so on.

    I'm guessing it has something to do with "setlocal EnabledDelayExpansion" and/or concatenating strings... But again, total noob here.

    Thanks in advance.

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

    Java

    Posted: 26 Feb 2020 09:39 AM PST

    When I use the StdIn.readString() method to read all words in a txt file what happens when I have read the all the words but I continue to read?

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

    Build and Run Apache Maven, simply as that?

    Posted: 26 Feb 2020 03:06 AM PST

    Can I just apologise beforehand that this is probably super newbish thing to ask?

    So, I am supposed to deploy this open source code thing. Web application using the Apache Maven build system.

    Can I just get the source code, compile it and then deploy and it will somehow miraculously work? Or is there always needed some customisation required?

    I just want to know if this is case of

    Lacking of the basic knowledge OR Insufficient documentation OR If your application doesn't work fully the problem will be somewhere else.

    I am sorry once again! Hope I didn't bothered you much.

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

    Help with finding the right resources

    Posted: 26 Feb 2020 08:45 AM PST

    Hi! I'm working on an artificial neural network project (specifically MLP Regressor) which was recently reviewed by my project tutor. He mentioned that I should analyze the results and find the range of input parameters combinations which would give good performance. My question is, is there any specific term that encompasses this task or any wiki/websites that talk about this? What do you think would be good performance for such a task? Any input would be appreciated.

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

    Front-end for a test coded with python that continuously generates questions for a set amount of time?

    Posted: 26 Feb 2020 08:42 AM PST

    New to coding, bear with me. So I coded something with python and am wondering if I should keep at this with python the way I am or seek out another avenue.

    It's basically a test that runs for a specified amount of time and exports data to an excel file for each question, like the amount of time it took to answer, what the right answer was, what the users response was, whether they were right, the difficulty etc. It uses a loop to generate each question.

    It does exactly what I want it to in the console, but I need a front end for it and have run in to some trouble. I've been trying with Tkinter, but am struggling to get the new question generation loop to cycle through displaying question -> user input -> display a new question. It seems like I need a new canvas for each question. Is it possible to loop through creating a new canvas for each question, closing it after input, and opening a newly generated one? The way that buttons work with functions has made looping difficult. Can I make this work or should I seek out another avenue? The program is meant for in-person, not a web-browser btw, I can't have the possibility of internet connection interference, so web-based languages are off the table

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

    Python GUI library similar to WPF or JavaFX

    Posted: 26 Feb 2020 07:45 AM PST

    Title pretty much says it all. Looking for an xml mvc based python gui library, any suggestions?

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

    What's future scope & opportunities in database administrator team?

    Posted: 26 Feb 2020 07:15 AM PST

    No comments:

    Post a Comment