conceptual

Which UML diagrams may I need to conceptualize background desktop apps?

為{幸葍}努か 提交于 2019-12-12 04:09:52
问题 I'm trying to develop a web-app and some desktop apps, all of these apps communicates via database or socket tcp. These desktop apps are running in background so, there is no use cases and the web-app is only used by remote users. And, these desktop apps communicates with the web-app via the DB and vis versa. Which UML diagrams may help me to conceptualize the work of the desktop apps, please? I've tried to conceptualize this thing using the deploiement diagram, but, I think that it's

Index path for XML document

心已入冬 提交于 2019-12-12 03:58:37
问题 I've got an algorithm for indexing an Xpath so that I can process multiple files with the same Xpath but different values via assigning an xpath node a unique index. Example: File 1: <Return> <ReturnData> <Person> <Name>Yohanna</Name> </Person> </ReturnData> </Return> File 2: <Return> <ReturnData> <Person> <Name>Jacoub</Name> </Person> </ReturnData> </Return> Desired output: 1. /Return/ReturnData/Person[1]/Name=Yohanna 2. /Return/ReturnData/Person[2]/Name=Jacoub My current implementation

How is JS both non-blocking / asynchronous but single-threaded?

五迷三道 提交于 2019-12-11 03:42:26
问题 I'm having trouble visualizing how Javascript can be both single-threaded but non-blocking on the client. I've always envisioned something like an assembly line: At the start of your code execution, you've got a single assembly line putting together different parts to a car. We get to a point at 20%-to-completion where an engine needs to be added, but an engine hasn't been assembled yet. Instead of waiting for the engine to be assembled, the assembly line gets broken up into two assembly

Conceptual inquiry about __main__ in Python

北城余情 提交于 2019-12-11 01:37:11
问题 I am currently working with Python and have been confused over the fact that functions are listed in __main__ . I have been looking over multiple python scripts to try to find a common theme as to what functions warrant a place in __main__ , but to no avail. Here I have a sample of my own code. firstfunction and anotherfunction are the only two functions in my code. def main(argv): firstinput="" secondinput="" if len(argv) < 3 or len(argv) > 3: print """"Please set to: metisfinal.main

Which executes first Code Behind or View Model

好久不见. 提交于 2019-12-08 13:58:00
问题 Based on my previous question Accessing variables from XAML and object from ViewModel using Code Behind: How would I know which executes first? Is it the code behind or the ViewModel? I just want to make sure that my code behind executes prior the ViewModel 回答1: The View and the ViewModel are both regular classes that get instantiated. This is done by calling the constructor as in any other class. So, as a simple answer to your question: Set a breakpoint in each constructor and see which one

When should we use event in C#

こ雲淡風輕ζ 提交于 2019-12-08 06:02:09
问题 I am a newbie of C# and WPF. And I just learned the asynchronous programming in C#. We raise event and some where we catch this event. The advantage of this method is we don't need to call directly the object method. Example we load data from database, then after load data method is finish, it raise the event LoadDataSuccessfully Then the main class catch this event and raise event UpdateGUIAfterLoadDataSuccessfully , some other Control will catch this event and update GUI. But now I think

What are the different ways of implementing multithreading in .net

旧巷老猫 提交于 2019-12-08 05:42:23
问题 I have been fighting with multi threading for few days. I dont understand what are different ways of multithreading . I have read little bit about backgroundWorker , little bit about creating an object of thread. Yesterday I saw in delegate example to implement multithreading by calling BeginInvoke . I dont understand are these different ways of multithreading or are same working on same background class. Please help me in making it clear to me. 回答1: I like this explanations very much. Maybe

REST API: Is it a really bad practice to create custom HTTP response codes?

三世轮回 提交于 2019-12-07 10:23:23
问题 Is it a bad practice when writing a RESTful API to use custom HTTP response codes like: 417 - Password not provided 418 - Database error I see there is a list of standard HTTP response codes. However, from looking at Twitter's API, it appears Twitter tries to return standard HTTP response codes when available but their own error codes when they cannot align the error with a standard HTTP response (correct me if I am wrong). What is the best practice for response codes (especially for errors)

Other builtin or practical examples of python `with` statement usage?

旧巷老猫 提交于 2019-12-07 08:15:17
问题 Does anyone have a real world example outside of python's file object implementation of an __enter__ and __exit__ use case? Preferably your own, since what I'm trying to achieve is a better way to conceptualize the cases where it would be used. I've already read this. And, here's a link to the python documentation. 回答1: There are many uses. Just in the standard library we have: sqlite3 ; using the connection as a context manager translates to committing or aborting the transaction. unittest ;

Is NULL a pointer?

前提是你 提交于 2019-12-07 06:01:02
问题 So, I had an argument with my professor earlier defending that NULL is not a pointer, but he kept on insisting that it is because there is such a thing as NULL pointer. So, here I am now a little bit confused if NULL is really a pointer or not I already tried search over the internet but couldn't find any answer, so my last resort is here 回答1: In C, NULL is a macro that expands to a null pointer constant. 7.19p3 The macros are NULL which expands to an implementation-defined null pointer