| |
|
|
- Page 1 - |
|
Frank Abbing | Perhaps is so one Thread time nice. Someone asks a programming task and the rest trying to find a short and good solution... The best solution would be put to the code snippets.
My task for today is:
Find a short and fast Solution to determine, if a directory is empty or not! |
|
|
| |
|
|
| |
|
- Page 2 - |
|
|
Frank Abbing | Hehe, Dieter has also my API-method posted. Quick and short. The shlwapi is an explosion of useful and unexpected features! Now you can someone else post a task. |
|
|
| |
|
|
|
| Your yes?
| Sort performant as possible 200 real random numbers with 8 digit accuracy after rnd()*1000 (XProfan 11) course, So how would a person do. | |
|
|
|
| |
|
|
|
Jörg Sellmeyer | CompileMarkSeparationRandomize
Declare s$
Window 0,0 - 400,%maxy
Var h& = Create("ListBox",%hwnd,1,1,10,200,%maxy - 80)
WhileLoop 200
AddString(h&,Format$("00#." + MkStr$("#",8),Rnd() * 1000))
Wend
While 1
WaitInput
Locate 1,29
s$ = Format$("00#." + MkStr$("#",8),Rnd() * 1000)
DeleteString(h&,Rnd(GetCount(h&)))
AddString(h&,s$)
SelectString(H&,-1,s$)
Print s$
Wend
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 08/26/08 ▲ |
|
|
|
|
| I gebs yes to, was a stupid idea! The next please... |
|
|
| |
|
|
|
Jörg Sellmeyer | so, moreover GEHTS:
It should be determined from a number of individual decimal values. I present here as a starting point once the method of strings. The whole thing should also be mathematically. A kind of test bit with 4bit. means, the number should in any "Bit" four states repräsentieren (0,1,2,3) and his eight digits. CompileMarkSeparation As I said, no Stringlösungen, but purely mathematical and not more than this 8 Schleifendurchläufen. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 08/28/08 ▲ |
|
|
|
|
Frank Abbing | Why can You the 1000 times through? Übrigens is but one of your Stringlösung, or? MID$ nunmal is a string function... |
|
|
| |
|
|
|
Jörg Sellmeyer | That the 1000it-Loop I had forgotten rauszunehmen.
Frank Abbing
Übrigens is but one of your Stringlösung, or?
Jörg Sellmeyer
I present here as a starting point once the method of strings. The whole thing should also be mathematically.
means: have You a mathematical Solution? |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 08/28/08 ▲ |
|
|
|
|
Sebastian Sprenger | Gehts now really about 2 Bits per digit and 8 Digits per number, or simply a Mid$-substitute? Naja whatever: CompileMarkSeparationOld procedure ErmittleZahl simply replace... |
|
|
| Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32 Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM Windows Me, 1.8 Ghz, 256 MB RAM | 08/28/08 ▲ |
|
|
|
|
Frank Abbing | |
|
| |
|
|
|
Jörg Sellmeyer | I post my views Solution. The need for 1000 Durchgänge ~1500 - ~2000 ms (therefore, the 1000 loop) The Stringlösung need only ~1000 - 1500ms. Your need ~2800 - ~3500ms I thought, mathematically could it to go faster. The idea is: i want Strings by Sendmessage to another program transfer. The strings consist of up to 16 characters (could one of eight agencies over &wparam and &lparam send). There are only four different characters, therefore the numbers of 0-3 per one decimal place. CompileMarkSeparation The numbers are backward issued but that means nothing.
Related to the Lg(Zahl&), rauszubekommen the number of posts, gefällt me! However, I am not clear, why do you even through the Lg(10) dividest. The is still 1 or? |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 08/28/08 ▲ |
|
|
|
|
Frank Abbing | |
|
| |
|
|
|
Sebastian Sprenger | Jörg Sellmeyer
why do you even through the Lg(10) dividest. The is still 1 or? True, he is it? *ausprobier* Yes, he's. well to know. One can take the logarithm to a certain base (in my case 10) calculate, but if The Lg-function with 10 anyhow 1 outputs, kann's Yes omitted. |
|
|
| Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32 Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM Windows Me, 1.8 Ghz, 256 MB RAM | 08/29/08 ▲ |
|
|
|