Deploying apps via CodePush or AppHub - reactjs

I am building a system that allows users to build up their own apps with React Native. This takes place on a React website. Each user will have a base application that holds the skeleton code, however the app they build on the website should be able to deployed to the phone easily and live in the skeleton app.
Is it possible to firstly do this? Also, would AppHub or Microsoft's CodePush allow me to do this?
I realise that these apps are built for deploying new releases, however I am wanting to push specific code, to specific users.

Here's some research. We ended up moving forward with CodePush
| | apphub.io | codepush.tools | react-native-auto-updater | getsiphon.com | rollout.io |
|--------------------------------------|------------------------|----------------------------|---------------------------|----------------------|-----------------------------------------|-
| Open Source Client | y | y | y | n | |
| Image Support | y | y | n | y | |
| HTTPS | y | y | n/a | y | |
| CLI Tooling | y | y | n/a | y | |
| Gradual Rollout | n | y | n/a | n | |
| SLA | "via ""Contact Us""" | ? (beta) | n/a | "via ""Contact Us""" | |
| Cost | "via ""Contact Us"" | | | | |
| | | | | | |
| ""Scale Plan"" (no private hosting): | | | | | |
| 1100$/mo for 5m DAU | | | | | |
| 2100$/mo for 10m DAU" | ? (free in beta) | n/a | "via ""Contact Us""" | | Ask apphub about multi-env / multi-file |
| On-Premise | y | n | n/a | y | |
| Cloud Hosting | y | y | n/a | y | |
| Documented API | y | n | y | n | |
| Web UI | y | n | n/a | n | |
| iOS | y | y | y | y | |
| Android | y | y | y | y | |
| Multiple Environments | """Debug"" and normal" | y | n | n | |
| Known Packaging | y | y | y | n | |
| Contact | support#apphub.io | codepushfeed#microsoft.com | | | |
| Delta Updates | n | y | ? | ? | |

It sounds technically possible. And you would have to carefully read the respective TOS to see if it violates them.

Related

viewing the variable stored in an C array [closed]

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 6 months ago.
The community is reviewing whether to reopen this question as of 5 months ago.
Improve this question
I am making a code that reads the data every time a new frequency is applied.
(I have a list of frequencies in an array)
I would like to display at the start of the set of readings a text saying current frequency (Hz): and then the value defined in the following array int freq[] = {1000 , 10000 , 30000 } . I am indexing the different frequencies in a for loop with the following code
for (byte count = 0; count < 6; count = count + 1) {
Serial.print("current Frequency(hz): ");
Serial.println( freq[count], 4);
However when I open the serial monitor I get numbers that I have not defined as a in the freq array. What am I doing wrong.
It takes the 4 least significant bits of cmd and the 10 least significant bits of data and combines them as follows:
cmd data
+---+---+---+---+---+ +---+---+---+---+---+---+---+---+---+---+---+
... | | | | | ... | | | | | | | | | | |
+---+---+---+---+---+ +---+---+---+---+---+---+---+---+---+---+---+
| | | | | | | | | | | | | |
| | | +---------+ | | | | | | | | | |
| | +---------+ | | | | | | | | | | |
| +---------+ | | | | | | | | | | | |
+---------+ | | | | | | | | | | | | |
| | | | | | | | | | | | | |
v v v v v v v v v v v v v v
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| 0 | 0 | | | | | | | | | | | | | | |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
data_word

How to Structure React and bootstrap-react projects?

How to Structure React and bootstrap-react projects?
Here you can see my folder structure. Is this the best practice?
|-COPYRIGHT.md
|-dist
| |-app
| |-bundle.js
| |-bundle.js.map
|
|-index.html
|-.git
|-.gitignore
|- node_modules
|-package.js
|-README.md
|
|-src
| |-app
| | |-components
| | | |-Footer.js
| | | |-Header.js
| | | |-Home.js
| | |
| | |-index.js
| |
| |-css
| | |-bootstrap.min.css
| | |-footer.css
| | |-header.css
| | |-styles.css
| |
| |-fonts
| | |-glyphicons-halflings
| |
| |-images
| | |-logo.jpg
| |
| |-index.html
| |
| |-js
| | |-es5-sham.min.js
| | |-es5-shim.min.js
| | |-html5shiv.min.js
| | |-html5shiv-printshiv.min.js
| | |-react-bootstrap.js
| | |-react-bootstrap.min.js
|
|-webpack.config.js
In the next step I would make my homepage multilingual. I need three languages de, en, fr.
I would like separate the languages like this.
How to change the languages in the Navbar?
Which of you has something already programmed and sends me a link of his Github repository? How do I program the routes correctly? In Footer I'll use three images as a flag for switching languages. But to be recognized by the browser language principle.
|-Languanges
|-de
| |-Impressum.js
|
|-en
| |-Imprint.js
|
|-fr
| |-empreinte.js

How to interpret sybase RESTRICT Operator (VA = 1)(4)(0)(0)(0)(0)

Can someone help to clarify restrict operator?
I understand Sybase restrict operator is used to evaluate expressions based on columns. But I still can't figure out the exact meaning of RESTRICT Operator in the query plan.
e.g, below is a query plan snippet of my sql. RESTRICT Operator (VA = 1)(4)(0)(0)(0)(0): what does (4)(0)(0)(0)(0) mean?
10 operator(s) under root
|ROOT:EMIT Operator (VA = 10)
|
| |SCALAR AGGREGATE Operator (VA = 9)
| | Evaluate Ungrouped COUNT AGGREGATE.
| |
| | |N-ARY NESTED LOOP JOIN Operator (VA = 8) has 7 children.
| | |
| | | |RESTRICT Operator (VA = 1)(4)(0)(0)(0)(0)
| | | |
| | | | |SCAN Operator (VA = 0)
| | | | | FROM TABLE
| | | | | trade
| | | | | t
| | | | | Index : i1
| | | | | Forward Scan.
| | | | | Positioning by key.
| | | | | Keys are:
| | | | | order_number ASC
| | | | | Using I/O Size 16 Kbytes for index leaf pages.
| | | | | With LRU Buffer Replacement Strategy for index leaf pages.
| | | | | Using I/O Size 16 Kbytes for data pages.
| | | | | With LRU Buffer Replacement Strategy for data pages.
| | |
| | | |SCAN Operator (VA = 2)
| | | | FROM TABLE
| | | | product
| | | | mp
| | | | Index : mp
| | | | Forward Scan.
| | | | Positioning by key.
| | | | Keys are:
| | | | prod_id ASC
| | | | Using I/O Size 16 Kbytes for index leaf pages.
| | | | With LRU Buffer Replacement Strategy for index leaf pages.
| | | | Using I/O Size 16 Kbytes for data pages.
| | | | With LRU Buffer Replacement Strategy for data pages.
| | |
| | | |SCAN Operator (VA = 3)
| | | | FROM TABLE
| | | | Accounts
| | | | a
| | | | Index : i2
| | | | Forward Scan.
| | | | Positioning by key.
| | | | Index contains all needed columns. Base table will not be read.
| | | | Keys are:
| | | | account ASC
| | | | Using I/O Size 16 Kbytes for index leaf pages.
| | | | With LRU Buffer Replacement Strategy for index leaf pages.
Part of the showplan output, like those numbers behind the operator, are internals of the ASE optimizer. There is no documented information about these, and this information is included to help techsupport in resolving issues.
The 'VA = n' part is just reflecting the unique number 'n' for every operator in the query plan.

How to show several loops and doing stuff in it in a sequence diagramm?

I want to show what my UserControl/Control is doing when I plug a list of data in it, what happens when the user press certain keys, selecting text etc...
I feel somehow a sequence diagramm is not really suited for showing several loops and doing stuff within the loops.
Am I wrong or how can I cope with that case?
If you are talking about a loop, then you have a series of operations that take place for all elements in the loop.
I would model the operations done in the loop as a sequence diagram by itself, if the operation in the loop are fairly complex.
I don't think we can have rules of thumb here, but when the process with the loop itself is complex, and the loop is relatively less complex, we can have them in a single sequence diagram.
If the process that has the loop is not very complex, but the loop is complex, then I would draw a sequence diagram for the operations of the loop and have a note that this entire sequence is called by a loop.
You can also have both sequence diagrams if needed.
Update:
We have to add some notes to the diagram because it is not straightforward to denote a "condition" in a sequence diagram.
The validate is part is something like
do validation
if validation succeeds
proceed to next (business or other) logic
if validation fails
feedback to user (or some other logic)
+----+ +----+ +----------------+ +----------------+
|User| | UI | | Your Validator | | Business Logic |
+----+ +----+ +----------------+ +----------------+
| select | | |
|--------------->| doValidation | |
| |------------------>|----+ |
| | | | Validate |
| | |<---+ |
| | | |
| | | (validation fails: |
| | Validation Fail | feedback to client) |
| |<------------------| |
| | | |
| | | |
| | | (validation succeeds: |
| | | proceed to |
| | | business logic) |
| | | |
| | | someLogic |
| | |----------------------->|
| | | |
UPDATE 2
Why use sequence diagram in a case as mine?
Because you still have to show the sequence of operations, and the developer still needs this information for coding :-)
With UML, as you probably already know, nothing is imposed. You are at your freedom to denote something in some fashion, provided your team also understands it the way you intended. These notes are also helpful.
I should have mentioned this before, some use an "option" fragment to denote a if else. This is more or less a note (I see it this way) but is perhaps more evident. I use them only when both the IF and the ELSE parts are both complex.
+----+ +----+ +----------------+ +----------------+
|User| | UI | | UI - Backend | | Busines Logic |
+----+ +----+ +----------------+ +----------------+
| Add Record | | |
|--------------->| doinsertOrUpdate | |
| |------------------>| |
| | | exists(record) |
| | |----------------------->|
| | | |
____|________________|___________________|________________________|__________
|[Record exists] | | | |
| | | | Get Record | |
| | | |----------------------->| |
| | | | | |
| | | |--------+ | |
| | | | | Set UI Values | |
| | | |<-------+ | |
| | | | | |
| | | | Update Record | |
| | | |----------------------->| |
| | | | | |
| | | Send Message | | |
| | |<------------------| | |
| | | "Record found, | | |
| | | Updated" | | |
|___|________________|___________________|________________________|_________|
| | | |
| | | |
______|________________|___________________|________________________|_________
| [Record does not | | | |
| exist] | | | |
| | | |--------+ | |
| | | | | Generate | |
| | | | | Seqeuence | |
| | | |<-------+ | |
| | | | | |
| | | | Create New Record | |
| | | |----------------------->| |
| | | Send Message | | |
| | |<------------------| | |
| | | "New Record | | |
| | | Created" | | |
|_____|________________|___________________|________________________|_________|
| | | |
| | | |
| | | |
See this for an example using an alt block.

How do I find the most “Naturally" direct route using A-star (A*)

I have implemented the A* algorithm in AS3 and it works great except for one thing.
Often the resulting path does not take the most “natural” or smooth route to the target.
In my environment the object can move diagonally as inexpensively as it can move horizontally or vertically.
Here is a very simple example; the start point is marked by the S, and the end (or finish) point by the F.
| | | | | | | | | |
|S| | | | | | | | |
x| | | | | | | | | |
x| | | | | | | | | |
x| | | | | | | | | |
x| | | | | | | | | |
x| | | | | | | | | |
|F| | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
As you can see, during the 1st round of finding, nodes [0,2], [1,2], [2,2] will all be added to the list of possible node as they all have a score of N.
The issue I’m having comes at the next point when I’m trying to decide which node to proceed with. In the example above I am using possibleNodes[0] to choose the next node. If I change this to possibleNodes[possibleNodes.length-1] I get the following path.
| | | | | | | | | |
|S| | | | | | | | |
| |x| | | | | | | |
| | |x| | | | | | |
| | | |x| | | | | |
| | |x| | | | | | |
| |x| | | | | | | |
|F| | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
And then with possibleNextNodes[Math.round(possibleNextNodes.length / 2)-1]
| | | | | | | | | |
|S| | | | | | | | |
|x| | | | | | | | |
x| | | | | | | | | |
x| | | | | | | | | |
x| | | | | | | | | |
x| | | | | | | | | |
|F| | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
All these paths have the same cost as they all contain the same number of steps but, in this situation, the most sensible path would be as follows...
| | | | | | | | | |
|S| | | | | | | | |
|x| | | | | | | | |
|x| | | | | | | | |
|x| | | | | | | | |
|x| | | | | | | | |
|x| | | | | | | | |
|F| | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
Is there a formally accepted method of making the path appear more sensible rather than just mathematically correct?
You need to add a Tie-breaker to your heuristic function. The problem here is that there are many paths with the same costs.
For a simple Tie-breaker that favors the direct route you can use the cross-product. I.e. if S is the start and E is the end, and X is the current position in the algorithm, you could calculate the cross-products of S-E and X-E and add a penalty to the heuristic the further it deviates from 0 (= the direct route).
In code:
dx1 = current.x - goal.x
dy1 = current.y - goal.y
dx2 = start.x - goal.x
dy2 = start.y - goal.y
cross = abs(dx1*dy2 - dx2*dy1)
heuristic += cross*0.001
See also http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html#S12, which is an excellent tutorial about A* in general.
If you want paths that look natural, you need to make sure that your costs correspond to the length on a cartesian coordinate system. That means the cost of moving diagonally should be sqrt(2) times the cost of moving vertically or horizontally.
You can add 'control effort' to the cost calculations for each square. The actor will try not to turn or change direction too much as that will add a cost to the path:
http://angryee.blogspot.com/2009/03/better-pathfinding.html
If I remember correctly, the trick to this is to add an extra parameter to the cost function (for every step between adjacent nodes, or squares in your case) that penalises turns slightly more than normal (for example, having a relative cost of greater than sqrt(2) for digonal moves). Now, there's probably a fine line between smoothing out the path and actually decreasing the optimality of the route (elongating it), however, and you're not going to be able to avoid this in any way. There's a certain trade-off you'll need to discover specific to your own application, and this can only really be achieved by testing.
There was an article on a game dev site, I believe, that detailed exactly how this could be done, but I can't seem to find it at the moment. Have a play around with your cost function anyway and see what results you get - I'm pretty sure that's the way to go.
What is more 'sensible'? Straighter? You need to quantify it properly if the algorithm is going to do anything about it.
Since moving diagonally is as inexpensive as moving horizontally/vertically, all the paths are equivalent according to all the criterion available to A*. If you want a more 'sensible' path, you need to tell the algorithm that some paths are more desirable than others, effectively weighting horizontal/vertical as 'better' than diagonal. As far as I can see, that would be altering the parameters of your environment.

Resources