Dump your code and share it

Codedump.io let's you dump code and share it with anyone you'd like.

Jquery ajax error callback is executed even though the response http status is 200

Javascript
I have written simple ajax code, in success callback I have written an alert but it does not work. The code is: $(".change_forex_transaction_status...
3 minutes ago

Setting focus to a textbox when a function is called

Javascript
I currently have a textbox in my aspx: <input type="text" id="myTextbox" value="" /> I was wondering if I could set the focus (put my curso...
3 minutes ago

How to apply CSS styles to content rendered after AJAX call

Javascript
I'm writing an app which grabs a bunch of JSON data via AJAX, then renders the view which is constructed from the same data in an es6 template literal...
4 minutes ago

How to get exact match keyword from the given string using java?

Java
I'm trying to match exact AdvanceJava keyword with the given inputText string but it executes both if and else condition,instead of I want only Advanc...
4 minutes ago

What is singleton pattern?Why and When should I use it?

Java
I am a one and half year experienced java developer. My question is :What is singleton? It seems that I never use it in my project(Java web,Spring boo...
4 minutes ago

Query with column called "date" in SQL Anywhere 11

Java
I have a table on a SQL Anywhere 11 DB where one of the columns is called "date". I am using jconnect JDBC drivers to connect to the DB from my Java c...
4 minutes ago

Error while reading blob (binary) data from mongodb using Java

Java
Am not able read blob (binary) record from MongoDB, am using Java 3.4.2 driver. BasicDBObject whereClause = new BasicDBObject(); List<Basi...
4 minutes ago

Is it possible to use Digest-Authentication with a XMLHTTPRequest?

HTTP
I have a simple question: Is it possible to use Digest-Authentication with a XMLHTTPRequest? If the answer is no, what's the technical reason? Or if...
7 minutes ago

Python 2.7 urllib2 raising urllib2.HTTPError 301 when hitting redirect with xml content

HTML
I'm using urllib2 to request a particular S3 bucket at hxxp://s3.amazonaws.com/mybucket. Amazon sends back an HTTP code of 301 along with some XML da...
7 minutes ago

DropDown SubMenu In Bootstrap Doesn't Work

HTML
I need help in making this dropdown works. When i clicked the "Program" menu, it should show the dropdown submenu. I put some codes in it but it doesn...
7 minutes ago

which takes the text thats is input in the inputbox in html and display it below as a clickable option.

HTML
I am working on a project, which takes the text that is input in the inputbox and display it below as a clickable option/button in html. Is it possibl...
7 minutes ago

Is it possible to get the list of SonarQube groovy rules

Groovy
Is it possible to get the list of groovy rules the way we can get java sonar rules via https://sonarcloud.io/api/rules/search?languages=java webservic...
8 minutes ago

How do I upload a few simple code files to a GitHub repository?

Git
The company I am applying to asked me to send the samples via GitHub, which I have never used. The documentations seem overwhelming with lots of thing...
9 minutes ago

Ionic: How is it possible to change the width of $ionicPopup?

CSS
I'm trying to change the width of $ionicPopup; I've tried using the following css code, to import it onto cssClass: my-popup: .my-popup { width...
10 minutes ago

OpenCV, how to use arrays of points for smoothing and sampling contours?

C++
I have a problem to get my head around smoothing and sampling contours in OpenCV (C++ API). Lets say I have got sequence of points retrieved from cv:...
11 minutes ago

event when the scroll bars appear C#

C#
How can you detect "EXACTLY" when the scroll bar appears, in a UserControl? perhaps an event or something?
12 minutes ago

Row_number over (Partition by yyy) in Linq?

C#
I'm very new to LINQ and one of my first attempts at using it had to be super complicated! I am trying to adapt the accepted answer in this Stack Ove...
12 minutes ago

The remote server returned an error: NotFound. Silverlight + WCF

C#
I'm trying to call web service for few hours. I have added clientaccesspolicy.xml: <?xml version="1.0" encoding="utf-8"?> <access-policy>...
12 minutes ago

Node JS - MongoDB - findAndModify is upating wrong object

AngularJS
I have an issue in findAndModify method, I am trying update one record but it is always updating first record in the db. AngularJS call: $http.put(...
17 minutes ago

Adding Seek bar to android video player

Android
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URL...
17 minutes ago

I have two buttons in one activity, if first button is pressed then two buttons from another activity should be disabled

Android
I have two buttons "Employee" and "Employer" in an activity named "Selection", if "Employee" button is pressed then two buttons "addEmployee" and "gen...
17 minutes ago

How to return count if column values conatains specific string in it

SQL
I have one table which have 20 different columns, 4 of which are used to store image names. e.g. img01 = abcdef_X img02 = jklmno img03 = tuvxys_X im...
23 minutes ago

SQL Server error login failed for user

SQL
i had installed sql on local system nad no problem , but now my system join to domain i cannot connect to sql server with no user. details error below...
23 minutes ago

Inject configuration value in play framework using Guice

Scala
I have play web application with conf/application.conf (nothing unusual). Guice is used for dependency injection. How can property value be injected i...
25 minutes ago

Adding class selector after pseudo selector in css

Sass (Sass)
Can I add a class selector after a pseudo class in my CSS rule, e.g: a:hover.my-class { background: red; } So if I hover over my anchor tag, &l...
25 minutes ago

Want to see more codedumps? Browse the complete list or start to dump your own code.