Search found 995 matches

by El_Choni
Wed Nov 15, 2017 10:52 am
Forum: TailBite
Topic: TailBite website will be closed
Replies: 3
Views: 46359

Re: TailBite website will be closed

Sad news. But it lasted long thanks to you ;)
by El_Choni
Sat May 11, 2013 11:55 am
Forum: General Discussion
Topic: Automatical cut pictures
Replies: 19
Views: 2206

Re: Automatical cut pictures

KCC: You are welcome! I said fast and dirty because this code was not made from scratch, but is a revamp of a 7 years old useless code: http://www.purebasic.fr/english/viewtopic.php?f=12&t=22465&p=151389 I discovered a hidden utility thanks to your talent for the Coding Questions :D Impress...
by El_Choni
Fri Apr 19, 2013 12:55 pm
Forum: Coding Questions
Topic: Change one bit of a value (long)
Replies: 7
Views: 1156

Re: Change one bit of a value (long)

You've changed the code I posted. The parentheses are needed ;)

Code: Select all

Macro Bchg(i,n)
  i!(1<<(n-1))
EndMacro
by El_Choni
Fri Apr 19, 2013 12:20 pm
Forum: Coding Questions
Topic: Change one bit of a value (long)
Replies: 7
Views: 1156

Re: Change one bit of a value (long)

This works here:

Code: Select all

Macro Bchg(i,n)
  i!(1<<(n-1))
EndMacro
If the n index was 0 based (which would be the standard), the macro could be a bit shorter:

Code: Select all

Macro Bchg(i,n)
  i!(1<<n)
EndMacro
Regards,
by El_Choni
Mon Apr 01, 2013 3:45 pm
Forum: Coding Questions
Topic: XML decoding help needed again. Pointers and recursive stuff
Replies: 2
Views: 897

Re: XML decoding help needed again. Pointers and recursive s

Hi Fangs! This seems to work here, although it's my first attempt with PB+XML so I'm not sure: Structure MovieData MoviePlot.s MovieCategory.s MovieTitle.s MovieDirectors.s MovieWriters.s MovieActors.s EndStructure Global Movie.MovieData Declare ImportImdbDataFile() Declare ImportImdbDataFile_XML(*C...
by El_Choni
Thu Mar 21, 2013 2:39 pm
Forum: Off Topic
Topic: Climategate 3.0 if your interested (Not 4 AGW ist`s )
Replies: 13
Views: 2270

Re: Climategate 3.0 if your interested (Not 4 AGW ist`s )

It's pretty easy to claim "it has already been settled", but the fact people are still talking about it carries its own weight. I'm afraid thousands of millions of people talking the issue to boredom wouldn't change the fact. You can't submit reality to a vote. Don't you agree that it's t...
by El_Choni
Thu Mar 21, 2013 8:28 am
Forum: Off Topic
Topic: Climategate 3.0 if your interested (Not 4 AGW ist`s )
Replies: 13
Views: 2270

Re: Climategate 3.0 if your interested (Not 4 AGW ist`s )

Predicting the weather is different from predicting the climate, as weather is different from climate. Climate dynamics are not completely understood yet, but scientists have made enough research the last hundred years to be confident when they say that the climate is warming, and we are doing it. A...
by El_Choni
Sat Feb 23, 2013 11:48 am
Forum: Coding Questions
Topic: Loading RAW image files
Replies: 7
Views: 1413

Re: Loading RAW image files

I think this documentation might help to deal with the CR2 format: http://wildtramper.com/sw/cr2/cr2.html.
by El_Choni
Fri Jan 11, 2013 3:09 pm
Forum: Coding Questions
Topic: Getting double return value from DLL
Replies: 10
Views: 3311

Re: Getting double return value from DLL

Interesting read, thank you!
by El_Choni
Fri Jan 11, 2013 12:02 pm
Forum: Coding Questions
Topic: Getting double return value from DLL
Replies: 10
Views: 3311

Re: Getting double return value from DLL

Helle wrote:If the return-value is double and x64, use this e.g.:

Code: Select all

GetCaptureProperty(*capture, #CV_CAP_PROP_FRAME_WIDTH)
w.d
!movsd [v_w],xmm0
This worked, thank you! (is this a PB bug, not being able to get this return value normally?)

Regards,
by El_Choni
Fri Jan 11, 2013 10:07 am
Forum: Coding Questions
Topic: Getting double return value from DLL
Replies: 10
Views: 3311

Re: Getting double return value from DLL

Thank you very much. I've wiped out the * as per new syntax constraints, and switched the return variable type to i (I'm compiling in x64). Still won't work :( Enumeration #CV_CAP_PROP_POS_MSEC #CV_CAP_PROP_POS_FRAMES #CV_CAP_PROP_POS_AVI_RATIO #CV_CAP_PROP_FRAME_WIDTH #CV_CAP_PROP_FRAME_HEIGHT #CV_...
by El_Choni
Fri Jan 11, 2013 7:48 am
Forum: Off Topic
Topic: Purebasic "class reunion"
Replies: 26
Views: 6349

Re: Purebasic "class reunion"

Hi, DarkDragon told me about this thread for the good old PB coders. Nice to know many are still around. Remember back then when bytes had only 3 bits? Now it so damn easy, I tell ya! :mrgreen: I had to give up coding years ago as my job took over my spare time. But now coding has become an increasi...
by El_Choni
Thu Jan 10, 2013 7:07 pm
Forum: Coding Questions
Topic: Getting double return value from DLL
Replies: 10
Views: 3311

Getting double return value from DLL

Hi all, I'm trying to figure out how to get a "double" value from a C DLL but I'm unable to do so. The function is cvGetCaptureProperty from opencv_highgui243d.dll (in short, OpenCV ). Enumeration #CV_CAP_PROP_POS_MSEC #CV_CAP_PROP_POS_FRAMES #CV_CAP_PROP_POS_AVI_RATIO #CV_CAP_PROP_FRAME_W...
by El_Choni
Thu Sep 22, 2011 2:52 pm
Forum: Tricks 'n' Tips
Topic: Simple Big Endian / Little Endian byte order swap function.
Replies: 20
Views: 12001

Re: Simple Big Endian / Little Endian byte order swap functi

I would use macros instead of procedures for speed's sake.
by El_Choni
Thu Aug 18, 2011 5:25 pm
Forum: Coding Questions
Topic: Open File larger than the amount of ram you have
Replies: 20
Views: 3583

Re: Open File larger than the amount of ram you have

Maybe using ts-soft's ReadData_M instead of ReadByte_M would help? (sorry if you already tried this)

Ragards,