• Breaking News

    Sunday, December 5, 2021

    What is the best map API for the following goal? Ask Programming

    What is the best map API for the following goal? Ask Programming


    What is the best map API for the following goal?

    Posted: 05 Dec 2021 12:32 AM PST

    I want to use a map on my website (angular) with satellite image and polygons.

    I want to check later if my location is inside or outside the polygon.

    For this purpose i've checked Google's map api, but i'm a little bit afraid that it is going to cost too much in the future, since i'm not quite familiar with how much usage does the free limit (28500 map loads) mean.

    I've checked MapBox too which is a cheaper alternative, but it has too old satellite images unfortunately.

    In your opinion what is the best API for this goal considering the above functionalities and the price?

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

    How do I incorporate SASS in my projects?

    Posted: 05 Dec 2021 06:25 AM PST

    Hello

    i'm wondering about the best way to incorporate SASS in my projects..

    i used to write all my styling logic into .scss files and have them compiled using something like SASS live compiler or gulp SASS into a .css file that i would link into my html file or import it into my main react component..

    and then i found out that i can do away with the compiling pain and just use the SASS npm package that would auto compile the sass code into pure javascript (i don't know what does that mean) and all i have to do is import my main scss file into my project and "it just works"..i don't understand what is happening there, my project isn't deployed yet and i don't know if that would break down when i deploy things, and i also don't know if this is the "correct" way to do things..

    can anyone with SASS experience please tell me how do you incorporate SASS into your project?

    thanks in advance!

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

    Is it possible to have a language that is easy to learn and has extremely high performance?

    Posted: 05 Dec 2021 05:20 AM PST

    I have some knowledge of C++, Go, and Python, and in my personal experience, Go provides good performance most of the time, but when it comes to really extreme performance scenarios Go tends to easily run into bottlenecks (lack of SIMD support, inability to set thread affinity, and Go compiler does not provide many kind of optimizations that GCC does), making it hard to achieve C++'s performance.

    C++ is good for high performance computing, but also very difficult, and it's hard for C++ newbies (like me) to implement a large, robust program.

    Python is nice to get started with and has good performance when using frameworks, but hotspot code is usually implemented in other languages and is not as easy to read source code, compile across platforms, or deploy as Go.

    Is there a language that is as easy to learn as Go/Python, but can achieves high performance like C++ if needed?

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

    Wanting to create an in-house software dev department. Not sure where to start?

    Posted: 04 Dec 2021 11:08 AM PST

    Hello everyone! Hope you're having a wonderful morning/evening.

    Our company is looking to invest into building a new software dev department. We have no previous experience in software developing, our business mainly focuses on B2B sales, we have multiple branch across the Gulf market.

    For our previous basic needs, like website, store, etc. we have a part-time web dev that sorts those things out. However, for the upcoming years, we want to create a new customized ERP for our business, something that suits our personal needs. We thought that creating a software dev department would be a great stepping stone for the future. Our company has been growing steadily for the past multiple years (we have been in the market for around 25 years), and we want to expand and grow our technology to facilitate and optimize workflow.

    Now we aren't exactly sure how to begin, how many people to hire, who to hire, how to manage the team, the budget to put in. We are highly leaning towards in-house developing to build a foundation for the company for later on. Any advice would be highly appreciated, thank you!

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

    GitHub account with Git installed on PC

    Posted: 05 Dec 2021 02:19 AM PST

    I had been making backend code in Atom code editor for a while now whilst using Git from command line to update my repo, but recently I decided to try out VSCode and have found it's more suitable for implementing my backend code into a frontend packaged application. I actually started a new project to implement frontend code and am planning to use the backend repo as an endpoint, so that the core functionality as backend is available for others to make different programs with.

    The problem I'm facing is that I don't fully understand the concept of a Git install, if I use the source control options in VSCode, will it access the same GitHub account that was setup when I was previously using command line in a different project?

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

    How are mathematical formula that include the | symbol implemented?

    Posted: 04 Dec 2021 08:50 PM PST

    I feel like this might be the wrong sub, but this is still a programming related question. A mathematical formula (https://www.sfu.ca/~ssurjano/bukin6.html) I'm trying to implement which contains | symbols which I don't really know how I'm supposed to implement or what I'm meant to do with it. I've tried to look online for what | could mean in mathematical terms but I can't seem to find an answer. If someone is able to help or direct me, it would be appreciated!

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

    SQL looking to inner join but on many

    Posted: 04 Dec 2021 11:30 PM PST

    I'm a little lost, I'm currently trying to get all records and do an inner join and don't know enough about sql to look up my problem,

    So this is what I currently have to get one record:

    SELECT m.source, m.type, w.idFROM w wrapper INNER JOIN m media ON w.fk_record_id = media.id WHERE wrapper.id = $1 

    I'm trying to return MANY of those wrappers, the wrapper is a one to one relationship with the media.
    My thoughts is to just and `AND w.fk_account_id = $2` but I don't think it's as easy as that.

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

    Mechanism for marking messages "read" in our chat module in our rail's app.

    Posted: 04 Dec 2021 10:37 PM PST

    We have a chat feature in our rails app where users can talk to each other.

    This is done using Actioncable, and a basic messages and inboxes schema structure, where:

    • Each unique conversation between 2 participants has its own inbox_id, and all messages sent by users to another user reside in that inbox_id.
    • In the messages table, which holds the records of every message, we have a read column (which is currently unused).

    We want to implement a way for our system to know if messages have been read by a specific user, but we're not entirely sure what the best method to facilitate this might be. We're unsure on how we should go about designing this exactly.

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

    Inspirational books related to programming?

    Posted: 04 Dec 2021 04:40 PM PST

    Not technical books on how to code, but things like autobiographies, sci-fi novels, non-fiction works on ideas/theories, etc

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

    I need help creating a summation function that takes in a vector in R.

    Posted: 04 Dec 2021 08:01 PM PST

    I basically need to create a function that does the summation of 1 to n for 1/n^2. I have it working for a single number, so if I put like n = 10 it'll execute the summation and give me the right answer, but then I need to make it so it can take a vector of numbers, and do the summation for each number and then report the answers of each summation. After it does the first, I get an error that says numerical expression has x elements: only the first one is used.

    this is done in R

    Let me know if you can help, feel free to chat, I can send pics if necessary. Thanks in advance.

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

    Suggestions for a simple DB to create 1 query/action and 5 text columns?

    Posted: 04 Dec 2021 06:01 PM PST

    Hi all. I have limited programming skills, but willing to learn.

    RN, I use Google Sheets, but I am willing to switch to any simple cloud-based database program. (I use Mac which seems limiting).

    In Sheets, I have 5 text columns (easy).

    For a 6th column, I need a pop-up menu in each cell with ~35 multi-select checkboxes of text values.

    When I select these checkboxes, and then hit save or go, these text values should output corresponding numeric values. These values then concatenate into each cell. The values would have a single comma between them and no spaces between them.

    Example:

    My checkboxes for my one cell or record are Dog (=1) Cat (=2) Bird (=3) Frog (=4)

    I select Dog, Cat, Frog

    The result in the one cell should be: 1,2,4

    I need to do this for each record or row and then export everything as a .csv

    I'm willing to try anything for novices and the solution doesn't have to be a spreadsheet one. Thanks for any suggestions.

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

    How to run Javascript files ?

    Posted: 04 Dec 2021 04:43 PM PST

    I started learning JS, however I'm confused because there are many ways to run:

    • Embed script in <script> in HTML
    • Embed script as a file in HTML using <script src="file.js">
    • Run "nodejs file.js" in terminal
    • Run code from inside the developer tools console in a browser

    So far running "nodejs file.js" is the closest to running file inside the IDE console. However, scripts that change HTML tags don't work in nodejs.

    Are there other ways to run/test .js code?

    I feel that testing it on the console is slower and has less resources than running in a IDE; and for js code that change HTML, it feels slow updating it, saving and f5ing the page

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

    I am looking for specifications of various tools/protocols etc

    Posted: 04 Dec 2021 03:37 PM PST

    Hello! I am looking to updating

    https://github.com/jugaadi/awesome-specs .

    Do you happen to know any other specs then the one provided there? I will aggregate the comments and update them there.

    Why is it useful you may ask. For libraries creators such list would be great for research and guidance.

    Thank you!

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

    I studied economics but I want to be a web developer

    Posted: 04 Dec 2021 03:34 PM PST

    Good day everyone, i'm new here so apparently I graduated with bs.c economics but this isn't something I will like to work in so I decided to become a web developer with no experience in computer science.

    So please I'd like any web developer to give a step to step guide on what I would need to know, I've also done my research and I know this is something that might be easy for me to do. I'd be glad to get a reply as soon as possible

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

    Desktop Application and Server Database Security

    Posted: 04 Dec 2021 04:58 AM PST

    Hello, lately I've started learning desktop apps (specifically WPF with C#) and I've come across this one issue that I just couldn't wrap my head around, despite searching for it.

    With web apps I found that the code you write is server based, meaning connecting to a database is done locally on the server (in my case), and so the client doesn't have access to my secrets and the data in the database, since his actions are limited by what the website allows him to do.

    However, I'm not sure how this works in a Desktop App. My understanding is that the client has the application and its code on their side, meaning in order to retrieve any data (such as for authentication purposes), he needs to have for example the connection string, which is supposed to be a secret, as it also contains the password to a database. Besides that, I'm not sure what limits the user from retrieving any data he wants from the database (emails, hashed and salted passwords, etc.).

    What am I misunderstanding in this? How do I ensure the safety of my data in a desktop app that accesses a server-side database?

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

    Are these two things allowed in a technical interview?

    Posted: 04 Dec 2021 03:09 PM PST

    1. Using a built in library function that isn't really the meat of the challenge problem?
    2. Writing helper methods to generate and visualize inputs / outputs?

    I'm working on a challenge problem right now that I feel I'm close to solving, I have a clever idea that I think could work but 1. it depends on binary search, which is an early CS algorithm literally everyone and their grandmothers learn. While I could code it out, it's not even the clever part of the solution I have in mind and I see it as a waste of time since python's bisect library has exactly what I need already anyway. I don't think my interviewer should really be concerned with whether I can regurgitate binary search, that doesn't require cleverness at all in my opinion.

    As for question 2, it's been hard for me to visualize what happens given certain inputs. When doing it by hand, it's tedious to write out input examples and analyze case by case what output might be. I can write out a stupid simple brute force solution to the problem very quickly, and methods to generate input data very easy as well. As I'm working on this right now, I can really benefit from writing these out as "helpers" to a more clever and efficient solution, and I could really benefit from seeing outputs on smaller datasets. I think it'd be silly not to allow these pedagogic helper methods to see what an output solution looks like after transformations which can assist my improved solution--as a working developer, my employer wouldn't give a shit if I did this if it helped me deliver a solution. So I was curious, would an interviewer find that strange to do? Obviously I'd communicate that this is beneficial for me but just wonder if they'd see it as a waste of time.

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

    Best online bachelor degrees programs for software developement?

    Posted: 04 Dec 2021 03:08 PM PST

    I'm looking for an online program but I live in Europe, any suggestions?

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

    Generating evenly spaced coordinate points within a circle

    Posted: 04 Dec 2021 03:04 PM PST

    Hi, I'm working on a simulator for gas particles in a 2D circular container.

    I have created two objects, ball and container (container is a child-class of ball). I also have a Simulation class which takes in a container object, and it generates a list of ball objects (each ball has a radius of 1), as follows:

    class Simulation(): def __init__(self, container = Container()): self._container = container self._balls = [Ball(np.array([i+3, i+3]), np.array([i+1, i+1])) for i in range(num_particles)] 

    where num_particles is the number of balls that I wish to generate. The first array in Ball sets the centre coordinates of the ball, and the second array sets the velocity. The second array is not too important right now.

    As you can see, my current code would generate balls with coordinates lying on a diagonal line from (3,3) to (6,6) for 4 balls. In addition, it would mean the balls are overlapping since their radius is 1. I know I can multiply i by something to stop them from overlapping, but it still would not allow me to fit many balls in the container (which has a radius of 10, and is centered at 0,0).

    I'm wondering if there is a way to generate centre coordinates which will fill up the space more efficiently (but the balls must be inside the container, and they must not overlap with eachother).

    I was thinking, perhaps the coordinates could be generated in concentric rings around (0,0)? Not sure how this could be implemented.

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

    I'm a total beginner, I have a probably very basic question about a program I'm making, also sorry for wasting your time

    Posted: 04 Dec 2021 11:11 AM PST

    Why is it that in the following expression (see below) the first type is int and the second type is boolean, or rather how do I make them both boolean? what I'm trying to code is: if "number1" is equal to "number2" and number two is greater than "number3" then...

    Here's the expression: if (num1 = num2 && num2 > num3)

    I'm programing with Java btw

    Edit: IT'S BEEN ANSWERED, I don't want to waste anybody else's time, thank for the help!

    submitted by /u/Alternative-Estate87
    [link] [comments]

    I am writing a c++ algorithm to find the smallest natural number in a list and wanted to ask is there a way to optimize/reduce the running time for my algorithm.

    Posted: 04 Dec 2021 09:54 AM PST

    So I want to achieve an output like this:

    Case 1:

    11 (number in the list)

    10 1 4 11 5 9 2 4 6 0 1 (number in lists)

    Output = 3

    Case 2:

    4 (number of inputs) 3 2 1 0 (number in lists) Output = 4

    My algorithm is like this:

    int main(){ while (cin) { int n; cin >> n; int* arr; arr = new int[n]; for (int i = 0; i < n; i++) cin >> arr[i]; map<int, bool> mp; for (int i = 0; i < n; i++) { mp[arr[i]] = true; } for (int i = 0; i <= n; i++) { if (mp.find(i) == mp.end()) { cout << i << endl; break; } } } return 0; } 

    I want to reduce the running time as it is a requirement of the program. Any hints on how I could achieve this? Thank you so much!!!

    Edit: my title is a bit misleading. I wanted to find the smallest natural number missing in the list. Really sorry for that!

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

    What is ssh tunnel and how it works?

    Posted: 04 Dec 2021 07:27 AM PST

    Segmentation Fault from reference style variable?

    Posted: 04 Dec 2021 01:23 PM PST

    believe I have narrowed down the potential cause of a segmentation fault. It happens very rare and sometimes after the codebase has been running for a long time, and sometimes quickly. But it is hard to reproduce and does not happen everytime on my multithreaded system. I lot of this design I inherited and just have to maintain.

    This code runs in a large multithreaded system running on Linux

    I have a simple mutex class:

    struct mutexData { pthread_mutex_t m_mutex; } ThreadMutex::ThreadMutex(){ m_data = nullptr; init(); } void ThreadMutex::init(){ if (m_data == nullptr) { // create mutex m_data = new mutexData; pthread_mutexattr_t mattr; pthread_mutexattr_init(&mattr); pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE_NP); pthread_mutex_init(&m_data->m_mutex, &mattr); } } // last function call before segment fault? void ThreadMutex::acq(void) { if (m_data == nullptr) { init(); } switch (pthread_mutex_lock (&m_data->m_mutex)) { case 0: break case EINVAL: throw exception; default: throw exception; } return true; } 

    this mutex is called by a simple function:

    class A { private: ThreadMutex mMutex; int count = 0; int performAction(){ { GuardLock<ThreadMutex> lock (mMutex); // perform desired action count++; } return count } } 

    with GuardLock's constructor implementing:

    GuardLock(T_LOCK_CKASS & lock) : m_lock(&lock) { m_lock->acquire(); } 

    Has anyone seen anything like this? It happens very rarely but is repeatable.

    Some people have also pointed out that the acquire could also be a segfault. I would think not because I do make sure to create it in the constructor though..

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

    I need to choose CI/CD pipeline and testing framework tools for the take-home assignment

    Posted: 04 Dec 2021 01:09 PM PST

    I was given a task for the interview. Basically, they ask me to build a web application and I am free to use the tech stack I want.

    It is a fullt stack app and I have chosen Spring boot for the backend and react for the frontend. They also ask me to implement:

    - CI/CD pipeline

    - testing framework

    Which tools would you choose? Should I choose Docker, Kubernetes and Jenkins for CI/CD? I was thinking to use Junit for testing but should I go with a more professional tool?

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

    getting Monnit sensor to trigger a custom work order in MaintainX

    Posted: 04 Dec 2021 09:19 AM PST

    Hello guys, I am working on a problem which has been bugging me for days. I am wondering if anyone is familiar with getting MaintainX to create a custom work order based on information from a Monnit sensor. I have looked through the APIs and I can't quite understand how to get these two pieces to communicate.

    I am trying to create a new work order based on information from the Monnit sensor but I have no idea where to begin.

    MaintainX API----- https://api.getmaintainx.com/v1/docs

    Monnit API----- https://www.monnit.com/support/api/

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

    How to stop repeating code, until keybinds have been put in and ran. Python Turtle / Time / Random

    Posted: 04 Dec 2021 12:46 PM PST

    OverView

    Making a Rock Paper Scissors game with Python Turtle / Time / Random.

    Problem:

    The code is all setup although (I reset screen for new round btw), for the screen to reset I need to put a while True loop to repeat the code. The problem with this is that since the the code (apart from image inserting) is based off button keybinds so when i run it, it continuously keeps loading in the images instead of just being a clean screen. What i need help w/ is making the code only run the first part once and not repeating untill a keybind has been put in and the code runs therefor returning itself back to the start.

    If you dont understand:

    If you need more detail in the problem or dont understand what i need help with, message or comment which part and ill reply back soon.

    Code:

    Pastebin code

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

    No comments:

    Post a Comment