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.codename1.tests.bglocation; | |
import com.codename1.location.Geofence; | |
import com.codename1.location.Location; | |
import com.codename1.location.LocationManager; | |
import com.codename1.ui.Display; | |
import com.codename1.ui.Form; | |
import com.codename1.ui.Label; | |
import com.codename1.ui.plaf.UIManager; |
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.codename1.tests.bglocation; | |
import com.codename1.location.Geofence; | |
import com.codename1.location.Location; | |
import com.codename1.location.LocationManager; | |
import com.codename1.ui.Display; | |
import com.codename1.ui.Form; | |
import com.codename1.ui.Label; | |
import com.codename1.ui.plaf.UIManager; |
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
BackgroundPainter p = new BackgroundPainter(cmp) { | |
@Override | |
public void paint(Graphics g, Rectangle rect) { | |
boolean antiAliased = g.isAntiAliased(); | |
g.setAntiAliased(true); | |
int r = Math.min(rect.getWidth(), rect.getHeight())/2; | |
int x = rect.getX() + rect.getWidth()/2 - r; | |
int y = rect.getY() + rect.getHeight()/2 - r; | |
switch (style) { |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.codename1.test; | |
import com.codename1.contacts.Contact; | |
import com.codename1.contacts.ContactsManager; | |
import com.codename1.ui.Button; |
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 | |
/** | |
* Reference/source: http://stackoverflow.com/a/1464155/933782 | |
* | |
* I want a short alphanumeric hash that’s unique and who’s sequence is difficult to deduce. | |
* I could run it out to md5 and trim the first n chars but that’s not going to be very unique. | |
* Storing a truncated checksum in a unique field means that the frequency of collisions will increase | |
* geometrically as the number of unique keys for a base 62 encoded integer approaches 62^n. | |
* I’d rather do it right than code myself a timebomb. So I came up with this. | |
* |
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 | |
namespace App; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\Str; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Database\Eloquent\Relations\Relation; | |
use Illuminate\Database\Eloquent\Relations\BelongsTo; |
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 | |
use Illuminate\Support\Facades\Log; | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
/** | |
* stream - Handle raw input stream | |
* | |
* LICENSE: This source file is subject to version 3.01 of the GPL license | |
* that is available through the world-wide-web at the following URI: |