Should i store the order log on the client or on the server or something entierly different

I am building an app for ordering food. I am currently storing the order log on the server. But I was confused whether to have a small database on the client side as well so that let’s say the customer can check the previous 10 orders without having to need an internet connection.

Is this a good idea or should I do something else?

When should I sign a PGP key with a non-revocable signature?

GnuPG allows the user to sign a key with a non-revocable signature. I have done this when I’m signing one of my own keys—signing my personal key with my work key, for instance. Is there any other situation in which this kind of signature either should or should not be used? Are there any commonly-accepted semantics in a non-revocable signature?

Is there a point after so many years that mathematical material published on the Wikipedia should just be considered published?

Look up the phrase “iterated function” on Google. The first match is the Iterated Function page on Wikipedia. Five years ago I found unattributed and unpublished material on the Wikipedia page under Fractional iterates and flows, and negative iterates. Extensive searches determined that the material could be found in only two places, on my web site and on Wikipedia. So I requested an attribution be made on the Iterated Function page to make the entry compliant with Wikipedia policy. No response, so I added an attribution to my website at http://tetration.org/Tetration/index.html

Five years later, no response. The issue was escalated repeatedly to the Talk:Iterated_function page and then the WikiProject Mathematics page. A detailed looked will reveal that I didn’t add the material, but neither can I edit the material without my edits being removed. In other words, this article has a life of its own that I can’t impact.

I have submitted two articles for publication, so I am trying to reduce the dichotomy between how mathematical publishing works and how mathematics is disseminated through the web. But I can’t help but wonder how many people have looked at this article in the last five years and if their collective scrutiny doesn’t surpass what any single referee is likely to provide.

Should I delete lost GPG key from GitHub?

I’ve been using GPG key for a while to sign commits on GitHub. However, I recently lost it by accident when moving data around. It haven’t leaked anywhere and signed commits can be trusted, I just don’t have private key anymore.

So, should I delete public key from my GitHub account? This will remove “signed” mark from commits which seems to be wrong in my case when I just can’t make any new commits with it.

In which cases avplayer should play? Like play() function, set player rate

I set player to pause and i am setting player rate after the pause. After setting player rate avplayer starting the playing without play method, so i want to know in which other cases that avplayer should play without play method.

I find that when we set rate or seek to specific time than it is play but i want to know is there other cases when avplayer should play

When inserting an element in a priority queue and the heap size is already at max capacity, should you output an error OR increase the array size?

I’m currently learning about how to implement priority queues using heaps, but I’ve hit a wall while trying to implement the insertion operation. Assume that the size of the array storing the elements of the heap is n, and the size of the heap is also n. Assume further that we try to insert an element ‘x’ inside the heap. We would have to increment the heap size by 1, but this would now make the heap size greater than the size of the array, which is unacceptable.

So my question is: how do we deal with this problem. Should we A: simply throw an error (since heap size == array size), or B: increase the size of the array by 1. A huge majority of the programs I’ve seen online implement A, but I think B would be better. Are there any advantages/disadvantages of using A over B (or vice versa)? Are there any other strategies to solving this problem?

Any help is greatly appreciated.

Should I quit my job?

Don’t know if there is a better stack exchange for this question… I was recently hired as a full stack intern by a small manufacturing company with the goal of creating an eCommerce platform to allow manufacturers to network with distributors.

That’s great and all but I am the sole person in charge of this project, I have no superior who is knowledge in computer science. so half my job for the past two weeks has been watching a ton of youtube tutorials, and reading stack overflow to try to to understand what I’m going to do.the boss let me pick the framework so I went with asp.net and mysql because those would be the things I’m most familiar with but the scope of this project sounds unreasonable to me.

My boss recently showed me a products sheet with collums a -cz. While thats easy enought to import to a database I’m not sure its organized correctly and im pretty sure I should reorganize that file if I use it (currently arranged in single table I think I want some inheritance in there do get some smaller tables.). I also haven’t had a database class yet though I have had limited use of them in past school assignments. However I haven’t yet secured a backup and this is the summer before my senior year and I haven’t had an internship yet. The pay for me right now is also below minimum wage (1000 per a month). anyone have any thoughts?

Why should we ask the password twice during registration?

It would be easier to ask for a user’s password only once during registration.

The problem: The user could make a mistake while typing the password once because of hiding letters.

The solution: The user could have a toggle button for showing or hiding the password.

unmask password

Working example with toggling the visibility of the password. This approach could be used on the registration or login page.

Are there any benefits to asking a user’s password twice during registration vs just not masking the password? Why would you ask twice?

P.S. Jakob Nielsen about unmasking the password:

  • Users make more errors when they can’t see what they’re typing while filling in a form. They therefore feel less confident. This double degradation of the user experience means that people are more likely to give up and never log in to your site at all, leading to lost business. (Or, in the case of intranets, increased support calls.)
  • The more uncertain users feel about typing passwords, the more likely they are to (a) employ overly simple passwords and/or (b) copy-paste passwords from a file on their computer. Both behaviors lead to a true loss of security.

Update: I created a WordPress plugin which unmasks the password field. So you may use it if you want to.

unmask password

Update 2: WordPress.com use same technique to show and hide password.

Update 3: Internet Explorer 10 added a toggle password visibility icon. It looks like this:

IE 10 password

Update 4: Article about unmask password on smashingmagazine.

Update 5: Example with unmasking password on focus.

Should a developer be able to create a docker artifact from a lerna monorepo in their development environment?

I’ve recently started using lerna to manage a monorepo, and in development it works fine.

Lerna creates symlinks between my various packages, and so tools like ‘tsc –watch’ or nodemon work fine for detecting changes in the other packages.

But I’ve run into a problem with creating docker images in this environment.

Let’s say we have a project with this structure:

root   packages      common → artifact is a private npm package, this depends on utilities, something-specific      utilities → artifact is a public npm package      something-specific -> artifact is a public npm package      frontend → artifact is a docker image, depends on common      backend → artifact is a docker image, depends on common and utilities 

In this scenario, in development, everything is fine. I’m running some kind of live reload server and the symlinks work such that the dependencies are working.

Now let’s say I want to create a docker image from backend.

I’ll walk through some scenarios:

  1. I ADD package.json in my Dockerfile, and then run npm install.

    Doesn’t work, as the common and utilities packages are not published.

  2. I run my build command in backend, ADD /build and /node_modules in the docker file.

    Doesn’t work, as my built backend has require('common') and require('utilities') commands, these are in node_modules (symlinked), but Docker will just ignore these symlinked folders.

    Workaround: using cp --dereference to ‘unsymlink’ the node modules works. See this AskUbuntu question.

  3. Step 1, but before I build my docker image, I publish the npm packages.

    This works ok, but for someone who is checking out the code base, and making a modification to common or utilities, it’s not going to work, as they don’t have privledges to publish the npm package.

  4. I configure the build command of backend to not treat common or utilities as an external, and common to not treat something-specific as an external.

    I think first build something-specific, and then common, and then utilities, and then backend.

    This way, when the build is occuring, and using this technique with webpack, the bundle will include all of the code from something-specfic, common and utilities.

    But this is cumbersome to manage.

It seems like quite a simple problem I’m trying to solve here. The code that is currently working on my machine, I want to pull out and put into a docker container.

Remember the key thing we want to achieve here, is for someone to be able to check out the code base, modify any of the packages, and then build a docker image, all from their development environment.

Is there an obvious lerna technique that I’m missing here, or otherwise a devops frame of reference I can use to think about solving this problem?