This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.achartengineexample; | |
import android.graphics.Color; | |
import android.os.Bundle; | |
import android.widget.LinearLayout; | |
import androidx.appcompat.app.AppCompatActivity; | |
import org.achartengine.ChartFactory; | |
import org.achartengine.GraphicalView; | |
import org.achartengine.chart.PointStyle; | |
import org.achartengine.model.XYMultipleSeriesDataset; | |
import org.achartengine.model.XYSeries; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
require 'nokogiri' | |
require 'pp' | |
class WelcomeControllerTest < ActionController::TestCase | |
# Someone currently working in Ruby on Rails or similar should | |
# put these into Ruby gems ktx | |
## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
AChartEngine has a bug. In a Series, such as an XYSeries or TimeSeries, if you set a Stroke, | |
such as myXYRenderer.setStroke(BasicStroke.DASHED), the line appears dashed. But the sample line | |
down in the legend, while the correct color, is not dashed. | |
The fix is to get into LineChart.java and make drawLegendShape() look a little bit like this: | |
*/ | |
public void drawLegendShape(Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, | |
int seriesIndex, Paint paint) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'twitter' | |
# Read https://developer.twitter.com/en/apps/3851951 to get the access | |
# keys for your Twitter account | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = "secret" | |
config.consumer_secret = "secret" | |
config.access_token = "secret" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
Note that assert{ 2.0 }'s assert_xhtml (and .be_html_with) now supersede this Gist! Get them with | |
gem install nokogiri assert2 | |
require 'assert2/xhtml' | |
And see: http://groups.google.com/group/merb/browse_thread/thread/3588d3f75fa0e65c | |
----8<--------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
=begin | |
from_xml{} and convert{} form a light DSL to convert XML | |
(such as to_xml() provides) into a matching new or updated | |
ActiveRecord object model. The DSL provides numerous hooks | |
and optional callbacks to rename and reprocess custom | |
XML, allowing it to range from a direct translation | |
to a complete reinterpretation of the represented objects. |