-
Posts
838 -
Joined
-
Last visited
Content Type
Forums
News
20th
EduGeek EDIT Conference
Blogs
Everything posted by Friez
-
I would say that (at least on here) there are more of us that do good for our schools and genuinely help them achieve their goals at as low a price as possible. I'd be surprised to come across a NM/Tech that genuinely intends to mess up things for a schools technology provision, and while I don't doubt that such people exist I am fairly confident that they are in the minority. Penalising all the hard working NM's and Techs out there just because of a few bad eggs is hardly fair to the majority of the workforce. Lets not forget that theres likely many thousands of jobs around the country that are going to be directly affected by BSF, and even more who are going to be indirectly affected. This isn't some tiny little thing that the government are just throwing out there, it's the outsourcing of a large number of public sector jobs. However, information on such outsourcing has been kept relatively quiet, and the few that do know about it are either those who are involved with the implementation of BSF, or are the workforce who have actively sought out BSF and discover (to their horror) what the powers that be are not telling them about their job (in)security. It is only recently that some of the media folk are starting to catch wind of it. So why such secrecy from the government and the like? Are they afraid there might be a little bit of public outcry when people figure out their taxes could potentially be washed away in another expensive scheme? Is a third party that has absolutely zero interest in the quality of service and education of children, but every interest in making a profit really beneficial to UK Schools? Do they have something measurable that demonstrates that they are a superior, more cost effective solution to that of an in-house service that we do not know about? Why stop at education? Why not outsource our teachers to Norway, doctors to China, and our police force to Germany? Makes "good" sense to me, afterall for all we know it could work out just great! The Majority of us do a fantastic job, we do it because we CARE about the place we work, we want the best for the schools we work in. However, we are met with financial constraints and this is no fault of our own, but only by the powers that be from above. In effect we are being penalised for THEIR mistakes and that is wholly unacceptable.
-
You have no chance to survive make your time. Seriously, anyone who doesn't know about all your base clearly has been living in a cave all their life. Nothing quite getting down the pub, spotting my mates and saying "How are you gentlemen?" and getting a resounding response of "All your base are belong to us."
-
Not necessarily useful for arrays, but along the same topic, here's a bit more about references/pointers: #include void addfive(int* iVar) // this function is asking for the memory address of an integer as its parameter { iVar[0] += 5; // funny how we're referencing it as if it's the first element of an array hmm? } int main void() { int iVariable = 5; // look ma! It's not a pointer! No *'s here! addfive(&iVariable); // checkit! the & passes the REFERENCE to the variable printf("%d",iVariable); // prints 10 but its outside of the function that added it! return 0; } I'm sure they would've given you a lecture on this sort of stuff
-
An example from yours truely about a simple array: #include "otherfile.h" int main (void) { char szArray**; AllocateMemory(szArray); // call the function in the other file, passing in the 2D char array // do stuff with 2D array then... // dont forget to make a DELETE version for anything you make with NEW return 0; } otherfile.h void AllocateMemory(char** szIn); otherfile.cpp #include "otherfile.h" void AllocateMemory(char** szIn) { szIn = new char*[256]; // space for 256 'words' (think about it as 256 pointers to 1D arrays) for(unsigned int i=0;i<256;i++) { szIn[i] = new char[256]; // space for 256 characters on each 'word' } } Disclaimer: I've not tested if this compiles, its just a quick monday morning straight off the top of my head type thing. Of course, even if you declare your arrays static like: char szArray[256][256]; the pointer stuff still counts.
-
I listen to a *lot* of Japanese music, it's quite incredible how many lyrics that can be misheard.
-
What on earth do you mean? It's scientificoligacally provenised that tea makes you immune to nuclear attack* * Not necessarily true.
-
computermap.php (This generates the actual map image via PHP): if(isset($_GET['room'])) { if($_GET['room'] == "T1") include "map_t1.php"; else if($_GET['room'] == "T2") include "map_t2.php"; else if($_GET['room'] == "T3") include "map_t3.php"; else if($_GET['room'] == "T4") include "map_t4.php"; else if($_GET['room'] == "WRLR") include "map_wrlr.php"; else if($_GET['room'] == "L5") include "map_l5.php"; else if($_GET['room'] == "T5") include "map_t5.php"; else return; $killlink = false; if(!isset($link)) // no SQL link { include "dblogin.php"; // login to the database $killlink = true; } $im = imagecreatetruecolor($maxwidth, $maxheight*2); $whi = imagecolorallocate($im, 255, 255,255); imagefill($im, 0, 0, $whi); $color = imagecolorallocate($im, 0, 0, 0); $x=0; $y=35; $c=0; for($i=0; $i<$sideA; $i++) { $size = 32; $comp = array( $x,$y, $x+$size,$y, $x+$size,$y+$size, $x,$y+$size ); $comp2 = array( $x,$y+$maxheight, $x+$size,$y+$maxheight, $x+$size,$y+$size+$maxheight, $x,$y+$size+$maxheight ); $query = 'SELECT * FROM netadmin_loggedinusers WHERE Machine = \'' . $compnames[$c] . '\''; $result = mysql_query($query); $line = mysql_fetch_array($result, MYSQL_ASSOC); $color = imagecolorallocate($im, 0, 0, 0); $col2 = imagecolorallocate($im, 0, 0, 192); if($line['Machine'] != "") { if($line['InTime'] == $line['OutTime']) // currently logged in { $color = imagecolorallocate($im, 198, 72, 72); $col2 = imagecolorallocate($im, 128, 128, 255); } } mysql_free_result($result); imagefilledpolygon($im, $comp, 4, $color); imagestring($im, 1, $x, $y, $compnames[$c], $whi); imagefilledpolygon($im, $comp2, 4, $col2); imagestring($im, 1, $x, $y+$maxheight, $compnames[$c], $whi); $y += 35; $c++; } $x=35; $y=0; for($i=0; $i<$sideB; $i++) { $size = 32; $comp = array( $x,$y, $x+$size,$y, $x+$size,$y+$size, $x,$y+$size ); $comp2 = array( $x,$y+$maxheight, $x+$size,$y+$maxheight, $x+$size,$y+$size+$maxheight, $x,$y+$size+$maxheight ); $query = 'SELECT * FROM netadmin_loggedinusers WHERE Machine = \'' . $compnames[$c] . '\''; $result = mysql_query($query); $line = mysql_fetch_array($result, MYSQL_ASSOC); $color = imagecolorallocate($im, 0, 0, 0); $col2 = imagecolorallocate($im, 0, 0, 192); if($line['Machine'] != "") { if($line['InTime'] == $line['OutTime']) // currently logged in { $color = imagecolorallocate($im, 198, 72, 72); $col2 = imagecolorallocate($im, 128, 128, 255); } } mysql_free_result($result); imagefilledpolygon($im, $comp, 4, $color); imagestring($im, 1, $x, $y, $compnames[$c], $whi); imagefilledpolygon($im, $comp2, 4, $col2); imagestring($im, 1, $x, $y+$maxheight, $compnames[$c], $whi); $x+=35; $c++; } $x=(35*($spacew+$sideB+1)); $y=35; for($i=0; $i<$sideC; $i++) { $size = 32; $comp = array( $x,$y, $x+$size,$y, $x+$size,$y+$size, $x,$y+$size ); $comp2 = array( $x,$y+$maxheight, $x+$size,$y+$maxheight, $x+$size,$y+$size+$maxheight, $x,$y+$size+$maxheight ); $query = 'SELECT * FROM netadmin_loggedinusers WHERE Machine = \'' . $compnames[$c] . '\''; $result = mysql_query($query); $line = mysql_fetch_array($result, MYSQL_ASSOC); $color = imagecolorallocate($im, 0, 0, 0); $col2 = imagecolorallocate($im, 0, 0, 192); if($line['Machine'] != "") { if($line['InTime'] == $line['OutTime']) // currently logged in { $color = imagecolorallocate($im, 198, 72, 72); $col2 = imagecolorallocate($im, 128, 128, 255); } } mysql_free_result($result); imagefilledpolygon($im, $comp, 4, $color); imagestring($im, 1, $x, $y, $compnames[$c], $whi); imagefilledpolygon($im, $comp2, 4, $col2); imagestring($im, 1, $x, $y+$maxheight, $compnames[$c], $whi); $y += 35; $c++; } for($i=0;$i { $x = $extrasX[$i]; $y = $extrasY[$i]; $size = 32; $comp = array( $x,$y, $x+$size,$y, $x+$size,$y+$size, $x,$y+$size ); $comp2 = array( $x,$y+$maxheight, $x+$size,$y+$maxheight, $x+$size,$y+$size+$maxheight, $x,$y+$size+$maxheight ); $query = 'SELECT * FROM netadmin_loggedinusers WHERE Machine = \'' . $compnames[$c] . '\''; $result = mysql_query($query); $line = mysql_fetch_array($result, MYSQL_ASSOC); $color = imagecolorallocate($im, 0, 0, 0); $col2 = imagecolorallocate($im, 0, 0, 192); if($line['Machine'] != "") { if($line['InTime'] == $line['OutTime']) // currently logged in { $color = imagecolorallocate($im, 198, 72, 72); $col2 = imagecolorallocate($im, 128, 128, 255); } } mysql_free_result($result); imagefilledpolygon($im, $comp, 4, $color); imagestring($im, 1, $x, $y, $compnames[$c], $whi); imagefilledpolygon($im, $comp2, 4, $col2); imagestring($im, 1, $x, $y+$maxheight, $compnames[$c], $whi); $c++; } header('Content-type: image/png'); imagepng($im); imagedestroy($im); if($killlink) { mysql_close($link); } } ?> Example Map File (map_t1.php): $sideA = 6; $sideB = 5; $sideC = 0; $extrasX = array( 210, 210, 175, 140, 105, 70, 70, 105, 140, 175, 210, 210, 175, 140, 105, 70, 122, ); $extrasY = array( 35, 70, 105, 105, 105, 105, 140, 140, 140, 140, 175, 210, 245, 245, 245, 245, 280, ); $maxheight = (35 * 9); $maxwidth = (35 * ($sideB+2)); $spacew=0; $compnames = array( "T1-06", "T1-05", "T1-04", "T1-03", "T1-02", "T1-01", "T1-07", "T1-08", "T1-09", "T1-10", "T1-11", "T1-12", "T1-13", "T1-14", "T1-15", "T1-16", "T1-17", "T1-18", "T1-19", "T1-20", "T1-21", "T1-22", "T1-23", "T1-24", "T1-25", "T1-26", "T1-27", "T1-28", ); ?> Note: The order machines are put in is particularly important. Due to the way our rooms are structured we generally have two/three sides of the rooms with computers on (hence the number of pcs listed for each side) and then any extras we tack on specific coordinates for. The sides are looped through, and then the extra machines, therefore the namelist is in specific order. This could be MUCH cleaner, but I lack the time Good luck finding your way around this code! >_< I hope its of some use though.
-
If you wish to rip apart, here's the mapping bit, not going much into the whole database pushing and pulling malarky though (uses exe files). The map display itself is simple: Main Page: echo "T1 "; $comproom = "T1"; $roomtemplate = "http://"; $postroomtemplate = ":5800\" target=\"_new\""; include "compmap.php"; compmap.php (this generates CSS hotspot clickable areas for the map): <br /> img.image{ display: none; }<br /> <br /> <?php<br /> if($comproom == "T1")<br /> include "map_t1.php";<br /> else if($comproom == "T2")<br /> include "map_t2.php";<br /> else if($comproom == "T3")<br /> include "map_t3.php"; <br /> else if($comproom == "T4")<br /> include "map_t4.php";<br /> else if($comproom == "WRLR")<br /> include "map_wrlr.php";<br /> else if($comproom == "L5")<br /> include "map_l5.php";<br /> else if($comproom == "T5")<br /> include "map_t5.php"; <br /> else<br /> return;<br /> <br /> <br /> $compXpos = array();<br /> $compYpos = array();<br /> <br /> $x=0;<br /> $y=35; <br /> for($i=0; $i<$sideA; $i++)<br /> {<br /> array_push($compXpos,$x);<br /> array_push($compYpos,$y); <br /> $y += 35; <br /> }<br /> <br /> $x=35;<br /> $y=0;<br /> for($i=0; $i<$sideB; $i++)<br /> {<br /> array_push($compXpos,$x);<br /> array_push($compYpos,$y); <br /> $x+=35; <br /> } <br /> <br /> $x=(35*($spacew+$sideB+1));<br /> $y=35; <br /> for($i=0; $i<$sideC; $i++)<br /> {<br /> array_push($compXpos,$x);<br /> array_push($compYpos,$y); <br /> $y += 35; <br /> }<br /> <br /> for($i=0;$i<count($extrasX);$i++)<br /> {<br /> $x = $extrasX[$i];<br /> $y = $extrasY[$i];<br /> array_push($compXpos,$x);<br /> array_push($compYpos,$y); <br /> } <br /> <br /> $uid = md5(uniqid(rand(), true));<br /> ?><br /> <br /> dl#overallMap<?php echo $comproom; ?>{<br /> margin: 0;<br /> padding: 0;<br /> background: transparent url(<?php echo "computermap.php?room=" . $comproom . "&uid=" . $uid; ?>) top left no-repeat;<br /> height: <?php echo $maxheight; ?>px;<br /> width: <?php echo $maxwidth; ?>px;<br /> position: relative;<br /> }<br /> <br /> dt{ margin: 0; padding: 0; position: absolute; font-size: 85%; display: none; }<br /> dd{ margin: 0; padding: 0; position: absolute; font-size: 85%; }<br /> <br /> <?php<br /> <br /> for($i=0;$i<count($compnames);$i++)<br /> {<br /> <br /> echo "dd#tg" . $compnames[$i] . "{ top: " . $compYpos[$i] . "px; left: " . $compXpos[$i] . "px; }\n";<br /> echo "dd#tg" . $compnames[$i] . " a{ position: absolute; width: 35px; height: 35px; text-decoration: none; }\n";<br /> echo "dd#tg" . $compnames[$i] . " a span{ display: none; }\n";<br /> echo "dd#tg" . $compnames[$i] . " a:hover{ position: absolute; background: transparent url(computermap.php?room=" . $comproom . "&uid=" . $uid . ") -" . $compXpos[$i] . "px -" . ($compYpos[$i]+$maxheight) . "px no-repeat; }\n";<br /> <br /> echo "dd#tg" . $compnames[$i] . " a:hover span{\n";<br /> ?><br /> display: block;<br /> text-indent: 0;<br /> vertical-align: top;<br /> color: #000;<br /> background-color: #F4F4F4;<br /> font-weight: bold;<br /> position: absolute;<br /> border: 1px solid #BCBCBC;<br /> bottom: 150%;<br /> margin: 0;<br /> padding: 5px;<br /> width: 150px; <br /> } <br /> <?php <br /> } <br /> <br /> ?><br /> <br /> <?php height= width= class="image" alt="Room Map" /> </pre><dl id="overallMap<?php echo $comproom; ?>"> $numrooms = count($compnames); if(!isset($link)) { include "dblogin.php"; // login to the database } for($i=0;$i<$numrooms;$i++) { $query3 = 'SELECT * FROM netadmin_loggedinusers WHERE Machine = \'' . $compnames[$i] . '\''; $result3 = mysql_query($query3); $line3 = mysql_fetch_array($result3, MYSQL_ASSOC); $uloggedname = ""; if($line3['Machine'] != "") { if($line3['InTime'] == $line3['OutTime']) // currently logged in { $uloggedname = $line3['User']; } } echo "" . $compnames[$i] . " " . $uloggedname . ""; } ?> </d
-
Perhaps she thought she was living in a place like New York, New York or perhaps Singapore, Singapore?
-
Wouldn't be particularly easy to share, I built it specifically for this school and would require sending over mysql table structures, executables and a series of modified PHP pages (so they're not heavily tied into our intranet any more, this would take a lot of time to fix up). If I only had the time... Sorry guys
-
I wrote a system thats something along this line, including something that let me just browse computer rooms for users e.t.c. and tie it straight into various tools like VNC. Here's a screenie. The map is very handy!
-
I like that triple post by Sarah Coaker on there! Quite an ignorant piece imho.
-
There's an entire BSF Subsection on this forum with a wealth of information at your disposal.
-
Of course they are! Why last night my Laser Printer tried to stab me in my sleep and my wireless access point laced all the food in the house with poison! Harmful things these technological devices I tell ye!
-
Any opportunities at your place for similar conditions? I think you win this round!
-
When I was in school I was virtually network manager, I also ran an afterschool club!!!!
-
They're bringing back the SS! :eek:
-
I am hoping this story is true! Those chavvies dserv wot dey get innit! Actually, that's how a lot of our kids communicate on both Emails and in person
-
dipcoffee... no wait... coffee dip! Now we're talking!
-
LOL That JB chap is just trying to get a reaction. If he's genuinely saying those things because that's what he really thinks then he's probably Britains dumbest person!
-
And we get in trouble for 'teacher bashing' on this board? HAH! Complain about us all they will, their life only gets harder without our help because they lack the skills to do it themselves
