• Categories
    • Unread
    • Recent
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. Scuzz
    3. Posts
    Offline
    • Profile
    • Following 0
    • Followers 3
    • Topics 91
    • Posts 375
    • Groups 1

    Posts

    Recent
    • RE: Some feedback from yesterday.

      @theDaftDev refresh and take a look know

      posted in The lounge
      ScuzzS
      Scuzz
    • RE: Some feedback from yesterday.

      Yeah they are. We have one for private coding category.

      posted in The lounge
      ScuzzS
      Scuzz
    • RE: NodeBB v0.6.x

      I’ve finally got round to upgraded to the latest version of NodeBB!

      After spending days messing about trying to get the forums backup and and running i attempted to load our old database and user the latest version of NodeBB. And guess what? it worked!

      Everything (mostly) is back to how it was before.

      See you in another 10 years.

      posted in Announcements
      ScuzzS
      Scuzz
    • RE: First bit of Python in a long time

      See, i kinda figured that out while i was testing some things.
      It would print out incorrect data as the list was getting smaller, skipping some strings.

      I then tried with a second empty list that i then made L equal to. This would not modify L globally which is what this question wanted.

      EDIT:

      Modified the code to be what i think is “correct”

      def f(s):
          return 'b' in s
      
      def satisfiesF(L):
          
          x = []
          for item in L:
              if f(item):
                  x.append(item)  
          return x
      
      L = ['a', 'b', 'a', 'a', 'b', 'a','a', 'b', 'a',]
      L = satisfiesF(L)
      print len(L)
      print L
      
      

      I think the example test code and the question are giving off the wrong idea as they want you to make global changes to L from within the function which can only be done via returning a value from the function. The test code says you need to return the length of L and make changes to L globally from within the function. You can use global to make global changes but doing this declares L as global and local which throws errors.

      Seems a shitty way of asking a question and using shitty example code?

      def f(s):
          return 'a' in s
            
      L = ['a', 'b', 'a']
      print satisfiesF(L)
      print L
      
      #Should print:
      #2
      #['a', 'a']
      
      posted in Development and Coding
      ScuzzS
      Scuzz
    • First bit of Python in a long time

      My manager’s son is learning Python and for some reason he thinks i’m a pro in Python.
      His son is doing some online course and he was struggling with a question.

      def satisfiesF(L):
          """
          Assumes L is a list of strings
          Assume function f is already defined for you and it maps a string to a Boolean
          Mutates L such that it contains all of the strings, s, originally in L such
          that f(s) returns True, and no other elements. Remaining elements in L should be in the same order.
          Returns the length of L after mutation
          """
          # Your function implementation here
      
      run_satisfiesF(L, satisfiesF)
      
      

      After a while I managed to get something working and it passed 100% when he submitted it.

      def f(s):
          return 'a' in s
      
      def satisfiesF(L):
          
          for item in L:
              if not f(item)
                  L.remove(item)
                  
          return len(L)
      
      L = ['a', 'b', 'a', 'josh', 'gary', 'mark', 'dave', 'chris']
      print satisfiesF(L)
      print L
      
      
      posted in Development and Coding
      ScuzzS
      Scuzz
    • RE: [nodebb-theme-classic] BitBangers Classic Theme

      Here is all the css i have currently in the admin control panel. There are some changes I have made directly to some files. I think these changes are only background color and @brand-primary.

      body {
          background: #f0f0f0;
          color:  #888;
      }
      
      .shoutbox blockquote {
          padding: 5px;
          margin: 0px;
          font-size: medium;   
      }
      
      .shoutbox .img-responsive {
          max-width: 200px;
      }
      
      .shoutbox-content {
          height: 250px;   
      }
      
      .col-xs-12 {
          padding-left: 0px;
          padding-right: 0px;
      }
      
      .navbar-default {
          background-color: #dc3522;   
      }
      
      .navbar-default .navbar-nav>li>a {
          color: #FFF;   
      }
      
      .navbar-default .btn-link {
          color: #FFF;   
      }
      
      .navbar-default .navbar-toggle .icon-bar {
          background-color: #FFF;   
      }
      
      .navbar-default .navbar-toggle {
          border-color: #FFF;   
      }
      
      
      .navbar-default .navbar-toggle:hover {
          background-color: #bd2e1d;   
      }
      
      .row {
          margin-left: 0px;
          margin-right: 0px;
      }
      
      #nprogress .bar {
          background: #FFF;   
      }
      
      #nprogress .spinner-icon {
          border-top-color: #FFF;
          border-left-color: #FFF;
      
      }
      
      .categories>li, .category>ul>li {
          padding: 20px;
          background: #FFF;
          border: 1px solid #e2e2e2;
          margin-bottom: 20px;
          -webkit-box-shadow: 0 0px 2px rgba(0, 0, 0, 0.1);
          -webkit-border-radius: 3px; overflow: hidden;
      }
      
      .categories-title {
          display: none;
      }
      
      .categories>li .card, .category>ul>li .card {
          border-left: 1px solid #e2e2e2;
      }
      
      .category>ul>li:not(.unread) h2 a {
          color: #dc3522 !important;   
      }
      
      .category>ul>li:not(.unread) h2 a:hover {
          color: #bd2e1d !important;   
      }
      
      .topic h1 {
          display: none;   
      }
      
      .topic .posts>li {
          background: #FFF;
          border: 1px solid #e2e2e2;
          padding: 20px;
          margin-bottom: 20px;
          -webkit-box-shadow: 0 0px 2px rgba(0, 0, 0, 0.1);
          -webkit-border-radius: 3px;
      }
      
      .account .profile {
          background: #FFF;
          border: 1px solid #e2e2e2;
          padding: 20px;
          margin-bottom: 20px;
          -webkit-box-shadow: 0 0px 2px rgba(0, 0, 0, 0.1);
          -webkit-border-radius: 3px;
      }
      
      .posts-list {
          background: #FFF;
          border: 1px solid #e2e2e2;
          padding: 20px;
          margin-bottom: 20px;
          -webkit-box-shadow: 0 0px 2px rgba(0, 0, 0, 0.1);
          -webkit-border-radius: 3px;
      }
      
      .users-container {
          background: #FFF;
          border: 1px solid #e2e2e2;
          padding: 20px;
          margin-bottom: 20px;
          -webkit-box-shadow: 0 0px 2px rgba(0, 0, 0, 0.1);
          -webkit-border-radius: 3px;
      }
      
      .btn-primary {
          background-color: #dc3522;
          border-color: #dc3522;
      }
      
      .btn-primary:hover {
          background-color: #bd2e1d;
          border-color: #bd2e1d;
      }
      
      .btn-primary:focus {
          background-color: #bd2e1d;
          border-color: #bd2e1d;
      }
      
      .fab {
          background-color: #dc3522;
      }
      
      a {
          color: #dc3522;
      }
      
      a:hover {
          color: #bd2e1d;
      }
      
      .pagination>li>a, .pagination>li>span {
          color: #dc3522;   
      }
      
      .pagination>.active>a, .pagination>.active>span, .pagination>.active>a:hover, .pagination>.active>span:hover, .pagination>.active>a:focus, .pagination>.active>span:focus {
          background-color: #dc3522;
          border-color: #dc3522;
      }
      
      .pagination>li>a:hover, .pagination>li>span:hover, .pagination>li>a:focus, .pagination>li>span:focus {
          color: #bd2e1d;
      }
      
      posted in Development and Coding
      ScuzzS
      Scuzz
    • RE: [nodebb-theme-classic] BitBangers Classic Theme

      @hnkmaddox It’s taken me a looong time but i am slowly making changes.
      The changes being made are a current mix of less edits and admin cp custom styles. I’ll get them all copied over to git as soon as i can.

      posted in Development and Coding
      ScuzzS
      Scuzz
    • RE: What are you listening to today?

      https://www.youtube.com/watch?v=kfVsfOSbJY0

      posted in The lounge
      ScuzzS
      Scuzz
    • RE: Kodi addons

      I installed genesis. Seems really useful although I have only watched a few episodes of Dr who.

      The other one uses torrents and downloads then to the sdcard. I don’t think mine is big enough to handle them. I. Can’t remember what size if have.

      posted in General Computing
      ScuzzS
      Scuzz
    • RE: [Spoilers?]Star wars

      I don’t know. It just seemed to be really cheesey like the conversations between the characters never seemed to have any detail to them.
      They seemed to be the basic, minimal conversation so everyone could understand. Even a 5 year old.

      Also they all seemed to have some “comedy” moments.

      I suppose I was expecting a slightly more serious film.

      posted in The lounge
      ScuzzS
      Scuzz
    • Kodi addons

      Since I’ve moved house and have a different Internet provider I am unable download torrents via my home sever as my ISP has blocked the website I use.

      It’s easy to bypass on my pc, it may be easy to do it via synology but I haven’t taken a look yet.

      I have kodi set up on my pi but never really make use of any of the good addons that are available for streaming. It’s only used for local streaming and now that has become a bit of a ballache I would prefer to stream the stuff I don’t care about and then manually download the films I want to see for better quality.

      So, can anyone recommend any decent addons for kodi? Streaming films, TV shows etc…

      posted in General Computing
      ScuzzS
      Scuzz
    • [Spoilers?]Star wars

      I went to see Star Wars last night. I went in not expecting much and I am glad I did.
      I found the film to be slightly cheesy and the acting wasn’t the best.

      It was pretty average, not good but not bad. You can tell it was made for younger people but I guess that’s the whole Disney thing rubbing off on it.

      One thing that stuck in my head though was that the story was extremely similar to A New Hope.

      And fuck me is Kylo Ren emo as fuck

      posted in The lounge
      ScuzzS
      Scuzz
    • RE: [nodebb-theme-classic] BitBangers Classic Theme

      I’ll try and get my dev environment set back up and get a repo going. I’ll let you know once its done.

      posted in Development and Coding
      ScuzzS
      Scuzz
    • RE: [nodebb-theme-classic] BitBangers Classic Theme

      I will probably fork the official NodeBB Persona theme.

      These changes are literally only a few lines off CSS.

      posted in Development and Coding
      ScuzzS
      Scuzz
    • RE: [nodebb-theme-classic] BitBangers Classic Theme

      @hnkmaddox check out this

      posted in Development and Coding
      ScuzzS
      Scuzz
    • RE: [nodebb-theme-classic] BitBangers Classic Theme

      @hnkmaddox Hey man. I am currently in the process of modifying this persona theme to look more like the classic theme that is mentioned in this thread.

      There are too many breaking changes with the updates of nodebb for me to really keep up to date.

      Once i have a decent working “OrangeRed” theme for persona i’ll post it up here. We will be using it too.

      posted in Development and Coding
      ScuzzS
      Scuzz
    • RE: Gumwrapper Truth or Truth

      @Almost that’s what you get when you speak United Kingdom

      posted in The lounge
      ScuzzS
      Scuzz
    • RE: Gumwrapper Truth or Truth

      Your mum?

      This bird that I’m not aloud to do anything with…

      posted in The lounge
      ScuzzS
      Scuzz
    • RE: Gumwrapper Truth or Truth

      Hence the shout box… :P

      posted in The lounge
      ScuzzS
      Scuzz
    • RE: Gumwrapper Truth or Truth

      Probably when I got my car wrote off by a HGV.

      I am lazy. If shit doesn’t have to get done now it will wait until I have to do it.

      To combat it I think I just need to kick myself in the ass and get shit done. But that’s a lot harder to do than say.

      posted in The lounge
      ScuzzS
      Scuzz
    • 1
    • 2
    • 3
    • 4
    • 5
    • 18
    • 19
    • 1 / 19