A project in collaboration with my classmate Catherine F. Palarca. Our instructor ask us to make our own monster create using AI, so we'd end up as shown in the picture. The names were based to surname or to type of animals (e.g Palcamon - Palca from Palarca and mon from digimon) (e.g Spidocs - Spid from spider and ocs from octopus). Please do rate our works. Thanks !
Uploading file and save it directly to your database is okay but not advisable (in my opinion) because the more you upload your file and save to your db, the higher the risk your database will get an error or any up to the peak that your db might give up. So, I advise to use the file's location only and be save to your database. Where will your file be save? Simple, your file will be save inside the htdocs (e.g /htdocs/myuploaded/file.txt <-- complete path to your file).
The logic is that, you use the upload form in html, once you select a file and click the button upload, you must get the tmp_name of the file, the designated folder where you want your file be save and perform the move_uploaded_file() function. The code below is the sample:
1. Create an html tags and etc. and paste this code inside the body tags (save this as uploadfile.php inside you htdocs folder):
<form action="uploadfile.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" value=""/><br/> <input type="submit" name="submit" value="Upload"/> </form> <?php require('connect.php'); // note that you already established your connection in MySQL and to your database session_start(); $path = "files\\"; $fname = $_FILES["file"]["name"]; $ftmp = $_FILES["file"]["tmp_name"]; $fsize = $_FILES["file"]["size"]; $file_fullpath = $path.$fname; $path = stripslashes($path); $fname = stripslashes($fname); $fsize = stripslashes($fsize); $path = mysql_real_escape_string($path); $fname = mysql_real_escape_string($fname); $fsize = mysql_real_escape_string($fsize); if($fname == ""){ echo "Please complete selection."; } else{ move_uploaded_file($ftmp, 'files/'.$fname);
2. Create a folder and name it as files inside your htdocs folder together with the uploadfile.php. 3. In your mysql, create a table and name it as myfiles and put the following as your fieldnames:
THIS WILL PRINT THE ENTIRE PAGE DUE TO THE DEFAULT HTML CODE OF THIS BLOG.
BETTER TO ZOOM IN THE PREVIEW TO SEE THAT THE "DEMO HERE" BUTTON WILL HIDE ONCE YOU PRINT OR TRY IT THROUGH COPYING THE PROVIDED CODES BELOW.
If you need to print only selected content in div and not include button print, this is simple solution help you to solve it.
+--- This code must place inside the head tags <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript">
//This is the function that closes the pop-up
function endBlackout(){
$(".blackout").css("display", "none");
$(".msgbox").css("display", "none");
}
//This is the function that starts the pop-up
function strtBlackout(){
$(".msgbox").css("display", "block");
$(".blackout").css("display", "block");
}
//Sets the buttons to trigger the blackout on clicks
$(document).ready(function(){
$("#btn1").click(strtBlackout); // open if btn is pressed
$(".blackout").click(endBlackout); // close if click outside of popup
$(".closeBox").click(endBlackout); // close if close btn clicked
// Automatically trigger the pop-up after 10 seconds
setTimeout( strtBlackout, 10000);
}); </script>
'just copy the code and paste it on your notepad or command prompt editor (must be inside the directory wherein tasm and tlink IDE located then type this command ---> edit <filename>.asm ) . You can modify it because I think the number of stars on the flag was wrong.
.model small .stack 100h .data newl db,0ah,0dh,"$" line1 db " * * * * * * * * $" color1 db " $" line2 db " * * * * * * * * $" color2 db " $" line3 db " * * * * * * * * $" color3 db " $" line4 db " * * * * * * * * $" color4 db " $" line5 db " * * * * * * * * $" color5 db " $" line6 db " * * * * * * * * $" color6 db " $" line7 db " * * * * * * * * $" color7 db " $" line8 db " * * * * * * * * $" color8 db " $" stripes1 db " $" stripes2 db " $"
.code
mov ax,@data
mov ds,ax
mov ah,9
mov bl,00011111b
mov cx,30
int 10h
mov dx,offset line1
int 21h
mov bl,11110000b
mov cx,40
int 10h
mov dx,offset color1
int 21h
mov dx,offset newl
int 21h
mov bl,00011111b
mov cx,30
int 10h
mov dx,offset line2
int 21h
mov bl,41h
mov cx,40
int 10h
mov dx,offset color2
int 21h
mov dx,offset newl
int 21h
mov bl,00011111b
mov cx,30
int 10h
mov dx,offset line3
int 21h
mov bl,11110000b
mov cx,40
int 10h
mov dx,offset color3
int 21h
mov dx,offset newl
int 21h
mov bl,00011111b
mov cx,30
int 10h
mov dx,offset line4
int 21h
mov bl,41h
mov cx,40
int 10h
mov dx,offset color4
int 21h
mov dx,offset newl
int 21h
mov bl,00011111b
mov cx,30
int 10h
mov dx,offset line5
int 21h
mov bl,11110000b
mov cx,40
int 10h
mov dx,offset color5
int 21h
mov dx,offset newl
int 21h
mov bl,00011111b
mov cx,30
int 10h
mov dx,offset line6
int 21h
mov bl,41h
mov cx,40
int 10h
mov dx,offset color6
int 21h
mov dx,offset newl
int 21h
mov bl,00011111b
mov cx,30
int 10h
mov dx,offset line7
int 21h
mov bl,11110000b
mov cx,40
int 10h
mov dx,offset color7
int 21h
mov dx,offset newl
int 21h
mov bl,00011111b
mov cx,30
int 10h
mov dx,offset line8
int 21h
mov bl,41h
mov cx,40
int 10h
mov dx,offset color8
int 21h
mov dx,offset newl
int 21h
mov cx,8
meme:
push cx
mov bl,11110000b
mov cx,57
int 10h
mov dx,offset stripes1
int 21h
mov dx,offset newl
int 21h
mov bl,41h
mov cx,57
int 10h
mov dx,offset stripes2
int 21h
mov dx,offset newl
int 21h
pop cx
dec cx
cmp cx,0
je exit
loop meme