Coder Social home page Coder Social logo

Comments (6)

basssque avatar basssque commented on July 17, 2024

I second that, same here.

My lock will no longer accept new codes and I can't change codes either. I
think one of the previous builds did something to my lock.
I don't get any notifications from the lock either, nor does it keep track
of how many times codes were used.

On Wed, May 13, 2015 at 6:23 PM, A.J. [email protected] wrote:

Version 3.7.7
IPhone 6: IOS 8.3
When I set the number of users to 10 and try to edit user 10, I get the
error identified in the title and am unable to get to the page.

I looked at the replace all and it looks like the replace is causing
issues. I changed the line to use a regex:
i = params.number.toString().replaceAll('.0','').toInteger()
to
i = params.number.toString().replaceAll(/.+$/,'').toInteger()

and
i = params.params.number.toString().replaceAll('.0','').toInteger()
to
i = params.params.number.toString().replaceAll(/.+$/,'').toInteger()

That appears to have corrected the issue.

Hope this helps.


Reply to this email directly or view it on GitHub
#10.

from user-lock-manager.

eyeonall avatar eyeonall commented on July 17, 2024

I have a github account but my repos are for business and private so I
do not know what the process is. If it makes it easier I can create a
branch with the proposed fix in it. I just do not want to mess with
anyone's repo without asking first.

On 5/13/2015 6:49 PM, basssque wrote:

I second that, same here.

My lock will no longer accept new codes and I can't change codes either. I
think one of the previous builds did something to my lock.
I don't get any notifications from the lock either, nor does it keep track
of how many times codes were used.

On Wed, May 13, 2015 at 6:23 PM, A.J. [email protected] wrote:

Version 3.7.7
IPhone 6: IOS 8.3
When I set the number of users to 10 and try to edit user 10, I get the
error identified in the title and am unable to get to the page.

I looked at the replace all and it looks like the replace is causing
issues. I changed the line to use a regex:
i = params.number.toString().replaceAll('.0','').toInteger()
to
i = params.number.toString().replaceAll(/.+$/,'').toInteger()

and
i = params.params.number.toString().replaceAll('.0','').toInteger()
to
i = params.params.number.toString().replaceAll(/.+$/,'').toInteger()

That appears to have corrected the issue.

Hope this helps.


Reply to this email directly or view it on GitHub
#10.


Reply to this email directly or view it on GitHub
#10 (comment).

from user-lock-manager.

eyeonall avatar eyeonall commented on July 17, 2024

it appears the fix breaks with an android phone...

On 5/13/2015 6:49 PM, basssque wrote:

I second that, same here.

My lock will no longer accept new codes and I can't change codes either. I
think one of the previous builds did something to my lock.
I don't get any notifications from the lock either, nor does it keep track
of how many times codes were used.

On Wed, May 13, 2015 at 6:23 PM, A.J. [email protected] wrote:

Version 3.7.7
IPhone 6: IOS 8.3
When I set the number of users to 10 and try to edit user 10, I get the
error identified in the title and am unable to get to the page.

I looked at the replace all and it looks like the replace is causing
issues. I changed the line to use a regex:
i = params.number.toString().replaceAll('.0','').toInteger()
to
i = params.number.toString().replaceAll(/.+$/,'').toInteger()

and
i = params.params.number.toString().replaceAll('.0','').toInteger()
to
i = params.params.number.toString().replaceAll(/.+$/,'').toInteger()

That appears to have corrected the issue.

Hope this helps.


Reply to this email directly or view it on GitHub
#10.


Reply to this email directly or view it on GitHub
#10 (comment).

from user-lock-manager.

eyeonall avatar eyeonall commented on July 17, 2024

i apologize for submitting a fix without testing on both android and
iphone. Here is the diff that works on both.

@@ -81,10 +81,17 @@ def userPage(params) {
if (params?.number || params?.params?.number) {
def i = 0
if (params.number) {

  •    i = params.number.toString().replaceAll('.0','').toInteger()
    
  •    i = params.number
    } else {
    
  •    i = params.params.number.toString().replaceAll('.0','').toInteger()
    
  •    i = params.params.number
    }
    
  •  if ( ! i.isNumber() ) {
    
  •    i = i.toInteger();
    
  •  } else if ( i.isNumber() ) {
    
  •    i = Math.round(i \* 100) / 100
    
  •  }
    

Hopefully this will help.

A.J.

On 5/13/2015 6:49 PM, basssque wrote:

I second that, same here.

My lock will no longer accept new codes and I can't change codes either. I
think one of the previous builds did something to my lock.
I don't get any notifications from the lock either, nor does it keep track
of how many times codes were used.

On Wed, May 13, 2015 at 6:23 PM, A.J. [email protected] wrote:

Version 3.7.7
IPhone 6: IOS 8.3
When I set the number of users to 10 and try to edit user 10, I get the
error identified in the title and am unable to get to the page.

I looked at the replace all and it looks like the replace is causing
issues. I changed the line to use a regex:
i = params.number.toString().replaceAll('.0','').toInteger()
to
i = params.number.toString().replaceAll(/.+$/,'').toInteger()

and
i = params.params.number.toString().replaceAll('.0','').toInteger()
to
i = params.params.number.toString().replaceAll(/.+$/,'').toInteger()

That appears to have corrected the issue.

Hope this helps.


Reply to this email directly or view it on GitHub
#10.


Reply to this email directly or view it on GitHub
#10 (comment).

from user-lock-manager.

ethayer avatar ethayer commented on July 17, 2024

Thanks A.J! I totally welcome pull requests too.

What you do, is hit "Fork" in the upper right of the main repo page, and then clone down your own fork of the code. After doing that, edit the code and then push it back up to your own fork. Hit "compare and merge" and then it will ping me to review it and merge it into the main repo.

I'll go ahead and add your diff here. This looks great. Thank you.

from user-lock-manager.

eyeonall avatar eyeonall commented on July 17, 2024

Thanks. I will do that. Also, looking at that little snippet of code, I
keep thinking there is a cleaner way. But, if it works and gets the
users going, all is good.

I will definitely have some more suggestions for you. I am not built to
develop stuff from scratch. I am designed to build on what exists. You
have a nice app here and a good foundation. I am doing some after-hours
volunteer work for a 501.3c and they have a building that could
ultimately have as many as 15 locks with different areas restricted to
different folks at different times. I am hoping I can build on your app
to facilitate this and, of course, you will be provided with all of the
changes.

Thanks again for your great work and I hope all is well,
A.J.

On 5/14/2015 12:59 PM, Erik Thayer wrote:

Thanks A.J! I totally welcome pull requests too.

What you do, is hit "Fork" in the upper right of the main repo page,
and then clone down your own fork of the code. After doing that, edit
the code and then push it back up to your own fork. Hit "compare and
merge" and then it will ping me to review it and merge it into the
main repo.

I'll go ahead and add your diff here. This looks great. Thank you.


Reply to this email directly or view it on GitHub
#10 (comment).

from user-lock-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.