Tag: c

56 votes
17 answers
3K views
jQuery Ajax POST example with PHP

I am trying to send data from a form to a database. Here is the form I am using: <form name="foo" action="

avatar
Rudolf
0 1 0 9
asked 07 September, 2021
57 votes
22 answers
1.3K views
Wait until all jQuery Ajax requests are done?

How do I make a function wait until all jQuery Ajax requests are done inside another function? In short, I ne

avatar
Alphonso
0 1 0 9
asked 07 September, 2021
53 votes
21 answers
2.2K views
jQuery Ajax error handling, show custom exception messages

Is there some way I can show custom exception messages as an alert in my jQuery AJAX error message? For examp

avatar
Cortez
0 1 0 9
asked 07 September, 2021
55 votes
26 answers
2.9K views
jQuery Ajax File Upload

Can I use the following jQuery code to perform file upload using POST method of an ajax request ? $.ajax({

avatar
Percy
0 1 0 9
asked 07 September, 2021
60 votes
24 answers
2.4K views
How to make an AJAX call without jQuery?

How to make an AJAX call using JavaScript, without using jQuery?

avatar
Jefferey
0 1 0 9
asked 07 September, 2021
63 votes
16 answers
1.9K views
Ajax request returns 200 OK, but an error event is fired instead of success

I have implemented an Ajax request on my website, and I am calling the endpoint from a webpage. It always retu

avatar
Venice
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
352 views
Scroll to bottom of div?

I am creating a chat using Ajax requests and I'm trying to get messages div to scroll to the bottom witho

avatar
Fabian
0 1 0 9
asked 07 September, 2021
59 votes
20 answers
2K views
jQuery AJAX submit form

I have a form with name orderproductForm and an undefined number of inputs. I want to do some kind of jQuery.

avatar
Keith
0 1 0 9
asked 07 September, 2021
56 votes
25 answers
1.8K views
Is Safari on iOS 6 caching $.ajax results?

Since the upgrade to iOS 6, we are seeing Safari's web view take the liberty of caching $.ajax calls. Thi

avatar
Luis
0 1 0 9
asked 07 September, 2021
51 votes
15 answers
1.4K views
How to manually send HTTP POST requests from Firefox or Chrome browser

I want to test some URLs in a web application I'm working on. For that I would like to manually create HT

avatar
Tana
0 1 0 9
asked 07 September, 2021
61 votes
30 answers
781 views
Disable same origin policy in Chrome

Is there any way to disable the Same-origin policy on Google's Chrome browser?

avatar
Thurman
0 1 0 9
asked 07 September, 2021
57 votes
6 answers
2.3K views
How is set() implemented?

I've seen people say that set objects in python have O(1) membership-checking. How are they implemented i

avatar
Dusty
0 1 0 9
asked 07 September, 2021
55 votes
20 answers
2.9K views
How to print binary tree diagram in Java?

How can I print a binary tree in Java so that the output is like: 4 / \ 2 5 My node: public cla

avatar
Alba
0 1 0 9
asked 07 September, 2021
59 votes
3 answers
1.6K views
How does the HyperLogLog algorithm work?

I've been learning about different algorithms in my spare time recently, and one that I came across which

avatar
Serina
0 1 0 9
asked 07 September, 2021
59 votes
14 answers
2.2K views
Get keys from HashMap in Java

I have a Hashmap in Java like this: private Map<String, Integer> team1 = new HashMap<String, Integer

avatar
Daniel
0 1 0 9
asked 07 September, 2021
61 votes
6 answers
2.1K views
How are multi-dimensional arrays formatted in memory?

In C, I know I can dynamically allocate a two-dimensional array on the heap using the following code: int** s

avatar
Georgie
0 1 0 9
asked 07 September, 2021
50 votes
6 answers
3K views
Why should I use Deque over Stack?

I need a Stack data structure for my use case. I should be able to push items into the data structure and I on

avatar
Omar
0 1 0 9
asked 07 September, 2021
63 votes
4 answers
2.3K views
Why do we use arrays instead of other data structures?

As I was programming, I haven't seen an instance where an array is better for storing information than an

avatar
Roger
0 1 0 9
asked 07 September, 2021
60 votes
6 answers
2.1K views
Why is std::map implemented as a red-black tree?

Why is std::map implemented as a red-black tree? There are several balanced binary search trees (BSTs) out th

avatar
Venice
0 1 0 9
asked 07 September, 2021
50 votes
30 answers
2.9K views
Array versus linked-list

Why would someone want to use a linked-list over an array? Coding a linked-list is, no doubt, a bit more work

avatar
Chaya
0 1 0 9
asked 07 September, 2021