This file contains 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
function jquery_lazy_load_ready() { | |
$placeholdergif = plugins_url('images/grey.gif', __FILE__); | |
echo <<<EOF | |
<script type="text/javascript"> | |
jQuery.noConflict(); | |
jQuery(document).ready(function($){ | |
if (navigator.platform == "iPad") return; | |
jQuery("img").not(".cycle img").lazyload({ | |
effect:"fadeIn", | |
placeholder: "$placeholdergif" |
This file contains 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
var getCarrier = function() { | |
var carrier = Ti.App.Properties.getString('carrier', null); | |
if (carrier == null) { | |
var sim = require('hogehoge.android.simoperatorname'); | |
carrier = sim.getSimOperatorName(); | |
Ti.App.Properties.setString('carrier', carrier); | |
} | |
return carrier; | |
} |
This file contains 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 hogehoge.android.simoperatorname; | |
import org.appcelerator.kroll.KrollModule; | |
import org.appcelerator.kroll.annotations.Kroll; | |
import org.appcelerator.titanium.TiApplication; | |
import org.appcelerator.kroll.common.Log; | |
import org.appcelerator.kroll.common.TiConfig; | |
import android.app.Activity; |
This file contains 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
/** | |
* Handle dynamic method calls on the model. | |
* | |
* @param string $method | |
* @param array $parameters | |
* @return mixed | |
*/ | |
public function __call($method, $parameters) | |
{ |
This file contains 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
$user = User::where('email', '=', $email)->get(); |
This file contains 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
/** | |
* Dynamically handle static method calls on the model. | |
* | |
* @param string $method | |
* @param array $parameters | |
* @return mixed | |
*/ | |
public static function __callStatic($method, $parameters) | |
{ | |
$model = get_called_class(); |
This file contains 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
#include <LiquidCrystal.h> | |
#include <RCS620S.h> | |
#define COMMAND_TIMEOUT 400 | |
#define POLLING_INTERVAL 500 | |
#define LED_PIN 13 | |
LiquidCrystal lcd = LiquidCrystal(5, 6, 7, 8, 9, 10, 11); | |
RCS620S rcs620s; | |
This file contains 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
// 修正前 | |
#include "WProgram.h" | |
// 修正後 | |
#include "Arduino.h" |
This file contains 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
#include <LiquidCrystal.h> | |
LiquidCrystal lcd = LiquidCrystal(5, 6, 7, 8, 9, 10, 11); | |
void setup() { | |
lcd.print("Hello World"); | |
} | |
void loop() { | |
} |
This file contains 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
/** | |
* センサーの取得値の更新 | |
*/ | |
@Override | |
public void onSensorChanged(SensorEvent event) { | |
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { | |
float x = event.values[0]; | |
float y = event.values[1]; | |
float z = event.values[2]; | |
Log.d(TAG, "x:" + x + ":y:" + y + ":z:" + z); |