ROBOT |
ロボスタ |
ロボットが人手を借りずにエレベーターを乗降 「ホテル京阪 ユニバーサル・タワー」でテスト運用 |
https://robotstart.info/2022/07/07/robot-elevator-hotel-keihan.html
|
|
2022-07-07 07:20:02 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 三重・菰野町に複合型キャンプリゾート施設 ドッグランや貸切サウナも用意 |
https://www.itmedia.co.jp/business/articles/2207/07/news133.html
|
freeandeasycampresort |
2022-07-07 16:45:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] LINEアイコンをNFTに 「プロフィールNFT」体験版提供 |
https://www.itmedia.co.jp/news/articles/2207/07/news151.html
|
itmedianewsline |
2022-07-07 16:27:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia PC USER] エプソン販売、Android端末向けビュワーアプリ「Epson Pocket Document」をアップデート |
https://www.itmedia.co.jp/pcuser/articles/2207/07/news152.html
|
android |
2022-07-07 16:25:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] Excelでセルを挿入するショートカットは「Ctrl+〇+〇」 |
https://www.itmedia.co.jp/news/articles/2207/07/news148.html
|
excel |
2022-07-07 16:01:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
ScrapyでImportError: cannot import name 'HTTPClientFactory’が出る |
https://qiita.com/ebina_akira_ut/items/c1d67b4f79e924fc8c87
|
docker |
2022-07-07 16:02:17 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
NCMBとMonaca、DeepL APIを使って翻訳アプリを作る(その2:翻訳処理とデータの保存) |
https://qiita.com/goofmint/items/1ff6caae08add6a4301c
|
deeplapi |
2022-07-07 16:38:34 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
VMWare、Hyper-Vなどの仮想データをAWSのEC2上に移行したい |
https://qiita.com/yoripo/items/2e4301c5b74d58998f6e
|
vmimpor |
2022-07-07 16:59:28 |
GCP |
gcpタグが付けられた新着投稿 - Qiita |
GCE(Google Compute Engine)でgit clone時に詰まった話 |
https://qiita.com/yoshi19920807/items/ee5b64caf569c75d6ae8
|
permissiondeniedpublicke |
2022-07-07 16:17:38 |
Git |
Gitタグが付けられた新着投稿 - Qiita |
GCE(Google Compute Engine)でgit clone時に詰まった話 |
https://qiita.com/yoshi19920807/items/ee5b64caf569c75d6ae8
|
permissiondeniedpublicke |
2022-07-07 16:17:38 |
技術ブログ |
Developers.IO |
ツールとの付き合い方 (ベターな技術選定) |
https://dev.classmethod.jp/articles/better-technology-selection/
|
創立記念日 |
2022-07-07 07:48:20 |
技術ブログ |
Developers.IO |
[M1] 音声認識ツール Voskを動かす [Node] |
https://dev.classmethod.jp/articles/vosk/
|
nodeintroduction |
2022-07-07 07:40:05 |
技術ブログ |
Developers.IO |
ActiveRecordで複数のカラムの中から最大の値でソートする |
https://dev.classmethod.jp/articles/activerecord-order-by-greatest/
|
activerecord |
2022-07-07 07:32:37 |
技術ブログ |
Developers.IO |
React Native の FlatList で、連続要素の中に一部独立して表示させたいのでやってみた |
https://dev.classmethod.jp/articles/react-native-for-independent-display-continuous-element-with-flatlist/
|
delivery |
2022-07-07 07:32:05 |
技術ブログ |
Developers.IO |
ベストプラクティスを知ろう (3) #サービスマネジメント |
https://dev.classmethod.jp/articles/sm-know-bestpractice-3/
|
prismatix |
2022-07-07 07:30:06 |
技術ブログ |
Developers.IO |
CodeStarで簡単なCI/CD環境を検証してみた |
https://dev.classmethod.jp/articles/codestar-cicd-practice/
|
codecommit |
2022-07-07 07:06:59 |
海外TECH |
DEV Community |
I made a premium Fintech admin template with 42+ pages for React! Feedback? |
https://dev.to/fredy/i-made-a-premium-fintech-dashboard-for-react-with-42-pages-feedback-4i47
|
I made a premium Fintech admin template with pages for React Feedback Hello guys I made a premium Fintech admin template with pages for React Feedback Live preview Website presentation Free version |
2022-07-07 07:49:13 |
海外TECH |
DEV Community |
Twitter validator cards |
https://dev.to/shreyvijayvargiya/twitter-validator-cards-52lp
|
Twitter validator cardsHow does twitter show those link cards when you add a link Under the HoodI was wondering how Twitter shows the link cards whenever we add links in the tweet input So after researching a bit I found the Twitter process and how we can build something like that on our own But I will not cover this in the text format instead I will share the information via video Here is the video link if you like the video please do show some support Video linkOur website iHateReading Youtube Twitter |
2022-07-07 07:32:41 |
海外TECH |
DEV Community |
M-One Personal Assistant v2.4 - Update: Friday, June 24, 2022 + GUI v1.0 |
https://dev.to/mhadi2003/m-one-personal-assistant-v24-update-friday-june-24-2022-gui-v10-l4e
|
M One Personal Assistant v Update Friday June GUI vHello friends Update of M One Assistant has been released Version Update Friday June M One in version can do things Important changes in version change voice in what language are you written do you know me set alarm Download Music for Alarm edit note open calculator open disk c amp d amp e open task manager toggle capslock toggle numlock start menu and fix program bugs And a graphic version of M One has been released M One v GUI v Includes interface Typing and Listening GUI v Screenshots Core DependenciesPython SpeechRecognitionsubprocess version webbrowserthreading version winsound version tkinter version GUI v wikipediapyautogui version translaterequestspyqrcodeplatform version winshell version datetimePyAudiopyttsxrandom version urllibwhois version timeosProject at GitHub Learn more about M One In the future some features of this program will be added and some of its shortcomings will be eliminated You dear ones can also express your opinions and suggestions |
2022-07-07 07:20:47 |
海外TECH |
DEV Community |
Beginner to Advanced Challenge - project 5, 6 & 7 |
https://dev.to/zt4ff_1/beginner-to-advanced-challenge-project-5-6-7-3doo
|
Beginner to Advanced Challenge project amp Cause and Effect AppThis is the fifth project in the beginner category in the beginneradvanced challenge It s a representational application where you can click on a button to display different values in the main session The link to the code can be found here Color Cycle AppThe sixth project in the beginner category in the beginneradvanced challenge is a website that randomly generates colours and displays them at different intervalsThe link to the code can be found here Countdown Timer AppThis is the seventh project in the beginner category in the beginneradvanced challenge is an app that allows you to select a date and have a timer counting down to it The link to the code can be found here Please leave a star in the repository so other people can find it and participate If you enjoy reading this article you can support me by buying me a coffee please |
2022-07-07 07:14:42 |
海外TECH |
DEV Community |
Creating a TreeView control in .NET MAUI |
https://dev.to/icebeam7/creating-a-treeview-control-in-net-maui-49mp
|
Creating a TreeView control in NET MAUIThis article is part of the MAUIUIJuly initiative by Matt Goldman You ll find other helpful articles and tutorials published daily by community members and experts there so make sure to check it out every day A few years ago a student asked me if it was possible to integrate a TreeView control in Xamarin Forms in order to display a hierarchical set of items The specific case A project has tasks each task is assigned to an employee We found an interesting project here and modified it a bit here This is what we got in the end What does it take to implement such a control in NET MAUI Let s see Step Add small images for the TreeView nodes Step Create a folder Name it Models Then add a couple of classes inside a Every node will be represented as a XamlItem with a Key and Id namespace MauiTreeView Models Serializable public class XamlItem public string Key get set public int ItemId get set b Every group will be represented as a XamlItemGroup with a Name GroupId a collection of nodes XamlItems and a collection of sub groups Children to represent the hierarchy namespace MauiTreeView Models Serializable public class XamlItemGroup public List lt XamlItemGroup gt Children get new public List lt XamlItem gt XamlItems get new public string Name get set public int GroupId get set Step Create a folder Name it Controls Then add four classes inside a Class ResourceImage assigns the image icon for a node in the TreeView For example an open folder when the user expands the node It uses a BindableProperty and extends an Image control namespace MauiTreeView Controls public class ResourceImage Image public static readonly BindableProperty ResourceProperty BindableProperty Create nameof Resource typeof string typeof string null BindingMode OneWay null ResourceChanged private static void ResourceChanged BindableObject bindable object oldvalue object newvalue var resourceString string newvalue var imageControl Image bindable imageControl Source ImageSource FromFile resourceString public string Resource get gt string GetValue ResourceProperty set gt SetValue ResourceProperty value b Next we have the ExpandButtonContent class which sets the specific icons that will be displayed for expanded Collapsed Leaf Nodes or expanded on request nodes It uses the ResourceImage and extends a ContentView Although we have not created the TreeViewNode class don t worry We will in a minute namespace MauiTreeView Controls public class ExpandButtonContent ContentView protected override void OnBindingContextChanged base OnBindingContextChanged var node BindingContext as TreeViewNode bool isLeafNode node ChildrenList null node ChildrenList Count empty nodes have no icon to expand unless showExpandButtonIfEmpty is et to true which will show the expand icon can click and populated node on demand propably using the expand event if isLeafNode amp amp node ShowExpandButtonIfEmpty Content new ResourceImage Resource isLeafNode blank png folderopen png HeightRequest WidthRequest else Content new ResourceImage Resource node IsExpanded openglyph png collpsedglyph png HeightRequest WidthRequest c Now we have the TreeViewNode class implementation This is a recursive StackLayout with several elements Among others A BoxView SpacerBoxView for sub levels identationA ContentView ExpandButtonContent with a TapGestureRecognizer that is used to determine if the user tapped on the image to expand hide the inner content The TreeViewNode content is configured in the constructor The ChildrenList is a IList lt TreeViewNode gt so that means this control is recursive A node can contain other sub nodes using System Collections ObjectModel using System Collections Specialized namespace MauiTreeView Controls public class TreeViewNode StackLayout private DataTemplate ExpandButtonTemplate null private TreeViewNode ParentTreeViewItem private DateTime ExpandButtonClickedTime private readonly BoxView SpacerBoxView new BoxView Color Colors Transparent private readonly BoxView EmptyBox new BoxView BackgroundColor Colors Blue Opacity private const int ExpandButtonWidth private ContentView ExpandButtonContent new private readonly Grid MainGrid new Grid VerticalOptions LayoutOptions Start HorizontalOptions LayoutOptions Fill RowSpacing private readonly StackLayout ContentStackLayout new StackLayout Orientation StackOrientation Horizontal private readonly ContentView ContentView new ContentView HorizontalOptions LayoutOptions Fill private readonly StackLayout ChildrenStackLayout new StackLayout Orientation StackOrientation Vertical Spacing IsVisible false private IList lt TreeViewNode gt Children new ObservableCollection lt TreeViewNode gt private readonly TapGestureRecognizer TapGestureRecognizer new TapGestureRecognizer private readonly TapGestureRecognizer ExpandButtonGestureRecognizer new TapGestureRecognizer private readonly TapGestureRecognizer DoubleClickGestureRecognizer new TapGestureRecognizer internal readonly BoxView SelectionBoxView new BoxView Color Colors Blue Opacity IsVisible false private TreeView ParentTreeView gt Parent Parent as TreeView private double IndentWidth gt Depth SpacerWidth private int SpacerWidth get private int Depth gt ParentTreeViewItem Depth private bool ShowExpandButtonIfEmpty false private Color SelectedBackgroundColor Colors Blue private double SelectedBackgroundOpacity public event EventHandler Expanded lt summary gt Occurs when the user double clicks on the node lt summary gt public event EventHandler DoubleClicked protected override void OnParentSet base OnParentSet Render public bool IsSelected get gt SelectionBoxView IsVisible set gt SelectionBoxView IsVisible value public bool IsExpanded get gt ChildrenStackLayout IsVisible set ChildrenStackLayout IsVisible value Render if value Expanded Invoke this new EventArgs lt summary gt set to true to show the expand button in case we need to poulate the child nodes on demand lt summary gt public bool ShowExpandButtonIfEmpty get return ShowExpandButtonIfEmpty set ShowExpandButtonIfEmpty value lt summary gt set BackgroundColor when node is tapped selected lt summary gt public Color SelectedBackgroundColor get return SelectedBackgroundColor set SelectedBackgroundColor value lt summary gt SelectedBackgroundOpacity when node is tapped selected lt summary gt public Double SelectedBackgroundOpacity get return SelectedBackgroundOpacity set SelectedBackgroundOpacity value lt summary gt customize expand icon based on isExpanded property and or data lt summary gt public DataTemplate ExpandButtonTemplate get return ExpandButtonTemplate set ExpandButtonTemplate value public View Content get gt ContentView Content set gt ContentView Content value public IList lt TreeViewNode gt ChildrenList get gt Children set if Children is INotifyCollectionChanged notifyCollectionChanged notifyCollectionChanged CollectionChanged ItemsSource CollectionChanged Children value if Children is INotifyCollectionChanged notifyCollectionChanged notifyCollectionChanged CollectionChanged ItemsSource CollectionChanged TreeView RenderNodes Children ChildrenStackLayout new NotifyCollectionChangedEventArgs NotifyCollectionChangedAction Reset this Render lt summary gt TODO Remove this We should be able to get the ParentTreeViewNode by traversing up through the Visual Tree by Parent but this not working for some reason lt summary gt public TreeViewNode ParentTreeViewItem get gt ParentTreeViewItem set ParentTreeViewItem value Render lt summary gt Constructs a new TreeViewItem lt summary gt public TreeViewNode var itemsSource ObservableCollection lt TreeViewNode gt Children itemsSource CollectionChanged ItemsSource CollectionChanged TapGestureRecognizer Tapped TapGestureRecognizer Tapped GestureRecognizers Add TapGestureRecognizer MainGrid ColumnDefinitions Add new ColumnDefinition Width new GridLength GridUnitType Star MainGrid RowDefinitions Add new RowDefinition Height GridLength Auto MainGrid RowDefinitions Add new RowDefinition Height GridLength Auto MainGrid Children Add SelectionBoxView ContentStackLayout Children Add SpacerBoxView ContentStackLayout Children Add ExpandButtonContent ContentStackLayout Children Add ContentView SetExpandButtonContent ExpandButtonTemplate ExpandButtonGestureRecognizer Tapped ExpandButton Tapped ExpandButtonContent GestureRecognizers Add ExpandButtonGestureRecognizer DoubleClickGestureRecognizer NumberOfTapsRequired DoubleClickGestureRecognizer Tapped DoubleClick ContentView GestureRecognizers Add DoubleClickGestureRecognizer MainGrid SetRow IView ChildrenStackLayout MainGrid SetColumn IView ChildrenStackLayout MainGrid Children Add ContentStackLayout MainGrid Children Add ChildrenStackLayout base Children Add MainGrid HorizontalOptions LayoutOptions Fill VerticalOptions LayoutOptions Start Render void DoubleClickGestureRecognizer Tapped object sender EventArgs e private void ChildSelected TreeViewNode child Um How does this work The method here is a private method so how are we calling it ParentTreeViewItem ChildSelected child ParentTreeView ChildSelected child private void Render SpacerBoxView WidthRequest IndentWidth if ChildrenList null ChildrenList Count amp amp ShowExpandButtonIfEmpty SetExpandButtonContent ExpandButtonTemplate return SetExpandButtonContent ExpandButtonTemplate foreach var item in ChildrenList item Render lt summary gt Use DataTemplae lt summary gt private void SetExpandButtonContent DataTemplate expandButtonTemplate if expandButtonTemplate null ExpandButtonContent Content View expandButtonTemplate CreateContent else ExpandButtonContent Content View new ContentView Content EmptyBox private void ExpandButton Tapped object sender EventArgs e ExpandButtonClickedTime DateTime Now IsExpanded IsExpanded private void TapGestureRecognizer Tapped object sender EventArgs e TODO Hack We don t want the node to become selected when we are clicking on the expanded button if DateTime Now ExpandButtonClickedTime gt new TimeSpan ChildSelected this private void DoubleClick object sender EventArgs e DoubleClicked Invoke this new EventArgs private void ItemsSource CollectionChanged object sender NotifyCollectionChangedEventArgs e TreeView RenderNodes Children ChildrenStackLayout e this Render d And finally the TreeView control implementation The public collection RootNodes needs to be assigned later in order to display the nodes It s a List of TreeViewNode You can call the public ProcessXamlItemGroups method to map the hierarchy of nodes xamlItemGroups into an ObservableCollection of TreeViewNode using MauiTreeView Models using System Collections ObjectModel using System Collections Specialized namespace MauiTreeView Controls public class TreeView ScrollView private readonly StackLayout StackLayout new StackLayout Orientation StackOrientation Vertical TODO This initialises the list but there is nothing listening to INotifyCollectionChanged so no nodes will get rendered private IList lt TreeViewNode gt RootNodes new ObservableCollection lt TreeViewNode gt private TreeViewNode SelectedItem lt summary gt The item that is selected in the tree TODO Make this two way and maybe eventually a bindable property lt summary gt public TreeViewNode SelectedItem get gt SelectedItem set if SelectedItem value return if SelectedItem null SelectedItem IsSelected false SelectedItem value SelectedItemChanged Invoke this new EventArgs public IList lt TreeViewNode gt RootNodes get gt RootNodes set RootNodes value if value is INotifyCollectionChanged notifyCollectionChanged notifyCollectionChanged CollectionChanged s e gt RenderNodes RootNodes StackLayout e null RenderNodes RootNodes StackLayout new NotifyCollectionChangedEventArgs NotifyCollectionChangedAction Reset null lt summary gt Occurs when the user selects a TreeViewItem lt summary gt public event EventHandler SelectedItemChanged public TreeView Content StackLayout private void RemoveSelectionRecursive IEnumerable lt TreeViewNode gt nodes foreach var treeViewItem in nodes if treeViewItem SelectedItem treeViewItem IsSelected false RemoveSelectionRecursive treeViewItem ChildrenList private static void AddItems IEnumerable lt TreeViewNode gt childTreeViewItems StackLayout parent TreeViewNode parentTreeViewItem foreach var childTreeNode in childTreeViewItems if parent Children Contains childTreeNode parent Children Add childTreeNode childTreeNode ParentTreeViewItem parentTreeViewItem lt summary gt TODO A bit stinky but better than bubbling an event up lt summary gt internal void ChildSelected TreeViewNode child SelectedItem child child IsSelected true child SelectionBoxView Color child SelectedBackgroundColor child SelectionBoxView Opacity child SelectedBackgroundOpacity RemoveSelectionRecursive RootNodes internal static void RenderNodes IEnumerable lt TreeViewNode gt childTreeViewItems StackLayout parent NotifyCollectionChangedEventArgs e TreeViewNode parentTreeViewItem if e Action NotifyCollectionChangedAction Add TODO Reintate this parent Children Clear AddItems childTreeViewItems parent parentTreeViewItem else AddItems e NewItems Cast lt TreeViewNode gt parent parentTreeViewItem Main code private TreeViewNode CreateTreeViewNode object bindingContext Label label bool isItem var node new TreeViewNode BindingContext bindingContext Content new StackLayout Children new ResourceImage Resource isItem item png folderopen png HeightRequest WidthRequest label Orientation StackOrientation Horizontal set DataTemplate for expand button content node ExpandButtonTemplate new DataTemplate gt new ExpandButtonContent BindingContext node return node private void CreateXamlItem IList lt TreeViewNode gt children XamlItem xamlItem var label new Label VerticalOptions LayoutOptions Center TextColor Colors Black label SetBinding Label TextProperty Key var xamlItemTreeViewNode CreateTreeViewNode xamlItem label true children Add xamlItemTreeViewNode public ObservableCollection lt TreeViewNode gt ProcessXamlItemGroups XamlItemGroup xamlItemGroups var rootNodes new ObservableCollection lt TreeViewNode gt foreach var xamlItemGroup in xamlItemGroups Children OrderBy xig gt xig Name var label new Label VerticalOptions LayoutOptions Center TextColor Colors Black label SetBinding Label TextProperty Name var groupTreeViewNode CreateTreeViewNode xamlItemGroup label false rootNodes Add groupTreeViewNode groupTreeViewNode ChildrenList ProcessXamlItemGroups xamlItemGroup foreach var xamlItem in xamlItemGroup XamlItems CreateXamlItem groupTreeViewNode ChildrenList xamlItem return rootNodes And that s it Well it needs a bit polishing implement some bindables for example make it a Nuget package but for the moment let s test it Step Create the following structure in your projecta Models For this example the hierarchy will be like this A company has departments and each department includes employees So the classes models are as follows Company namespace MauiTreeView Sample Models public class Company public int CompanyId get set public string CompanyName get set Department namespace MauiTreeView Sample Models public class Department public int DepartmentId get set public string DepartmentName get set public int ParentDepartmentId get set public int CompanyId get set Employee namespace MauiTreeView Sample Models public class Employee public int EmployeeId get set public string EmployeeName get set public int DepartmentId get set b For the Services layer data is hard coded The DataService contains methods to return a collection of Department Employee and Company using MauiTreeView Sample Models namespace MauiTreeView Sample Services public class DataService public Company GetCompany return new Company CompanyId CompanyName TC Solutions public IEnumerable lt Department gt GetDepartments return new List lt Department gt new Department CompanyId DepartmentId DepartmentName IT ParentDepartmentId new Department CompanyId DepartmentId DepartmentName Accounting ParentDepartmentId new Department CompanyId DepartmentId DepartmentName Production ParentDepartmentId new Department CompanyId DepartmentId DepartmentName Software ParentDepartmentId new Department CompanyId DepartmentId DepartmentName Support ParentDepartmentId new Department CompanyId DepartmentId DepartmentName Testing ParentDepartmentId new Department CompanyId DepartmentId DepartmentName Accounts receivable ParentDepartmentId new Department CompanyId DepartmentId DepartmentName Accounts payable ParentDepartmentId new Department CompanyId DepartmentId DepartmentName Customers and services ParentDepartmentId public IEnumerable lt Employee gt GetEmployees return new List lt Employee gt new Employee EmployeeId EmployeeName Luis DepartmentId new Employee EmployeeId EmployeeName Pepe DepartmentId new Employee EmployeeId EmployeeName Juan DepartmentId new Employee EmployeeId EmployeeName Inés DepartmentId new Employee EmployeeId EmployeeName Sara DepartmentId new Employee EmployeeId EmployeeName Sofy DepartmentId new Employee EmployeeId EmployeeName Hugo DepartmentId new Employee EmployeeId EmployeeName Gema DepartmentId new Employee EmployeeId EmployeeName Olga DepartmentId new Employee EmployeeId EmployeeName Otto DepartmentId new Employee EmployeeId EmployeeName Axel DepartmentId new Employee EmployeeId EmployeeName Eloy DepartmentId new Employee EmployeeId EmployeeName Flor DepartmentId new Employee EmployeeId EmployeeName Aída DepartmentId new Employee EmployeeId EmployeeName Ruth DepartmentId c Class CompanyTreeViewBuilder is a specific mapping from our hierarchy to XamlItemGroup hierarchy which is used by the TreeView control FindParentDepartment method compares the ParentDepartmentId to evaluate if the current department belongs to another one or if it s a root one The public method GroupData maps your hierarchy to a XamlItemGroup instance It requires a DataService connection to obtain the data companies departments and employees using MauiTreeView Models using MauiTreeView Sample Models using MauiTreeView Sample Services namespace MauiTreeView Sample Helpers public class CompanyTreeViewBuilder private XamlItemGroup FindParentDepartment XamlItemGroup group Department department if group GroupId department ParentDepartmentId return group if group Children null foreach var currentGroup in group Children var search FindParentDepartment currentGroup department if search null return search return null public XamlItemGroup GroupData DataService service var company service GetCompany var departments service GetDepartments OrderBy x gt x ParentDepartmentId var employees service GetEmployees var companyGroup new XamlItemGroup companyGroup Name company CompanyName foreach var dept in departments var itemGroup new XamlItemGroup itemGroup Name dept DepartmentName itemGroup GroupId dept DepartmentId Employees first var employeesDepartment employees Where x gt x DepartmentId dept DepartmentId foreach var emp in employeesDepartment var item new XamlItem item ItemId emp EmployeeId item Key emp EmployeeName itemGroup XamlItems Add item Departments now if dept ParentDepartmentId companyGroup Children Add itemGroup else XamlItemGroup parentGroup null foreach var group in companyGroup Children parentGroup FindParentDepartment group dept if parentGroup null parentGroup Children Add itemGroup break return companyGroup d Then CompanyPage is where we will use our control There is XAML and C code required for the setup The XAML part is simple lt xml version encoding utf gt lt ContentPage xmlns xmlns x x Class MauiTreeView Sample Views CompanyPage xmlns controls clr namespace MauiTreeView Controls Title Company Page gt lt controls TreeView BackgroundColor White Margin x Name TheTreeView gt lt ContentPage gt And regarding the code behind here it is S and Susing MauiTreeView Sample Services using MauiTreeView Sample Helpers namespace MauiTreeView Sample Views public partial class CompanyPage ContentPage DataService service CompanyTreeViewBuilder companyTreeViewBuilder public CompanyPage DataService service CompanyTreeViewBuilder companyTreeViewBuilder InitializeComponent this service service this companyTreeViewBuilder companyTreeViewBuilder ProcessTreeView private void ProcessTreeView var xamlItemGroups companyTreeViewBuilder GroupData service var rootNodes TheTreeView ProcessXamlItemGroups xamlItemGroups TheTreeView RootNodes rootNodes As you can see you simply call the GroupData from CompanyTreeViewBuilder public method passing a DataService instance then you pass the XamlItemGroup instance to ProcessXamlItemGroups method from TreeView control to actually display the content Step Don t forget to configure your DI in MauiProgram cs builder Services AddSingleton lt DataService gt builder Services AddSingleton lt CompanyTreeViewBuilder gt builder Services AddTransient lt CompanyPage gt And set the initial page in AppShell xaml lt xml version encoding UTF gt lt Shell x Class MauiTreeView AppShell xmlns xmlns x xmlns local clr namespace MauiTreeView xmlns samples clr namespace MauiTreeView Sample Views Shell FlyoutBehavior Disabled gt lt ShellContent Title Home ContentTemplate DataTemplate samples CompanyPage Route MainPage gt lt Shell gt Step Time to test our application Windows Android Cool right By the way the project is available on GitHub I hope that this blog post was interesting and useful for you I invite you to visit my blog for more technical posts about Xamarin NET MAUI Azure and more I write in Spanish language Thanks for your time and enjoy the rest of the MAUIUIJuly publications See you next time Luis |
2022-07-07 07:08:22 |
海外TECH |
DEV Community |
Here is why you need a message broker |
https://dev.to/saar_memphis/here-is-why-you-need-a-message-broker-31g0
|
Here is why you need a message broker Hopefully by the end of this article you will be able to understand the importance of using a message driven architecture for building your next project Among the open source projects my college buddies and my future co founders of memphis dev and I built you can find “Makhela a Hebrew word for choir For the sake of simplicity We will use Choir “Choir was an open source OSINT Open source intelligent project focused on gathering context based connections between social profiles using AI models like LDA and topic modeling written in Python to explain what the world discusses over a specific domain and by high ranking influencers in that domain and focus on what s going on at the margins For proof of concept or MVP we used a single data source fairly easy for integrations Twitter The graph below was the “brain behind “Choir The brain autonomously grows and analyzes new vertexes and edges based on incremental changes in the corpus and fresh ingested data Each vertex symbolizes a profile a persona and each edge emphasizes a who connects to who b Similar color Similar topic Purple Topic Blue Topic Yellow Marginal topicAfter a reasonable amount of research dev time and a lot of troubleshooting amp debug things started to look good Among the issues we needed to solve were Understand the connection between profilesBuild a ranking algorithm for adding more influencersTransform the schema of incoming data to a shape the analysis side knows how to handleNear real time is crucial Enrich each tweet with external dataAdaptivity to Twitter rate limitEach upstream or schema change crashed the analysis functionsSync between collection and analysis which were two different componentsInfrastructureScaleAs with any startup or early stage project we built “Choir as MVP Working solely with “Twitter and it looked like this The “Collector is a monolith python written application that basically collects and refines the data for analysis and visualization in batches and in a static timing every couple of hours Problems started to arise as the collected data and its complexity grew The amount of processing cycle each batch processing took to be analyzed turned into hours for no good reason in terms of the capacity of the collected data Hundreds of Megabytes at most More on the rest of the challenges in the next sections Fast forward a few months later users started to use “Choir Not just using but actually engaging paying and raising feature requests Any creator s dream But then it hit us a Twitter is not the center of the universe and we need to expand “Choir to more sources b Any minor change in the code breaks the entire pipeline c Monolith is a death sentence to a data driven app performance wise As with every eager to run project that starting to get good traction fueling that growth and user base is your number and priority and the last thing you want to do at this point is to go back and rebuild your framework You want to continue the momentum With that spirit in our mind we said Let s add more data sources and refactor in the future Big Mistake Challenges in scaling a data driven application Each new data source requires a different schema transformationEach schema change causes a chain of reaction downstream to the rest of the stages in the pipelineIncremental climbing collection While you can wait for an entire batch collection to finalize and then save it to the DB applications often get crashed Imagine you re doing a very slow collection and in the very last record the collection process gets crashedIn a monolith architecture it s hard to scale out the specific functions which require more powerAnalysis functions often require modifications upgrades and algorithms to get better results which are made by using or requiring different keys from the collectors While there is no quick fix what we can do is build a framework to support such requirements SolutionsOption Duplicate the entire existing process to another source for example “Facebook Besides duplicating the collector we needed to Maintain two different schemas Nightmare Entirely different analysis functions The connections between profiles on Facebook and Twitter are different and require different objective relationships The analyzer should be able to analyze the data in a joined manner not individually therefore any minor change in source X directly affects the analyzer and often crashes it down Double maintenanceAnd the list goes on…Long story short it cant scale Option Here it comes Using a message broker I want to draw a baseline A message broker is not the solution but a supporting framework or a tool to enable branched growing data driven architectures What is a message broker “A message broker is an architectural pattern for message validation transformation and routing It mediates communication among applications vague minimizing the mutual awareness that applications should have of each other in order to be able to exchange messages effectively implementing decoupling Wikipedia Let s translate it to something we can grasp better A message broker is a temporary data store Why temporary Because each piece of data within it will be removed after a certain time defined by the user The pieces of data within the message broker are called “messages Each message usually weighs a few bytes to a few megabytes Around the message broker we can find producers and consumers Producer The “thing that pushes the messages into the message broker Consumer The “thing that consumes the messages from the message broker “Thing means system service application IoT some objective that connects with the message broker and exchanges data Small note the same service system app can act as a producer and consumer at the same time Messaging queues derive from the same family but there is a crucial difference between a broker and a queue MQ uses the term publish and subscribe The MQ itself pushes the data to the consumers and not the other way consumer pulls data from the broker Ordering is promised Messages will be pushed in the order they receive Some systems require it The ratio between a publisher producers and subscribers is Having said it modern versions can achieve it by some features like exchange and more Famous message brokers queues are Apache Kafka RabbitMQ Apache Pulsar and our own Memphis devStill with me Awesome Let s understand how using a message broker helped “Choir to scale Instead of doing things like this By decoupling the app to smaller microservices and orchestrating the flow using a message broker it turned into this Starting from the top left corner each piece of data tweet post inserted into the system automatically triggers the entire process and flows between the different stages Collection The three collectors search each new profile added to the community in parallel If any more data source social network is needed it s been developed on the side and once ready start listening for incoming events Allows infinite scale of sources ability to work on the specific source without disrupting the others micro scaling for better performance of each source individually and more Transformation Once the collection is complete results will be pushed to the next stage “Schema transformation where the schema transformation service will transform the events schemas into a shape the analysis function can interpret It enables a “single source of truth regarding schema management so in case of upstream change all is needed to reach out to this service and debug the issue In a more robust design it can also integrate with an external schema registry to make maintenance even more effortless Analysis Each piece of event is sent to the analysis function transformed and in a shape the analysis function can interpret In “Choir we used different AI models Scaling it was impossible so moving to analysis per event definitely helped Save Creates an abstraction between “Choir and the type of database ability to batch several insertions to a single batch instead of request per event The main reason behind my writing is to emphasize the importance of implementing a message broker pattern and a technology as early as possible to avoid painful refactoring in the future Yes your roadmap and added features are important Yes it will take a learning curve yes it might look like an overkill solution for your stage but when it comes to a data driven use case the need for scale will reveal quickly in performance agility feature additions modifications and more Bad design decisions or a lack of proper framework will burn out your resources It is better to build agile foundations not necessarily enterprise grade before reaching the phase you are overwhelmed by users and feature requests To conclude the entry barrier for a message broker is definitely worth your time Special thanks to Yaniv Ben Hemo for the writing |
2022-07-07 07:03:23 |
金融 |
日本銀行:RSS |
FSBが「クロスボーダー送金の目標達成に向けた実装方法の策定:中間報告書」を公表 |
http://www.boj.or.jp/announcements/release_2022/rel220707a.htm
|
中間報告 |
2022-07-07 17:00:00 |
ニュース |
BBC News - Home |
Boris Johnson: Resignations exceed 50 but PM stays in post |
https://www.bbc.co.uk/news/uk-politics-62069494?at_medium=RSS&at_campaign=KARANGA
|
fresh |
2022-07-07 07:50:20 |
ニュース |
BBC News - Home |
House prices defy expectations to hit record |
https://www.bbc.co.uk/news/business-62075834?at_medium=RSS&at_campaign=KARANGA
|
halifax |
2022-07-07 07:31:29 |
ニュース |
BBC News - Home |
Chris Mason: Boris Johnson robbed of authority, but not his job |
https://www.bbc.co.uk/news/uk-politics-62076253?at_medium=RSS&at_campaign=KARANGA
|
johnson |
2022-07-07 07:35:22 |
ニュース |
BBC News - Home |
Who has gone, who is staying? |
https://www.bbc.co.uk/news/uk-politics-62058278?at_medium=RSS&at_campaign=KARANGA
|
ministerial |
2022-07-07 07:35:32 |
ニュース |
BBC News - Home |
Boris Johnson: Brandon Lewis resigns as Northern Ireland secretary |
https://www.bbc.co.uk/news/uk-northern-ireland-62071165?at_medium=RSS&at_campaign=KARANGA
|
boris |
2022-07-07 07:15:11 |
ニュース |
BBC News - Home |
Raheem Sterling: Why are Man City letting him go and why are Chelsea signing him? |
https://www.bbc.co.uk/sport/football/62050049?at_medium=RSS&at_campaign=KARANGA
|
england |
2022-07-07 07:09:25 |
ニュース |
BBC News - Home |
Australia v England: Uncapped Guy Porter and Tommy Freeman to start for Eddie Jones' side |
https://www.bbc.co.uk/sport/rugby-union/62075049?at_medium=RSS&at_campaign=KARANGA
|
Australia v England Uncapped Guy Porter and Tommy Freeman to start for Eddie Jones x sideEngland will give debuts to centre Guy Porter and wing Tommy Freeman for the second Test against Australia in Brisbane on Saturday |
2022-07-07 07:51:18 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
空飛ぶタクシー会社、バッテリーが存続のカギ - WSJ発 |
https://diamond.jp/articles/-/306137
|
存続 |
2022-07-07 16:21:00 |
GCP |
Google Cloud Platform Japan 公式ブログ |
Cloud Armor の新機能であるレート制限、適応型保護、bot 防御の概要 |
https://cloud.google.com/blog/ja/products/identity-security/announcing-new-cloud-armor-rate-limiting-adaptive-protection-and-bot-defense/
|
」CloudArmorは、さまざまな脅威の軽減をサポートCloudArmorに追加された新たな機能を使えば、Googleの大規模なグローバルネットワークを活用しつつ、インターネットに接続しているウェブアプリケーションやサービスが直面するさまざまな脅威を、業界をリードするツールや戦術を組み合わせて軽減できるようになります。 |
2022-07-07 09:00:00 |
GCP |
Google Cloud Platform Japan 公式ブログ |
Google Public Sector のご紹介 |
https://cloud.google.com/blog/ja/topics/public-sector/announcing-google-public-sector/
|
この新しいGoogle部門は、米国の連邦政府、州政府、地方自治体などの公共部門機関や教育機関が、デジタルトランスフォーメーションを加速できるように支援することに重点を置いています。 |
2022-07-07 09:00:00 |
GCP |
Google Cloud Platform Japan 公式ブログ |
リリース パイプラインに割り当ての回帰検出を組み込む |
https://cloud.google.com/blog/ja/products/devops-sre/ensuring-consistent-api-quota-limits-between-dev-and-prod/
|
これを見過ごしてしまうと、この会計事務所は、負荷テストに合格して繁忙期を迎えることができても、サービス環境の割り当て不足によるシステム停止に陥る可能性があります。 |
2022-07-07 08:00:00 |
北海道 |
北海道新聞 |
東証大幅反発、382円高 米国株上昇、円安を好感 |
https://www.hokkaido-np.co.jp/article/702877/
|
大幅反発 |
2022-07-07 16:37:40 |
北海道 |
北海道新聞 |
北海道内901人感染、2人死亡 新型コロナ |
https://www.hokkaido-np.co.jp/article/702879/
|
北海道内 |
2022-07-07 16:09:11 |
北海道 |
北海道新聞 |
石油業の発展祈る燃水祭、大津 天智天皇を祭る近江神宮 |
https://www.hokkaido-np.co.jp/article/702897/
|
天智天皇 |
2022-07-07 16:43:00 |
北海道 |
北海道新聞 |
ディズニーと女子サッカー普及へ 第1弾は小学生向け教室 |
https://www.hokkaido-np.co.jp/article/702895/
|
女子サッカー |
2022-07-07 16:27:00 |
北海道 |
北海道新聞 |
追いかけ、複数回切り付け 仙台、中学生刃物襲撃 |
https://www.hokkaido-np.co.jp/article/702891/
|
女子生徒 |
2022-07-07 16:17:43 |
北海道 |
北海道新聞 |
ハイチ大統領暗殺1年、続く混乱 治安悪化、住民に嘆きも |
https://www.hokkaido-np.co.jp/article/702894/
|
大統領暗殺 |
2022-07-07 16:15:00 |
ビジネス |
東洋経済オンライン |
粉飾倒産がコロナ禍を脱する今から増えてくる訳 倒産件数も休廃業も政策的に抑え込まれた反動で | 企業経営・会計・制度 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/600544?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
新型コロナウイルス |
2022-07-07 17:00:00 |
ニュース |
Newsweek |
ウィンブルドンの試合直前「透ける」とブラを替えさせられた! |
https://www.newsweekjapan.jp/stories/world/2022/07/post-99051.php
|
既定にはさらに、「プレー中に観客から見える、あるいは汗をかいたなどの理由で透けて見える可能性がある下着も、幅センチ以内の縁取り以外は完全な白でなければならない」と定め、こう続けている。 |
2022-07-07 16:19:12 |
マーケティング |
MarkeZine |
AIQ、コンテンツ創作とユーザーコミュニケーションの活性化を支援する新プラットフォームをリリース |
http://markezine.jp/article/detail/39411
|
活性化 |
2022-07-07 16:30:00 |
IT |
週刊アスキー |
25周年リマスター作品『風のクロノア 1&2アンコール』が本日発売! |
https://weekly.ascii.jp/elem/000/004/097/4097173/
|
nintendo |
2022-07-07 16:55:00 |
IT |
週刊アスキー |
プリップリ×4尾!フレッシュネス、大ぶりのエビを“まるごと”使用した「シュリンプバーガー」期間限定で |
https://weekly.ascii.jp/elem/000/004/097/4097116/
|
期間限定 |
2022-07-07 16:15:00 |
IT |
週刊アスキー |
瀬戸内ならではの特産品を買いに行こう! 東京都庁の観光PRコーナーにて「ぶちええ『SETOUCHI TABI(せとうちたび)』」7月13日~7月19日開催 |
https://weekly.ascii.jp/elem/000/004/097/4097150/
|
setouchitabi |
2022-07-07 16:10:00 |
IT |
週刊アスキー |
『DQウォーク』で新イベント「賢者と受け継がれしさとりのしょ」が開催。新装備が手に入る「さとりのしょ装備ふくびき」も登場! |
https://weekly.ascii.jp/elem/000/004/097/4097162/
|
位置情報 |
2022-07-07 16:10:00 |
海外TECH |
reddit |
Kazuki Takahashi, author of Yugioh, has passed away |
https://www.reddit.com/r/yugioh/comments/vtcjln/kazuki_takahashi_author_of_yugioh_has_passed_away/
|
Kazuki Takahashi author of Yugioh has passed away submitted by u Pzzaman to r yugioh link comments |
2022-07-07 07:11:05 |
GCP |
Cloud Blog JA |
Cloud Armor の新機能であるレート制限、適応型保護、bot 防御の概要 |
https://cloud.google.com/blog/ja/products/identity-security/announcing-new-cloud-armor-rate-limiting-adaptive-protection-and-bot-defense/
|
」CloudArmorは、さまざまな脅威の軽減をサポートCloudArmorに追加された新たな機能を使えば、Googleの大規模なグローバルネットワークを活用しつつ、インターネットに接続しているウェブアプリケーションやサービスが直面するさまざまな脅威を、業界をリードするツールや戦術を組み合わせて軽減できるようになります。 |
2022-07-07 09:00:00 |
GCP |
Cloud Blog JA |
Google Public Sector のご紹介 |
https://cloud.google.com/blog/ja/topics/public-sector/announcing-google-public-sector/
|
この新しいGoogle部門は、米国の連邦政府、州政府、地方自治体などの公共部門機関や教育機関が、デジタルトランスフォーメーションを加速できるように支援することに重点を置いています。 |
2022-07-07 09:00:00 |
GCP |
Cloud Blog JA |
リリース パイプラインに割り当ての回帰検出を組み込む |
https://cloud.google.com/blog/ja/products/devops-sre/ensuring-consistent-api-quota-limits-between-dev-and-prod/
|
これを見過ごしてしまうと、この会計事務所は、負荷テストに合格して繁忙期を迎えることができても、サービス環境の割り当て不足によるシステム停止に陥る可能性があります。 |
2022-07-07 08:00:00 |
コメント
コメントを投稿