Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/14/2021 in all areas

  1. As far as I can tell, it's good. Nice thing for me is BitBucket offers unlimited free private repositories with up to (I believe - it's been a while since I checked) 5 contributors per repository. So for a small team or independent developer with friends, totally free forever. And SourceTree is free no matter what - you can use as many different accounts on as many different repository hosts as you want - BitBucket, GitHub, GitLabs, or Azure. Good lord, I should get a commission. Of course, a commission on free is pretty much what I'm already getting, so there ya' go.
    1 point
  2. Sort the array first. Assuming you start with ... $options = [ [ 'type' => 'Visual disability', 'name' => 'Audio-described cut-scenes' ], [ 'type' => 'Visual disability', 'name' => 'Highlighted path to follow' ], [ 'type' => 'Physical disability', 'name' => 'Sensitivity settings for all the controls' ], [ 'type' => 'Visual disability', 'name' => 'Screen readers on menus' ], [ 'type' => 'Visual disability', 'name' => 'Slow down the game speed' ], ]; then ... # # Sort the array by type (descending) # usort($options, function($a, $b) { return $b['type'] <=> $a['type']; }); # # process the array # $prev_type = ''; // store previous type echo "<ul>\n"; foreach ($options as $opt) { if ($opt['type'] != $prev_type) { // is this a new type? if ($prev_type != '') { // was there a previous one? echo "</ul>\n</li>\n"; // if so, close it } echo "<li>{$opt['type']}\n<ul>\n"; $prev_type = $opt['type']; // store as previous value } echo "<li>{$opt['name']}</li>\n"; } // close last group echo "</ul>\n</li>\n"; // close whole list echo "</ul>\n"; giving ... <ul> <li>Visual disability <ul> <li>Audio-described cut-scenes</li> <li>Highlighted path to follow</li> <li>Screen readers on menus</li> <li>Slow down the game speed</li> </ul> </li> <li>Physical disability <ul> <li>Sensitivity settings for all the controls</li> </ul> </li> </ul> An alternative approach is to reorganise the array using subarrays for each type... $options = [ 'Visual disability' => [ 'Audio-described cut-scenes', 'Highlighted path to follow', 'Screen readers on menus', 'Slow down the game speed' ], 'Physical disability' => [ 'Sensitivity settings for all the controls' ] ]; then use two nested foreach() loops.
    1 point
  3. I feel your pain, the only advice I have is We all know the saying is if a job is worth doing it is worth doing well. I used to think like that till I started thinking about this, I am not suggesting that you should do shoddy work, I am saying get out and do the job. You may not have the skills or the knowledge to do it perfectly, yet the satisfaction of getting it done will exceed the concern about it not being perfect. Too many projects die a slow death because people want perfection. MS DOS and Windows would still be an idea if the job wasn't worth doing badly. Get the job done. Improve it and improve your skills and knowledge so that the job done badly can be made better after it's real.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.