Categories
Mastering Development

how to upload an image in comments?

i have a small form in my blog detail view and it has a name,last name,email and an image field. the first three work fine but when i add the imagefield in the form, the form wont save from the page but it works from admin page. this is my views.py: def campaign_detail_view(request, id): template_name […]

Categories
Mastering Development

Testing amplify Auth with Jest + Enzyme

I am very new to testing and I finally feel like I’v got the hang of it. However, mocks are still a bit confusing. I am currently testing a signup function and the functions executes up until Auth.signUp. I’m not sure if I need to mock something in my test or if I need it […]

Categories
Development

Need to delete a couple of characters from one column in Pandas Dataframe

I have tried absolutely everything….EVERYTHING to remove just the the Call ,[,] and ‘ from column D. I’ve been on here for hours looking through everything i can about this and nothing works. I’m hoping someone out there can help walk me through it. I’ve tried: .str.replace df.Required_no_Email.replace(“\(“, ‘xxx’, regex=True) df.Required_no_Email.replace(‘\(|\)’, ”, regex=True) df.Required_no_Email.str.strip(‘()’) and […]

Categories
Development

Store Procedure is not Working on IIS Server while working fine on localhost in MVC .net

can someone help me i have created method for getting data from store procedure in this procedure user select month year and district and it will show numbers of user on that district,it is working fine on localhost but when i upload this on Server it is not working properly. [HttpPost] public ActionResult get_Data_with_months(int did, […]

Categories
Development

POST to API from React frontend is not working — Error 400

I’m trying to send data to my Flask API to get data into my database, but I keep getting the following error: OPTIONS /createUser HTTP/1.1″ 400 Reg.js import React, { Component } from ‘react’; class Reg extends Component { constructor() { super(); this.state = { FirstName: ”, LastName: ”, Email: ”, Password: ” } this.Email […]

Categories
Development

Is a Spark RDD deterministic for the set of elements in each partition?

I can’t find much documentation on ensuring partitioning order – i just want to ensure that given a set of deterministic transformations (output rows always the same), partitions always receive the same set of elements if the underlying dataset doesn’t change. Is that possible? It doesn’t need to be sorted: an example would be after […]

Categories
Development

JSON Combine Array with Array of Strings to get a cohesive name value pair

My application is utilizing a 3rd party application to obtain data (Splunk). The output that Splunks api endpoint returns is an Array containing all the row headers and an array of strings containing all the row’s data. For example { “fields”:[ “appID”, “ApplicationName”, “AppOwner”, “AppOwnerID”, “KnownIPS”, “IP Count”, “KnownFIDS”, “FIDCount”, “LastSeen”, “TotalConnections”], “rows”:[ [ “123456”, […]

Categories
Development

Issues with SQL Dynamic Query Based on User Input for Access

I have a table, Contact Info I have a form for user input, frmSearch I have a query that is the subject of my question, frmSearchQuery The table has data about residents which are First, last, phone, email, address, …. And about 25 mixed education and skills. Use Case The idea is that my client […]

Categories
Development

Multi threaded quick sort much slower than expected

Basically I’ve spent several hours researching the best way to implement both a recursive and multi-threaded quick-sort and merge sort (this post is only about quick-sort). My goal in this is to take every logical processor in a given computer and pin them all for maximum quick-sort speed. I took the approach of dividing up […]

Categories
Development

Regular expression with first character in latin is not working. Why? [duplicate]

This question already has an answer here: Why can't I use accented characters next to a word boundary? 5 answers Javascript RegExp + Word boundaries + unicode characters 9 answers Javascript – regex – word boundary (\b) issue 3 answers I have a text where I would like to find different words. The following text […]