software-design

Why use classes in php?

社会主义新天地 提交于 2020-07-15 15:08:11
问题 I want to know why we use classes in php. I have seen in all of open source they use classes for executing query. It means they use classes for getting results, insert query etc. I think this is used for consistency and speedup, but as my knowledge if we execute query using mysql_query() , rather than creating an object link $db->query will execute fast as compare to second one because in object it will goto the function and then it execute it there and after that it return the result but in

What is the best way to stop a thread and avoid 'RuntimeError' in python using threading and tkinter modules?

泪湿孤枕 提交于 2020-06-27 08:16:20
问题 I have went through multiple solutions on the net, but they require a lot of code that might get confusing once you scale up. Is there a simple way to stop the thread and avoid the RuntimeError: threads can only be started once , in order to call the thread an infinite number of times. Here is a simple version of my code: import tkinter import time import threading def func(): entry.config(state='disabled') label.configure(text="Standby for seconds") time.sleep(3) sum = 0 for i in range(int

Database communication in modular software?

前提是你 提交于 2020-06-18 09:55:30
问题 I'm building web app that has modular design. I have ER database schema for whole app. Tables there are grouped by the module they will be used by. There will be core modules and I plan to add new ones that depend on that core i.e. that need data from core modules tables. When NEW module needs to access core tables, what practices should I follow: 1.In purpose of reading, a. is it okay to read from core tables or I need to build interfaces in core module? b. is JOIN operation with core tables

Database communication in modular software?

杀马特。学长 韩版系。学妹 提交于 2020-06-18 09:50:24
问题 I'm building web app that has modular design. I have ER database schema for whole app. Tables there are grouped by the module they will be used by. There will be core modules and I plan to add new ones that depend on that core i.e. that need data from core modules tables. When NEW module needs to access core tables, what practices should I follow: 1.In purpose of reading, a. is it okay to read from core tables or I need to build interfaces in core module? b. is JOIN operation with core tables

Passing Data between Arbitrary amounts of Fragments via one Activity

随声附和 提交于 2020-01-26 03:36:19
问题 I have an application design question regarding passing data between fragments. I have an application using the navigation drawer layout, with various "sub applications" that perform standalone functions (for example, a calculators app, with unrelated "sub apps" for income tax calculations, metric/imperial conversions, etc). For a given calculator, I'd have a data entry/selection fragment and a data presentation fragment that displays the calculation in some meaningful type of way. Thus, my

Why do we use UseCase diagrams in object oriented analysis and design even if Usecases are not considered as Object oriented?

﹥>﹥吖頭↗ 提交于 2020-01-23 01:20:06
问题 UML notations says, Usecases are drawn to point out the functional requirements in the Problem Domain, it by no means gives the information about object or class as Data Flow Diagrams or Entity Relationship diagrams. But also why do we use Usecase Diagrams in object oriented analysis and design even if Usecases are not considered as Object oriented. 回答1: Use case diagram is meant to shed light on the main functionalities of the system , and emphasis the perspective presenting the latter as a

How to get feedback on design [closed]

二次信任 提交于 2020-01-21 09:08:40
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . As we know design is most important part of Software Development, I want to practice it. But problem is, I cannot get feedback on my design, is there any website where we can submit design (like UML diagrams) and community will review it. Thanks in advance. 回答1: Use the Code Review section on stackexchange. 来源:

Managing the demo version of software [closed]

自闭症网瘾萝莉.ら 提交于 2020-01-14 14:14:57
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have a software product written in VB6. It is a paid software product and it has a demo version for 1 month.There is no separate setup file for demo version.The software on entering the product key turns demo to a full version.I used to write the information in registry to track

Find Number of CPUs and Cores per CPU using Command Prompt

落花浮王杯 提交于 2020-01-11 17:10:51
问题 I am trying to retrieve the Number of CPUs and Cores per CPU using Command Prompt. I have executed the following command: wmic cpu get NumberOfCores, NumberOfLogicalProcessors/Format:List I get this error: wmic' is not recognized as an internal or external command, operable program or batch file I am executing this on a Windows Server 2008 R2 machine. I believe the 'wmic' command is compatible on this windows. The directory I am running the command promt from is 'C:\Windows> Any advice please

Constructors, templates and non-type parameters

半城伤御伤魂 提交于 2020-01-10 17:44:31
问题 I've a class that must depend for some reasons from an int template parameter. For the same reasons, that parameter cannot be part of the parameter list for the class, instead it is part of the parameter list of its constructor (that is, of course, templated). Here the problems arose. Maybe I'm missing something, but I can't see an easy way to provide such a parameter to the constructor, because it cannot be deduced nor explicitly specified. So far, I've found the following alternatives: put