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.ex_alarmService_1; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
public class AlarmReceiver extends BroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent arg1) { |
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.iceskysl.TestServiceHolder; | |
import android.app.Activity; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.ServiceConnection; | |
import android.os.Bundle; | |
import android.os.IBinder; | |
import android.view.View; |
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.iceskysl.TestServiceHolder; | |
import android.app.Notification; | |
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.app.Service; | |
import android.content.Intent; | |
import android.os.Binder; | |
import android.os.IBinder; | |
import android.util.Log; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.iceskysl.TestServiceHolder" | |
android:versionCode="1" | |
android:versionName="1.0.0"> | |
<application android:icon="@drawable/icon" android:label="@string/app_name"> | |
<activity android:name=".TestServiceHolder" | |
android:label="@string/app_name"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<TextView android:layout_width="fill_parent" | |
android:layout_height="wrap_content" android:text="@string/hello" /> | |
<Button android:id="@+id/start_service" android:layout_width="fill_parent" | |
android:layout_height="wrap_content" android:text="Start Service" /> |
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.yobo.iceskysl; | |
import java.net.URL; | |
import javax.xml.parsers.SAXParser; | |
import javax.xml.parsers.SAXParserFactory; | |
import org.xml.sax.InputSource; | |
import org.xml.sax.XMLReader; | |
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
desc 'Lists ActionController::StatusCodes::STATUS_CODES like routes' | |
task :status_codes => :environment do | |
puts "Status - Name" | |
ActionController::StatusCodes::STATUS_CODES.to_a.sort.each { |code, message| | |
puts "#{code} - #{message.gsub(/ /, "").underscore.to_sym}" | |
} if ActionController::StatusCodes.constants.include?('STATUS_CODES') | |
end |
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 'open-uri' | |
# == Feed me with: | |
# | |
# Filename:: and I'll give you the file! | |
# URL:: and I'll give you the content! | |
# Any string:: and I'll give you a StringIO! | |
# An integer:: and I'll give you the stream for | |
# the given integer file descriptor! | |
# Any IO:: and I'll give you the same IO! |
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
def show | |
@auction = Auction.find(params[:id]) | |
@user = User.find(params[:user_id]) | |
end |
NewerOlder