Quantcast
Are you the publisher? Claim or contact us about this channel


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Showcase


Channel Catalog


Channel Description:

Blog entries categorized under Tips, Tricks and Techniques

(Page 1) | 2 | 3 | .... | 10 | newer

    0 0

    本題に入る前に、近況から。

    7/29(金)は翔泳社様主催のデベロッパーズサミット2016夏で弊社の相蘇とペアで登壇させていただきました。

    弊社製品の紹介とIoTデバイスやビーコンのアプリを少ない工数で実装するライブデモを行ったのですが、心拍計をつけたデモンストレーションでは今回も心拍数が120前後まで上がるという有様で、相変わらず人前でのデモを行う際の緊張状況がバッチリ可視化されてしまいました orz。

     

    なお、心拍計つながりで他のネタを紹介しますが、心拍計とお化け屋敷と組み合わせた「スマートお化け屋敷」というイベントが大阪と沖縄で行なわれているそうです。入場者にIoTデバイスを装着してもらって、どんな場所でどれくらいビビっていたかを可視化してくれるようです。こういうのは実に面白い応用事例ですよね。
    https://www.ntt-west.co.jp/ikouze/obake/

     

    さて、近況はそれくらいにしておきまして、話を戻します。日本で昨年からマイナンバーという仕組みが始まりましたが、番号の発行で使われているチェックデジットのアルゴリズムが入力ミスのチェックに対して十分ではない、という話が一部で話題になっているようです。

    そしてそういう話題の中で「実装がシンプルで、かつチェックデジットとしても優れている Damm みたいなのを使えばよいのに」という話もあるようです。

     

    私自身は Damm についての知識はなかったのですが、少々気になったので、Damm を Delphi で記述した実装例がないかと思って探してみました。しかし 2016/07/30 時点では実装例が見当たりませんでした。(その他のいくつかの言語での実装例は https://en.wikibooks.org/wiki/Algorithm_Implementation/Checksums/Damm_Algorithm に出ています。)

      

    そこで Damm を Delphi で実装してみたらどうなるかを試してみたのが以下のコードです。ご覧いただければ分かる通り、確かに実装は非常にシンプルでした。変換用の2次元配列を初期化した後は、配列の添字に値を当てはめていくだけです。

      

    この実装の使い方ですが、Damm.encode( [numeric_string] ) で、チェックデジットの数値が取得できます。たとえば 572 という値を文字列で与えるとチェックデジット 4 が戻り値で返されます。

     

    また Damm.check( [numeric] ) では、チェックデジットを含む数値文字列が正しいかどうかを検証できます。先の例で 572 のチェックデジットが 4 と分かっていますが、この処理に 5724 を入力値として与えると True が帰ります。なお、この検証は「チェックデジットを含む文字列をDammでエンコードすると必ず0になる」という仕組みで行います。だから check の処理では encode の結果が 0 かどうかを確認しています。

    //
    //  Example Delphi implementation for Damm checkdigit algorithm
    //
    //  https://en.wikipedia.org/wiki/Damm_algorithm
    //  https://ja.wikipedia.org/wiki/Damm%E3%82%A2%E3%83%AB%E3%82%B4%E3%83%AA%E3%82%BA%E3%83%A0
    
    unit Damm;
    
    interface
    uses
      System.SysUtils;
    
    function encode(Number: String ): Integer;
    function check(Number: String ): Boolean;
    
    implementation
    
    function encode(Number: String): Integer;
    // input: numeric string.
    // return: check digit by damm
    const
      matrix: array[0..9, 0..9] of integer = (
       (0, 3, 1, 7, 5, 9, 8, 6, 4, 2),
       (7, 0, 9, 2, 1, 5, 4, 8, 6, 3),
       (4, 2, 0, 6, 8, 7, 1, 3, 5, 9),
       (1, 7, 5, 0, 9, 8, 3, 4, 2, 6),
       (6, 1, 2, 3, 0, 4, 5, 9, 7, 8),
       (3, 6, 7, 4, 2, 0, 9, 5, 8, 1),
       (5, 8, 6, 9, 7, 2, 0, 1, 3, 4),
       (8, 9, 4, 5, 3, 6, 2, 0, 1, 7),
       (9, 4, 3, 8, 6, 1, 7, 2, 0, 5),
       (2, 5, 8, 1, 4, 3, 6, 7, 9, 0)
      );
    var
      interim: Integer;
      index: Integer;
    begin
      interim := 0;
    
      for index := 1 to length(Number) do
        interim := matrix[ interim,  StrToInt(Number[index]) ];
    
      Result := interim;
    end;
    
    function check(Number: String): Boolean;
    // input: numeric string with damm checkdigit.
    // return: true if input value is valid number with check digit.
    begin
    
      if ( encode( Number ) = 0 ) then
        Result := True
      else
        Result := False;
    
    end;
    
    end.

     

    なお、Damm のアルゴリズム自体の解説はここでは省略します。Wikipedia 上の文書やその他の文書等を参照してください。

     

     

    * 今回のブログでは docwki 関連のネタを書くつもりでしたが、内容の整理が追いついていないので次回に持越しとさせていただきます……。

     


    0 0

    Do you want to

    • Get started with C++?
    • Start moving to modern C++?
    • Learn or enhance your cross-platform C++ skills?
    • Write mobile games?

    Now's your chance! We're pairing up C++Builder Starter Edition and a week-long 'boot camp' series of webinars to help you get going... and making Starter free to boot!  (The bad puns come for free too.)

    Download the Starter Edition at 100% off until August 5th (that's the end of this week!), and then register for the C++ Boot Camp for for five great online sessions between Aug 8-12. We'll cover getting started writing your first application, using C++Builder, writing fast and responsive user interfaces (with great effects) that work cross-platform using the FireMonkey UI framework, a C++ language deep dive, and then we'll move into game development with C++ and making a cross-platform natively compiled app for mobile and tablet - that's both iOS and Android.  Some great stuff!

    Read all about the Boot Camp sessions

    Register for the Boot Camp now!

    And then download your personal Starter edition license of our award winning C++ Builder, 100% off!

     


    0 0

    Fábio Feltrin da Silveira and João Mota NetoFábio Feltrin da Silveira and João Mota Neto

    Embarcadero has a Academic Program. Basically, any formal school can have Embarcadero tools available in their labs, and for all their students, paying a symbolic price per unit. If you want to know more, please contact Embarcadero or a distributor/reseller in your region.

    Here in Brazil we are adding more and more universities to the program, and the first results are showing up. I’m here to share one of these cases.

    SATC is one of our affiliated. They are teaching Delphi inside their regular programming course, and also using the tool in some researches, like this one reported here:
    http://www.engeplus.com.br/noticia/tecnologia/2016/v-deo-satc-cria-aplicativo-para-movimentar-protese-de-mao/

    The text above is in brazilian portuguese, but in short, it says:

    ...

    After six months of study, research with a prosthetic hand developed in Satc creates application able to make an artificial hand to move by an smartphone. The tool enables the registration of several movements that make fingers and forearm to move by means of voice command.

    The artificial hand was created in Satc by 3D printing method. The voice command smartphone was developed in Delphi, which allows the application to run on any platform.

    ...

    Here you have two videos showing the prototype in action:
    https://www.youtube.com/watch?v=z2Hb91mCJDc
    https://www.youtube.com/watch?v=yOvD4JanJLU

    I’d like to congratulate the university and all the team involved in this project (Fábio Feltrin da Silveira and his coordinator, João Mota Neto) by this incredible achievement, and please, keep us informed about the project status!

    Finally, If you are a teacher or a student in any part of the world, and want to have Embarcadero tools in your school, please contact us (or any partner in your region) and let’s innovate together!


    0 0

     

    先日、729日に翔泳社さん主催のデベロッパーサミットのセッションの一つを担当し、IoTやビーコンやマルチデバイス関連のお話を45分にわたって、弊社の井之上とともに繰り広げてまいりました。 ご聴講いただいた方々が、おおよそ弊社のことをご存知ない方だと思われましたので、DelphiC++ Builderのディープな話は置いておき、RAD Studioの特徴であるIoTとビーコン開発のコンポーネント周りや、マルチデバイス開発の基礎的な話をいたしました。おそらく150人以上は集まっていただいたかと思われる会場で、聴講者の皆様の前に立って話すというのは緊張するもので、セッション開始直後の数分間はカミカミでありました。

     

    さて、今日の本題に入ります。久々に、日本語で書かれた(日本語に翻訳された)Delphi (Object Pascal)の書籍が出ています。


    0 0

    Next Wednesday we're hosting an online webinar in partnership with the G+ C++ group which is a live chat with Pat of the G+ group, a C++ expert and developer, and Bruneau Babet, one of the compiler engineers at Embarcadero, hosted by me.

    It's a freeform chat (lightly edited for pauses etc) but we envisage covering a lot of technical topics - things like language and compiler topics, extending Clang, IDE internals, that kind of thing. It's a glimpse into a side of the C++ world you might not often see.  If you're the kind of person who reads blog posts about new calling conventions or follows why Xcode's code completion is different to VC++'s or is interested in Clang on Windows or any platform or what happened to classic Borland C++ or... any topic... this might be for you.

    If there's some technical topic you'd like us to talk about, post what it is - we'll try to add it. (Please keep to on-topic questions - the chat is broad but intended to be technical.) Since the talk is pre-recorded, please post your suggestions here or (even better) on the G+ post. You can register for the webinar here.

    This talk is part of a week-long boot camp we're doing, which includes a 100% discount on C++Builder Starter edition! There are lots of other interesting topics - as well as getting started with C++Builder, other sessions cover writing games, using our GPU-powered cross-platform UI framework, FMX, and writing natively compiled C++ apps for mobile. Thanks to Pat and to the C++ G+ group as a whole for joining us for the talk!

     

     


    0 0

    この記事は、Marco CantuによるProduct Roadmap August 2016の抄訳です。

    2月にエンバカデロ製品の詳細なロードマップを発表した際お約束した通り、半年毎にロードマップを更新し、お客様と今後の展開について共有したいと思います。多くの方からのご要望に応じた結果、通年計画としましては、アップデート数を増やし、メジャーリリースの回数は1回とする方向に進んでいます。

    現在進めているエキサイティングなプランは、今後、お客様やパートナーの皆様の要件や意見を反映しながら、引き続き微調整していきます。変更点としましては、RAD Studio 10.1 Berlin Update 2で、Windows 10 Anniversary Editionに必要なサポート、特にCentennialとして知られていたWindows Desktop Bridgeへのサポートを提供するものです。また、このアップデートには、新しいWin 10 Anniversary スタイル及びUXコントロールが含まれます。

    Godzillaの開発トラックは順調に進んでいます、それと並行して、Microsoftの開発動向にも歩調をあわせたいと考えています。Windows 10サポートをさらに拡大するために、Update 2には新しいWindows 10 Anniversary Edition のスタイル及びユーザーインターフェイスコントロールが含まれる予定です。

    既に述べました通り、このプランは、年1回のメジャーリリースというサイクルに戻って、機能追加と、期間中にリリースされたOSの新バージョンをサポートするアップデートを、年2~3回提供するものです。以上がロードマップの概要ですが、続いて、RAD Studioのプロダクトマネージャを務めるMarco、 David、Sarinaの3名から詳細なコメントがあります。

    2016 Product Roadmap

    *ここに記載した製品機能は、その提供をお約束するものではありません。この記事内で触れたすべての機能は、技術的な理由や優先度の変更などの理由により、変更される可能性があります。

    Marcoからの詳細情報

    Marco CantuMarco Cantu - Delphi言語 / パーソナリティ、Delphi RLT、VCL、データベースとWebテクノロジー、RAD Serverを担当

    過去数年間にわたり、私たちはDelphiで多大な前進を成し遂げてきました。パートナーやお客様からお話を伺って、SeattleとBerlinに組み込まれている新機能の多くが、あまり知られていないことが分かりましたので、まず、Windows 10に搭載されるWinRT APIへのサポートを拡大することから着手しました。私たちは、Windows 10対応の一環として、VCLへのタイムリーなサポートを提供しました。今後もこの方向性に沿って、Windows 10 Anniversary Editionの新機能へのサポートを提供する予定です。

    ロードマップにおける最もエキサイティングな新機能は、まもなくプレビューがスタートするLinuxサポートです。サーバーサイドのコード(Apache拡張、コンソールアプリケーション、WebBrokerプロジェクト、DataSnapサーバー、RAD Serverモジュール、カスタム中間層アーキテクチャ)を使用し、データーアクセスコンポーネントを保持、Linuxオンプレミス・マシンやクラウドインスタンスに配置することが可能となるため、Delphi開発者の皆さんにとって、そしてC++Builder開発者の皆さんにとっても、新たな可能性が切り拓かれることでしょう。

    それと同時に、Delphi言語の改善を忘れてはなりません。投入される新機能は、Nullable型へのサポートですが、かなりの項目にわたる言語構文の強化も検討中です。後者はどちらかというとマイナーな変更ですが、コードを書く際、その可読性や表現力の改善につながります。

    Delphi、VCL、およびRAD Serverの詳細なロードマップは以下のとおりです。

    Berlin Update 2

    • Windows Desktop Bridge(旧Centennial)配置のサポート:従来からのモバイル向け配置サポートと同様の方法で、IDEから直接APPXファイルを構築
    • QuickEditプロパティ:標準コントロールで通常最もよく使用するプロパティへのアクセスを迅速化することで、VCLデザイナー上での日常タスクをスピードアップ
    • 新しいWindows 10 CalendarView VCLコントロール:(完全にVCLコードで記述されているものの)ネイティブWinRTカレンダービューコントロールと完全に合致
    • Windows 10 Anniversary Edition用の新しいVCLスタイル

    Godzilla

    • Linux Server 64bit向けDelphiコンパイラとRTLを提供
    • Konopka Controlsを統合して提供
    • Konopka Controlsのデザイナー機能をVCL設計エクスペリエンスの中核に取り込むことで、VCLビジュアル設計のエクスペリエンスを刷新
    • DateおよびTime Pickerや追加のカスタムパネルを含む、新しいWindows 10 VCLコントロール
    • FireDACのLinux サポートとすべてのプラットフォーム向けのドライバアップデート(サポート中の多数のデータベースエンジンが対象)
    • 大容量メモリ対応のスタンドアロンDelphiコンパイラ
    • RAD Server Linux版(Apache統合、Delphi/C++でLinux RAD Server APIモジュール作成が可能)、RAD Server Console UI の強化、マルチテナント機能

    Godzilla Updates

    • 品質及び性能を改善
    • 新しいVCLコントロール(評価中)
    • コード移行ツールの改良
    • RAD Server向けに、ログイン向けActiveDirectoryサポート、アカウントのAD同期、クライアント向けKerberos認証

    Carnival

    • Apple macOS 64-bit コンパイラとツールチェイン
    • Nullable型へのDelphi言語サポート
    • Delphi言語構文の強化

    Carnival Updates

    • 品質及び性能を改善
    • Windows 10サポートの強化

    Davidからの詳細情報

    David MillingtonDavid Millington - C++ 言語、コンパイラとリンカ、マルチプラットフォームデバッガ、RAD Studio IDEを担当

    目下計画中の今後の数バージョンのC++Builderのリリースは、きっと C++開発者の皆さんに満足いただけるものと信じています。私たちは最近、プラットフォームサポートに注力していますが、その一例がGodzillaでデビューするLinux Serverサポートです。ネイティブコードでクロスプラットフォームをサポートし、同一のUIと他のフレームワークを用いながら、すべてのレベルでネイティブコンパイルが可能であるため、実際的なユーザーニーズを強力に支援するものです。いずれの競合他社も、このレベルには到達していないと言っていいでしょう。しかし、この点に注力するためのコストは、C++言語サポートの遅延につながるため、強力なプラットフォーム基盤から、この点の改善にシフトしていきます。

    現在、Clang 3.9をベースとしたClangベースのコンパイラのアップグレードを計画しています。まず、Windows コンパイラに着手し、その後すぐに他のプラットフォームも追加していきます。さらに、Clangの最新動向に足並みをそろえ、各リリースは、Clangの最新の安定版に極めて近いコンパイラをベースとするようにします。つまり、私たち、そして皆さまにとっても、「二兎を追う者は一兎をも得ず」ということわざとは逆に、一度にふたつの良いことがあるのです。そのふたつの良いこととは、他のIDEよりも優れたクロスプラットフォームサポートとクロスプラットフォームフレームワークを手にするだけでなく、C++言語サポートも同時に手にできるということなのです。

    私たちは、IDEにありがちな閉鎖的で孤立した体制を少し開放しようと、コンパイラについてはCMakeサポートやある程度のIDE統合の検討を始めています。今、何をサポートするかを評価中ですが、CMakeに限るものではないと思いますので、ぜひ皆さんのご意見をお聞かせください。ツールの他、多くのC++コモンライブラリも検討中です。これについても、ぜひご意見をお寄せください。 最後に、デバッガーに関する素晴らしい計画があり、より多くのプラットフォーム上でLLDBを使用し、拡張機能やIDEとの統合を改善する作業を進めています。少なくとも、ClangとLLVMを使用する環境では、LLVMを使うことで統一を図りたいと考えています。

    小さいことですが重要な事項として、BerlinのUpdate 2では、C++用のリネーム・リファクタリングを提供する予定で、非常に有用なものになるはずです。また、コード補完といったIDE機能や、リンカの改善を積極的に進めています。いずれの機能も改善課題として認識し、注力していきます。このように、永年ご愛顧いただいているユーザーの皆さんに満足いただける、すばらしい成果をまもなくお届けできると思っています。来年度は優れた機能も提供します。

    Berlin Update 2

    • リネーム・リファクタリング
    • Win64 C++ デバッガーのプロパティサポート

    Godzilla

    • Linux Server 64サポートを提供

    Godzilla Updates

    • CMakeのサポート: CMake にbcc32c and bcc64のビルトインサポートを提供(CMakeそのものでサポート、あるいはパッチを提供)。いくつかのIDEサポートを提供、但し、範囲は未定
    • Clang 3.9へのアップグレード
      • 当初はWin64及びWin32を予定
      • C++17のフルサポート
      • 今後数回のリリースにおいて他のプラットフォームもサポート
      • Clangの最新動向をキャッチアップ:Clang 3.3の時のように遅延しない。最終目標は、Clangの最新版に追随してすべてのプラットフォームで展開すること

    Carnival

    • iOS64, OSX64用の主要なデバッガー改善 – 基本的なBCCの拡張とDelphiサポートにより、両プラットフォームでLLDBを使用
    • Clang 3.9 / 3.x プラットフォーム展開

    Ongoing, and Carnival Future

    • LLDB サポート強化 – フル拡張、Delphi サポート。対象プラットフォームの拡大(iOS64、OSX64、Win64、 Win32など)
    • リンカの改善(継続)

    Sarinaからの詳細情報

    Sarina DuPontSarina DuPont - FireMonkey、コンポーネントライブラリUXとスタイル、インストレーション・エクスペリエンス、デモとドキュメンテーションを担当

    ここ数年間、私たちはFireMonkeyフレームワークにたくさんの素晴らしい機能を追加してきました。たとえば、FireUIマルチデバイスデザイナ、ビヘイビアサービス、FireUIライブプレビュー、ネイティブコントロールをはじめ、数多くの新機能や機能強化により、複数のフォームファクターやターゲットプラットフォーム向けの迅速なアプリケーション開発を可能にしました。FireMonkeyのロードマップにおける主要なテーマのひとつは、ネイティブコントロールサポートの拡張です。現在、iOS 、Windows両方でのZオーダーサポートと、両プラットフォーム上での各種UIコントロールのネイティブプレゼンテーションサポートを提供しています。

    以下に示したFireMonkeyのロードマップでお分かりいただけるように、このZオーダーサポートをAndroid及びMac OSにも拡大する計画です。ロードマップの一環として、UI コントロールへのAndroidおよびMac OS向けネイティブプレゼンテーションサポートの追加も計画中です。Update 1で導入されるiOS上での新しいTGridネイティブレンダリングサポートも気に入っていただけるものと思います。画面サイズの制限という観点から、タブレットアプリケーションのグリッドレイアウトは人気があります。また、表レイアウトが好まれ、列の順序変更、サイズ変更、テキスト入力を必要とするエンタープライズアプリケーション向けに柔軟性の高いUIを提供します。これについては、最近書いたブログで簡単に紹介しています。

    Berlin Update 1

    • iOS上でのTGridのネイティブプレゼンテーションサポート
    • FireMonkeyのバグ修正

    Berlin Update 2

    • Windows 10 Anniversary Edition向けの新しいFireMonkeyスタイル
    • FireMonkeyのバグ修正
    • サポート中のOSの最新バージョンへの配置サポート

    Godzilla

    • Android向けFireMonkeyネイティブレンダリングのサポート(フェーズ1:Zオーダーの管理)
    • FireMonkeyのリファクタリング作業
    • サポート中のOSの最新バージョンへの配置サポート
    • Radiant Shapesコンポーネントライブラリ
    • FireMonkeyの各種強化

    Godzilla Updates

    • Android向けFireMonkeyネイティブレンダリングのサポート(フェーズ2および3:TEdit、TMemoを含む、各種UIコントロールのネイティブプレゼンテーション)
    • FireMonkeyスタイルの追加
    • 追加の広告サービスをサポートする広告コンポーネントのアップデート
    • FireMonkeyのバグ修正

    Carnival

    • Android上の追加のUIコントロールのネイティブプレゼンテーション
    • Mac OS向けFireMonkeyネイティブレンダリングサポート(フェーズ1:Zオーダーの管理)
    • Mac OS向けFireMonkeyネイティブレンダリングサポート(フェーズ2:TEdit、TMemoを含む、各種UIコントロールのネイティブプレゼンテーション)
    • プラットフォーム固有のコントロールを含むFireMonkeyコントロールの追加
    • サポート中のOSの最新バージョンへの配置サポート
    • デスクトップでのFireMonkeyマップサポート

    Carnival Updates

    • Mac OS 上の追加UIコントロール(TListView、TGrid等)のネイティブプレゼンテーションサポート
    • iOS、Android、Windows向け追加UIコントロールのネイティブプレゼンテーションサポート
    • FireMonkeyのバグ修正とその他の強化

    私たちは、現在のRAD Studio ロードマップ、そしてその先にある展開にわくわくしています。計画が期待のすべてを網羅しているわけではないことは承知していますが、この文書でハイライトされている主要な成果と一緒に他にも多くの機能を提供できると確信しています。中には上記のスケジュールよりも早く提供できる機能もあるかもしれません。

    ご質問、ご意見は、担当のプロダクトマネージャまで、Eメールでお寄せください。また、アイデアや機能に関するご要望は、quality.embarcadero.com までお願いします。

    これらの計画とロードマップは、現時点でのエンバカデロの方向性を示したもので、開発計画とその優先度は、変更される可能性があります。従って、ここに記載した製品機能や提供スケジュールのいずれについても、その提供をお約束するものではありません。また、製品スケジュールや製品ロードマップは、いずれの契約を中止ないしは置き換えるものではなく、お客様が利用されている製品のアップグレード、アップデート、機能改善、他のメンテナンスリリースについては、ソフトウェアライセンス契約に基づいて提供されます。


    0 0

    Right now we have C++Builder Starter at 100% off - and today is the last day!  If you haven't already, get your license here!

    Note: if you don't see it available at $0, or you get redirected to a different page, you're encountering some website issues. Please email me at david dot millington at embarcadero.com with your name, email and country, and I'll get a license to you.

    Did you know - next week we are also having a C++ boot camp, covering getting started with your new C++Builder Starter license, making amazing UIs, writing games, and moving to cross-platform. We're also having a very interesting conversation with Patrick Scheller, a moderator of the C++G+ group and developer and project manager, and Bruneau Babet, one of our compiler engineers, about all sorts of technical C++, compiler and IDE stuff. A week of amazing content - register here!

     


    0 0

    The C++ Boot Camp starts on Monday, August 8, 2016 and continues each day of the week. I am kickoff the first day and will cover building your first C++Builder applications using VCL, FMX and the RTL. The following are some of the links to additional information for my presentation. You can register for the C++ Boot Camp at https://attendee.gotowebinar.com/register/1361682854879502081

    C++ Boot Camp Daily Agenda

    • Day 1: August 8, 2016 – Building your first application with C++Builder
    • Day 2: August 9, 2016 – Creating fast responsive user interfaces with animations and effects
    • Day 3: August 10, 2016 – C++11 language deep dive, and online chat with Patrick Scheller & Bruneau Babet
    • Day 4: August 11, 2016 – Game development with C++
    • Day 5: August 12, 2016 – Stepping up to mobile

     

    Day 1 Replay on Embarcadero's YouTube Channel (EmbarcaderoTechNet)

     

    C++Builder Information Links

     

    C++ Demos Source Code

    C++ Parallel Programming Library projects code - http://cc.embarcadero.com/Item/30589

     


    0 0

    Day 2 of C++ Boot Camp covers creating fast and responsive user interfaces with effects and animations.

    Agenda

    Today we will mostly focus on FireMonkey with lots of practical examples of different user interface considerations. While we will focus on Windows user interfaces, we will also discuss how to plan for mobile.

    • User Interface Considerations
      • Discuss some common user interface paradigms and common elements. 
    • Working with Animations
      • Animations are a great way to add movement to your user interface. Especially useful when it comes to bringing your user interface to life to help your users discover how to interact with it.
    • Creating Effects
      • Effects can be as simple as a drop shadow on a button, or as complex as a page curl. They add depth to your user interface.
    • Avoiding Freezes
      • Freezes are bad news for your user interface. Typically the result of long running processes in the main user thread. We will look at a couple technique to avoid freezes to keep your application responsive and your users happy.
    • Dealing with Screen Resolutions
      • Not everyone is running on 30" High-DPI displays. We will discuss making your user interface responsive to different screen sizes so it always looks good and is easy to use.
    • Customizing Styles and Appearance
      • The styling system helps your application look great, and simple customizations are a great way to make your application stand out and look fantastic.

    Presenter

    • Jim McKeethJim McKeeth
      • Lead World Wide Developer Evangelist & Engineer
      • Long time software developer
      • Invented and patented pattern and swipe to unlock
        • US Patent # 8352745 & 6766456, etc.
      • Built thought controlled drone with Google Glass
      • Host of Podcast at Delphi.org
      • Lives near Boise, Idaho, USA with his family
      • Improvisational comedy performer with CSz Boise
      • Follow on Twitter @JimMcKeeth

    Get your free C++Builder Starter license (Limited time)

    Video replay with Q&A


    [YoutubeButton url='https://www.youtube.com/watch?v=H4vA3VQmkOw']

    Downloads

    Understanding and using FireMonkey Layouts

    FireMonkey and the FireUI makes it easy to build one form to rule all the platforms. Combining layout controls and making use of Anchors, Alignment, Padding and Margins it is easy to make one form that looks and works great on all platforms.

    Anchors

    • Position relative to one or more edge(s) of parent:Anchor
      • Top
      • Bottom
      • Left
      • Right
    • Default is Top, Left
    • Moves with parent resize
    • Each control has 0 to 4 anchors

    Alignment

    • Aligns control within parent, setting anchors, size and position.
    • Default is None.
    • Anchor and fill along edge:
      • Top, Bottom, Left, Right
    • Fill parent, but preserve aspect ratio:
      • Fit, FitLeft, FitRight
    • Fill along one side of the parent (priority over other edge alignments):
      • MostBottom, MostTop, MostLeft, MostRight
    • Resize only on one axis (width or height)
      • Vertical, VertCenter, Horizontal, HorzCenter
    • Miscellaneous
      • Client – Fills client area, less other children
      • Center – No resize, just centered
      • Contents – Fills client area, ignoring other children
      • Scale – resizes and moves to maintain the relative position and size

    Spacing – Margins and Padding

    • MarginsMarginsAndPadding
      • Spacing for siblings (and parent edges)
    • Padding
      • Spacing for children

    TFlowLayout

    • Arrange child controls like words in a paragraph
    • Controls arranged in order added to layout
      • Use “Move to Front” or “Send to Back” to reorder
    • Use TFlowLayoutBreak for forced line break

    FlowLayout1 FlowLayout2

    TGridLayout

    • Arranges child controls in a grid of equal sizes
    • Controls flow through grid as parent resizes
    • Use ItemWidth and ItemHeight properties
    • Customize margins of individual controls

    GridLayout2 GridLayout1

    TGridPanelLayout

    • Creates a grid of specified rows and columns
    • Does not change the anchor or size of child
    • Each cell can contain 1 child control
    • You set the Height, Width, Align, and Anchors of children
    • Controls can span multiple cells

    GridPanelLayout2 GridPanelLayout1

    TScaledLayout

    • Stretches child controls as it is resized at runtime
    • Doesn’t respect aspect ratios of controls
    • Set the Align of the TScaledLayout to Fit to maintain aspect ratio
    • Some styles look better zoomed than others. The font grows – it is not a bitmap scale.
    • Has properties for OriginalWidth and OriginalHeight – Compare to Width and Heightto determine scaling.

    ScaledLayout-Stretch

    TScrollBox

    TTabControl

    • Control to group child controls into tabs
    • Tabs are in a stack with one visible at a time
    • TabPosition := PlatformDefault to use platform default behavior
    • TabPosition := None to hide navigation
    • Use TTabChangeAction to animate transitions

    Frames

    • Reusable pieces of User Interface
      • Includes
        • The layout
        • All the event handlers
        • All the code in the unit
    • Create 1 or more Frames, then reposition based on current layout
      • Examples:
        • In TTabControl for phone
        • Side-by-side for Tablet

    TMultiView

    • One super panel with multiple modesMultiView
    • Supported modes
      • PlatformDefault
      • Drawer
      • NavigationPane
      • Panel
      • Popover
      • Custom
    • Point to MasterPane, DetailPane and definable MasterButton
    • PlatformDefault adapts to platform and orientation
    • Custom supports user defined layout and behavior

    Learning Resources

    Why Use Animations, Transitions and Effects?

    • Give you user interface life
    • Make application more interactive
    • Keep users attention
    • Use motion to provide meaning
    • Implement Google’s Material Design
    • Skumorphic behavior
    • Less code and better UI performance
    • Add affordance to user interface

    FireMonkey Basics

    • Anything can be nested
    • Most numeric properties are a single & animatable
      • Position (X, Y), RotationCenter, Scale, Size (Height & Width), Opacity, & RotationAngle
    • Use MakeScreenshot method to get Bitmap of layout
    • VCL Developers Guide to FireMonkey by Robert Love, MVP - On YouTube from CodeRage 8

    [YoutubeButton url='https://www.youtube.com/watch?v=KkcplPOc_D8']

     

    Animations 

    • Modify property values over duration
    • Automatic or manual start
    • Optional delay, loop, inverse, etc.
    • Triggers (or True or False)
      • IsMouseOver, IsDragOver, IsFocused, IsVisible, IsPressed, IsChecked, IsSelected, IsExpanded
    • Events OnProcess & OnFinish
    • Can also use the Animate* methods
    • Note: Multiple animation instances are not necessarily synchronized (noticeable over time).

    Interpolation

    • Determines how the rate of the value changes over time
    • Linear is default and changes at a constant rate
      • All options: Linear, Quadratic, Cubic, Quartic, Quintic, Sinusoidal, Exponential, Circular, Elastic, Back, & Bounce
    • AnimationType controls how Interpolation is applied (start vs. end)
      • In - The curve applies to the starting value of the property animated.
      • Out - The curve applies to the ending value of the property animated and proceeds backwards to the starting value.
      • InOut - The curve applies to the both the starting value and the ending value of the property animated and meets at the center point.

    Effects 

    • Over 40 GPU powered effects (not counting transition effects)
    • Built using shader filters
    • Supports optional trigger for automatic enable or disable
    • Apply to image or control

    Transition Effects 

    • Over 20 Transition Effects
    • A subset of regular Effects
    • Changes parent image (or control) into target image
    • Progress property represents percentage of application (can be animated over time)
    • For control transitions use MakeScreenshot to get Target image

    ShaderFilters Sample (Ships with Delphi & RAD Studio)

    • \Samples\Object Pascal\Multi-Device Samples\User Interface

    0 0

    Day 3 of the C++ Boot Camp has a lot of material!  First, a deep dive into C++ - first, a lightning overview of C++ for those who haven't used it before, followed by taking some C++98/03-style code and changing it into modern C++, with explanation about what changed and why, as well as pitfalls and things to look into.

    Very interesting material, and very useful for getting started!

    Youtube replays

    C++ Deep Dive

    A lightning look at C++ in general for those who are new to it, followed by taking some "old" C++ code and refactoring it to use modern features - importantly, with explanations of each feature and why they are worth using, or why the new design is better.

    Online chat with Patrick Scheller and Brueau Babet

    This talk is between Pat of the C++ G+ group, a developer and project manager, and Bruneau, one of our compiler engineers.  It's not about C++ specifically, but instead talks about the compiler history, using Clang, compiler extensions, the difficulties of supporting two different languages that can interoperate, and some C++ features.  Fascinating stuff!

     

    Resources

    Source code

    Basics

    Forums

    C++ / STL

    C++ Builder

    Thanks for attending, and for the great series of questions in the Q&A section afterwards.  You can still join for the rest of the boot camp, and get a copy of C++Builder Starter 100% off, or read more information on the Boot Camp here!

     


    0 0

    As promised during the webinar here are the downloads:

    Enjoy!

    ==

    In just two days I will be presenting the Wednesday EMEA Developer Webinar where I'm going to focus on Object Pascal programming language used in Delphi.

    Mind Your Language!

    Join us for a webinar on Aug 17, 2016 at 11:00 AM CEST.

    Register now!

    https://attendee.gotowebinar.com/register/6490173423290975236

    The Object Pascal language used in Delphi is constantly evolving. With every new version of Delphi there are smaller and bigger changes added to Delphi compilers and the runtime library. 

    In this one hour webinar we are going to review many different language features that even experienced Delphi developers might not be aware of. Learn new Object Pascal language constructs and start writing cleaner and better code! 

    The webinar will be followed by the live Q&A session.

    The webinar is free, but you need to register. After registering, you will receive a confirmation email containing information about joining the webinar.

     


    0 0
  • 08/16/16--11:03: 128 Strong!
  • 128 countries were represented in last week’s C++ Builder Summer Camp. Only the US representation was almost one thousand people. Pretty awesome stats! Surprisingly many did not know that C++ Builder even existed, and ten years ago it was the main C++ IDE. Things can change dramatically in the software world. It is exciting to be back in the game with a cool, updated, and powerful product. Yes, there are a lot of free IDEs for C++ and some other respectable commercial tools, but if one wants to build visual, cross-platform applications very fast and efficiently, nothing comes close. The Product Management team was so excited to hear the positive feedback from attendees that the product roadmap is growing as we speak. The bottom line is that our tools can add a lot of value in today’s competitive tools market for C++ that it is all that matters.

    We plan to follow suite with a large Delphi Boot Camp as well. With a similar format, we expect the number of participants to be phenomenal. Unlike our Fall Code Rage event that usually attracts several thousand people, the focus of this effort will be on New Developers, especially students of all ages. The Delphi language deserves a growing popularity in education and we are committed to support more and more initiatives to accomplish this, so stay tuned. To reach this objective, we will require the support of the Community. We are a not a huge company, but with the viral support that you provide, we can make a difference. We are seeing continuous growth in our Social footprint, so things are working.

    I know that core to this is product. We released an updated Product Roadmap that shows some of the things to come. I think that Berlin 10.1 is the best version to-date to support education, with a better installation experience, many improvements to the FireMonkey cross-platform framework, and a visual development approach that is highly intuitive. Features like Real Time Preview should make the development experience much more engaging. Also, our support for 2D gaming has improved a lot, and in fact, we plat to ship Berlin 10.1 updates with source code for several games.

     

    So proud of our Product and Marketing Teams!


    0 0

    There are a number of different embedded databases that you can use with Delphi and C++Builder. InterBase ToGo and IBLite are two embedded databases offered by Embarcadero. SQLite is an embedded SQL database engine developed by the SQLite Consortium. And finally there is TFDMemTable which can save and load data from binary, XML, JSON and query through it's LocalSQL property. Each embedded database has it's own strengths and you can quickly deploy any of these solutions with your apps.

    InterBase ToGo

    InterBase ToGo has encryption support on Android, IOS, OSX, and Windows. It also has no limit on the size of it's database file or the number of transactions per connection. InterBase ToGo has a unique Change Views feature which uses InterBase multigenerational architecture to capture the changes to data. This has no performance overhead on existing transactions because it maintains a consistent view of changed data observable by other transactions. The Change Views mechanism is not dependent on its own underlying data but is based on data already stored for existing base tables or views derived from base tables. Additionally, InterBase ToGo has a lighter version with a slimmer set of features called IBLite which comes with a free unlimited deployment license.

    Head over and find out everything you need to get started using InterBase ToGo.

    SQLite

    SQLite features transactions that are atomic, consistent, isolated, and durable (ACID) even after system crashes and power failures. There is zero configuration with SQlite which means there is no setup or administration needed. SQLite implements most of SQL92 and supports table triggers and views. It is a a complete database is stored in a single cross-platform disk file. It supports massive terabyte-sized databases and gigabyte-sized strings and blobs. It can even be faster than popular client/server database engines for most common operations. There are no external dependencies and it runs on Windows, Mac OS X, iOS, and Android out of the box. The sources are in the public domain which means use for any purpose is free. It's very powerful API allows you to extend the engine in practically all areas. Lastly SQLite achieves one of the best data access performances among other embedded, file-server, and client-server database engines used by the Delphi applications.

    Head over and find out everything you need to start deploying SQLite with your apps.

    TFDMemTable

    TFDMemTable is a FireDAC based in memory table. It has a SaveToFile functionality to save dataset data to an external file for later use. It can also use it's LoadFromFile method to populate the dataset with data stored in an external file (that you may have saved previously). The data is not moved to a database, it is just loaded into a dataset in-memory storage. You can use both methods with three different file format: binary, XML and JSON. You could for example prototype your app on Win32 and load up data into TFDMemTable. You could then save the data out to one of the three file formats and then deploy the file with your app to Android, IOS, OSX, or Windows. Lastly you could load up the file at runtime into TFDMemTable and query against the data using the LocalSQL property.

    Head over to the Embarcadero DocWiki for more information and code samples for TFDMemTable.

     


    [YoutubeButton url='https://www.youtube.com/watch?v=YBPNMdGK4WY']

    0 0

    Im Zuge des Delphi Boot Camps – 5 Tage Delphi lernen mit vielen Inhalten – gibt es Delphi Starter 10.1 Berlin kostenfrei.

    Das Delphi Boot Camp: Anmeldung und Informationen:

    http://community.embarcadero.com/blogs/entry/delphi-boot-camp

    Delphi 10.1 Berlin Starter - KOSTENFREI:

    https://www.embarcadero.com/de/app-development-tools-store/delphi

     


    0 0

    Developer Erik Salaj over at WINSOFT has a whole suite of Com Port components for Firemonkey in Delphi and C++Builder. The various Com Port components give you access to the Com Port on Android, OSX, and Windows. It does not appear that there is any support for IOS though. You can communication with all kinds of different devices using the Com Port like printers, sensors, joysticks, and all kinds of Internet of Things devices. There are a number of different components for Com Port access on Android which include connecting via Serial, support for FTDI FT311D and FT312D devices, support for Prolific devices, USB connected devices including FT232R, CDC/ACM (Arduino Uno), CP2102 and CH34x chips, and even more USB Serial devices including CP210x, CP2130, CDC, FTDI, PL2303 and CH34x devices. The Windows and Mac OSX Com Port components are also available for standard serial port communication. I believe there is a Windows version for VCL and one for FMX. On the Windows side there is even support for Protocols 3964 and 3964R. WINSOFT is a third party library integration powerhouse with over 50 different third party libraries wrapped in easy to use Delphi and C++Builder components. The components are commercial but there are free trials available and come with full source code after purchase. Additionally, you can buy ALL of the components together at a very steep discount. The bottom line is if you need to connect to any type of serial device from Android, OSX, or Windows using Delphi or C++Builder you should check these components out because they can save you a lot of time. Accessing the Com Port becomes as easy as "ComPort.ReadAnsiString;" and "ComPort.WriteAnsiChar(AnsiChar(Key));".

    Check out ComPort for VCL in Delphi 10 Berlin.

    Check out ComPort for Android with Firemonkey in Delphi 10 Berlin.

    Check out ComPort for Android FTDI FT31xD with Firemonkey in Delphi 10 Berlin.

    Check Out ComPort for Android Prolific with Firemonkey in Delphi 10 Berlin.

    Check Out ComPort for Android USB with Firemonkey in Delphi 10 Berlin.

    Check out ComPort for Android USB Serial with Firemonkey in Delphi 10 Berlin.

    Check out ComPort for FireMonkey on Windows in Delphi 10 Berlin.

    Check out ComPort for OS X in Firemonkey for Delphi 10 Berlin.  


    0 0

    As part of our Delphi Boot Camp event we've made the Starter Edition of Delphi available at 100% off. For those of you quick at math that makes it free for a limited time. 

    Delphi Starter is a great way to get started building high-performance Delphi apps for Windows. Delphi Starter includes a streamlined IDE, code editor, integrated debugger, two-way visual designers to speed development, hundreds of visual components, and a limited commercial use license. Database components and drivers are not included. Starter Delphi FAQ

     So download Delphi Starter and register for the Delphi Boot Camp before this special offer runs out. If that is not enough, you can also download a copy of Marco Cantu's Object Pascal Handbook to help you study alongside the course.


    0 0

    If you are looking to wire up your home or office with smart technologies there are a number of devices that you can easily connect to and control from Delphi and C++Builder. These smart IoT devices that are part of ThingConnect. Bluetooth LE and Z-Wave are two technologies that are supported by ThingConnect. Bluetooth Low Energy (Bluetooth LE) or Smart Bluetooth provides a new environment for devices with small amount of data to transfer and lower power consumption. The Z-Wave protocol is an inter-operable, wireless, RF-based communications technology designed specifically for control, monitoring and status reading applications in residential and light commercial environments. 

    Components to connect with these ThingConnect devices can be downloaded from the GetIt Package Manager. Obviously you will need to have the device to be able to connect with it as well. When you install the package for each device from GetIt you will also get a demo app that you can load up and start testing with right away. The five devices we are going to highlight are the GoControl Light Bulb, the Trane Home Thermostat, the Aeon Labs Smart Switch, the Kwikset Deadbolt, and a Leviton Smart Switch. Using these five devices you can control the temperature in your home or office, turn the lights on and off, control the power sockets, control the locks on the doors, and control switches.

    The GoControl Light Bulb is a Z-Wave LED bulb from LinearLinc. This device allows you to turn the bulb On/Off or use its dimming features to adjust up to 100 levels of brightness.

    The Trane Home Thermostat is a Z-Wave wireless digital thermostat from Trane. This device allows you to remotely control the heating, the cooling and the general energy usage of your home.

    The Aeon Labs Smart Switch is a smart socket from Aeon that lets you wirelessly control whatever is plugged into it. This Z-Wave component allows you to control any plug-in device, monitor its energy consumption, and simultaneously charge a USB device.

    The Kwikset Deadbolt is a smart deadbolt from Kwikset. This component allows the user through a web enabled device to remotely lock or unlock the door, check the door lock status and receive text or email messages.

    The Leviton Smart Switch is a smart lighting control system from Leviton. The inclusion of this switch on a Z-Wave network allows remote On/Off control and dimming of loads connected.

     

    Head over and check out all of the different devices for ThingConnect that are available through the GetIt Package Manager.

     


    [YoutubeButton url='https://www.youtube.com/watch?v=Yn52unAvnAY']

    0 0

    In 10.1 Berlin, we introduced TAddressBook, a new FireMonkey component for creating, accessing and managing contacts on iOS and Android. 

    We have updated our existing FireMonkey contacts demo and added the ability to add a photo to each contact you create. This demo uses our built-in actions for selecting an image from the gallery or taking a photo using the camera on your device. 


    0 0
  • 08/25/16--03:38: Busy autumn this year
  • So a lot is going on in the Delphi Community this autumn. 

    Just the day before yesterday we had a meeting in Dapug, the danish Delphi Users group. The main topic was how to connect to various databases on various platforms. Also different coding styles with regards to databases.

    Devart sponsored a license to any given product so thanks a lot to www.Devart.com and Congratulations to Anders Balslev for winning.

    Later in Septmber (28th and 29th) I am teaching a course in Fredericia, Denmark where I have my office. Link

    10th of October I have a one-day workshop with the main topic being "whats new since Delphi XE" Link

    18th and 19th of October I have a training course in Gothenburg Sweden Link

    25th and 26th, Danny Wind is paying Dapug a visit for the bi-annually workshop. Link

    In November I'm teaching in Copenhagen on the 1st and 2nd Link

    In Düsseldorf the 7th through 9th of November where I am talking about AppTethering at the EKON20 Link

    I'm going back to Sweden (Stockholm) on the 15th to 16th November for another training course Link

    The 24th and 25th of November Nick Hodges and Cary Jensen are doing Delphi Developer Days in Copenhagen (can't miss that) Link

    On the 29th and 30th November I'll once again head for Sweden, this time for a one-day workshop on FireDAC and a one-day workshop on Mobile development with Delphi Link

    Then in December, on the 6th and 7th, there will be a course in Oslo Norway with me as teacher.... Link

     

    Yup, I have my autumn planned... :-)


    0 0

    BeaconFence is a developer proximity solution that delivers precise “GPS-Free” indoor/outdoor user location tracking and events with radial and geometric zones for any physical location and layout. Visually draw the layout of the physical location and beacon placement to track location information down to inches. Create radial and rectangular zones and track intersections, enters, and exits with callback events. BeaconFence enables developers to take proximity beacons to the next level by adding precision spatial location awareness to their applications both indoors and outdoors.

    It provides your application on a BLE device with the following features: Monitor beacons and trigger proximity events. Define zones and trigger proximity events for: entering zone, exiting zone and approaching zone. Compute automatically the position of your BLE mobile device in a map. Calculate a route between points of interest in a map.

    The BeaconFence component has many different properties and events you can set up, such as the OnZoneEnter event to trigger an event in the user’s client application as he enters a pre-defined zone.

    It also includes the Beacon Fencing Map Editor. You can easily create a new map using this GUI editor, and load an existing bitmap, such as an office floor plan, to use as your beacon-fencing map. With BeaconFence, you can set up several maps for different areas in your factory, for example, or floors in your building.

    The BeaconFence Map Editor allows you to create a project where you can design, load, and edit several maps of interest. For each map you can define and modify the layout of physical spaces and the placement of a set of: Beacons, Zones, and Paths with nodes

    It also provides you with the abilities to: Fence areas within the map space. Name beacons, zones, paths, and nodes. Connect, and disconnect paths between maps. And finally set description values for beacons, zones, and nodes.

    BeaconFence is available through GetIt, a package manager integrated into RAD Studio for easily accessing, downloading and updating components.

    Head over and find out more about BeaconFence in the Embarcadero DocWiki.


    [YoutubeButton url='https://www.youtube.com/watch?v=1_cWnDmvxJk']
     
     

    [YoutubeButton url='https://www.youtube.com/watch?v=MRrZubGke8k']
     
    Case Study:
     

    [YoutubeButton url='https://www.youtube.com/watch?v=SRqFYQrxY9o']

(Page 1) | 2 | 3 | .... | 10 | newer