Bosna i Hercegovina



#1 07.09.2010-03:10
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Proba koda
DownloadIzvorni kod (Visual Basic):
  1. Public Function DeleteAllFiles(ByVal FolderSpec As String) _
  2. As Boolean
  3.  
  4.  
  5. 'EXAMPLE: DeleteAllFiles "C:\Test"
  6.  
  7. Dim oFs As New FileSystemObject
  8. Dim oFolder As Folder
  9. Dim oFile As File
  10.  
  11.  
  12. If oFs.FolderExists(FolderSpec) Then
  13. Set oFolder = oFs.GetFolder(FolderSpec)
  14. On Error Resume Next
  15. For Each oFile In oFolder.Files
  16. oFile.Delete True 'setting force to true
  17. 'deletes read-only file
  18. Next
  19. DeleteAllFiles = oFolder.Files.Count = 0
  20. End If
  21.  
  22. End Function

Pozdrav
Ovaj komentar je mijenjan 1 puta. zadnja izmjena 19.10.2010-02:15 od strane zxz. ↑  ↓

#2 26.09.2010-13:25
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
Kod: Označi sve
DownloadIzvorni kod (PHP):
  1. < ?
  2. ? >
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  7. <title> Untitled </title>
  8. </head>
  9.  
  10. <body>
  11. < ?

Pozdrav
↑  ↓

#3 19.10.2010-02:08
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
DownloadIzvorni kod (Visual Basic):
  1. Public Function Izmijeni(ImeTabele As String, ZnakUBazi _
  2. As String, Zamjena As String) As Variant
  3. '*******************************************
  4. 'Ime:      Izmijeni   (Function)
  5. 'Sadržaj: Promjena znaka ~ u slovo 
  6. 'Autor:     ZXZ
  7. 'Datum:      09 06, 2010, 09:54:46
  8. 'Adresa: Tuzla BiH
  9. 'Email:     zxz@icentar.ba
  10. 'Ulazni parametri:Ime tabele,Znak koji '
  11. 'treba mijenjati i znak u koji se mijenja
  12. 'Izlazni parametri:Nema
  13. 'Microsoft dao 3.1-Referenca
  14. '*******************************************
  15. Dim Db As Database
  16. Dim Rs As Recordset
  17. Dim Podatak As String
  18. Dim I As Integer
  19. Dim n As Integer
  20. Dim Promjena As Boolean
  21.  
  22.  
  23.  
  24. 'On Error GoTo Greska
  25. Set Db = CurrentDb()
  26. Set Rs = Db.OpenRecordset(ImeTabele)
  27. Do While Not Rs.EOF
  28.   For I = 0 To Rs.Fields.Count - 1
  29.   If Format$(Rs.Fields(I)) <> "" Then
  30.   Podatak = Rs.Fields(I).Value
  31.   Else
  32.   Podatak = ""
  33.   End If
  34.       For n = 1 To Len(Podatak)
  35.         If Mid(Podatak, n, 1) = ZnakUBazi Then
  36.         Mid(Podatak, n) = Zamjena
  37.         Rs.Edit
  38.         Rs.Fields(I).Value = Podatak
  39.         Promjena = True
  40.         End If
  41.       Next n
  42.    Podatak = ""
  43.   Next I
  44.  
  45. If Promjena = True Then
  46. Promjena = False
  47. Rs.Update
  48. End If
  49. Rs.MoveNext
  50. Loop
  51. Izlaz:
  52. Exit Function
  53. Greska:
  54. 'GreskaB (Err.Number)
  55. Resume Izlaz
  56. Kraj:
  57. End Function

Pozdrav
↑  ↓

#4 29.06.2015-11:14
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
Proba internet explorer 11
Pozdrav
↑  ↓

#5 29.06.2015-11:18
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
Neki se zale da ne radi odgovor na temu u IE.
Ja probao Ie 11 i win 8.1 i kod mene radi.
E sad ako ima kod koga neka kombinacija da ne radi neka napise.
Neka napisu i oni koji imaju IE bez obzira radi li neka probaju ovdje.
Pozdrav
↑  ↓

#6 29.06.2015-15:32
mirsadz Offline
Moderator
Registrovan/a od: 26.05.2011-21:40
Komentari: 31


Subject: Re: Proba koda
Proba test internet explorer WIN7
↑  ↓

#7 09.10.2015-23:17
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
Dodatna napomena autora:
kasnije dodano.
Nisam nikada ovo probao

Pozdrav
↑  ↓

#8 09.10.2015-23:19
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
definicija
obrazlozenje

Pozdrav
↑  ↓

#9 19.11.2016-00:49
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
DownloadIzvorni kod (PHP):
  1. < ?
  2.  
  3.  
  4. ? >
  5.  
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7.  
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9.  
  10. <head>
  11.  
  12. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  13.  
  14. <title> Untitled </title>
  15.  
  16. </head>
  17.  
  18.  
  19.  
  20. <body>
  21.  
  22. < ?

Pozdrav
↑  ↓

#10 03.06.2017-10:58
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
DownloadIzvorni kod (Javascript):
  1. <HTML>
  2. <HEAD>
  3. <BODY>
  4. <DIV id=Zittertext
  5. style="FONT-WEIGHT: bold; FONT-SIZE: 25pt; FILTER: Wave(freq=5, light=0, phase=8, strength=1); WIDTH: 100%; COLOR: red">
  6.   <p align="center"><font color="#000000">
  7.   <span style="background-color: #FFFF00">Posjetite icentar</span></font></DIV>
  8. <SCRIPT language=JavaScript>
  9. <!--
  10. function DynWave()
  11. {
  12.   if(document.all.Zittertext.filters[0].freq > 130)
  13.      document.all.Zittertext.filters[0].freq = 15;
  14.   document.all.Zittertext.filters[0].freq += 1;
  15.   if(document.all.Zittertext.filters[0].phase > 50)
  16.      document.all.Zittertext.filters[0].phase = 1;
  17.  document.all.Zittertext.filters[0].phase += 1;
  18.   if(document.all.Zittertext.filters[0].strength > 1)
  19.      document.all.Zittertext.filters[0].strength = .1;
  20.   document.all.Zittertext.filters[0].strength += 1;
  21.   window.setTimeout("DynWave()",100);
  22. }
  23. DynWave();
  24. </SCRIPT>
  25. </BODY>
  26. </HTML>

Pozdrav
↑  ↓

#11 03.06.2017-10:58
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
evo na ovom serveru radi kod java.
Pozdrav
↑  ↓

#12 05.06.2017-08:03
Avko Offline
Administrator
Registrovan/a od: 28.05.2014-09:21
Komentari: 2,738


Subject: Re: Proba koda
DownloadIzvorni kod (Text):
  1. $upit=mysql_query("SELECT datum,ime_voca,sifra
  2.                 FROM voce
  3.                 ORDER BY DATE(datum) asc
  4.                 LIMIT 0 , 100")
  5.                 or die(mysql_error());
  6.        
  7. $csv= "Datum".",imeVoca".",sifra"."\n";
  8. while ($row = mysql_fetch_array($upit)){
  9.         $strDatum=(string)$row[0];
  10.         $strImeVoca=(string)($row[1]);
  11.         $strDatum=(string)date('d/m/Y',strtotime($row[2]));
  12.  
  13.         $csv.='"'.$strDatum.'",'.'"'.$strImeVoca.'",'.'"'.$strDatum.'",'.'"'.$strEndDate."\n";
  14. }
  15. unset($upit);

klikom na tipku mozemo skinuti taj fajl
u HTML-u imamo tipku:
DownloadIzvorni kod (Text):
  1. <form>
  2. <input type='button' name='Release' onclick= '[b]downloadCSV[/b]({ filename: "voce.csv" });' value='DOWNLOAD CSV FILE'>
  3. </form>

HTML poziva javascript funkciju koja skida fajl na hard disk

DownloadIzvorni kod (Text):
  1. <script type="text/javascript">
  2.         function [b]downloadCSV[/b](args) {  
  3.                 var data, filename, link;
  4.                 var csv = < echo json_encode($csv);>;
  5.                 filename = args.filename || 'export.csv';
  6.                 if (!csv.match(/^data:text\/csv/i)) {
  7.                         csv = 'data:text/csv;charset=utf-8,' + csv;
  8.                 }
  9.                 data = encodeURI(csv);
  10.                 link = document.createElement('a');
  11.                 link.setAttribute('href', data);
  12.                 link.setAttribute('download', filename);
  13.                 link.click();
  14.                 uvecajCSVklik();
  15.         }
  16.         function uvecajCSVklik(){
  17.  
  18.                 //kod kojim uvecavamo broj skidanja table voce
  19.  
  20.         }
  21. </script>

za uvecavanje broj skidanja u koristim ovo:

DownloadIzvorni kod (Text):
  1. //uvecaj broj skidanja
  2. $query='UPDATE voce SET ukupno =(ukupno+1), datum= NOW()';
  3. mysql_query($query) or die(mysql_error());
  4. unset($query); //praznjenje upita

da, radi
Newton laže! Lake padaju brže!
↑  ↓

#13 05.06.2017-08:24
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 9,484


Subject: Re: Proba koda
hehe znaci radi sad.
Pozdrav
↑  ↓

#14 05.06.2017-11:38
Avko Offline
Administrator
Registrovan/a od: 28.05.2014-09:21
Komentari: 2,738


Subject: Re: Proba koda
radi.
a sta je bilo do servera ili do tebe?
Newton laže! Lake padaju brže!
↑  ↓

Stranice (1): 1


All times are GMT +01:00. Current time: 18.11.2017-12:56.