Category: Just Tricks

All the other languages.

jQuery – DOM – InsertBefore, PrependTo and other examples

So I have tried to learn a little about jQuery and its DOM functions and this is what I have managed to do today – an example with “insertBefore”, “prependTo”, “insertAfter” and “appendTo”. Pretty much that is what the example

Tagged with: , , ,

PHP – JQuery – MySQL – Make a simple drop down menu

After the simple ToDo list here, I have decided to add more features to it. So, a possible feature, looks like this – you have a drop down menu with all the users in the database: Then, after a selection,

Tagged with: , ,

PHP – Build a HTML Table From any Query

As far as I am putting some efforts towards PHP and understanding why it is so hated by programmers all around, I have decided that the results from the queries should be always easily displayed in an HTML table. A

Tagged with: , , ,

PHP – Make a simple To Do list with PHP

Some two days ago I have decided that it would be more fun if I try to make a simple PHP todo list, while trying to learn the language. 🙂 After all, I have made this exercise with JS (no

Tagged with: , ,

PHP – Simple guessing game

Indeed simple. These are the rules (from a homework of the SoftUni): Implement a “Guess Number Game” in PHP. Keep the secret number in the user’s session and indicate “Up” or “Down” after each guess. At the start page of

Tagged with: , ,

JQuery Strange Game – A way to tease yourself with JQuery events

The idea here is to try to start the YouTube clip, which is embedded in the light blue square, just bellow the jelly fish. I am using mouseout, mousemove and click events with JQuery to illustrate their way of working.

Tagged with: , , , ,

JQuery – Select First, Last, Nth, Second Children

Ever wondering how to select children in JQuery? No? Then skip to the next article. My case is the following – I present a div with divs, and I try to select its children, changing the borders and the background.

Tagged with: , , ,

JQuery – Randomize Anything – Random Numbers with Random Colors

Some years ago, while I was writing my master thesis (I have two of them in two different languages), I remember that I was told that I should write something that is not written before and I should convince the reader

Tagged with: , , ,

PHP – Inheritance and Overload in a Class

Have you ever dreamt to understand the inheritance and the overload from once 5 minute example? No such dreams? Anyway, in case you ever tend to think about it, here is the example with PHP. Let’s imagine that we have

Tagged with: , ,

PHP – Make Iterator with PHP Class

PHP and iterators… Violin and boxing… Anyway, it is possible and the possibility is since some years ago. In this article I will simply show how to make an iterator with a PHP class. And I would iterate in a

Tagged with: , ,

PHP – class with functions

After some time with JS and Python, this week I have decided to continue with PHP. So, let’s see how you can make a class with a function in PHP. My class would be called Investment, with 3 public variables

Tagged with: ,

jQuery – a Simple Example With Two Links

Today I have started to take a better look at JQuery. And it seems wonderful! Indeed. Full of wonders 🙂 Thus, I have started to code something trivial – like the picture below: With JQuery, this click option of the

Tagged with:

JavaScript – Format HTML with JavaScript code

Have you ever tought of formatting HTML with JS in stead of CSS? Why have you tought about it? Anyway, if playing with formats is your thing, here is a small example how to achieve the following picture with JS

Tagged with: ,

Java Script – Random pictures

Imagine that you are in a situation, on which you are wondering among 8 different choices. Thus, the following program would be able to help you take a solution. Or at least to check the way JS works with arrays,

Tagged with: , ,

PHP – Issue yourself a certificate – PDF and PHP

As you are probably aware, this site is called VitoshAcademy. As far as the site is called this way, I have tought of finding a way to issue automatic certificates with PDF and PHP. And this is exactly what I am going

Tagged with: ,

PHP – Get data from XML to HTML file with PHP

Now continuing with PHP – today I will show you how to use a simple xml file and to get its data to a PHP file in the Internet. Not as difficult as it seems actually – XML files are

Tagged with: , ,

PHP – Writing to a file with php

  Reading and writing always come together. Thus, after presenting the way to read from a file, now it is time to be able to write:   Writing in PHP is not a challenge, the only tricky part is to

PHP – Reading from a file into a HTML table

As I have already mentioned in a previous article here, lately PHP has attracted my attention. Thus, today I will show how to build a small HTML table from a txt file, using each line in the file as a

Tagged with: , ,

SQL Server – Solution of the first part of the SoftUni Exam for SQL Server

Just a day ago I have participated at an exam, organized from SoftUni for SQL server. The exam can be found here and the questions for it are here. In the current article I will present my answers from the first part

Tagged with: , , , ,

SQL Server – Create two tables with primary and foreign key with SQL code

There is a simple way in VBA and in Python to create tables in the database you need, giving the tables a name of a variable and the type of a variable. In SQL Server, we also have a way

Tagged with: , , , ,

SQL Server – Get data below the avarage; Difference between Left and Right Join Explained

I have started to explain tricks with SQL Server in a series of articles about a week or two ago. Today I will use a database, mentioned in a previous article. Get data below average The task is to get top

Tagged with: , , ,

SQL Server – Conditional Query And Multiple Tables Join (Many to Many Query)

As I have already started some time ago with SQL Server, in this article I will present the way to write a if-else case in sql query. The database is available here, I have used a sample DB for one

Tagged with: , , , ,

SQL Server – Simple Transaction in SQL Server

So, after starting with SQL Server custom views, SQL Server Triggers, SQL Server Procedures and Functions, now it is time to pay some attention to SQL Transaction as well. What are transactions? Microsoft says the following:  A transaction is a single

Tagged with: , , ,

SQL Server – Procedures and Functions in SQL

So, continuing from yesterday with the SQL Server subject, it is time to introduce some nice ways of writing functions and procedures in SQL. What is the idea, behind the functions and the procedures in SQL? Pretty much, I would

Tagged with: , , ,

SQL Server – create trigger to log changes in DB

About 6 months ago I wrote about the way to create a log sheet in Excel with VBA. Nowadays, as far as I am doing a small upgrade from MS Excel to MS SQL Server 🙂 , I was interested

Tagged with: , , , ,

SQL Server – Create Custom View in Microsoft SQL Server Management Studio

Speaking about SQL, I have noted something really interesting in MS SQL Server Management Studio, which would probably be of use in MS Access as well. This is the saved custom view. It is not present in MS Access, but

Tagged with: , , ,

SQL Server – Generate data in Microsoft SQL Server Management Studio

The legend says that when the chess was invented, the inventor was asked to pick a price from the local king. Thus, he asked for one grain for the first cell of the chess board, 2 for the second, 4

Tagged with: , , , ,

SQL Server – How to generate sql script from a db

If you are interested in DB development, then most probably you have tried to generate a sql script from your database. In this article I will show you how to do it with Microsoft SQL Server Management Studio. So, lets

Tagged with: , , ,

Linux – Install MonoDevelop for Ubuntu and Mint

This is probably the shortest article I have written. After some time trying to install an environment for C# in my Mint and my Ubuntu systems, I found out the following: the name of the environment is MonoDevelop. the installation

Tagged with: , , , , ,

Ubuntu – Setup jQuery project with node.js and server from scratch

Yup! That is what we are gonna do – Setup jQuery project with node.js and server from scratch in Ubuntu. There are plenty of ways to do it in the internet. Setting up a jQuery project is something, that should be

Tagged with: , , , , , ,