by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 30 2019 15:34
    juangdm edited #114
  • Jul 30 2019 15:33
    juangdm edited #114
  • Jul 30 2019 15:32
    juangdm opened #114
  • May 21 2018 21:24
    radudangratian commented #9
  • Mar 21 2018 20:10
    samuelgortiz opened #113
  • Nov 07 2017 22:16
    RomainLLC opened #112
  • Sep 05 2017 12:34
    Narnar-azert commented #111
  • Sep 05 2017 12:34
    Narnar-azert commented #111
  • Jul 15 2017 05:02
    jibe-b closed #108
  • Jun 28 2017 17:04
    rbanks721 opened #111
  • May 14 2017 15:28
    bugith commented #25
  • Apr 28 2017 06:27
    Travis promethe42/cocorico (fix/travis-tests) still failing (316)
  • Apr 28 2017 06:11

    promethe42 on travis-tests

    Wait 30s before running the tes… (compare)

  • Apr 27 2017 22:21
    Travis promethe42/cocorico (fix/travis-tests) still failing (315)
  • Apr 27 2017 22:04

    promethe42 on travis-tests

    The API tests will now stop the… Don't call npm install or npm b… Use testrpc instead of geth whe… and 4 more (compare)

  • Apr 26 2017 08:05
    Travis promethe42/cocorico (fix/travis-tests) still failing (314)
  • Apr 26 2017 07:45
    Travis promethe42/cocorico (fix/travis-tests) canceled (313)
  • Apr 26 2017 07:45

    promethe42 on travis-tests

    Make ansible less verbose when … (compare)

  • Apr 26 2017 07:33
    Travis promethe42/cocorico (fix/travis-tests) still failing (313)
  • Apr 26 2017 07:14
    Travis promethe42/cocorico (fix/travis-tests) canceled (313)
Jean-Marc Le Roux
@promethe42
yeah, but why do you copy ballot into proposal ?
proposal is useless here
just read stuff from ballot
Pacien Boisson
@pakokrew
yea sure
youre sniper
Jean-Marc Le Roux
@promethe42
function vote(uint8[] ballot)
    public
    onlyRegisteredVoter()
    notAlreadyVoted()
    onlyWhenStatusIs(Status.Open)
    {
        Voter voter = voters[msg.sender];

        if (ballot.length > numCandidates)
        {
                VoteError(msg.sender, 'invalid candidate');
                return;
        }

        for(uint8 i = 0; i < numCandidates; i++) {
            if (ballot[i] >= _numProposals) {
                VoteError(msg.sender, 'invalid proposal');
                return;
            }
        }

        voter.voted = true;

        for(uint8 i = 0; i < numCandidates; i++) {
            results[i][ballot[i]]  += 1;
        }

        Ballot(msg.sender, ballot);
    }
also be careful about the curly brackets : if you want to put them at the end of lines (like in the Solidity coding style), we can do this but in a separate commit
for now, let's follow the current coding style
Pacien Boisson
@pakokrew
done
Yes I found this line but don't know what to do with it
what is this map ?
Jean-Marc Le Roux
@promethe42
for some reason, the JS call to getVoteResults() returns an array of string instead of an array of Number...
so we use Array.map() to convert it
I'm guessing it should be:
Pacien Boisson
@pakokrew
ok so now we also have to convert this array to matrix ?
Jean-Marc Le Roux
@promethe42
instance.getVoteResults().map((s) => s.map((s2)=>parseInt(s2)))
Pacien Boisson
@pakokrew
not exactly it is still an array
Jean-Marc Le Roux
@promethe42
so what ?
Pacien Boisson
@pakokrew
does the api should return a matrix ?
Jean-Marc Le Roux
@promethe42
ooooooooooh yeah
right my bad
Pacien Boisson
@pakokrew
k
Jean-Marc Le Roux
@promethe42
ok ok... we should splice the array then
then of course we will have to change the BallotBox component to show the results properly
I'll start by splitting the chart comonents out of the BallotBox component
Pacien Boisson
@pakokrew
k
destroyed vagrant and reprovision :
msg": "refusing to convert between directory and link for /srv/cocorico/lib/cocorico-logger/node_modules"
:fire:
Jean-Marc Le Roux
@promethe42
make sure you're up to date
Jean-Marc Le Roux
@promethe42
@pakokrew I broke the BallotBox page into multiple components promethe42/cocorico@b3a7d13
this way, it should be easier to update the result presentation, which is now in the VoteResultPieChart component
Paul MARTY
@polo46
Hi Jm, Hi everyone!
Paul MARTY
@polo46
Where is the last version of the codebase?
@promethe42 I will look for this. But the travis build fails, and the log is really too big to debug it, could you reduce the vagrant provision output ?
Jean-Marc Le Roux
@promethe42
@pakokrew I'll fix the tests, did you make some progress ?
Jean-Marc Le Roux
@promethe42
@pakokrew I need some update before this week end, otherwise I'll do it myself :)
Jean-Marc Le Roux
@promethe42
no answer from @pakokrew so I'm redoing all the work he's been working on
Jean-Marc Le Roux
@promethe42
@/all the new version for LaPrimaire.org 2nd round is up and running! We can now handle ballots with mutiples values. Here a few screenshots of such use case:
the new API documentation is available here : https://laprimaire.cocorico.cc/documentation/
Pacien Boisson
@pakokrew
Hey @promethe42 , sorry for the no response, I didn't see your message cause was very busy with new job. Glad you managed to do the job anyway ;)
However I think the vagrant machine is too hard to install/use/debug for getting active contributor...
I won't have enough time to help you more, but you have all my encouragements for this positive project ;) good luck for the rest !
Jean-Marc Le Roux
@promethe42
@pakokrew what's so hard about the vagrant machine ?