architecture

Angular 2 — navigate through web pages without reloading a component that is common for those pages

元气小坏坏 提交于 2020-01-02 20:09:53
问题 Here you can find an example app: http://ivan-khludov.com/ This is my root component: import { Component } from '@angular/core'; @Component({ selector: 'root', template: ` <h1>My Dummy Angular App</h1> <router-outlet></router-outlet> <nav> <a routerLink="/section-1/1" routerLinkActive="active">Section 1 - Page 1</a> <span>||</span> <a routerLink="/section-1/2" routerLinkActive="active">Section 1 - Page 2</a> <span>||</span> <a routerLink="/section-2/1" routerLinkActive="active">Section 2 -

calculating page size and segment size

时光怂恿深爱的人放手 提交于 2020-01-02 12:27:29
问题 in a paged-segmented system we have the virtual address of 32 bits and 12 bits for the offset,11 bits for segment and 9 bits for page number.the how can we calculate the page size ,maximum segment size and maximum number of segment size? 回答1: 12 bits are reserved for offset, so the page size is 2^12 = 4KB 9 bits are reserved for page number, so each segment can contain 2^9 = 512 pages Each segment can grow up to size of (# of pages) * (pages size), so maximum segment size is 512 * 4K = 2M For

How to push data to a .NET CF client?

淺唱寂寞╮ 提交于 2020-01-02 04:43:11
问题 Although polling a webservice is possible, do you know of another method to push changes to a mobile client except using the exchange server mail transport? 回答1: As Mark Seemann worte: I once did a POC of a client notification system for .NET CF when I was in the Microsoft Dynamics Mobile team. At the time I didn't find any Out-Of-The-Box solutions that could do this and I didn't want to piggyback on the Exchange Server connection since the intended users didn't have a AD account and most

Multiplatform C++ cross-compiler

喜夏-厌秋 提交于 2020-01-02 03:59:06
问题 How can I build a cross-compiler for a C++ library to target many platforms on a single build server? The cross-compiler should be able to build the library for (at least) {Windows 7, Mac OS X, Ubuntu 11.04} × {32 bit, 64 bit} × {Debug, Release}. I don't care if the whole build from scratch takes forever or if the gcc binary is 1 GB. If the cross-compiler cannot be a single executable, what is the workflow I should use to compile (and recompile) my library? The host machine would be a Ubuntu

Design from the database first through to UI or t'other way round?

可紊 提交于 2020-01-02 03:06:32
问题 Do you always lean towards thinking of db schema when starting or planning a new project it or do you go the other way and start designing UI then moving down the stack? Or do you have a different way of developing? Not really an agile/waterfall/specs/stories question just a way of getting a handle on which way people lean when working on projects personal/professional or otherwise. I have decided that both are the best ways in the past and am currently in the UI first camp but that can and

HTTP PATCH: Handling arrays, deletion, and nested key creation

房东的猫 提交于 2020-01-02 00:57:12
问题 I'm looking for a practical guide to implementing the PATCH verb for partial updates of a noun in a RESTful api using JSON. Understanding that PATCH is for partial updates, we lack still standardization around the syntax for deleting keys, creating or updating nested keys, and arrays. Let's say I GET an object: // GET users/42 { id: 42, name: 'SimpleAsCouldBe', city: 'San Francisco', roles: ['viewer','editor'], posts: { '01': {}, '02': {}, } } ...Then I want to update it: // PATCH users/42 {

How to model Push Notifications on server

一曲冷凌霜 提交于 2020-01-01 19:53:07
问题 Brief Description : Well, since many days I've been looking for an answer to this question but there seems to be answers for 'How to create a Push Notification Server' and like questions. I am using node.js and it's quite easy to 'create' a push notification server using sock.js (I've heard socket.io isn't good as compared to sock.js). No problem till here. But what I want is how to model such a server. Details : OK, so, let's say I've an application where there's a chat service (just an

How to run docker containers on different machines

怎甘沉沦 提交于 2020-01-01 19:23:33
问题 I've setup several docker containers for my application: container for mysql container for application server (tomcat7) container for nginx container for python tornado application On my local machine, using docker-machine , I've tried all these containers and them interactive with each other. I created one virtualbox machine with boot2linux and setup all these containers on it. Now, for production I am going to run each one of these containers on a separate server. Is there something docker

designing application classes

柔情痞子 提交于 2020-01-01 18:32:31
问题 Besides using the Single Responsibility Principle, when designing classes for an application one is writing, what should one keep in mind, to keep the code maintainable, reusable and adhere to OOP principles? I'm finding it hard to design the classes of applications I'm trying to write, because when does one decide what (functionality) goes in which class and whether it should really be in a derived class or there should be an abstract class or interface for this class? I know this is

ACPI in Linux

烈酒焚心 提交于 2020-01-01 13:00:32
https://01.org/zh/linux-acpi The goal of this project is to enable Linux to take advantage of platforms that support ACPI (Advanced Configuration & Power Interface). ACPI has been supported on virtually all high-volume i386, x86_64, and ia64 systems, since 1999. ACPI is an abstraction layer between the OS and platform firmware and hardware. This abstraction allows the OS and the platform to evolve independently. Not only should a new OS be able to handle old hardware, but an old OS should be able to handle new hardware. The latest ACPI specification is published on the ACPI home page: http:/