Nastroje pro webove vyvojare - zobrazovani cisla radku
menu > Nastroje prohlizece > Nastroje pro webove vyvojare V javascriptove konzoli je moznost v nastaveni povolit/zakazat zobrazovani casoveho razitka. Mam zakazane. Ale, hodilo by se mi, kdyby tam slo zapnout/vypnout zobrazovani cisla radku.
Pro ladeni scriptu, treba ja si hraji se serazovacimi algoritmy, vypisuji do konzoly ruzna data, ktera se meni podle cyklu. Najdu si radek, kde se chyba projevi. Pri zmacknuti F5 je to ten samy radek. Jenze ho musim hledat ve vypisu asi 50 dalsich radku :) Cili, cislo radku zustava zachovane.
Samozrejme, u jinych scriptu se to nehodi. Takze by to melo jit vypnout, kdyby to tam nekdo nechtel. Jako, treba, mne je k nicemu to casove razitko pro to, co delam.
所有回复 (2)
konkretne to vypada asi takto
[10,11,5,3,8,15,14,6,7,4,2,12,9,1,13,0] sorting4-algorithms.js:2400:9 [10,11,5,3,8,15,14,6,7,4,2,12,9,1,13,0] 1 2 step before sorting4-algorithms.js:2550:9 [10,11,3,5,8,15,14,6,7,4,2,12,9,1,13,0] 1 2 step before sorting4-algorithms.js:2550:9 [10,11,3,5,8,15,6,14,7,4,2,12,9,1,13,0] 1 2 step before sorting4-algorithms.js:2550:9 0,0,0],[2,0,1],[4,0,2],[6,0,1],[8,0,2],[11,1,1],[14,0,2],[16,0,2 b-step sorting4-algorithms.js:2575:9 [3,5,10,11,6,8,14,15,1,2,4,7,9,12,13,0] 2 step after2 sorting4-algorithms.js:2578:9 0,0,0],[2,0,1],[4,0,2],[6,0,1],[8,0,2],[11,1,1],[14,0,2],[16,0,2 b-after-1 sorting4-algorithms.js:2589:9 0,0,0],[4,0,2],[8,0,2],[14,0,2],[8,0,2],[11,1,1],[14,0,2],[16,0,2 b-after-2 sorting4-algorithms.js:2595:9 [[0,0,0],[4,0,2],[8,0,2],[14,0,2],[16,0,2],null,null,null] b-after-3 (before next step) sorting4-algorithms.js:2601:9 [3,5,10,11,6,8,14,15,1,2,4,7,9,12,13,0] 2 1 step before 2 sorting4-algorithms.js:2550:9 [3,5,6,8,10,11,14,15,1,2,4,7,9,12,13,0] 1 step after2 sorting4-algorithms.js:2578:9 [[0,0,0],[4,0,2],[8,0,1],[14,0,2],[16,0,1],null,null,null] b-after-1 sorting4-algorithms.js:2589:9 [[0,0,0],[8,0,1],[16,0,1],[14,0,2],[16,0,1],null,null,null] b-after-2 sorting4-algorithms.js:2595:9 [[0,0,0],[8,0,1],[16,0,1],[14,0,2],[16,0,1],null,null,null] b-after-3 (before next step) sorting4-algorithms.js:2601:9 [3,5,6,8,10,11,14,15,1,2,4,7,9,12,13,0] 1 2 step before sorting4-algorithms.js:2550:9 [1,2,3,4,5,6,7,8,9,10,11,12,13,0,14,15] 2 step after2 sorting4-algorithms.js:2578:9 [[0,0,0],[8,0,1],[16,0,2],[14,0,2],[16,0,2],null,null,null] b-after-1 sorting4-algorithms.js:2589:9 [[0,0,0],[16,0,2],[16,0,2],[14,0,2],[16,0,2],null,null,null] b-after-2 sorting4-algorithms.js:2595:9 [[0,0,0],[16,0,2],[16,0,2],[14,0,2],[16,0,2],null,null,null] b-after-3 (before next step) sorting4-algorithms.js:2601:9 [[0,0,0],[16,0,1],[16,0,1],[14,0,2],[16,0,1],null,null,null] b-step sorting4-algorithms.js:2575:9 [15,14,0,13,12,11,10,9,8,7,6,5,4,3,2,1] 1 step after2 sorting4-algorithms.js:2578:9 [1,2,3,4,5,6,7,8,9,10,11,12,13,0,14,15] 2 ---out--- sorting4-algorithms.js:2606:9
no, a asi 10ty radek ze spodu je ta chyba [[0,0,0],[4,0,2],[8,0,1],[14,0,2],[16,0,1],null,null,null] b-after-1 - ok [[0,0,0],[8,0,1],[16,0,1],[14,0,2],[16,0,1],null,null,null] b-after-2 - chyba [[0,0,0],[8,0,1],[16,0,1],[14,0,2],[16,0,1],null,null,null] b-after-3 (before next step) - chyba
spravne to melo byt [[0,0,0],[8,0,1],[16,0,1],null,null,null,null,null] b-after-3 Resim to, ze nahodile zamichane pole je vlastne skupina uz serazenych mensich poli. A pak slucuji dve takove sub pole do jednoho porovnavanim zleva. Takze by se mel pocet rozdeleni postupne snizovat. 1 2 5 4 3 7 6 5 1 1 2 1 2 5 | 4 3 | 7 6 5 1 | 1 2 - rozdeleni na 4 serazene pole asc | desc | desc | asc order a pak to spojuji, dve do jednoho, takze pocet rozdeleni klesne na 2 pole 1 2 3 4 5 | 1 2 5 6 7 - a po dalsim kroku mam serazeno 1 1 2 2 3 4 5 5 6 7
Je to jen test. Lepsi moznost je uvazovat tak, ze kazde cislo je pole o 1 prvku, serazene asc a spojovat to 1-1, pak 2-2, pak 4-4...
Toto je jen fórum uživatelů, tady s tím nikdo nic neudělá. Svůj problém zkus zadat na https://bugzilla.mozilla.org