NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Larry Sand

Pages: 1 2 [3] 4 5 ... 7
31
Web Server - Ask For Help / Re: Niggling problem with FreeImage for Clarion
« on: November 19, 2013, 01:14:27 PM »
Mike,

If your source image is smaller than the image you're trying to make it will be "fuzzy" because the resampling algorithm has to make up the missing bits.  You'll have very good results if you start with an image larger than your thumbnail.  Some filters will yield better results but only marginally.  If your source image is larger than the thumbnail then something else is happening and I'd need to see the image.

Hope that helps,
Larry Sand

32
Bruce,
>>I'm happy with that, but your construction with Choose doesn't look right. Can you confirm what's going on there?


You mean the syntax or what my poor feeble mind was thinking? <g>  At the time I thought I would only test if the global option was enabled.  I suppose that if it returns access denied on the create then it more than likely already exists.  That was all.

Thanks,
Larry Sand

33
Hi Bruce,

When checking the error returned creating a second global mutex i found that Windows will also return Access Denied "ErrNum = 5".  So the test in MyService.ManageInstances() needs something like this:

ErrorNum = ERROR_ALREADY_EXISTS Or Choose(self.TerminalServiceUsesGlobalMutex <> 0 And ErrorNum = 5)

Larry Sand

34
Stu,
If i understand what you're asking, we use this on some jQuery dialogs to handle that:


var enterKeyHandler = function(formId, btnText) {
  $(formId).keypress(function(e) {
     if (e.keyCode == $.ui.keyCode.ENTER) {
        $(":button:contains('"+btnText+"')").trigger("click");
     return false;
      }
    });
};   


Larry Sand

35
Stu,

One thing that happens when using dynamic SQL is that the server cannot reuse the execution plan and it consumes more memory.  If you use parameterized queries you get several benefits, reduced memory consumption, increased speed, resistance to sql injection attacks.  Here's an article that explains it well: https://www.simple-talk.com/sql/t-sql-programming/performance-implications-of-parameterized-queries/

Larry Sand

36
Web Server - Ask For Help / CORS header elements in _CreateHeader
« on: October 01, 2013, 02:26:45 PM »
Bruce,

NetWebServer._CreateHeader() has a couple of errors:

  if p_HeaderDetails.AccessControlAllowOrigin <> ''
    HeaderStr.Append('Access-Control-Allow-Origin ' & clip (p_HeaderDetails.AccessControlAllowOrigin) & '<13,10>')
  end
  if p_HeaderDetails.AccessControlAllowCredentials <> ''
    HeaderStr.Append('Access-Control-Allow-Credentials ' & clip (p_HeaderDetails.AccessControlAllowCredentials) & '<13,10>')
  end
  if p_HeaderDetails.AccessControlAllowOrigin <> ''
    HeaderStr.Append('Access-Control-Allow-Methods ' & clip (p_HeaderDetails.AccessControlAllowMethods) & '<13,10>')
  end
  if p_HeaderDetails.AccessControlMaxAge <> ''
    HeaderStr.Append('Access-Control-Allow-MaxAge ' & clip (p_HeaderDetails.AccessControlMaxAge) & '<13,10>')
  end



Should be:

  if p_HeaderDetails.AccessControlAllowOrigin <> ''
    HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-Origin: ' & clip (p_HeaderDetails.AccessControlAllowOrigin) & '<13,10>'
  end
  if p_HeaderDetails.AccessControlAllowCredentials <> ''
    HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-Credentials: ' & clip (p_HeaderDetails.AccessControlAllowCredentials) & '<13,10>'
  end
  if p_HeaderDetails.AccessControlAllowMethods <> ''
    HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-Methods: ' & clip (p_HeaderDetails.AccessControlAllowMethods) & '<13,10>'
  end
  if p_HeaderDetails.AccessControlMaxAge <> ''
    HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-MaxAge: ' & clip (p_HeaderDetails.AccessControlMaxAge) & '<13,10>'
  end

There are missing colons and the condition on the allow methods are changed.

Thanks,
Larry Sand

37
Web Server - Ask For Help / Re: Clarion FreeImage documentation?
« on: August 14, 2013, 06:34:00 AM »
You're welcome Mike,

If you document what you find and send it to me I'll see about including it.

Larry Sand

38
Web Server - Ask For Help / Re: Clarion FreeImage documentation?
« on: August 08, 2013, 10:06:17 AM »
Mike,

Here are the methods to resize images, look in freeimcl.inc iImage Interface and you'll find them.

Some methods return the new image in the object, and the ones that have an (iImage dstImage) return the new image in another object via the passed iImage interface.

The source code example program has the most comprehensive use of the methods.  Also the rescaling and rotation dialog objects show quite a bit too.


Rescale             Procedure(*Real fPercentX, *Real fPercentY, UNSIGNED fiFilter),BOOL,Proc
Rescale             Procedure(*Real fPercent, UNSIGNED fiFilter),BOOL,Proc
Rescale             Procedure(UNSIGNED nDstWidth, UNSIGNED nDstHeight, UNSIGNED fiFilter),BOOL,Proc
Rescale             Procedure(*iImage dstImage, Real fPercent, UNSIGNED fiFilter),BOOL,Proc                            !New Image is returned in dstImage
Rescale             Procedure(*iImage dstImage, UNSIGNED nDstWidth, UNSIGNED nDstHeight, UNSIGNED fiFilter),BOOL,Proc  !New Image is returned in dstImage

FitTo               Procedure(UNSIGNED nDstWidth, UNSIGNED nDstHeight, UNSIGNED fiFilter=FILTER_BILINEAR, UNSIGNED FitMethod=CFIFIT_BOTH, UNSIGNED limitLongSideTo=0, BOOL maintainAspectRatio=True, BOOL adjustPower2=False),BOOL,Proc

Thumbnail           Procedure(*iImage dstImage, UNSIGNED nDstWidth, UNSIGNED fiFilter),BOOL,Proc                       !New Image is returned in dstImage
Thumbnail           Procedure(UNSIGNED nDstWidth, UNSIGNED fiFilter),BOOL,Proc

Thumbnail           Procedure(*iImage dstImage, UNSIGNED nMaxPixelSize),BOOL,Proc                                      !New Image is returned in dstImage
Thumbnail           Procedure(UNSIGNED nMaxPixelSize),BOOL,Proc


So you'll need a FreeImage object:

fi  FreeImageClass
  Code
  !Load some image into the object
  if fi.iImage.Load('someImage.jpg')
    !make a 128 px wide image maintaining aspect ratio
    fi.iImage.Thumbnail(128, FILTER_BILINEAR) !See freeImg.inc and the freeimage docs on source forge for rescaling filters, there's an appendix that describes them
    fi.iImage.SaveAs('someThumbnail.jpg')
  end



There are a lot of options, what do you want to do?

Larry Sand

39
Web Server - Ask For Help / Re: NT 4 to NT 7 failure
« on: June 28, 2013, 10:02:56 AM »
Chuck,

Check the serverObject.SSLMethod property and what you're setting the clients to,  IIRC NT5.30+ defaults to NET:SSLMethodSSLv3 and NT4 was NET:SSLMethodSSLv23 and the connection fails.

Larry Sand

40
Thanks for the information Bruce, It might be the IMDD driver, I don't know yet and was trying to isolate the cause.  It's good to know that you think that wrapping that bit in the critical section doesn't cause a problem.

cheers,
Larry Sand

41
Comments?

42
FTP - Ask For Help / Re: endless loop done ftp demo nt 7.07
« on: June 26, 2013, 01:36:24 PM »
We wrote a workaround and have it working at thousands of sites now.  Just cannot use event driven programming with the FTP object.   Let me know if you ever get a chance to look at it since I don't like the kludge.

43
Web Server - Ask For Help / Re: NetTalk as a service and ODBC drivers
« on: June 12, 2013, 09:26:34 AM »
Another thing that happens is the account the service runs under does not have sufficient rights.  If you create a user just for the service and ensure it has logon as service rights and set the service to use it to logon, then you can control the permissions.

Larry Sand

44
FTP - Ask For Help / Re: endless loop done ftp demo nt 7.07
« on: April 29, 2013, 02:16:47 PM »
Hi Bruce,

Do you have everything you need to reproduce this?

Thanks,
Larry Sand

45
Web Server - Ask For Help / Re: SSL works in Firefox but not in IE
« on: April 25, 2013, 02:29:13 AM »
If you uncheck "Use SSL 2.0" and have "Use SSL 3.0" checked in IE's internet options, I think you'll find it connects.  NetTalk uses SSLv3 by default.

Larry Sand

Pages: 1 2 [3] 4 5 ... 7