Skip to content

Instantly share code, notes, and snippets.

Alfan Nasrulloh alfannas

Block or report user

Report or block alfannas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PracticalAstronomy_JDtoGD.java
public class HelloWorld
{
public static void main(String[] args)
{
PracticalAstronomy astro = new PracticalAstronomy(2455002.25);
double[] date = astro.getGregorianDay();
System.out.print((int)date[0] + " " + (int)date[1] + " " + date[2]);
//will output 2009 6 19.75
}
}
View PracticalAstronomy_GDtoJD.java
public class ShowJulianDay
{
// arguments are passed using the text field below this editor
public static void main(String[] args)
{
PracticalAstronomy astro = new PracticalAstronomy(2009,6,19,18,0,0);
System.out.print(astro.getJulianDay());
}
}
View android-listview-java.java
...
LayoutInflater myinflater = getLayoutInflater();
ViewGroup myHeader = (ViewGroup)myinflater.inflate(R.layout.android_listview_header, listView, false);
TextView tvHeader = (TextView)myHeader.findViewById(R.id.header_textview);
listView.addHeaderView(myHeader);
listView.setAdapter(adapter);
...
View android_listview_header.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.