Jump to content

zero_point

Members
  • Posts

    14
  • Joined

  • Last visited

Previous Fields

  • Languages
    php, c#, nette(framework), ...

Profile Information

  • Interests
    programming, comics, games, cycling, skiing, movies, ...

zero_point's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi all, I created basic googleMap ... from w3school example ... but I have one question ... dafault all is set to the center view ... how can I set it more left .... For example : I have google map of size 500x500 px ... and of course the pointer is set to coords 250,250 = to the center ... how can I move it more left => 100,250 ... I hope you understand what I want ... thanks a lot indeed for your answers
  2. Hi all :-) I wanna put two onload function into html body tag ... I tried to use this <body onload="function1(); function2()"> OR THIS ... <body onload="functions()"> functions( function1(); function2(); ) ... BUT it always takes only first function and second not ... do you know why or what else can I use? Thanks.
  3. Hi all, I've just created a google map. I know there exist 4 types : ROADMAP, SATELLITE, HYBRID & TERRAIN, but my question is if it is possible to set it to 3D view ... same as when you move that yellow guy to map ... you see that 3D view ... thanks for answers For now I use this: ... var mapOptions = { zoom: 16, center: myLatlng, mapTypeId: google.maps.MapTypeId.HYBRID } ...
  4. Hi again,at first sorry for my previous angry comment - I am nervous from school ... I hope you understand ... but ... what I meant was this ... Drawing a function using javascript ... Tthis is sinus function HTML ... you put this <canvas id="myCanvas1"> <script type="text/javascript"> draw(); </script> </canvas> FILE.js function draw(){ var canvas1 = document.getElementById("myCanvas1"); canvas1.width = 400; canvas1.height = 400; var SPX = 50; // starter point X var SPY = 399/2; // starter point Y var P = canvas1.getContext("2d"); P.beginPath(); P.strokeStyle = "#44ef01"; P.moveTo(SPX,SPY,1,1); for(var i=0;i<12;i+=0.1){ P.lineTo(SPX+(i*1)*25,SPY-(Math.sin(i))*25,1,1); // number 25 is just to enlarge all function line } P.stroke(); }
  5. Hi, do you know how to use pause in for_loop? 1. from 0 to 7 ... for example 2. write 0 wath(500) write 1 wat write 2 wait ..... I tried something but it works this way ... 1. wait (500)*7 and then write 1,2,3,4,5,6,7 ... but this is wrong way thanks
  6. 1. there is an array ==> array = [5,2,3,?,1,?]; // this array is size of 6 and full array of size 6 has values 0,1,2,3,4,5 so ..... => 2. the missing values are 0 and 4 3. I want to find these missing values (I need som algorithm which find me it) ... I hope this is more clear
  7. Hi all, Does anyone know how to solve this problem? ==> I have an array of size for example 6 array = [5,2,3,?,1,?]; and I want to know how to automaticly fill that missing values .... if an array is size of 6 so all values will be 0,1,2,3,4,5 ... so there I see that missing values are 0 and 4 => As I mentioned before, at first I randomly choose from 0 and 4 and fill where is ? thanks for that
  8. Ok, I really dont know what dont you understand on that. It simple question. I give you example ... I can draw a line like this .. ... var point = canvas1.getContext("2d"); point.moveTo(x,y,width,height); point.lineTo(-||-); ... that line ... but I want to draw a function like sinus ... I mean that sinus-line ... like in chart
  9. Hi all, I know how to draw points, lines,... in canvas but can someone tell me how can I draw a function? Thanks.
  10. Hi all, how can I create 2D array ... like this .... var array = [][] ... you know what I mean ... like in other languages ... is it possible?
  11. I try to make a copy as you said .... like this ... for(var i=0;i<5;i++){ newA = suffleArray(row); column = newA;} ... or ... this way ... for(var i=0;i<5;i++){ column = row; column = suffleArray(column);} ... same problem ... probably it was not a good idea, but I do not have other ... can you send me a code of that little change? Thank you.
  12. Hi all, I have a little problem, I know how to randomize an array like this ... function suffleArray(array){ for (var i = array.length - 1; i > 1; i--) { var j = Math.floor(Math.random() * (i + 1)); var temp = array; array = array[j]; array[j] = temp; } } ... but when I use this function in 2D array like this ... var column = new Array(5);var row = [1,2,3,4,5];for(var i=0;i<5;i++){ column = suffleArray(row);} for(var i=0;i<5;i++){ for(var j=0;j<5;j++){ document.write(column[j]); }document.write("<br>");} --------------------------------------------- output ... for example 2 0 1 4 3 2 0 1 4 3 2 0 1 4 3 2 0 1 4 3 2 0 1 4 3 ... I have all rows same and I do not know why. Can you help me? Thank you.
×
×
  • Create New...