 Tutorials
|
 Tutorials |
 Tutorials
|
|
|
Refering using meta tags and php |
|
Why would you want to use meta tags and all this scripting just to make a hyperlink? Well because you can program more things into the hyperlink than just a _BLANK and send them away. The reason i used it is so that i can have a counter for every click on a link. Now i send the user to a new php page, that page selects some information from the DB based on the ID of the record. and does a simple update +1 on the link. Then i have added a function to check if http exists in the string because a simple www.test.com wouldnt work, it has to be http://www.test.com for the meta tag. Hope this helps abit.
<?session_start()?>
<title>:: Overminds :: Redirection</title>
<body bgcolor="#6666FF" text="#FFFFFF">
<center>
<?php
include"../config.php";
$result = mysql_query ("SELECT * FROM links
WHERE id LIKE '$id'
");
if ($row = mysql_fetch_array($result)) {
do {
$idnumber = $row["id"];
$linkurl = $row["url"];
$nhits = $row["hits"];
}while($row = mysql_fetch_array($result));
mysql_query("UPDATE links SET hits=hits+1 WHERE id = '$idnumber'");
echo("Overminds.org is redirecting to: $linkurl");
}
else {
echo("you made a boo boo");
$linkurl = "http://www.overminds.org";
}
if(stristr($linkurl, 'http') === FALSE) {
$linkurl = "http://$linkurl";
}
?>
<META HTTP-EQUIV="REFRESH" CONTENT="2; URL=<?=$linkurl?>">
<br><br><br>Cant wait? Click the hyperlink: <a href="<?=$linkurl?>"><?=$linkurl?></a> |
Yell0w - 20/07-2008 kl.18:03 - Blog (0) Comments
|
|
Fancy music mapping! |
|
I was surfing around this evening and then i stumbled upon a very cool page for finding music that is similar to other music you like. The site is called www.music-map.com, just type in an artist and it will find music that resembles it, and so on, with a nice overview. Must have when youre searching for new music. Cardamar worked, but didnt return any results when searching for Binærpilot :\ Oh well ;D
Yell0w - 20/07-2008 kl.0:48 - Blog (0) Comments
|
|
Using cursors in t-sql |
DECLARE TEST_CURSOR CURSOR FOR
SELECT GM.[login]
FROM stbl_System_Groups AS G WITH (NOLOCK)
INNER JOIN stbl_System_GroupsMembers AS GM WITH (NOLOCK) ON GM.GroupRef = G.PrimKey
WHERE G.GroupID = 'Developers'
OPEN TEST_CURSOR
FETCH NEXT FROM TEST_CURSOR
WHILE @@FETCH_STATUS <> -1
BEGIN
FETCH NEXT FROM TEST_CURSOR
END
CLOSE TEST_CURSOR
DEALLOCATE TEST_CURSOR
|
Yell0w - 03/07-2008 kl.12:56 - Blog (2) Comments
|
|
Executing a stored procedure in VB |
|
Here is an example how to execute a stored procedure with appframe in vb.net
#Region "Imports statements"
Imports CR3 = Appframe3.Win.CR3
Imports CR3Data = Appframe3.Common.Data
Imports UserSession = Appframe3.Common.UserSession
Imports Appframe3.Common.Utils
Imports Appframe3.Common.Data.afAccessLayer
Imports Appframe3.Common.Data
#End Region
Dim myProc As New afProcedureCall("astp_Personnel_Timekeeping_ImportDoimport")
afAccessLayer.ExecProcedure(myProc) |
Yell0w - 30/06-2008 kl.15:36 - Blog (0) Comments
|
|
Syntax highlighting! |
|
Added support for syntax highlighting in the newspost, hope it works as intended, you can add sourcecode to the textbox on the add news forms. I use a script called Geshi to parse the highlighting, and it supports several languages :D
Just a test here:
<? if(isset($editnews)) { echo"<option selected>$ny_kat</option>"; }
$query = "select * from gen_categorys WHERE maincat LIKE 'news' AND level <= $axx";
$resultat = mysql_query($query);
if ($resultat)
{
for ($i=0; $i<mysql_num_rows($resultat); $i++)
{
$row = mysql_fetch_Array($resultat);
$id = $row["Id"];
$owner = $row["owner"];
$maincat = $row["maincat"];
$subcat = $row["subcat"];
$notes = $row["notes"];
{
echo"<option>$subcat</option>";
}}}
?> |
Yell0w - 26/06-2008 kl.21:49 - overminds (0) Comments
|
|
Substring and Trimstart in vb .net |
|
Dim tests As String = "EM00000000000001234" /substring on char 2 (after char 2)
tests = tests.Substring(2)
/Trim away all 0 in a char set tests = tests.TrimStart("0"c)
/Show the result MessageBox.Show(tests)
Dim tests As String = "EM00000000000001234"
/substring on char 2 (after char 2)
tests = tests.Substring(2)
/Trim away all 0 in a char set
tests = tests.TrimStart("0"c)
/Show the result
MessageBox.Show(tests) |
Yell0w - 19/06-2008 kl.14:48 - main (1) Comments
|
|
Creating a new stored procedure |
|
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: Werner -- Create date: -- Description: -- ============================================= CREATE PROCEDURE someprocedurenamehere --<@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0> AS BEGIN SET NOCOUNT ON; -- Insert statements for procedure here -- SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
END GO
Yell0w - 16/06-2008 kl.10:07 - main (0) Comments
|
|
Oh happy days! |
|
With my bank account showing -2000 in the early days of may and i had quite a few exams to take, my life didnt look very good, but then thanks to Vidar everything changed a late sunday night. He wanted me to attend a course in MSSQL and appframe basics, sadly this was in my last week of school and with two exams to take... of course i said yes! So i attendet the course as much as i could and also i read for my exams in the evenings. The end of this story couldnt have been better, both exams passed, with good grades, and i got a job working at Omega in Ølensvåg, as a programmer! A very nice turn of events in my life, and ill try to post some more updates in the near future.
Yell0w - 14/06-2008 kl.17:02 - blog (0) Comments
|
|
Oh hi all! |
I havent been online in a while now, havent been motivated to do much here since im trying to learn VB .net instead. Well, ive got 1 month left of my bachelor studies YAY! and then i might do some work here again. If you guys need to contact me you can do it on my email (not ingame) it is werner ( at ) overminds.org
Yell0w - 10/05-2008 kl.11:33 - OCRacing (4) Comments
|
|
Xbox 360 status code 80169d94 fix |
|
When i tried adding points to my account, and tried upgrading back to xbox gold i got this error. So i tried clearing up harddisk space, deleting profiles and doing the stuff that people on the xbox.com forums recommended, but nothing worked. What i did in the end was making a new account, on another email, got a month free gold membership and added points to that account and bought fable <3
so it seems that when my normal account went from gold to silver it got blocked on the market place, i dont know why microsoft would do that but there it is ...
Yell0w - 13/04-2008 kl.17:48 - blog (1) Comments
|
|
4. runde i Z-liga vs Sunken Souls |
|
Da var 4. runde i Z-liga over. Mapet var de_inferno og motstanderen var Sunken Souls.
Vant knivrunden og fikk da æren av å starte som CT. Vi vant gunround og et par eco runder også ble det rimelig jevnt resten av matchen. Endte til slutt opp med 8-7 seier.
Som Terror vant vi også gunround + antieco. Gikk på en bitteliten smell i en runde, men etter det gikk det smooth. Vant til slutt 8-1!
Sluttresultatet ble da: 16-8 til oss!
KimG - 02/04-2008 kl.20:14 - nequam (0) Comments
|
|
3. runde i Z-Ligan |
|
I kveld var det tid for mer Z-Liga spill, motstanderen var KoV.no (Kings of Vas) og mapet var de_nuke. Etter en finfin knivrunde av oss, så fikk vi æren av å starte som CT. Alt gikk som smurt og vi vant til slutt 10-5.
Som T gikk det mindre bra, tapte runde på runde, men skjerpet oss til slutt og fikk inn 6 runder (stillingen ble 6-9, favør KoV).
Sluttresultatet ble da 16-14 til oss og vi er fortsatt ubeseiret i Z-ligan.
KimG - 24/03-2008 kl.23:03 - nequam (0) Comments
|
|
Første kamp i CB OpenCup Div2 Quali |
|
Første kampen i ClanBase OpenCup Div2 Qual er nå ferdig spilt. Vi møtte på warsense fra Nederland og det var ikke all verdens med motstand. Vi vant greit 16-2.
KimG - 19/03-2008 kl.20:50 - nequam (0) Comments
|
|
Andre runde i Z-liga * |
|
I kveld gikk andre runde i z-ligaen av stabelen, hvor vi møtte Lastbreath. Vi startet som CT (etter en fantastisk knivrunde av undertegnede) med tap i gunround. Og slik gikk det stort sett som CT, tapte en del runder og endte opp med 5-10 tap. Som terror kom vi sterkere tilbake og tok runde etter runde og vant 9-6. Men dessverre så ble det et 14-16 tap.
En liten kort oppsummering: En utrolig jevn kamp ut mot slutten, tok mange viktige runder og moralen gikk til topps. Men LB trakk det lengste strå'et og gikk av med seieren.
* UPDATE *
Admins fant ut at noen av LB spillerne hadde binds i configen som var imot regelverket, og dermed vant vi på WO.
KimG - 16/03-2008 kl.23:38 - nequam (1) Comments
|
|
Første kamp i Z-liga |
|
Spillte vår første kamp i Z-ligan i dag mot MiT-Gaming (de_dust2), hvor vi vant 22-08.
KimG - 09/03-2008 kl.22:17 - nequam (0) Comments
|
|
test |
|
test
Yell0w - 06/03-2008 kl.20:43 - nequam (0) Comments
|
|
Small update |
|
Oh hai all! Working on a new layout now that i was pretty happy with, working my last day in haugesund on the alvheim project, nice enough. Future is looking good to me, soon finishing school and stuff, gonna be sweet ;D Also im looking into getting a digital SLR camera, either the d70 or the d80 (nikon). Not much more to say but, oh well :D
Yell0w - 16/02-2008 kl.21:44 - blog (4) Comments
|
|
zwii |
|
Ingen kjeksnyheter inntil Wernie har ordnet det slik at jeg kan legge til annet nytt.
Men frykt ikke! Se på filmen og ta deg en kjeks.
http://youtube.com/watch?v=GmwqpHsMExg
d^^b
namenlos - 03/02-2008 kl.10:52 - cookie (0) Comments
|
|
Velkommen |
|
Velkommen til cookiesiden
namenlos - 27/01-2008 kl.15:31 - cookie (2) Comments
|
|
|
|
ZOINK!
namenlos - 27/01-2008 kl.15:24 - overminds (0) Comments
|
 Tutorials
|
 Tutorials |
 Tutorials
|
|
|
Refering using meta tags and php |
|
Why would you want to use meta tags and all this scripting just to make a hyperlink? Well because you can program more things into the hyperlink than just a _BLANK and send them away. The reason i used it is so that i can have a counter for every click on a link. Now i send the user to a new php page, that page selects some information from the DB based on the ID of the record. and does a simple update +1 on the link. Then i have added a function to check if http exists in the string because a simple www.test.com wouldnt work, it has to be http://www.test.com for the meta tag. Hope this helps abit.
<?session_start()?>
<title>:: Overminds :: Redirection</title>
<body bgcolor="#6666FF" text="#FFFFFF">
<center>
<?php
include"../config.php";
$result = mysql_query ("SELECT * FROM links
WHERE id LIKE '$id'
");
if ($row = mysql_fetch_array($result)) {
do {
$idnumber = $row["id"];
$linkurl = $row["url"];
$nhits = $row["hits"];
}while($row = mysql_fetch_array($result));
mysql_query("UPDATE links SET hits=hits+1 WHERE id = '$idnumber'");
echo("Overminds.org is redirecting to: $linkurl");
}
else {
echo("you made a boo boo");
$linkurl = "http://www.overminds.org";
}
if(stristr($linkurl, 'http') === FALSE) {
$linkurl = "http://$linkurl";
}
?>
<META HTTP-EQUIV="REFRESH" CONTENT="2; URL=<?=$linkurl?>">
<br><br><br>Cant wait? Click the hyperlink: <a href="<?=$linkurl?>"><?=$linkurl?></a> |
Yell0w - 20/07-2008 kl.18:03 - Blog (0) Comments
|
|
Fancy music mapping! |
|
I was surfing around this evening and then i stumbled upon a very cool page for finding music that is similar to other music you like. The site is called www.music-map.com, just type in an artist and it will find music that resembles it, and so on, with a nice overview. Must have when youre searching for new music. Cardamar worked, but didnt return any results when searching for Binærpilot :\ Oh well ;D
Yell0w - 20/07-2008 kl.0:48 - Blog (0) Comments
|
|
Using cursors in t-sql |
DECLARE TEST_CURSOR CURSOR FOR
SELECT GM.[login]
FROM stbl_System_Groups AS G WITH (NOLOCK)
INNER JOIN stbl_System_GroupsMembers AS GM WITH (NOLOCK) ON GM.GroupRef = G.PrimKey
WHERE G.GroupID = 'Developers'
OPEN TEST_CURSOR
FETCH NEXT FROM TEST_CURSOR
WHILE @@FETCH_STATUS <> -1
BEGIN
FETCH NEXT FROM TEST_CURSOR
END
CLOSE TEST_CURSOR
DEALLOCATE TEST_CURSOR
|
Yell0w - 03/07-2008 kl.12:56 - Blog (2) Comments
|
|
Executing a stored procedure in VB |
|
Here is an example how to execute a stored procedure with appframe in vb.net
#Region "Imports statements"
Imports CR3 = Appframe3.Win.CR3
Imports CR3Data = Appframe3.Common.Data
Imports UserSession = Appframe3.Common.UserSession
Imports Appframe3.Common.Utils
Imports Appframe3.Common.Data.afAccessLayer
Imports Appframe3.Common.Data
#End Region
Dim myProc As New afProcedureCall("astp_Personnel_Timekeeping_ImportDoimport")
afAccessLayer.ExecProcedure(myProc) |
Yell0w - 30/06-2008 kl.15:36 - Blog (0) Comments
|
|
Syntax highlighting! |
|
Added support for syntax highlighting in the newspost, hope it works as intended, you can add sourcecode to the textbox on the add news forms. I use a script called Geshi to parse the highlighting, and it supports several languages :D
Just a test here:
<? if(isset($editnews)) { echo"<option selected>$ny_kat</option>"; }
$query = "select * from gen_categorys WHERE maincat LIKE 'news' AND level <= $axx";
$resultat = mysql_query($query);
if ($resultat)
{
for ($i=0; $i<mysql_num_rows($resultat); $i++)
{
$row = mysql_fetch_Array($resultat);
$id = $row["Id"];
$owner = $row["owner"];
$maincat = $row["maincat"];
$subcat = $row["subcat"];
$notes = $row["notes"];
{
echo"<option>$subcat</option>";
}}}
?> |
Yell0w - 26/06-2008 kl.21:49 - overminds (0) Comments
|
|
Substring and Trimstart in vb .net |
|
Dim tests As String = "EM00000000000001234" /substring on char 2 (after char 2)
tests = tests.Substring(2)
/Trim away all 0 in a char set tests = tests.TrimStart("0"c)
/Show the result MessageBox.Show(tests)
Dim tests As String = "EM00000000000001234"
/substring on char 2 (after char 2)
tests = tests.Substring(2)
/Trim away all 0 in a char set
tests = tests.TrimStart("0"c)
/Show the result
MessageBox.Show(tests) |
Yell0w - 19/06-2008 kl.14:48 - main (1) Comments
|
|
Creating a new stored procedure |
|
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: Werner -- Create date: -- Description: -- ============================================= CREATE PROCEDURE someprocedurenamehere --<@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0> AS BEGIN SET NOCOUNT ON; -- Insert statements for procedure here -- SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
END GO
Yell0w - 16/06-2008 kl.10:07 - main (0) Comments
|
|
Oh happy days! |
|
With my bank account showing -2000 in the early days of may and i had quite a few exams to take, my life didnt look very good, but then thanks to Vidar everything changed a late sunday night. He wanted me to attend a course in MSSQL and appframe basics, sadly this was in my last week of school and with two exams to take... of course i said yes! So i attendet the course as much as i could and also i read for my exams in the evenings. The end of this story couldnt have been better, both exams passed, with good grades, and i got a job working at Omega in Ølensvåg, as a programmer! A very nice turn of events in my life, and ill try to post some more updates in the near future.
Yell0w - 14/06-2008 kl.17:02 - blog (0) Comments
|
|
Oh hi all! |
I havent been online in a while now, havent been motivated to do much here since im trying to learn VB .net instead. Well, ive got 1 month left of my bachelor studies YAY! and then i might do some work here again. If you guys need to contact me you can do it on my email (not ingame) it is werner ( at ) overminds.org
Yell0w - 10/05-2008 kl.11:33 - OCRacing (4) Comments
|
|
Xbox 360 status code 80169d94 fix |
|
When i tried adding points to my account, and tried upgrading back to xbox gold i got this error. So i tried clearing up harddisk space, deleting profiles and doing the stuff that people on the xbox.com forums recommended, but nothing worked. What i did in the end was making a new account, on another email, got a month free gold membership and added points to that account and bought fable <3
so it seems that when my normal account went from gold to silver it got blocked on the market place, i dont know why microsoft would do that but there it is ...
Yell0w - 13/04-2008 kl.17:48 - blog (1) Comments
|
|
4. runde i Z-liga vs Sunken Souls |
|
Da var 4. runde i Z-liga over. Mapet var de_inferno og motstanderen var Sunken Souls.
Vant knivrunden og fikk da æren av å starte som CT. Vi vant gunround og et par eco runder også ble det rimelig jevnt resten av matchen. Endte til slutt opp med 8-7 seier.
Som Terror vant vi også gunround + antieco. Gikk på en bitteliten smell i en runde, men etter det gikk det smooth. Vant til slutt 8-1!
Sluttresultatet ble da: 16-8 til oss!
KimG - 02/04-2008 kl.20:14 - nequam (0) Comments
|
|
3. runde i Z-Ligan |
|
I kveld var det tid for mer Z-Liga spill, motstanderen var KoV.no (Kings of Vas) og mapet var de_nuke. Etter en finfin knivrunde av oss, så fikk vi æren av å starte som CT. Alt gikk som smurt og vi vant til slutt 10-5.
Som T gikk det mindre bra, tapte runde på runde, men skjerpet oss til slutt og fikk inn 6 runder (stillingen ble 6-9, favør KoV).
Sluttresultatet ble da 16-14 til oss og vi er fortsatt ubeseiret i Z-ligan.
KimG - 24/03-2008 kl.23:03 - nequam (0) Comments
|
|
Første kamp i CB OpenCup Div2 Quali |
|
Første kampen i ClanBase OpenCup Div2 Qual er nå ferdig spilt. Vi møtte på warsense fra Nederland og det var ikke all verdens med motstand. Vi vant greit 16-2.
KimG - 19/03-2008 kl.20:50 - nequam (0) Comments
|
|
Andre runde i Z-liga * |
|
I kveld gikk andre runde i z-ligaen av stabelen, hvor vi møtte Lastbreath. Vi startet som CT (etter en fantastisk knivrunde av undertegnede) med tap i gunround. Og slik gikk det stort sett som CT, tapte en del runder og endte opp med 5-10 tap. Som terror kom vi sterkere tilbake og tok runde etter runde og vant 9-6. Men dessverre så ble det et 14-16 tap.
En liten kort oppsummering: En utrolig jevn kamp ut mot slutten, tok mange viktige runder og moralen gikk til topps. Men LB trakk det lengste strå'et og gikk av med seieren.
* UPDATE *
Admins fant ut at noen av LB spillerne hadde binds i configen som var imot regelverket, og dermed vant vi på WO.
KimG - 16/03-2008 kl.23:38 - nequam (1) Comments
|
|
Første kamp i Z-liga |
|
Spillte vår første kamp i Z-ligan i dag mot MiT-Gaming (de_dust2), hvor vi vant 22-08.
KimG - 09/03-2008 kl.22:17 - nequam (0) Comments
|
|
test |
|
test
Yell0w - 06/03-2008 kl.20:43 - nequam (0) Comments
|
|
Small update |
|
Oh hai all! Working on a new layout now that i was pretty happy with, working my last day in haugesund on the alvheim project, nice enough. Future is looking good to me, soon finishing school and stuff, gonna be sweet ;D Also im looking into getting a digital SLR camera, either the d70 or the d80 (nikon). Not much more to say but, oh well :D
Yell0w - 16/02-2008 kl.21:44 - blog (4) Comments
|
|
zwii |
|
Ingen kjeksnyheter inntil Wernie har ordnet det slik at jeg kan legge til annet nytt.
Men frykt ikke! Se på filmen og ta deg en kjeks.
http://youtube.com/watch?v=GmwqpHsMExg
d^^b
namenlos - 03/02-2008 kl.10:52 - cookie (0) Comments
|
|
Velkommen |
|
Velkommen til cookiesiden
namenlos - 27/01-2008 kl.15:31 - cookie (2) Comments
|
|
|
|
ZOINK!
namenlos - 27/01-2008 kl.15:24 - overminds (0) Comments
|
|