Dump your code and share it

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

how to show the grouping the array of objects using angular js

AngularJS
I have the array of object but I don't know how to group by the id as order. I want to show it numerical order like 1,2,3 using ng-repeat $scope.arra...
56 seconds ago

Programmatically change between two resource files

Android
Is there a way to change/pick which of the resource files is being used if you have like colors.xml and colors_inverted.xml and you want Activity A to...
2 minutes ago

EditText content inside ExpandableListView disappear when clicking next ExpandableListView header

Android
I have an edittext inside an expandablelistview item child. Then, I entered a text inside this edittext, but whenever I click other expandablelistview...
2 minutes ago

Why is custom scheme for redirect_uri for facebook login not working?

Android
Answer to the question: facebook redirect_uri set to ios URL Scheme did not solve my problem. Trying to implement Facebook login in Android WebView ...
2 minutes ago

I'm making an app which uses SQLite and when I run it, it crashes

Android
I get this error: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.houman.mymovielist/com.example.houman.mymovielist.Ma...
2 minutes ago

Download Google Play Services JAR

Android
I have been out of touch with Android for considerably long time. Recently I had to develop an Android module for Appcelerator. I need to use the Goog...
2 minutes ago

Android Studio:select a particular word in a string of array

Android
I want to select a particular word in my input and put the selected word into array. EXAMPLE my input : the quick brown fox i want to select the Wo...
2 minutes ago

how to get substring in Android?

Android
I am trying to get last subString from String, As I have a file name tulips.jpg how can I get only .jpg using substring method? I have used: Strin...
2 minutes ago

Get rows from table of last 5 days in IBM DB2 by joining another table

SQL
I have two tables in DB2. table1 ---- sidpk pid -------------------------- 24gsr3 xyz 67sfr9 xyz 67sts8 ...
18 minutes ago

C# change cell value of selected datagridview rows in database

SQL
Hello i want to change the column of all the selected rows in datagridview and database but it is changing all of the data not just the selected rows....
18 minutes ago

Pass input to map lambda as tuple in Scala

Scala
I'm trying to find a concise way of passing the result of zipping two arrays into a map function, ie. one that does not require declaring both the inp...
22 minutes ago

Play Framework: Dependency Inject Action Builder

Scala
since Play Framework 2.4 there is the possibility to use dependency injection (with Guice). Before I used objects (for example AuthenticationService)...
22 minutes ago

Is inject the same thing as reduce in ruby?

Ruby
I saw that they were documented together here. Are they the same thing? Why does Ruby have so many aliases (such as map/collect for arrays)? Thanks a ...
26 minutes ago

could not convert index to appropriate type while attempting to plot weekly ts object in dygraphs

R
I'm trying to create a Holt-Winters forecast from a weekly time series, then plot the original series and forecast using dygraphs. I have 144 weeks o...
32 minutes ago

How to convert a long data frame to a wide data frame with duplicates/triplicates?

R
Consider I have a data frame in long format with three columns. Column x contains the measurements, y the names of the 3 variables, and z contains 2 l...
32 minutes ago

use Anaconda scikit-learn in PostgreSQL 9.5 plpython3u?

Python
I wish to use scikit-learn Python machine learning library inside PostgreSQL plpython3u language functions. The easisest way to install scikit-learn (...
34 minutes ago

Python list changing value outside the loop. Absolutely baffling

Python
So, I was implementing a simple do-while in python. Everything goes as expected, except the moment I exit the while loop, the appended list inexplicab...
34 minutes ago

Trouble parsing XML and getting data into pandas dataframe

Python
I am trying to import data from a XML file that contains breath-by-breath data from an exercise test. the XML structure is as follows (simplified to s...
34 minutes ago

Show and flip image using python

Python
I am trying to encode a String to a QR code. Then show the QR code image on a display using python. Here is my code: import pyqrcode from PIL import...
34 minutes ago

stop loading page selenium as soon as pyqt button is clicked

Python
from selenium import webdriver driver=webdriver.Firefox() driver.get("https://9gag.com")#page that take too much time to load Since this page took t...
34 minutes ago

What causes my code to inflate text file size?

Python
I've written a Python program to go through the text files in a directory and create new versions of each one with added line numbers. Here is the rel...
34 minutes ago

python http client module error / inconsistent

Python
I'm getting the following output 301 Moved Permanently --- when using http.client 200 --- when using requests URL handling "http://i.imgur...
34 minutes ago

pandas dataframe filter to return True for ALL rows. how?

Python
Hi I have a filter 'm' set that is flexible enough to change by me. Sometimes, I want to filter by Car or x_acft_body , or any of the various other fi...
34 minutes ago

Twisted Reactor not restarting in scrapy

Python
I'm trying to run a scrapy spider via a Telegram bot using the python-telegram-bot API wrapper. Using the below code, I can successfully execute the s...
34 minutes ago

In Python how to find the least significant digit

Python
I'm looking for, a hopefully simple way to find, the least significant digit in a number (float or integer). For example: 101 --> 1 101.2 --...
34 minutes ago

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