184 views

Puzzle maker for Windows – download

Make sure the image has a dimension divisible by the number of columns and rows.

  1. Download app – see link below
  2. Create a folder for app
  3. Open app
  4. Select picture, or put path of picture tu text field.
  5. Select number of parts: colmns x rows
  6. Press OK button
  7. Check programm folder for result

puzzle-maker-jk.exe dowload

puzzle-maker-jk-picture

puzzle-maker-jk-picture_promo

Posted in Download | Tagged , | Comments Off on Puzzle maker for Windows – download
507 views

JS get window url javascript window location href

window.location.href
Example for debuging of code

if (window.location.href.indexOf('/localhost')!= -1){
// debug code here
 
}
Posted in Javascript css html | Tagged , | Comments Off on JS get window url javascript window location href
585 views

JS multi threading thread javascript example

For all browsers e.g. old IE 11 ….

 
 <script>
 
 
 
        var mbThreadOneRunning = false;
        var mbThreadOneEnded = false;
 
        var mbThreadTwoRunning = false;
        var mbThreadTwoEnded = false;
 
        // you can create more than one Thread 
        // setTimeout() used for running more Threads at once
        var timeout_1 = setTimeout("ThreadOne()", 5000); // 5000 == 5 second
        var timeout_2 = setTimeout("ThreadTwo()", 3000); // 
 
        function ThreadOne() {
            mbThreadOneRunning = true;
            alert("1. ThreadOne working!");
            // working code here .............
            mbThreadOneEnded = true;
            clearTimeout(timeout_1);
        }
 
        function ThreadTwo() {
            mbThreadTwoRunning = true;
            alert("2. ThreadTwo working!");
            // working code here .............
             mbThreadTwoEnded = true;
            clearTimeout(timeout_2);
        }
 
 
        var mInterval = setInterval("checkThread()", 1000); // 1000 ms == 1 second, you can put smaller value
 
        function checkThread() {
            if (mbThreadOneEnded == true) {                
                alert("1. checkThread() ThreadOne finish work! " + mbThreadOneEnded);
            }
            else if (mbThreadTwoEnded == true) {
                alert("2. checkThread() ThreadTwo  finish work! " + mbThreadTwoEnded);
            }
            if (mbThreadOneEnded && mbThreadTwoEnded) {
                clearInterval(mInterval); // just to be sure
                mbThreadOneEnded = false;
                mbThreadTwoEnded = false;
                alert("ThreadOne and ThreadTwo ended ");
            }
 
        }
 
 
 
 
 
    </script>
Posted in Javascript css html | Tagged , | Comments Off on JS multi threading thread javascript example
654 views

JS how to emulate click on element javascript example

 
    <input type="radio" name="nmRadio" id="idOne" onclick="javascript:myFc(this)">One<br>
    <input type="radio" name="nmRadio" id="idTwo" onclick="javascript:myFc(this)">Two<br>
    <input type="radio" name="nmRadio" id="idThree" onclick="javascript:myFc(this)">Three<br>
 
    <script>
        if (!document.all && document.getElementById) document.getElementById('idTwo').click();
 
        function myFc(ts) {
            alert(ts.id);
       }
 
    </script>
Posted in Javascript css html | Tagged | Comments Off on JS how to emulate click on element javascript example
660 views

JS multitype multi type array javascript

     <div id="idMyDiv"></div>
    <div id="idOtherDiv"></div>
 
    <script>
    var myDiv = document.getElementById('idMyDiv');
    var otherDiv = document.getElementById('idOtherDiv');
    // array can contains string, number, object etc.
    var arr = new Array('5', 3, 'hello', 12, myDiv);
 
    if (contains(arr, myDiv)) {
        alert('Contains myDiv');
        idMyDiv.innerHTML = "I found You!!!!! :)";
    } else {
        alert('Does not contains myDiv');
    }
 
    if (contains(arr, otherDiv)) {
        alert('Contains otherDiv');
    } else {
        alert('Does not contains otherDiv');
    }
 
 
    function contains(arr, valueOrObject) {
        for (var i = 0; i < arr.length; i++) {
            if (arr[i] === valueOrObject) {
                return true;
            }
        }
        return false;
    }
 
    </script>
Posted in Javascript css html | Tagged , | Comments Off on JS multitype multi type array javascript
668 views

JS Check if an array contains an value or object JavaScript

Tthis code works in all previous versions of browsers

// use ===
function contains(arr, valueOrObject) {
    for (var i = 0; i < arr.length; i++) {
        if (arr[i] === valueOrObject) {
            return true;
        }
    }
    return false;
}
 
// example of usage
// array of strings and numbers
    var arr = new Array('5', 3, '7', 12);
// true
    if (contains(arr, '5')) {
        alert('Contains string 5');
    } else {
        alert('Does not contain string 5');
    }
 
// false
    if (contains(arr, 5)) {
        alert('Contains number 5');
    } else {
        alert('Does not contain number 5');
    }
 
// true
    if (contains(arr, 12)) {
        alert('Contains number 12');
    } else {
        alert('Does not contain number 12');
    }
Posted in Javascript css html | Tagged | Comments Off on JS Check if an array contains an value or object JavaScript
679 views

JS sleep wait function javascript use setTimeout

Tthis code works in all previous versions of browsers

Pause code by alert

var n = 1;
alert(n);
 
n = 5;
alert(n);

Set timeout

var n = 5;
// wait 5 second / do next code
// next code put into function and call this function by setTimeout
setTimeout("nextCodeFc (n)",5000); // wait for 5000 millisecond == 5 second and execute
 
// how put string as parameter into setTimeout
var str = "Hello string parameter!";
setTimeout("nextCodeFc(\"str"\)",3000); // produce "str"
setTimeout("nextCodeFc(\""+str+"\")",3000); // produce "Hello string parameter!"
setTimeout("nextCodeFc(str)",3000); // produce Hello string parameter!
 
function nextCodeFc (n){
  // do work .........
 
  alert(n);
}
Posted in Javascript css html | Tagged , | Comments Off on JS sleep wait function javascript use setTimeout
741 views

JS get type of variable javascript

var n = 0.87;
var sType = typeof n; //number
 
var str = "Hello Sapce!";
sType = typeof str; //string
 
typeof true === 'boolean';
typeof undefined === 'undefined';
 
typeof function() {} === 'function';
// etc.  ....... 
 
// try get type of null, Infinity, NaN .... 
var strTypeOfNull = typeof null;
alert(strTypeOfNull);
Posted in Javascript css html | Tagged | Comments Off on JS get type of variable javascript
731 views

JS check if variable or function exist javascript

Use typeof

// var nMyVariable = 0; // try comment and uncomment this row
 
if(typeof nMyVariable === 'undefined' ){
 alert("Variable not exist");
}ele{
 alert("Variable exist");
}
 
//////////////////////////
// chcek if function exist
function myFunciton (){
  alert("Hello Space!");
}
 
if(typeof myFunction === 'function'){
 myFunction();
}
Posted in Javascript css html | Tagged | Comments Off on JS check if variable or function exist javascript
1,089 views

CSS circle style html

      create div with class with name e.g. circle
      create in styleSheet.css class circle

html code

 <div class="circle" id="">3</div>

css code

.circle {
 border-radius: 50%;
    width: 50px;
    height: 50px;
    background: yellow;
    position: absolute;
    display: block;
    border: 6px solid blue;
    font-size: 50px;
    text-align: center;
}

3

Posted in Javascript css html | Tagged | Comments Off on CSS circle style html
1,089 views