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
import 'package:flutter/material.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import 'package:infinite_bloc_example/bloc/pagination_bloc.dart'; | |
import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; | |
import 'model/ItemModel.dart'; | |
class ScreenMain extends StatefulWidget { | |
const ScreenMain({super.key}); |
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
@With(Compress.class) | |
public class Application extends Controller { | |
public static void index() { | |
render();//response will be gzipped | |
} | |
} |
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
extension UIViewController { | |
class func loadFromNib<T: UIViewController>() -> T { | |
return T(nibName: String(describing: self), bundle: nil) | |
} | |
} | |
let vc : OfferDetailViewController = OfferDetailViewController.loadFromNib() |
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
numLines = textView.contentSize.height/textView.font.lineHeight |
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
+ (NSDateFormatter*)getRelativeDateFormatter{ | |
NSDateFormatter* df = [NSDateFormatter new]; | |
df.dateStyle = NSDateFormatterShortStyle; | |
df.timeStyle = NSDateFormatterShortStyle; | |
df.doesRelativeDateFormatting = YES; | |
return df; | |
} |
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
#define MAP_PADDING 2.5 | |
#define MINIMUM_VISIBLE_LATITUDE 0.01 | |
- (void)zoomToAnnotations:(NSArray*)annotationArray{ | |
if (annotationArray.count>0) { | |
CGFloat maxLongitude = -180; | |
CGFloat maxLatitude = -90; | |
CGFloat minLongitude = 180; | |
CGFloat minLatitude = 90; |
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
OS_ACTIVITY_MODE = disable |
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
- (void)viewWillDisappear:(BOOL)animated { | |
[super viewWillDisappear:animated]; | |
NSArray *viewControllers = self.navigationController.viewControllers; | |
if (viewControllers.count > 1 && [viewControllers objectAtIndex:viewControllers.count-2] == self) { | |
// View is disappearing because a new view controller was pushed onto the stack | |
NSLog(@"New view controller was pushed"); | |
} else if ([viewControllers indexOfObject:self] == NSNotFound) { | |
// View is disappearing because it was popped from the stack | |
NSLog(@"View controller was popped"); | |
} |
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
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/ |
NewerOlder