Categories
Development

python functions and passing variables [closed]

def func(f_m,T,l): c_t = np.empty([f_m.shape[1],]) c_t_0 = 0 for t in range(T): for i in range(f_m.shape[0]): t, t_0 = p(f_m[i,:], l[i], c_t, c_t_0) c_t_0 = t_0 c_t = t return t, t_0 Where: def p( f_v: object, l: object, c_t: object, c_t_0: object) -> object: if l*(np.add(np.dot(c_t, f_v), c_t_0)) <= pow(10,-6): t = c_t + […]

Categories
Development

Errors in Here maps. How they can be fixed?

Do you know any possibility to fix a wrong route indicator (properties) by yourself? It takes long time to have an error on map corrected by Here support. For example, we get a wrong route from Berttyoujfalu (Hungary) – to Oradea (Romania) See attached pictures The problem is a wrong indicator, please see detailed pictures. […]

Categories
Development

How to convert a list of tuples to a csv file

Very new to programming and was trying to create an amortization table. Found some great questions and answers on here, but now I am stuck trying to convert the results into a csv file. from datetime import date from collections import OrderedDict from dateutil.relativedelta import * import csv def amortization_schedule(rate, principal, period): start_date=date.today() #defining the […]

Categories
Development

How to connect to yugabyte db using LibPQ in julia?

I am trying to generate insert load for yugastore.users table of yugabyte db using the following scrpt. I am able to successfully connect and execute on built in postgresql server but couldn’t connect to yugabyte db from client using LibPQ in julia. Code: using LibPQ, DataStreams, DataFrames, Dates, Random; global fnames = [“Oliver”, “Jake”, “Noah”, […]

Categories
Development

Need to add to my grocery list using Javascript

I have been working on list that propagates the browser with a grocery list that is created in my Javascript file using an object and in calculates the total of the list and the price. The problem that I am running into is the additional function that I want to add on in which you […]

Categories
Development

How To Refresh Chat using ajax

I’m implementing text chat based on twilio api ,I have function that loads the chat on click,after the click when i setInterval to refresh the chat,I have two problems first is that the setinterval gets called before the content is loaded ,and after five calls the function misbehave,also when i click on another li the […]

Categories
Development

c++ Creating a function thatt will alphabetize based on the first letter

I’m trying to create a program that will alphabetize names just based on the first letter using input/output files. #include <iostream> #include <fstream> #include <string> #include <algorithm> using namespace std; const int SIZE = 50; void writeletter(string names[], int size, char letter, ostream& out); int main() { ifstream in; ofstream o; string n[SIZE]; int s=0; […]

Categories
Development

How to upload files and display them as list item?

So I have a webpage that has Downloadable books and I just added an option to upload books to my server but I want so when they upload the file it to display on the main page. Heres my code. main page where I want my uploaded files to display <html> <head> <title>Book Store</title> <link […]

Categories
Development

How to make so people can upload files to my website and display them?

How to make so people can upload files to my website and display them, for example, I want people to be able to upload books like archive.org. FYI I do not know PHP. Heres my code <html> <head> <title>Book Store</title> <link rel=”shortcut icon” href=”logo2.ico” /> <link href = “style1.css” type = “text/css” rel = “stylesheet” […]

Categories
Development

How to click on a dynamically created link to then create a new dynamic page from that link?

I wrote an custom API(node.js app) that gets the info about the blogs from medium.com, right now there is the author/main pic of the article, title, link to the article on medium.com(redundant), the entire article text, in the JSON output. Sample API/JSON: { “img”: [ “https://upload.wikimedia.org/wikipedia/commons/4/42/Blog_%281%29.jpg” ], “title”: [ “The old and the new or […]