architecture

How to scope ViewModels properly?

回眸只為那壹抹淺笑 提交于 2020-08-06 12:50:49
问题 I am trying to wrap my head around the new Android Architecture Components, specifically the ViewModel. My impression is that a Fragment should not know about what Activity or Fragment it is owned by, so that it can be used in different contexts of the application. The examples seem to contradict this by declaring the ViewModel scope directly in the Fragment, rather than the Fragment owner: viewModel = ViewModelProviders.of(getActivity()).get(SomeViewModel.class); I would like to be able to

Web components - Services / non html components

可紊 提交于 2020-08-05 09:36:29
问题 So I am coming from Angular and wanted to take a look at how to create vanilla Web components . Now coming from Angular we tend to have things divided: Components (which acts as HTML,CSS, and some javascript) and then "services" which mainly acts do jobs such as collecting data and doing the "hard backend" jobs that shouldn't happen in components. now while I know that Web components and a Framework such as Angular are not the same things I am wondering how you would structure a project. All

Disadvantages of bigger project in VBA

左心房为你撑大大i 提交于 2020-08-01 09:02:43
问题 i am new in project for company that have bigger enterprise/accounting system based on Visual Basic for Applications (VBA) in Ms Access 97. This application is still alive, they make updates and everything is working relatively fine. But they want to move this app to highest level, speed up development, make this app more "atractive" for end-users and so on.. But i'm not shure if it's good idea to continue developing using this technology (VBA) and therefore i have a few questions. I would be

Disadvantages of bigger project in VBA

纵然是瞬间 提交于 2020-08-01 09:02:10
问题 i am new in project for company that have bigger enterprise/accounting system based on Visual Basic for Applications (VBA) in Ms Access 97. This application is still alive, they make updates and everything is working relatively fine. But they want to move this app to highest level, speed up development, make this app more "atractive" for end-users and so on.. But i'm not shure if it's good idea to continue developing using this technology (VBA) and therefore i have a few questions. I would be

What is the difference between a state machine and the implementation of the state pattern?

亡梦爱人 提交于 2020-07-28 06:02:05
问题 I wonder if a state machine is just the state pattern at work or if there is actually a difference between those two? I found this article with the bold title "the state design pattern vs state machine" but at the end of the day he only says that the state pattern makes state machines obsolete but then doesn't describe what exactly is a state machine compared to the implementation of the state pattern . 回答1: The way I describe this difference to my colleagues is that state patterns are a more

What is the difference between a state machine and the implementation of the state pattern?

久未见 提交于 2020-07-28 06:01:50
问题 I wonder if a state machine is just the state pattern at work or if there is actually a difference between those two? I found this article with the bold title "the state design pattern vs state machine" but at the end of the day he only says that the state pattern makes state machines obsolete but then doesn't describe what exactly is a state machine compared to the implementation of the state pattern . 回答1: The way I describe this difference to my colleagues is that state patterns are a more

Convolutional Neural Net Architecture - correct?

南笙酒味 提交于 2020-07-20 06:32:19
问题 I am trying to train a convolutional neural net. Therefore I am using a datset of 646 images/license plates which contains 8 characters (0-9, A-Z; without letter 'O' and blank spaces, in total 36 possible characters). These are my training data X_train . Their shape is (646, 40, 200, 3) with color code 3. I resized them to the same shape. I also have a dataset which contains the labels of this images, which I one-hot-encoded to a numpy array of shape (646, 8, 36) . This data is my y_train

CQRS: Command Return Values [closed]

旧城冷巷雨未停 提交于 2020-07-16 11:00:07
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . Improve this question There seems to be endless confusion about whether commands should or should not have return values. I would like to know if the confusion is simply because the participants have not stated their context or circumstances. The Confusion Here are examples

instruction point value of dynamic linking and static linking

允我心安 提交于 2020-07-09 11:54:09
问题 By using Intel's pin, I printed out the instruction pointer (ip) values for a program with dynamic linking and static linking. And I've found that their ip values are quite different, even though they are the same program. A program with static linking shows 0x400f50 for its very first ip value. but a program with dynamic linking shows 0x7f94f0762090 for its first ip value I am not sure why they have that quite a large gap. It would be appreciated if anyone could help me find out the reason

Infinite loop with Python imports; looking for Pythonic way

試著忘記壹切 提交于 2020-07-09 05:41:58
问题 My team is working on huge project with Django. For sake of simplicity, here's plain Python to illustrate the problem (original problem has models and apps instead of classes (I know that both are classes) and packages (I know that both are packages as well)). a.py : from b import B1 class A1(object): def __init__(self): print "object A1" class A2(object): def __init__(self): print "object A2" A1() B1() b.py : from a import A2 class B1(object): def __init__(self): print "object B1" A2() When