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($, window, undefined){ | |
var requests = {} | |
$.fn.loadContent = function(url, opts){ | |
/* | |
* | |
* Customization | |
* |
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 com.raulete.dev.stretchvideoview.utils; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.VideoView; | |
public class StretchVideoView extends VideoView { | |
public StretchVideoView(Context context) { | |
super(context); | |
} |
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
// Call from a Context(e.g. an Activity) | |
public void openTargetActivity(){ | |
startActivity(new Intent(this, TargetActivity.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
(function(msg){ | |
console.log(msg); | |
})("42"); |
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
// Método para cambiar estilos a la última palabra | |
private Spannable highlightLastWordOfSentence(String sentence, int backgroundColor, int foregroundColor){ | |
int startIndexOfLastWord = sentence.lastIndexOf(" ") + 1; | |
int endIndexOfLastWord = sentence.length(); | |
SpannableStringBuilder spannable = new SpannableStringBuilder(sentence); | |
BackgroundColorSpan backgroundSpan = new BackgroundColorSpan(backgroundColor); | |
spannable.setSpan(backgroundSpan, startIndexOfLastWord, endIndexOfLastWord, Spannable.SPAN_INCLUSIVE_INCLUSIVE); | |
ForegroundColorSpan foregroundSpan = new ForegroundColorSpan(foregroundColor); |
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
<?php | |
require_once(CORE_PATH . 'Cake/Model/ConnectionManager.php'); | |
class ExampleTestData extends CakeTestSuite { | |
public static function suite() { | |
self::loadDB(); | |
$suite = new CakeTestSuite('Name Of The Suite'); | |
$suite->addTestDirectory(TESTS . 'Case' . DS . 'Sample'); | |
return $suite; |
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
public class Calculator { | |
public static String[][] values = { | |
{ "CM", "DCD" }, | |
{ "M", "DD" }, | |
{ "CD", "CCCC" }, | |
{ "D", "CCCCC" }, | |
{ "XC", "LXL" }, |
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
# Source : http://thezinx.com/2013/10/29/create-bootable-dmg-iso-mavericks-app.html | |
# Mount the installer image | |
hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
# Convert the boot image to a sparse bundle | |
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Mavericks | |
# Increase the sparse bundle capacity to accommodate the packages | |
hdiutil resize -size 8g /tmp/Mavericks.sparseimage |
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
// No DI | |
public class Car{ | |
private Motor motor; | |
public Car(){ | |
motor = new ElectricMotor(); | |
} | |
} |
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
<?php | |
$this->University->Behaviors->load('Containable'); | |
$containArray = array( | |
'Course' => array( | |
'Group' => array( | |
'Studen' => array( | |
'Marks' | |
) | |
) | |
) |
OlderNewer