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
/* | |
* Copyright (C) 2008 The Android Open Source Project | |
* Copyright (C) 2017 Benoit Touchette (Draekko RAND) | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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/scheduler.dart'; | |
void main() => runApp(const MyApp()); | |
const sampleText = ''' | |
عد أسابيع من الشد والجذب، منح الاتحاد الأوروبي أخيراً الاثنين موافقته على استثناء السيارات التي تعمل بالوقود التركيبي من الحظر الذي يعتزم تطبيقه على بيع السيارات ذات محركات الاحتراق بحلول عام 2035، بعد رفع ألمانيا تحفظها عن النسخة الأولى من ورقة الاتفاق. | |
وعارضت برلين بشدة هذا الحظر، تخوفاً من أن تقضي السياسات البيئية الأوروبية على صناعة السيارات الألمانية. فيما يعد قرار الاتحاد الأخير أول اعتراف سياسي بالوقود التركيبي مصدر طاقة أخضر، بعدما دافع عن حياده الكربوني عدد من الخبراء والمهندسين المختصين. | |
ما الوقود التركيبي؟ | |
يعد الوقود التركيبي، كالبنزين التركيبي والكيروسين التركيبي والميثان التركيبي، وقوداً غير أحفوري. بل يُصنَّع عن طريق تجميع انبعاثات ثاني أكسيد الكربون وأحادي أكسيد الكربون التي التُقطت في الجو، والهيدروجين الأخضر المنتَج باستخدام كهرباء متجددة أو خالية من الانبعاثات. |
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 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/scheduler.dart'; | |
void main() => runApp(const MyApp()); | |
const sampleText = ''' | |
عد أسابيع من الشد والجذب، منح الاتحاد الأوروبي أخيراً الاثنين موافقته على استثناء السيارات التي تعمل بالوقود التركيبي من الحظر الذي يعتزم تطبيقه على بيع السيارات ذات محركات الاحتراق بحلول عام 2035، بعد رفع ألمانيا تحفظها عن النسخة الأولى من ورقة الاتفاق. | |
وعارضت برلين بشدة هذا الحظر، تخوفاً من أن تقضي السياسات البيئية الأوروبية على صناعة السيارات الألمانية. فيما يعد قرار الاتحاد الأخير أول اعتراف سياسي بالوقود التركيبي مصدر طاقة أخضر، بعدما دافع عن حياده الكربوني عدد من الخبراء والمهندسين المختصين. |
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 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/scheduler.dart'; | |
void main() => runApp(MyApp()); | |
const sampleText = ''' | |
Flutter is an open-source UI software development kit created by Google. | |
It is used to develop applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia,[4] and the web from a single codebase.[5] |
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
/** | |
* AvenirNextFontType collects all available fonts in the Avenir Next family. To be used with [UIFont(AvenirNext) avenirNextFontOfType:size:] | |
*/ | |
typedef NS_ENUM(NSUInteger, AvenirNextFontType) | |
{ | |
/** | |
* Font named AvenirNext-Regular. |
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 UIKit | |
class demoViewController: UIViewController, UIPopoverPresentationControllerDelegate { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
} | |
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
func captureScreen() -> UIImage { | |
let layer: CALayer = UIApplication.sharedApplication().keyWindow!.layer | |
let scale: CGFloat = UIScreen.mainScreen().scale | |
UIGraphicsBeginImageContextWithOptions(layer.frame.size, layer.opaque, scale) | |
layer.renderInContext(UIGraphicsGetCurrentContext()) | |
let image = UIGraphicsGetImageFromCurrentImageContext() | |
UIGraphicsEndImageContext() | |
return image | |
} |
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
// | |
// ViewController.swift | |
// SideMenu | |
// | |
// Created by Burhan Aksendir on 9.07.2015. | |
// Copyright (c) 2015 Aksendir. All rights reserved. | |
// | |
import UIKit |
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
let gearTitle = NSString(string: "\u{2699}") as String | |
let fontStyle = [NSFontAttributeName: UIFont(name: "Avenir Next", size: 27)!] | |
let settingsButton = UIBarButtonItem(title: gearTitle, style: UIBarButtonItemStyle.Plain, target: self, action: Selector("showSettingsVC:")) | |
settingsButton.setTitleTextAttributes(fontStyle, forState: UIControlState.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
class BookViewController: UIViewController { | |
var book: UIView! | |
var content: NSMutableArray! | |
var currentPage: Int = 0 | |
var font: UIFont! | |
override func viewDidLoad() { |
NewerOlder