• Breaking News

    Sunday, January 17, 2021

    What is the worst programming language? Ask Programming

    What is the worst programming language? Ask Programming


    What is the worst programming language?

    Posted: 17 Jan 2021 04:42 PM PST

    I cannot answer a programming interview question if given some, though I have made multiple apps.

    Posted: 17 Jan 2021 07:41 PM PST

    I am third year in uni. I've made a few apps and got one on the App Store with another one coming soon, full fledged apis, payment processing, search, etc. but I never thought I'd work for someone but as I'm beginning to graduate I'm starting to be more aware. I've seen programming interview questions and I know how to solve them if you give me a few hours, I can optimize even etc... But to answer on the spot? It seems like a way to test memory more than problem solving.

    So yeah. Obvious move is to begin practicing problems. Just wanted to put this out there.

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

    How to find Recipes out of ingredients you have

    Posted: 17 Jan 2021 07:33 AM PST

    So I'm trying to make an app where a user can input the ingredients they have in their fridge, and the system will return all the recipes which the user can make. I'm wondering what's the best way (in terms of runtime complexity) to figure out if a user has all the ingredients for a specific recipe?

    I'm thinking this is a set membership problem, where we can see if the ingredient set contains all the items in the recipe set. Is there a better way to solve this?

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

    What is the difference between a Website, WebApp, Web Service, Webapi, and Restful Webapi?

    Posted: 17 Jan 2021 07:04 PM PST

    Is website a blanket term that, as technology evolved, was split into smaller processes like and app and an api? Or is it more than that?

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

    Uploading files to Google Drive using C programming

    Posted: 17 Jan 2021 04:33 PM PST

    My program needs to send folders via Google Drive, but I have no idea how to actually do it, do you guys have any ideas on it?

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

    Can I make an animation such that, when you click on it, it runs some command from Excel in the background, e.g., creates a table, and then the animation writes you a message when it's done?

    Posted: 17 Jan 2021 04:17 PM PST

    How do I go on about learning server side development with Java?

    Posted: 17 Jan 2021 07:40 AM PST

    Hi, I want to start building backend REST API in Java. Currently, I've only made console programs using Java. Now, I want to start building RESTful Api. But, the problem is that I don't know what should I learn? Java SeverLet, Java Web Services, Spring Boot or something else?

    Like how you can create rest apis in Node/Express. I want to learn building the same kinda rest apis in Java.

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

    How do you handle different timezones among users?

    Posted: 17 Jan 2021 03:45 PM PST

    Hello,

    I'm wondering if anyone knows the best way to handle an application that handles users from various timezones. For instance, if I have a user in CA and one in NY and each of them create post, the timestamp from that created post will reflect whatever timezone the DB server is in - say central.

    However, when the user in CA views the time on their post and the post made from the person in NY (at the exact time), I want them to see that time (PST). Hopefully that makes sense.

    I'm thinking the best way to do this is to convert it on the client side, i.e., get the users geolocation, take the difference between the DB server timezone and their timezone.

    Any thoughts/help would be greatly appreciated!

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

    Is using a Python + React stack a good idea for this data analysis application?

    Posted: 17 Jan 2021 04:47 PM PST

    I'm making a small web application for basic analysing of some fixed data and displaying results online. I want to implement it using React. However, I want to do the data analysis only with Python... I've got 1 year experience with web app development so I'm not sure how to glue it all together. My question: What do you think of a React & Python Flask stack for this sort of project? Is there a better way for using React and Python together?

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

    Is there any point in using a Database if I'm sorting a 15mb JSON by string similarity on a value?

    Posted: 17 Jan 2021 03:06 PM PST

    I have a 11 MBish json that looks like this:

    [{ "name": "Guayabal de Síquima", "country": "Colombia", "population": 1051, "timezone": "America/Bogota" }, { "name": "Maracaibo", "country": "Venezuela", "population": 19637, "timezone": "America/Caracas" }] 

    I do a query to sort the cities by name like this:

    cityList.sort((city1,city2) => (stringSimilarity(city1.name, query) - population) - (stringSimilarity(city2.name, query) - population)) 

    I'm also creating an array with only countries and cities per timezone, so that I can do the same thing, but with countries.

    It's a pretty big list with 137530 cities.

    Is there any advantage to using a database for this? I already get pretty satisfactory results, but I don't know if I can speed things up a tiny bit to get more overhead for new features.

    The use is: users will enter a city, and they'll get a piece of information that they need about it. Since so many cities share the same name, I order them by string similarity, and then by population, which will probably get the most relevant result, but I return 5 anyway to be sure.

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

    Where should I start? I want a programm to analyse a certain part of my screen which includes a number and the output should be this number. I recently heard about opencv but what should I search for next and how do I start this?

    Posted: 17 Jan 2021 12:13 PM PST

    How to grab all combinations in a matrix, being only 1 item in each row?

    Posted: 17 Jan 2021 10:56 AM PST

    I have this example matrix of item values (the actual matrix has 130 columns and 68 row).

    1 2 3
    4 5 6
    7 8 9

    Each row has to be selected exactly once.

    In this example, I need the following results:

    [0][0],[0][1],[0][2] - [1][0],[0][1],[0][2] - [2][0],[0][1],[0][2]

    [0][0],[1][1],[0][2] - [0][0],[2][1],[0][2]

    [0][0],[0][1],[1][2] - [0][0],[0][1],[2][2]

    [1][0],[1][1],[1][2] - [2][0],[1][1],[1][2]

    [1][0],[2][1],[1][2]

    [1][0],[1][1],[2][2]

    [2][0],[2][1],[2][2]

    which in human terms, means:

    1,4,7 - 2,4,7 - 3,4,7

    1,5,7 - 1,6,7

    1,4,8 - 1,4,9

    2,5,8 - 3,5,8

    2,6,8

    2,5,9

    3,6,9

    I can't find how to loop this. Do you have any ideas?

    (using python)

    Thank you

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

    Is there some way to regex the web? To grep the web? To perform actual advanced searches?

    Posted: 17 Jan 2021 09:05 AM PST

    Keywords, quotes, etc., just aren't doing it for me. I am sick of getting the same propaganda every time I want to perform an existential search.

    Maybe it's my search skills... like recently I wanted to look up the caste system in the US. All the articles I found made it a race issue, which is fine, because that is still apparent, but I could not find an article explaining the caste system and poverty. Poverty is not a race issue. There are poor whites. I wanted a deeper explanation of how poverty and the US caste system are linked.

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

    Could this be profitable?

    Posted: 17 Jan 2021 04:21 PM PST

    Say i develop a good looking and easy to use WPF Point of Sale app for restaurants, how likely it is for anyone to buy it? or a hotel management system in WPF, can anyone make money of that?

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

    Embedded System Programming

    Posted: 17 Jan 2021 07:35 AM PST

    Hello, I'm a computer engineering student; I've worked on a few projects and written code for simple microcontrollers like the Arduino, STM32. However, I feel in order to be a "good" computer engineer I need to know how each library operates or how each component of a microcontroller works. How do I get better at understanding what my code is doing physically in the microcontrollers ?

    Also, with IDE's making things so much abstract; how do I learn to code, upload and deploy with me doing most of the work (making make files and such). Any thing / recommendation for someone who does not know where to start?

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

    Android, Java. Why do I need to call methods from within onCreate?

    Posted: 17 Jan 2021 02:37 PM PST

    Probably a dumb question

    public class MyActivity extends BaseActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_activity); createButtons(); shuffle(); } public void createButtons(){ /// } public void shuffle(){ /// } } 

    I need to call createButtons() and shuffle() otherwise they don't work.

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

    Needed some help figuring out how to make an algorithm for scheduling store purchases and deliveries

    Posted: 17 Jan 2021 09:26 AM PST

    So I have a Python based task in which I have to purchase products and deliver them to 7 households over the period of a week. There's a list of products in a CSV and each product has stores that they are available in e.g A, B and C. With this there are some constraints like, can't use dicts or any external libraries except for csv, and we can only visit one store per day.

    What I'm looking for some help with is what the most efficient way given these constraints that you can purchase these products and then schedule deliveries for the houses? I thought of splitting the houses by the majority of shops that the products are in to do as many as possible. But it seems incredibly inefficient when it comes to checking which households are ready to be delivered to to have to filter through every single product that would have so far been purchased and making sure they match what's meant to be purchased for each household.

    I think I'm probably over complicating this but I can't seem to figure it out. Any advice would be appreciated. TY!

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

    I need some help with an asignment that i haven't started yet

    Posted: 17 Jan 2021 04:54 PM PST

    I am an mech engeneering student who took on a subject from a different course "programming and microcontroller". It has been fun so far but the pressure from the other subjects has let this one a little low. Now i have an upcoming asigment in which i have to create a working project with HvA XmegLite, in the Language C in Xmega style. The program used is Atmel studios aka Microcontroller studios.

    Now i didn't really put as much effort in the asigment becuase of work pressure, so i ask this subs help to any extent, if you know a project i can do, a site for help, any help is welcome.

    I put the parts list and criteria of the asignment below.

    Components:

    HvA XmegaLite 1

    Lightsensor 1

    Accelerometer 1

    Potmeters-Single 2

    Breadboard 1

    Wirejumperset 1

    10-wire male female 1

    Usb cable 1

    Servomotor 1

    Pushbutton 4

    Resistor 10k 4

    Resistor 5k6 2

    Resistor 4k7 4

    Resistor 220R 4

    Rode led 4

    Capacitor Ceramic 100nF 4

    Elco 470uF 1

    Criteria:

    Use the HvA-Xmegaboard with the Xmega256a3u

    You use the externe oscillator for a systemclock and the frequentie must be 32 MHz

    Next to that use minimally 3 special Feature like:

    SPI, I2C, UART, ADC, DAC, analog comparator, timers, RTC, graphic

    display, interrupts, etc

    For the code use C in the Xmega-style.

    The project can't be a copy of the book asignments, from a presentation, from the internet or ealier presented projects.

    U will use a a breadboard, but u can also make you're own pcb.

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

    Curve_fit issues (python)

    Posted: 17 Jan 2021 05:36 AM PST

    Hi all. I am trying to fit a set of datas with the following equation:

    y= c_0 * x^{c_1}

    Using the following script:

    X = pd.read_csv('fitdatas.txt') #containing x and y columns def func(x, c_0, c_1): return c_0 *math.pow(x, c_1) guess=[0.1,-0.6] x_test=[array_of_x_values] n=len(x_test) q=np.empty(n) for i in range(n): q[i]= func(x_test[i],guess[0],guess[1]) plt.plot(X['x'] , X['y'], color='b') plt.plot(x_test , q, color='r') #plt.show() #comparison between plots #fit step x = X['x'].values y = X['y'].values c,cov = curve_fit(func,x,y,guess) print(c) 

    When using a different function (exp, polynomial, sine etc.) the script works fine, but with x^{c_1} it gives the following:

     File "/Users/Desktop/Fit", line 30, in <module> c,cov = curve_fit(func,Length,Temp,guess) File "/usr/local/lib/python3.9/site-packages/scipy/optimize/minpack.py", line 784, in curve_fit res = leastsq(func, p0, Dfun=jac, full_output=1, **kwargs) File "/usr/local/lib/python3.9/site-packages/scipy/optimize/minpack.py", line 410, in leastsq shape, dtype = _check_func('leastsq', 'func', func, x0, args, n) File "/usr/local/lib/python3.9/site-packages/scipy/optimize/minpack.py", line 24, in _check_func res = atleast_1d(thefunc(*((x0[:numinputs],) + args))) File "/usr/local/lib/python3.9/site-packages/scipy/optimize/minpack.py", line 484, in func_wrapped return func(xdata, *params) - ydata File "/Users/Desktop/Fit", line 16, in func return C *math.pow(L, alpha)*(-1) TypeError: only size-1 arrays can be converted to Python scalar 

    My first take would be that the math.pow() function requesting to be fed a scalar instead of the array I am using, but I am unsure on how to fix it. Does anyone know what changes should I do to make this type of fit?

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

    Is this bad programming, who to contact?

    Posted: 17 Jan 2021 01:04 PM PST

    Hi!

    Trying to schedule an appointment on a website, with a date and time listed but, the following message is given:

    failed to lazily initialize a collection of role: com.qmatic.qp.calendar.model.ResourceGroup.resources, could not initialize proxy - no Session

    The appointments are vital so, I want to contact someone to ensure that customers are given accurate information. Without having to contact the actual agency and hoping that they are competent enough to transfer me to the correct people or to relay the message, would contacting the webmaster be the way to go? How do I determine the webmaster, if it is?

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

    Is this approach to creating a hexagon-shaped grid of hexagons inefficient? Can you suggest an improvement?

    Posted: 17 Jan 2021 05:14 AM PST

    I've spent some time (more than I'd like to admit) today on trying to create a grid of hexagons which takes the shape of a larger hexagon. I'm beginning to feel that my solution is too complicated and there is some easier way to do this, but not sure. This is how i'm approaching it:

    • Create a smaller hexagon by calculating the angles of the vertices and drawing a line to each(this is easy enough).
    • Place a central hexagon
    • Create a hexagon "ring", by calculating the vertices, and after each vertex (depending on the ring size), calculate the forward heading of that vertex, and place the next hexagon 1 width away along that forward heading until the next vertex is reached.
    • Do this iteratively until all hexagon rings are created and the grid is made.

    Any advice on how the logic here could be improved?

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

    Pymongo distinct() question

    Posted: 17 Jan 2021 12:40 PM PST

    Long shot, but does anyone know why a call to collection.distinct('field') would not return all results? I'm getting 5 fields in the response, and I know from inspecting the data that there should be thousands.

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

    How do you get back in 'the flow'?

    Posted: 17 Jan 2021 12:33 PM PST

    Haven't you been in the situation, where you come back from a vacation and you would not want to do anything thinking related, cause you were so used to calmness and peace of mind?

    It's no secret our minds are lazy by default and will avoid thinking where possible, therefore, in order to be productive again, you have to kick-start your mind to get back in 'the flow'.

    This state is best cited by Daniel Kahneman:

    "A state of effortless concentration so deep that they lose their sense of time, of themselves, of their problems."

    What are your most effective methods on getting back into this 'productive mindset' again after longer periods of rest?

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

    What's your main browser for development?

    Posted: 17 Jan 2021 12:33 PM PST

    When it comes to development, the browser choice is obviously as important as a properly configurated code editor and terminal.

    I'm on Chrome and still find dev experience best on it. I've read more and more people switching to Firefox and Brave, tho.

    What is your current weapon of choice and why?

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

    No comments:

    Post a Comment