Saturday, 28 November 2015

New Budget PC - Late 2015

Found this article on PCgamer.com for a budget PC:
Component type Recommended component Price
Processor Intel Core i3-6100
$125 (£107)
Motherboard AsRock Z170M Pro4S
$100 (£78)
Memory Kingston HyperX Fury DDR4 2666 (8GB)
$60 (£45)
Graphics card AMD Radeon R9 380 4GB
$195 (£183)
Power supply EVGA 500W 80PLUS Certified ATX12V/EPS12V
$40 (£41)
Primary storage Crucial BX100 250GB
$80 (£63)
Secondary storage Western Digital Blue HDD (1TB)
$52 (£40)
CPU cooler Arctic Alpine 11 Pro Rev. 2
$15 (£8)
Disc drive None $0 (£0)
Cases Cooler Master N200 (see below for more) $50 (£42)
$717 (£607)

This is a little out of the 'budget' price range. I remember that the previous article was a Pentium g3258 at a

much cheaper price. Found this from a recommended proper budget build:
CPU
$59.99Intel Pentium G3258 3.2GHz Dual-Core

MOTHERBOARD
$28.99MSI H81M-P33 Micro ATX LGA1150

MEMORY
$36.29Kingston HyperX Fury Blue 8GB (1 x 8GB) DDR3-1866


STORAGE
$62.22Samsung 850 EVO-Series 120GB 2.5" SSD


CASE
$79.98NZXT S340 (Black/Red) ATX Mid Tower


POWER SUPPLY
$0.00SeaSonic 620W ATX12V / EPS12V
$272.47


This is sooo much cheaper!! Just need a graphics card. He recommends a 380/380x, or 960. We'll see. Think I might just go for what I got last year: R9 270. Budget card of choice seems to be $106.98Gigabyte GeForce GTX 750 Ti 2GB WINDFORCE
Also adding a Cooler from top as will be overclocking

Bought. Here's what I got:
1 x Intel Pentium Dual Core G3258 3.2GHz Socket 1150 3MB L3 Cache Retail Boxed Processor £45.82
1 x MSI H81M-P33 Socket 1150 VGA DVI 8 Channel Audio mATX Motherboard £25.82
1 x HyperX 8GB 1866MHz DDR3 CL10 DIMM Fury Series Blue £26.65
1 x Ace Black 120mm Fan 700W Fully Wired Efficient Power Supply £14.99
1 x Gigabyte GTX 750 Ti 2GB GDDR5 Dual Link DVI HDMI PCI-E Graphics Card £72.49
1 x Cooler Master Hyper TX3 EVO 3 Heatpipes/1x92mm Fan CPU Air Cooler £16.24

Total: £242.43

Going to yoink an old case from who knows where, saved about £15.00

Saved money on PSU and case. He used stock cooler, I don't trust in them, especially when overclocking!

Wednesday, 4 November 2015

If all links on the internet were nofollow links, where would that leave Google?

A Test for rel="nofollow" links and google PageRank


Just listening to Link Building in Depth with Peter Kent, specifically "Examining social networking links" explaining that Google has stated that a link with rel="nofollow" does not contribute to a pages PageRank. He goes on to say that they have also stated that it is up to the social network sites to manage which links are nofollows

Surely Google should manage which it thinks are worth looking at, as it is their search results that are affected. If all links on the internet were nofollow links, where would that leave Google?

It is an almost certainty that they do use links with rel="nofollow", they simply don't admit to it. A simple test would be:

Perhaps a more thorough test would be:
  1. To create two sites or pages, with the same 'unique content'.
  2. ONLY use nofollow links to get to one of the page from indexed sites (perhaps only Facebook)
  3. Finally do a search on Google
If the site which has the nofollow links is higher then the page with no links, then Google is using rel="nofollow" links

Cheers

Sunday, 19 July 2015

simulating connectionist networking using cell like balls

I'm interested in new ways of computing, particularly connectionist networks. One such way is not to emulate connectionist networks through computeres, but to physically make one.

My new idea is to make the building blocks (nodes) of connectionist networks; small, simply and cheap enabling mass production. Each node requires power for processing and communication transmission, and a way of communicating. These nodes can then be put in a volume and the network is made.

The difficulty of powering a network like this is that this power distribution would get in the way of the communication and would have to be built into each node, so that they can pass the power over to adjacent nodes.

One idea is to cover the node in a conductor, and when the surface touches both a positive and negative ..... it can be powered. This way you can fill a volume with these nodes and only provide provide electrical power to the outer nodes. The outer nodes touching their neighbours and so on, passing the charge.

Communication has to be done through another medium so as not to complicate or interfere with power distribution. The medium which seems best suited is light. With the advances in optics and commincation through optics this method seems the best answer. At its' very simplist, there are LED lights in a sepherical distribution around the node, and also light recieving devices surrounding each node.

Each node is powered by being next to a powered node. It can send and recieve signals from it's neighbours through light.

One drawback in using light is that it will have to be converted at the beginning and end nodes, to electrical signals.

Thursday, 16 July 2015

interactive base to work on

Been thinking about an interactive template for web design. The basic principal is to create a canvas containing thousands of tiled objects, could be pixels. All these objects are monitored. When the mouse passes over them their colour value increases.This would create a nice effect for the user.We can change areas of this so that the pixels behave differently in different areas. Perhaps their behavior is based on the proximity to something. Or perhaps different elements like the menu system have either different starting value or different calculations.
This way we can create a website, the graphics are all based on user interactions, and each time the page is visited the visitor will see something unique.
To do:
  • Create objects which change when mouse goes over
  • Tile a webpage with it
  • Create areas within the webpage with different variables

Possible problems

I see that this initially might be processor intensive. This needs to be monitored and more effencient methods worked out.



Research

going to use jquery to animate the changes. 

Tuesday, 23 June 2015

MDT task sequence gets stuck in a loop -

Found this page which describes how to stop the cycle, which is the only reference not entailing wiping the whole drive and starting again!

Basically, just run the LTICleanup.wsf file in the scripts folder within the Deployment Share

On reboot it came up with this error:
can not find script file c:\minint\scripts\litetouch.wsf

Simply had to delete the last file in the startup folder in the start menu.

Thursday, 11 June 2015

C++ Programming compression - Step 1 - reading and writing to a file

After installing Netbeans for windows (previous post) the first stage of making my compression program is to read and write text files. Ultimately, to read a file, compress it (0% to start with -  might actually be larger) and then uncompress it to the original contents. Really want to make a self extracting compressed file. Not sure at what point to implement this. The earlier in the project the better I thinks.

First things first - read and write to files. Found this tutorial using Visual Studio, but can't be too different.

ifstream
ofstream

Found this tutorial on it as well, but you can copy and paste this one. Here's the program I wrote to read a file, and write to a file (although couldn't get it to create a file):

/* 
 * File:   main.cpp
 * Author: Supermonkey
 *
 * Created on 27 May 2015, 07:16
 */

#include 
#include 
#include 
#include 
using namespace std;


void readFile(string filename);
void writeFile(string filename);
/*
 * 
 */
int main(int argc, char** argv) {

    string readFilename = "newhtml.html";
    string newFilename = "newtxt.txt";
    
    readFile(readFilename);
    writeFile(newFilename);
    
    return 0;
}

void readFile(string filename) {
    
    string line;
    ifstream myfile ("newhtml.html");

    if (myfile.is_open()){
      while ( getline (myfile,line) ){
        cout << line << '\n';
      }
      myfile.close();
    }
    else cout << "Unable to open file"; 
  
  

  //return 0;
    
}

void writeFile(string filename) {
  ofstream myfile ("newhtml1.html");
  if (myfile.is_open())
  {
    myfile << "This is a line.\n";
    myfile << "This is another line.\n";
    myfile.close();
  }
  else cout << "Unable to open file";
  //return 0;
}




Managed to find this forum on why I couldn't pass a string into the ifstream and ofstream perameters. To get it to work you have to convert the C++ string to std:string :

ifstream myfile (filename.c_str()); 

I've now created a couple of functions which read a line from one file, and write it to another. I found this explination of how to append to a file, as with the above code it would only wipe the file and replace contents with the last line.

void readWriteFile (string readFile, string writeFile) {
    string line;
    ifstream myfile (readFile.c_str());

    if (myfile.is_open()){
      while ( getline (myfile,line) ){
        cout << line << '\n';
        writeLineToFile (line, writeFile);
      }
      myfile.close();
    }
    else cout << "Unable to open file"; 
}

void writeLineToFile (string line, string writeFile) {
  ofstream myNewfile;
  myNewfile.open (writeFile.c_str(), std::ofstream::out | std::ofstream::app);
  if (myNewfile.is_open())
  {
    myNewfile << line << "\n";
    myNewfile.close();
  }
  else cout << "Unable to open file";
  //return 0;
}

Sunday, 31 May 2015

Netbeans install

Found this video for installing netbeans for use with c++. Why is it so complicated. Because people don't want you to make programs! They want all the glory! Here's what I make of the rundown of the install:


  1. Cygwin (please make your website easier to use!)
    1. click install > setup-x86.exe
    2. Run it
    3. Download from any mirror
    4. Packages
      1. gcc-core - GNU compiler collection
      2. gcc-g++ - GNU compiler collection
      3. gdb - GNU debugger
      4. make - the GNU version of the make utility
    5. install
  2. JAVA Development Kit JDK
    1. Download JDK
  3. Netbeans
    1. just install the full package (you never know when you're going to need it all)
    2. Load up Netbeans
    3. make a new C++ app
    4. tools > Options > C++
      1. If you don't have anything in these boxes, click restore to defaults
Done

Tuesday, 7 April 2015

Sunday, 29 March 2015

Drupal security updating

Using drupal it's always good to stay up-to-date with security updates. The trouble is, how to update as it is usually a manual thing (please could you automate it Drupal?).

So, the manual process is:
  1. Backup files
    1. You really only need to backup the /Sites/All folder, but I backup all of it
    2. I use FileZilla, and simply drag the whole online folder onto my machine in an appropriately named folder - /Backups/29-03-2015/webfiles/
  2. Backup database
    1. The database is probably the most important thing to backup
    2. Log in to your myPHPadmin console
    3. click on the database
    4. Click on export
    5. I just use the simple settings
    6. When it's made the file, it'll give it to you to download
    7. Download and put it in an appropriately named folder - /Backups/29-03-2015/database/
  3. Download the latest Drupal release
  4. Upload all the files
    1. I use FileZilla, which doesn't replace folders, only files within folders. Very handy! You don't want to overwrite your /sites/ folder as this contains all your custom stuff!
  5. Run the update
    1. go to http://www.yourwebsite.com/update.php
  6. Done!

Saturday, 28 March 2015

PHP download FTP file and convert from ANSI to UTF-8

So, I have a file, and I'm using Joomla with CSVI to import the file from an ftp server into the database. The file is automatically made by a third party, and it is in ANSI format.

This file contains '£' which CSVI and Joomla do not like when it is in ANSI format. I need to convert it to UTF-8 in order to import such characters. Of course to convert, I will need to store locally as well. Here's my research:

First thing is to get the file and store on server:

Found the PHP function ftp_get

Once on the server, I found two ways to convert:
mb_convert_encoding()
iconv()

this is quite helpful for getting and writing the file:
$file = file_get_contents('file.php');
$file = iconv('greek-charset','UTF-8', $file);
file_put_contents('file.php', $file);
//ta-da!

Monday, 9 March 2015

Blender Render Farm Tutorial

This tutorial will talk you through how to use the Render Farm in S721. You will be able to submit a job, and collect the files when finished.

  1. Load up Blender 2.73a found in Applications > Blender 2.73a > Blender
  2. You will need to enable the render farm plugin
    1. Go to File > User Preferences
    2. Go to "Render" on the left hand list
    3. Enable "Network Renderer"
    4. Close this window
    5. At the top go to where it says "Blender Render" and select "Network Render":
    6. On the lower right hand panel you will see the controls for network rendering:
    7. Once a job is submitted you will have to wait until it is complete before collecting the files.
On the Master Machine (the Mac Pro teaching machine) you can log in and access the queue viewer.
  1. Open a web browser on this machine
  2. in the URL type
    1. http://localhost:8000
 Done

Basic Fabric Printer Tutorial

This tutorial will talk you through using SmartPrint to send a print to the fabric printer and controlling the 'print queue' to the printer.

  1. You will need to log into the computer with a special login:
    1. Username: .\smartprint
      1. Please put the .\ before the word 'smartprint'
    2. Password: smartprint
  2. Put your USB Pendrive into the machine
  3. Your image is best off in the .TIFF format
    1. To convert to this format (as opposed to JPEG) load Photoshop
    2. Open your image
    3. In the menu system, click on Image > Image Size
    4. resize your image to the size you would like it printed to
      1. Make sure the 'Resolution' is set to 200 Dots Per Inch (DPI) (as opposed to Dots per CM)
    5. Click OK to resize it.
    6. In the menu system click: File > Save As
    7. Select TIFF from the list of formats
    8. Click OK when asked more questions.
  4. Load up "SmartPrint"
    1. Icon is at the bottom
  5. It will present you with a set width canvas which is dark gray
    1. each fabric is a different width. Measure your fabric
    2. To resize the width of the canvas click: File > Layout
    3. Edit the 'width' to the size in mm
  6. Open up an explorer window and browse to your image. (the TIFF file you made earlier)
  7. Drag this image onto the canvas of Smartprint
  8. It should size your image how you had sized it in Photoshop
  9. You may drag more images onto the canvas to maximise use of space. Although it will only let you drag one image at a time.
  10. When you are happy, switch the printer on
  11. Load the roll you wish to print on
  12. Click the 'right' arrow to say you have loaded a roll
    1. it will measure the width of the roll
  13. Click the 'Remote' button when the printer is ready to print
  14. On the computer go to: File > Print
  15. Click OK for 1 copy
  16. The Print Queue Manager will load up
    1. Do not click on the Print Queue Manager as it will crash!
  17. If the Print Queue Manager 'crashes' you will need to close it and open it again
    1. Click on the SmartPrint software
    2. In the file menu system go to: File > Close Queue Manager
    3. In the file menu system go to: File > Open Queue Manager
    4. In the Queue Manager go to: File > Start Print Queue
 Done

Embroidery Machine basic Tutorial

The embroidery machine can take an image and convert it into lines which it can follow with a stitch, or it can fill inbetween if the area is enclosed.

This tutorial will show you how to get an image into the application and convert it into stitch lines and fills.

Finding an Image

To make your life easier, it is best to start with images that have only a few colours, and which are flat. i.e. no gradients or noise.

For demonstration purposes I have not made my life easier, I have picked this image:
Although this image has gradients, we can fix it in Photoshop to make it a flatter image

Fine-tuning the image before using PE Design

I will open the image in Photoshop. To make the image have less colours (I count the gradient as many colours) we can do a few things:
  1.  If it is just one shaded colour, you can use threshold
    1. Click on the threshold button in the Adjustments panel on the leftIt's in the bottom row of icons in the middle
    2. It will add an adjustment layer in photoshop and take you to editing it. This panel should now look like this
    3. And your image should now be black and white:
    4.  Underneath the graph there is a slider, if you slide it around you should be able to get a good black and white image:
    5. Heres where I moved the slider to:
    6. If you are happy with it, you can save as a JPEG image and move onto the next Chapter "Converting Pixel Image into Vector Image"
  2. If these last few steps didn't bode well, then we will try a different 'filter'
    1. We will use the 'Cutout' filter, accessed in the menu 'Filters > Artistic > Cutout...
    2.  You will see these sliders:
    3. Move them about until you have however many colours you need. Your image should look flat (no gradients) like this:
    4. Save your file as a JPEG image and close Photoshop.

Converting images into stitch and fills

Now we are ready to put the image into PE Design
  1. The software needs a license to run, which is on the 'disk drive' for the embroidery machine. Make sure it is plugged in.
  2. Load up PE Design Center
    1. Start menu > PE Design > PE Design Center
  3. click on the Image button to say you have an image to work from
  4. Find your image and click OK
  5. With the colour picker, choose the colours of your image that you want it to work from
  6. Click OK
  7. Now in the top right corner you will see four icons next to each other. These are the four steps to take to convert our image. The workflow is to work from left to right. We have done the first two steps of importing the image and converting it to PE Design format.
  8. Click the next image which looks like some dots with lines joining them. Here it will convert our image into lines
  9. The standard settings work well, but if it does not produce the right image, click this icon again to go back and repeat the steps, changing the settings.
  10. Your image should be converted into lines. You can edit these lines if there are not quite right using the tools on the left
  11. The final step is the last button on the right. When you click this it will covert your lines to a running stitch.
    1. To change the stitch colour click on the line tool and change the colour.
      1. Whereever you now click it will change that line to that colour
    2. To make it have no running stitch, click the button to the left of the colour to turn it off
      1. wherever you now click it will not do a running stitch
    3. To change whether it fills an area in with a fill stitch click the fill tool
      1. Where-ever you now click it will fill in areas with a fill stitch
    4. To unfill an area, click the button to the left of the 'colour' button
      1. Where-ever you now click it will NOT fill in areas.
  12. When you are happy with your image you will need to put it on the disk
    1. Don't close the PE-Design center but open PE Layout and Editing from the Start menu
      1. Start > Programs > PE Design > Layout and Editing
    2.  To import your file click File > Import > From Design Center
      1. It will ask you what size to import it as
    3. Now to save to disk
      1. Click File > Write to Disk

The Embroidery Machine

Now you are ready to put your image on the Embroidery machine.
  1. Switch the machine on at the back
  2. Click the on-screen OK button
  3. When it is booted, insert the disk
  4. Click on the icon which represents the disk
  5. Click on the file on the disk
    1. It will put your artwork on the 'canvas'
  6. You can rotate, resize your artwork here.
  7. When you are ready click the End Edit button (bottom right)
  8. Load your Embroidery frame in
  9. Click the To Sew button (bottom right)
  10. Thread the machine
  11. Click the Sew button (bottom right)
  12. Click the safety button and then the green button to begin.

LaserCutter Vector Cutting Basic Tutorial

Introduction

In order for the Laser Cutter to cut through materials, it needs a vector line to follow with the laser. Vector lines are created on the computer using various applications such as:
  • Adobe Illustrator
  • CorelDraw
  • InkScape
A vector line in its simplist form is two points on the screen, which have a line connecting them. Images made in these applications might only consist of points and lines. These lines might have a colour and thickness. If these lines enclose an area, the area can be filled with a colour or gradient.

This is in contrast to the images you will be used to which are 'pixel' based. Pixel based images are made up of a large grid of dots, each with a colour value.

Overview

In this tutorial we will take a pixel based image and convert it to a vector image using Adobe Illustrator CS5. We will then edit this to enable the laser cutter to follow the lines we would like to cut. This involves editing the line thickness, deleting all the 'filled in areas' and lines we do not want the laser cutter to cut.

Finally we'll stick it in CorelDraw and laser cut it.

Finding an Image

To make your life easier, it is best to start with images that have only a few colours, and which are flat. i.e. no gradients or noise.

For demonstration purposes I have not made my life easier, I have picked this image:
Although this image has gradients, we can fix it in Photoshop to make it a flatter image

Fine-tuning the image before using Illustrator

I will open the image in Photoshop. To make the image have less colours (I count the gradient as many colours) we can do a few things:
  1.  If it is just one shaded colour, you can use threshold
    1. Click on the threshold button in the Adjustments panel on the leftIt's in the bottom row of icons in the middle
    2. It will add an adjustment layer in photoshop and take you to editing it. This panel should now look like this
    3. And your image should now be black and white:
    4.  Underneath the graph there is a slider, if you slide it around you should be able to get a good black and white image:
    5. Heres where I moved the slider to:
    6. If you are happy with it, you can save as a JPEG image and move onto the next Chapter "Converting Pixel Image into Vector Image"
  2. If these last few steps didn't bode well, then we will try a different 'filter'
    1. We will use the 'Cutout' filter, accessed in the menu 'Filters > Artistic > Cutout...
    2.  You will see these sliders:
    3. Move them about until you have however many colours you need. Your image should look flat (no gradients) like this:
    4. Save your file as a JPEG image and close Photoshop.

Converting Pixel image into Vector Image

Now we can open our image in Illustrator and convert it:
  1. Open Illustrator
  2. Open your file
    1. Go to the menu "File > Open" and find your file
  3.  It will place your image on a sheet of paper. Click on the image and you will see the top bar change and a "Live Trace" button will appear
  4. Click "Live Trace" and your image should change to Black and White and the top bar will change once more:
  5. You can change the "Threshold" and "Min Area" numbers to change how it converts your image
    1. You will find that the flatter your image is, the better the results will be
  6. To just get the outlines of the image, we need to click the "Tracing Options Dialogue" which is the small button at the top, next to the "Custom" dropdown box. The dialogue box should look like this:
    1.  Uncheck the Fills box
    2. Check the Strokes box
    3. Check the Ignore white box
  7.  When you click OK, your image should look like this:
  8. When you are happy, click the "Expand" button at the top:
  9. You will now be able to see the points and lines Illustrator has created. It naturally strokes the line with a thickness of 1pt. We want make the thickness 0.01pt as this is what the lasercutter likes.
    1. Change the 'Stroke' number in the top bar to 0.01pt (it's not in the dropdown box, you have to manually type it in)
  10. Now we must Save
    1. Go to File > Save as
    2.  Save it as an Illustrator Document (.ai)
    3. Click save
    4. On the dialogue box with more options on:
    5. Uncheck "Use Compression"

Laser Cutting


Now we are ready to use CorelDraw to layout our artwork and send to the laser cutter
    1. Login to the lasercutter computer
      1. Username: .\lasercutter
      2. Password: lasercutter
    2.  Load up CorelDraw X4 (icon is at the bottom next to start menu)
    3.  CorelDraw makes you a new document which is 40cm by 30cm
    4. Import your image
      1. go to File > Import
      2. find your image and click import
      3. Click OK if it asks you any questions
    5. Its easier if you group you artwork lines together.
      1. right click on your artwork and select Group
    6. Position your artwork so it will line up with the material you put in the lasercutter
    7. Now you're ready
    8. Before we send the whole thing, we need to do test cuts.
    9. Make a small square using the square tool.
    10. In the bottom right corner, double click the black box and change the stroke to "Hairline"
    11. Click OK
    12. go to File > Print
    13. Check the box which says "selection"
    14. Click on Properties
    15. Go to the Advanced tab and find a preset which most resembles your material.
    16. Click it and click "Load"
    17. Now it should have updated the setting on the previous tab. Go back to this one
    18. Make sure the Vector check is marked
    19. Have a look at the speed and power settings in the vector section (bottom right)
    20. Click OK
    21. This takes you back the print window. Click "Print" (make sure the lasercutter is on and connected)
    22. Open the lasercutter and put in your material.
    23. Click Focus button and use up and down arrows until measuring tool brushes the surface of the material
    24. Click the Job button and you should see your file as JOB1:graphic1.cdr
    25. Switch on Extractor fan (big green button)
    26. Press GO!
    27. When machine beeps it's finished.
    28. Check whether it was a good cut
    29. If not, readjust settings (12.) and retry.
    30. When it is a good cut, select your work and go through the last steps to send it.
Cheers

Saturday, 21 February 2015

drupal views link to another view

I have a view which shows a list of a content type. When the content is clicked I want to show another view of that content.

The reason is I want to make use of the css layout I've already made with a views slideshow, and I would like to duplicate it with another view of just one item.

I have found this question, which is answered linking to these places about arguments.

I worked it out in the end. Although I did have trouble to begin with because I got all the settings correct and it still didn't work. But on creating a new view with the same settings it worked. It might have been due to the url having several 'layers' to it.

Basically:
  1. Sort out your page
  2. add 'contextual filter'
    1. I did a taxonimy term.
  3. test out in preview panel.

Thursday, 12 February 2015

Blender render farm - built in Network renderer

Well, I tested this last year, but I can't believe it, I can't find any mention of me doing it. It either means I forgot to write it up, or didn't write it up in this blog! Oh well, here's a new writeup:

The only files I have to go from are two files named:
master.blend
slave.blend

Basically, these files have presets in them, so whichever machine opens them either becomes the master or the slave.

Here's a document I found which has 'slave.blend' mentioned in it, looks very promising.

  1. First thing is to load blender, and load the Network Renderer plugin. Go to:
    1. File > User Preferences > Render > Network render > tick:
  2. Up the top, next to File, Edit menus, there is a dropdown usually on "Scene". Select "Network Render":
  3. On the far right you should see the Network Render settings:
  4. Click Master on the machine you want to control jobs. Make sure it's a machine which is always on, perhaps with storage space which can be shared to other machines (not worked out where rendered files are stored)
    1. Click Start Service
  5. You can now view the jobs and clients connected to the master by browsing to the webpage:
    1. http://ipAddressOfMaster:8000:
      1. I had trouble with this, but found it was because I was on the master machine and so had to type:
        1. http://localhost:8000/
      2. There is also a newer jquery interface: /html/newui#interface:
  6.  Now start another machine as a slave
  7. On the final machine, load up a nice file and click "Send Job":
  8. The systems so good, the end files end up where-ever you said for the output (at the bottom of the client list). You can even download renders from previous jobs!!

Now that I got it all working, the plan was to save a master.blend file and a slave.blend file and have them load up when the machines are started, from command line. Here it goes:

 To run the master:
/Applications/Blender\ 2.73a/blender.app/Contents/MacOS/blender -b /Users/Shared/master.blend --addons netrender -a -noaudio -nojoystick

The slave:
/Applications/Blender\ 2.73a/blender.app/Contents/MacOS/blender -b /Users/Shared/slave.blend --addons netrender -a -noaudio -nojoystick 

Seems to work very nicely. One thing to note is that the IP address of the master has to be saved in the slave.blend file. I don't know how to add this through the command line.

The next thing is to get the slave.blend command to launch at system startup, and run as root.

Found this question and answer in stackoverflow 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>uk.ac.chesterfield.dci.blender.client</string> <!-- org.mongodb.mongodb perhaps? -->

    <key>KeepAlive</key>
    <true/>
  
    <key>RunAtLoad</key>
    <true/>
  
    <key>ProcessType</key>
    <string>Background</string>

    <key>UserName</key>
    <string>root</string>

    <key>ProgramArguments</key>
    <array>
            <string>/Applications/Blender 2.73a/blender.app/Contents/MacOS/blender</string>
            <string>-b</string>
            <string>/Users/Shared/slave.blend</string>
            <string>--addons</string>
            <string>netrender</string>
            <string>-a</string>
            <string>-noaudio</string>
            <string>-nojoystick</string>
    </array>
</dict>
</plist>

Sunday, 8 February 2015

jquery pullout slide animation

This is my first lesson in jquery.

Basically what I want is a slider which is mostly hidden on the left, and when you hover over it pulls out to reveal all.

After going on W3CSchools for 30 mins I botch'd up this code:

$(document).ready(function(){$("#square").hover(function(){ $("#square").animate({ left: '+=100px' }); }, function(){ $("#square").animate({ left: '-=100px' }); }); });

Saturday, 7 February 2015

Drupal views slideshow image as css style background

Thought I'd document this as I will probably do this in future developments.

I wanted a views slideshow, with the images appearing full screen with text ontop. It appears simple at first but actually required more digging.

Backstretch does not work with views slideshow, as it applies the image background to elements not within the slideshow.

I found a slightly helpful article which suggested a fix, but later found the forum from where more helpful information was taken.

to sum it up, you need views to output the url of the image for the field, and then use a views template override to get this url and 'render' it inside a html element as the background-image style.

To do this:

  1. Get views to output the url of the image
    1. in the views view, add a Relationship
      1. this needs to be a 'File Usage: file'
    2. next add a field '(file) File Path
      1. in this field, tick the box titled:
        1. Display download path instead of file storage URI
  2. Now to render this URL inside a HTML element you need a template override
    1. In views veiw, go to 'Other' > 'Theme' > 'Information'
      1. find the template override for the field
      2. create a new file with that exact name and place it in your theme
    2. inside this file paste this:
      1. <div class="mainImage" style="background-image:url('&lt;?php print $output;?&gt;');">&lt;!--<img src="&lt;?php print $output;?&gt;"style="visibility:hidden; "></img>--&gt;</div>
    3. Done
You can now style this .mainImage div as:
.mainImage {
position: fixed;
height: 100%;
width: 100%;
top: 0px;
left: 0px;
z-index: -2000;
background: no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

sorted.

It now changes with the views slideshow.

Wednesday, 28 January 2015

Drupal Slideshow with text overlay

I have a content type which I has a main picture and some intro text and a title. I would like to 'slideshow' this full screen, with the text of each one over the top of the image, and the title at the top of the page. With thumbnails of all down the side, clickable.

I've seen this post which describes doing it with Views Slideshow, as demo'd here. I shall give it a go presently.

it involves adding a folder into the server. Look at the error when you try and enable the module.

After the install all appeared very nice and worked almost swimmingly.

Drupal restore from backup

well, I've been drupal'ed. Time to restore. thought I'd export content type and content. Here's how:

http://drupal.stackexchange.com/questions/39417/export-content-types-using-features

http://drupal.stackexchange.com/questions/20498/export-content-in-features-using-uuid-features

couldn't do the second of these tutorials as it was written in 2012 and I think things have changed.




Here's what I did to restore:


  1. Downloaded the database (for backup)
  2. downloaded all files (for backup)
  3. downloaded the new drupal
  4. uploaded all new drupal files (replacing old files)
  5. done
It was a while ago I did this so I'm not entirely sure but try this first next time.

Navigating to a viagra link came up with 'no such page'.

Sorted

adding javascript to a template

Whilst making templates in Joomla I am always wanting to add a little javascript here and there but always hitting a brick wall. What usually seems to happen is that the script, or another on the page doesn't seem to run.

Looking into it it looks like it is to do with how it is loaded. It looks like you cannot have mutliple scripts using the on page load command. It only runs once and probably on the first occurance, maybe the last?

Looking at Joomla specifically, I found the official article on how to add inline and external javascripts. I'm going to try this out before investingating anything else.

Sunday, 11 January 2015

Jquery slideshow with php

So I'm going to make a jquery slideshow into a joomla website. Should be interesting.

Here's a good start