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
using System; | |
using Xamarin.Forms.Platform.iOS; | |
using Xamarin.Forms; | |
using UIKit; | |
using System.Diagnostics; | |
[assembly: ExportRenderer(typeof(SearchBar), typeof(Namespace.iOS.Renderers.ExtendedSearchBarRenderer))] | |
namespace Namespace.iOS.Renderers | |
{ |
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
<PackageReference Include="Xamarin.Firebase.Messaging" Version="121.0.1" /> | |
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="117.6.0" /> | |
<PackageReference Include="Xamarin.Google.Dagger" Version="2.27.0" /> <!-- Fixes runtime error class not found --> |
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
using Android.Graphics; | |
using Android.Media; | |
private static Bitmap ExifRotateBitmap(string filePath, Bitmap bitmap) | |
{ | |
if (bitmap == null) | |
return null; | |
var exif = new ExifInterface(filePath); | |
var rotation = exif.GetAttributeInt(ExifInterface.TagOrientation, (int)Orientation.Normal); |
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
from adminsortable.models import Sortable | |
from django.template.defaultfilters import slugify | |
class Project(Sortable): | |
name = models.CharField("Name", max_length=255) | |
slug = models.SlugField(max_length=255, editable=False) | |
def save(self, *args, **kwargs): | |
self.slug = slugify(self.name) | |
super(Project, self).save(*args, **kwargs) |
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
[TestMethod] | |
public async Task SendMessage_Should_SaveData_AndReachPeer() | |
{ | |
IHubProxy proxy1 = await CreateConnectionAndGetProxy(AdminToken); | |
IHubProxy proxy2 = await CreateConnectionAndGetProxy(UserToken); | |
ChatMessageDTO pushedMessage = new ChatMessageDTO(); | |
proxy1.On<ChatMessageDTO>("AddNewMessage", m => pushedMessage = m); | |
ChatMessageEntryDTO message = new ChatMessageEntryDTO |
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
# -*- coding: utf-8 -*- | |
"""Add permissions for proxy model. | |
This is needed because of the bug https://code.djangoproject.com/ticket/11154 | |
in Django (as of 1.6, it's not fixed). | |
When a permission is created for a proxy model, it actually creates if for it's | |
base model app_label (eg: for "article" instead of "about", for the About proxy | |
model). | |
What we need, however, is that the permission be created for the proxy model | |
itself, in order to have the proper entries displayed in the admin. |
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
""" | |
Ejemplo simple de calculadora para IVA e IRPF dada una base imponible | |
""" | |
from colorama import init, Fore, Back, Style | |
init() | |
IVA_PERCENT = 0.21 | |
IRPF_PERCENT = 0.15 | |
CURRENCY = '€' |
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 lba.utils | |
{ | |
import flash.events.IOErrorEvent; | |
import flash.events.OutputProgressEvent; | |
import flash.filesystem.File; | |
import flash.filesystem.FileMode; | |
import flash.filesystem.FileStream; | |
import flash.utils.ByteArray; | |
import org.osflash.signals.Signal; |
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 Core.Utils.ServiceLocation | |
{ | |
public interface ILocator | |
{ | |
function RegisterConstant(value:Object, type:Class):void; | |
function Register(type:Class, contract:Class = null):void; | |
function RegisterSingleton(type:Class, contract:Class = null):void; |
NewerOlder