Jump to content

fiveworlds

Senior Members
  • Posts

    1903
  • Joined

  • Last visited

Posts posted by fiveworlds

  1. Quote

    If it's that easy please explain exactly how this would be done. I suspect there are many things you have taken into account but without details i just don't know. Have you seen many patient transfers in radiology?

    Yeah I did supernumerary placement in a hospital years ago before I found out that I was immune to certain vaccinations and am not allowed to do that anymore. There are many details to be taken into account personally I have worked with orthopaedics and have brought patients to the mri, ct scan, xray etc. 

    Quote

    I'd recommend auditory feedback too for when a patient yelps when something unexpectedly hurts them.

    That is a great idea and is certainly possible with today's technology. There are apps in development which can do things like automatically translate spoken english into another language and back.

    Quote

    While i remember the machine will also need either to be able to safely log roll an immobilised patient so they can safely vomit (or maybe a suctioning system). Happens only sometimes but can be fatal when it does.

    Absolutely but in such cases maybe it would be better if the nurse stayed in the room like they usually do. Certainly putting a suction system in is easy enough.

    To implement such a system properly it would require a large database of patients and would have to know if the patient has certain conditions to do a specific thing. What you would have is a basic system that does nothing at the start just records exactly what the radiographer would do in a certain situation for patients with specific illnesses.  Then over the course of a number of years the data from many such systems would be merged into a working system that should be able to copy exactly what the radiographers did. 

     

     

  2. Quote

    Can it be used to counter arguments of "lost sales" to enumerate damages and severity of punishment?

    I want to watch the new (Sword Art Online movie Ordinal Scale/Lucifer/Supernatural) legally here how do I do that when they don't sell to my country? The national tv broadcaster never has anything I want to watch on and the paid services are nothing but repeats. Netflix is just as bad because it has country restrictions like everything else. Why should I wait years to watch something behind everybody else knowing everything that happened in it because it is all over social media. Tv and Movies should be available on an affordable subscription basis who can afford paying $120 for their family to go to the blooming cinema?

  3. Quote

     

    If I understood you correctly,

    you want to user visit f.e. index.html

    And PHP should be called to process this file, even though it's wrong extension .html (instead of .php)..

    Is that correct?

     

    No currently I am using the mean stack. Which is

    MongoDB, ExpressJs, AngularJs and NodeJs

    You can find a prebuilt version here http://meanjs.org/ but I am building from source.

    In mean the entire server stack uses javascript so it is quite popular with webdevelopers because they won't need to learn an additional server-side language

    currently my server.js looks something like

    const express = require('express');
    const app = express();
    const fs = require('fs');
    const sass = require('node-sass');
    const sassMiddleware = require('node-sass-middleware');
    const path = require('path');
    const lessMiddleware = require('less-middleware');
    var sw = true;
    
    
    app.use("/lessStylesheets",lessMiddleware(__dirname+'/less/',{
        debug: true,
        dest: path.join(__dirname, 'public/lessStylesheets/'),
        force: true
    }));
    
    app.use("/sassStylesheets",sassMiddleware({
      src: path.join(__dirname, 'sass'),
      dest: path.join(__dirname, 'public/sassStylesheets'),
      debug: true,
      indentedSyntax: true,
      outputStyle: 'compressed'
    }));
    
    app.use(express.static('public'));
    app.use('/node_modules', express.static('node_modules'))
    
    app.listen(80, function () {
      console.log('Example app listening on port 80!')
    });

    In order to process get requests MEAN uses express.js which would look something like. Post requests use app.post.

    app.get('/templates/form.html', function (req, res) {
      var path = "templates/form.html";
      var head = fs.readFileSync("templates/head.html").toString();
      var foot = fs.readFileSync("templates/foot.html").toString();
      res.send(head+fs.readFileSync(path).toString()+foot);
      sw = false;
    })


    At the moment all the get and posts requests need to be in or included into the server.js file.

    What I want is to only have one app.get or app.post to handle all the get or post requests. Then have the server preprocess the server-side code. It isn't necessary to use the .html extension I could use .njs or something similar.

    One possibility is to have two files like a filename.njs and filename.snjs where the .snjs has the server-side code. Another is to only have one file and have nodeJS use cheerio https://cheerio.js.org/ or something similar to parse the html code and execute the server-side code contained in the file.

    What I am looking for is an existing library that does this for me. It would be cool if I could load the html file in code and have access to the dom to implement the server-side code (mysql requests etc).

     

     

     
     

     

     

  4. Hey, is anyone here familiar with MEAN stack I want to implement a preprocessor so I can have the server-side code in the html files like in php's <?php ?> or Asp's <% %>. Do you know if there is a preprocessor available that will do that for me?

     

  5. Quote

    I Appreciate the enthusiasm, but you sound like a computer scientist who has never spent a day on a hospital ward.

    I'm not being enthusiastic the radiographer rarely moves the patient most of the time the nurses do that. All that is involved to replace them is making an easy to use hydraulic based platform with weight sensors and an automated camera that does what it is told. All the nurse would have to do is move the patient to the platform and push a button on the wall (maybe with an id scanner too).

     

     

  6. You do realize that quantum computers have to run at extremely low temperatures somewhere around 0 kelvin making phone sized quantum computers not possible at the moment. The reason for the low temperature is that heat has the same effect as deleting data from the quantum computer since it will cause the subatomic particles to change state randomly.

  7. I'm not great on debugging them either. I left a message for the maintainer so I hope they get back to me. I'm trying to help out a radio station that was using an older version of the software and the old equipment broke.

     

  8. Yeah I think I have a lot of it now. The specific repository I am trying to get working is https://github.com/Opendigitalradio/data-over-dab-example which is using gnuradio. I think I am down to one error now which is

    conan : cmake error at cmake/modules/conanpackages.cmake:81 could not find load file data-over-dab-example/build/conanbuildinfo.cmake

    I originally was trying to get it working on a raspberry pi but would up getting tons of errors because the raspberry pi chipset isn't supported

     

     

     

     

     

     

  9. 
    var canvas = document.createElement('canvas');
    var context = canvas.getContext('2d');
    var img = new Image();
    img.onload = function() {
        canvas.width = img.width;
        canvas.height = img.height;
        context.drawImage(img, 0, 0 );
        var count = 0;
        var myData = context.getImageData(0, 0, img.width, img.height);
        for(var i=0; i<myData.data.length; i=i+4){
            if(myData.data[i]>90||myData.data[i+1]>90){
                myData.data[i] = 0;
                myData.data[i+1] = 0;
                myData.data[i+2] = 0;
                myData.data[i+3] = 0;
            } else {
                count = count + 1;
            }
        }
        context.putImageData(myData,0,0);
        document.body.appendChild(canvas);
        alert(count);
    }
    img.src = 'image.jpg';

    That will remove the sky from the image after which you can crop out the trees. Which will give you an image that looks like this.

    LGIW5tO.png

    Then you can use imagej analyse>analyze particles to get a count for the number of birds in the picture. Which worked out for me at 1388 since the camera didn't catch the birds in great detail. Most of the birds wound up being cut into 2 blobs so there are approx 700 birds.

  10. I could probably write something but in order to get a fairly accurate count I would need a video or at least a couple of pictures.

    Basically you can find the differences between 2 pictures aka the moving birds. Then create a spritesheet from the data and all you would need to do is count the length of the returned array.

    If you don't feel like coding it yourself you can use adobe photoshop to find differences between 2 photos and https://www.codeandweb.com/texturepacker/tutorials/how-to-create-a-sprite-sheet will generate the spritesheet and return a count of sprites.

     

     

  11. Here are what the buttons of the full ckeditor look like minus a few. I use ckeditor on occasion.

    BgalOmN.png

    There should be a button which looks like Σ to insert a mathjax equation instead of having to use bbcode (which I can never remember) but you might have to download this plugin to use it.

    http://ckeditor.com/addon/mathjax

    To add buttons there should be a configuration file (*usually called config.js) the above example looks like this. It may be called something different on the forum software.

    CKEDITOR.editorConfig = function( config ) {
    	// Define changes to default configuration here. For example:
    	// config.language = 'fr';
    	// config.uiColor = '#AADC6E';
    	
    	config.toolbarGroups = [
    		{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
    		{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
    		{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing', 'Math'] },
    		{ name: 'forms', groups: [ 'forms' ] },
    		'/',
    		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    		{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
    		{ name: 'links', groups: [ 'links' ] },
    		{ name: 'insert', groups: [ 'insert' ] },
    		'/',
    		{ name: 'styles', groups: [ 'styles' ] },
    		{ name: 'colors', groups: [ 'colors' ] },
    		{ name: 'tools', groups: [ 'tools' ] },
    		{ name: 'others', groups: [ 'others' ] },
    		{ name: 'about', groups: [ 'about' ] }
    	];
    	config.extraPlugins = 'mathjax';
    	config.extraPlugins = 'widget';
    	config.extraPlugins = 'dialog';
    	config.extraPlugins = 'lineutils';
    	config.extraPlugins = 'clipboard';
    	config.extraPlugins = 'notification';
    	config.extraPlugins = 'toolbar';
    	config.extraPlugins = 'dialogui';
    	config.extraPlugins = 'button';
    	config.mathJaxLib = '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML';
    };

    To make the equation editor work you need to download a few plugins and extract them into the plugins folder.

    Also CKEDITOR.replace needs to include the extraPlugins bit.

    CKEDITOR.replace( 'textareaIDhere', {
     extraPlugins: 'mathjax'
    }  );

     

    plugins.zip

  12. I

    agree with fiveworlds about the salty. But not about the fat.

     

     

    Yeah I never knew about the fat till awhile ago. The food science class did a study on supermarket yoghurt in lidl, aldi and tesco and found no yoghurt/cheese below 20% fat.

  13. Yes you can make money blogging in wordpress. You would be looking at jobs like social media marketing manager for pubs, clubs and festivals your job would also include photography of any events and answering comments on the blog and facebook page.

  14. Ah I was missing the type. It should be a variable yeah which should be helpful if I can get it working right.

    #include<stdio.h>
    #include<conio.h>
    #include<stdlib.h>
    int i;
    int k;
    int line[38];
    int repeatedNumbers[38];
    int input;
    int loopcount;
    int repeatsx[20];
    int repeatsy[20];
    int p = 0;
    const LAST_LINE_DATABASE = "lastline.txt";
    
    int main(int argc, char **argv)
    {
     filed();
     _getch();
     exit(EXIT_SUCCESS);
    }
    int incrementLine() {
     _asm {
      ADD line[TYPE line * 0], 1;
      ADD line[TYPE line * 1], 1;
      ADD line[TYPE line * 2], 1;
      ADD line[TYPE line * 3], 1;
      ADD line[TYPE line * 4], 1;
      ADD line[TYPE line * 5], 1;
      ADD line[TYPE line * 6], 1;
      ADD line[TYPE line * 7], 1;
      ADD line[TYPE line * 8], 1;
      ADD line[TYPE line * 9], 1;
      ADD line[TYPE line * 10], 1;
      ADD line[TYPE line * 11], 1;
      ADD line[TYPE line * 12], 1;
      ADD line[TYPE line * 13], 1;
      ADD line[TYPE line * 14], 1;
      ADD line[TYPE line * 15], 1;
      ADD line[TYPE line * 16], 1;
      ADD line[TYPE line * 17], 1;
      ADD line[TYPE line * 18], 1;
      ADD line[TYPE line * 19], 1;
      ADD line[TYPE line * 20], 1;
      ADD line[TYPE line * 21], 1;
      ADD line[TYPE line * 22], 1;
      ADD line[TYPE line * 23], 1;
      ADD line[TYPE line * 24], 1;
      ADD line[TYPE line * 25], 1;
      ADD line[TYPE line * 26], 1;
      ADD line[TYPE line * 27], 1;
      ADD line[TYPE line * 28], 1;
      ADD line[TYPE line * 29], 1;
      ADD line[TYPE line * 30], 1;
      ADD line[TYPE line * 31], 1;
      ADD line[TYPE line * 32], 1;
      ADD line[TYPE line * 33], 1;
      ADD line[TYPE line * 34], 1;
      ADD line[TYPE line * 35], 1;
      ADD line[TYPE line * 36], 1;
      ADD line[TYPE line * 37], 1;
     }
     return 1;
    }
    int initLine() {
     _asm {
      MOV line[TYPE line * 0], 1;
      MOV line[TYPE line * 1], 1;
      MOV line[TYPE line * 2], 1;
      MOV line[TYPE line * 3], 1;
      MOV line[TYPE line * 4], 1;
      MOV line[TYPE line * 5], 1;
      MOV line[TYPE line * 6], 1;
      MOV line[TYPE line * 7], 1;
      MOV line[TYPE line * 8], 1;
      MOV line[TYPE line * 9], 1;
      MOV line[TYPE line * 10], 1;
      MOV line[TYPE line * 11], 1;
      MOV line[TYPE line * 12], 1;
      MOV line[TYPE line * 13], 1;
      MOV line[TYPE line * 14], 1;
      MOV line[TYPE line * 15], 1;
      MOV line[TYPE line * 16], 1;
      MOV line[TYPE line * 17], 1;
      MOV line[TYPE line * 18], 1;
      MOV line[TYPE line * 19], 1;
      MOV line[TYPE line * 20], 1;
      MOV line[TYPE line * 21], 1;
      MOV line[TYPE line * 22], 1;
      MOV line[TYPE line * 23], 1;
      MOV line[TYPE line * 24], 1;
      MOV line[TYPE line * 25], 1;
      MOV line[TYPE line * 26], 1;
      MOV line[TYPE line * 27], 1;
      MOV line[TYPE line * 28], 1;
      MOV line[TYPE line * 29], 1;
      MOV line[TYPE line * 30], 1;
      MOV line[TYPE line * 31], 1;
      MOV line[TYPE line * 32], 1;
      MOV line[TYPE line * 33], 1;
      MOV line[TYPE line * 34], 1;
      MOV line[TYPE line * 35], 1;
      MOV line[TYPE line * 36], 1;
      MOV line[TYPE line * 37], 1;
     }
     return 1;
    }
    int filed() {
     // We assume argv[1] is a filename to open
     FILE *file = fopen(LAST_LINE_DATABASE, "rb");
     if (file == 0)
     {
      printf("Could not open file\n");
      file = fopen(LAST_LINE_DATABASE, "wb");
      input = rand() % 36;
      repeatedNumbers[0] = input;
      initLine();
      line[input + 1] = 0;
      fwrite(line, sizeof(int), 38, file);
      loopcount = 1;
     }
     else
     {
      printf("File opened\n");
      fread(line, sizeof(int), 38, file);
      for (i = 0; i < 38; i = i + 1) {
       printf("%d ", line[i]);
      }
      fclose(file);
      loopcount = 0;
     }
     fclose(file);
     file = fopen("data.txt", "wb+");
     for (i = 0; i < 100 - loopcount; i++) {
      incrementLine();
      input = rand() % 36;
      
      int switcher = 0;
      for (k = 0; k < sizeof(repeatedNumbers); k++) {
       if (repeatedNumbers[k] == input) {
        repeatsx[p] = input;
        repeatsy[p] = i;
        p = p + 1;
        switcher = 1;
        break;
       }
      }
      if (switcher == 0) {
       repeatedNumbers[sizeof(repeatedNumbers)] = input;
      }
      line[input + 1] = 0;
      if (100 - i < 37 - loopcount) {
       for (k = 0; k < 38; k = k + 1) {
        printf("%d ", line[k]);
       }
      }
      fwrite(line, sizeof(int), 38, file);
      
     }
     fclose(file);
     file = fopen(LAST_LINE_DATABASE, "wb");
     fwrite(line, sizeof(int), 38, file);
     fclose(file);
     printf(",");
     for (i = 0; i < p - 1; i++) {
      printf("%d ",repeatsx[i]);
      printf("%d ", repeatsy[i]);
     }
     printf("%d ", repeatsx[p - 1]);
     printf("%d ", repeatsy[p - 1]);
     printf(",");
     for (k = 0; k < sizeof(repeatedNumbers); k++) {
      printf("%d ", repeatedNumbers[k]);
     }
     
    }
  15. Does anybody know how to use int arrays in the inline assembly compiler for c? I tried just putting the line[index] in but that gives me a "\n" access error.

     

    #include<stdio.h>
    #include<conio.h>
    #include<stdlib.h>
    int i;
    int line[38];
    int repeatedNumbers[38];
    int input;
    int loopcount;
    const LAST_LINE_DATABASE = "lastline.txt";
    
    int main(int argc, char **argv)
    {
     filed();
    
     _getch();
     exit(EXIT_SUCCESS);
    }
    int filed() {
     // We assume argv[1] is a filename to open
     FILE *file = fopen("lastline.txt", "rb");
     
     if (file == 0)
     {
      printf("Could not open file\n");
      file = fopen(LAST_LINE_DATABASE, "wb");
      for (i = 0; i < 38; i = i + 1) {line[i] = 1;}
      input = rand() % 36;
      repeatedNumbers[0] = input;
      line[input + 1] = 0;
    
      fwrite(line, sizeof(int), 38, file);
      return 1;
     }
     else
     {
      printf("File opened\n");
      fread(line, sizeof(int), 38, file);
      for (i = 0; i < 38; i = i + 1) {
       printf("%d", line[i]);
      }
      
      fclose(file);
      return 0;
     }
    }

     

  16. They might need something more costly though to keep bulk down. ​

    I dunno about bulk mine was a pumped water system similar to the hot water suits divers wear and a battery pack. It is a full body suit and is already made of fairly durable material and is available in black.

×
×
  • 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.