Re: out of memory..urgent

2013-09-09 Thread Greg Keogh
This is the utf8 validation I was thinking of -- Greg

http://msdn.microsoft.com/en-us/library/302sbf78.aspx


On 10 September 2013 14:00,  wrote:

> Not sure if it’s of use in this case but you can use
> char.GetUnicodeCategory to check validity of a Unicode character
>
>
> var validCharacter = 'q';
>
> var ucCategory = char.GetUnicodeCategory(validCharacter);
> var isValidUnicode = ucCategory != UnicodeCategory.OtherNotAssigned;
>
>
>
> var invalidCharacter = (char) 888;
>
> ucCategory = char.GetUnicodeCategory(invalidCharacter);
>
> isValidUnicode = ucCategory != UnicodeCategory.OtherNotAssigned;
>
> Jason Roberts
> Journeyman Software Developer
>
> Twitter: @robertsjason
> Blog: http://DontCodeTired.com
> Pluralsight Courses: http://bit.ly/psjasonroberts
>
> *From:* Greg Keogh
> *Sent:* Tuesday, 10 September 2013 11:36 AM
> *To:* ozDotNet
>
> Does the byte[] actually represent a valid utf-8 string? There are ways of
> validating, but I can't remember off the top of my head. You can also code
> Encoding.UTF8.Getstring() as there is a static member for convenience --
> Greg
>
>
> On 10 September 2013 13:04,  wrote:
>
>> Getting out of memory exception when I try to
>>
>> ** **
>>
>> Dim s as string
>>
>> Dim b() as Byte
>>
>> ** **
>>
>> s=System.Text.Encoding.GetEncoding(“utf-8).GetString(b) 
>>
>> ** **
>>
>> Definitely something about the length of b..works fine most of the time
>> except if b length is very large
>>
>> ** **
>>
>> Anthony
>>
>> Melbourne StuffUps…learn from others, share with others!
>>
>> http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/
>> 
>>
>>
>>
>> --
>> NOTICE : The information contained in this electronic mail message is
>> privileged and confidential, and is intended only for use of the addressee.
>> If you are not the intended recipient, you are hereby notified that any
>> disclosure, reproduction, distribution or other use of this communication
>> is strictly prohibited.
>> If you have received this communication in error, please notify the
>> sender by reply transmission and delete the message without copying or
>> disclosing it. (*13POrtC*)
>>
>> ---
>> 
>>
>> ** **
>>
>
>


Re: out of memory..urgent

2013-09-09 Thread osjasonroberts
Not sure if it’s of use in this case but you can use char.GetUnicodeCategory to 
check validity of a Unicode character


varvalidCharacter='q';

varucCategory=char.GetUnicodeCategory(validCharacter);

varisValidUnicode=ucCategory!=UnicodeCategory.OtherNotAssigned;  




varinvalidCharacter=(char) 888;

ucCategory=char.GetUnicodeCategory(invalidCharacter);

isValidUnicode=ucCategory!=UnicodeCategory.OtherNotAssigned;


Jason Roberts
Journeyman Software Developer

Twitter: @robertsjason
Blog: http://DontCodeTired.com
Pluralsight Courses: http://bit.ly/psjasonroberts



From: Greg Keogh
Sent: ‎Tuesday‎, ‎10‎ ‎September‎ ‎2013 ‎11‎:‎36‎ ‎AM
To: ozDotNet


Does the byte[] actually represent a valid utf-8 string? There are ways of 
validating, but I can't remember off the top of my head. You can also code 
Encoding.UTF8.Getstring() as there is a static member for convenience -- Greg




On 10 September 2013 13:04,  wrote:




Getting out of memory exception when I try to

 

Dim s as string

Dim b() as Byte

 

s=System.Text.Encoding.GetEncoding(“utf-8).GetString(b) 

 

Definitely something about the length of b..works fine most of the time except 
if b length is very large

 

Anthony

Melbourne StuffUps…learn from others, share with others!

http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/


--
NOTICE : The information contained in this electronic mail message is 
privileged and confidential, and is intended only for use of the addressee. If 
you are not the intended recipient, you are hereby notified that any 
disclosure, reproduction, distribution or other use of this communication is 
strictly prohibited. 
If you have received this communication in error, please notify the sender by 
reply transmission and delete the message without copying or disclosing it. 
(*13POrtC*)
---

Re: out of memory..urgent

2013-09-09 Thread Greg Keogh
Does the byte[] actually represent a valid utf-8 string? There are ways of
validating, but I can't remember off the top of my head. You can also code
Encoding.UTF8.Getstring() as there is a static member for convenience --
Greg


On 10 September 2013 13:04,  wrote:

> Getting out of memory exception when I try to
>
> ** **
>
> Dim s as string
>
> Dim b() as Byte
>
> ** **
>
> s=System.Text.Encoding.GetEncoding(“utf-8).GetString(b) 
>
> ** **
>
> Definitely something about the length of b..works fine most of the time
> except if b length is very large
>
> ** **
>
> Anthony
>
> Melbourne StuffUps…learn from others, share with others!
>
> http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/*
> ***
>
>
>
> --
> NOTICE : The information contained in this electronic mail message is
> privileged and confidential, and is intended only for use of the addressee.
> If you are not the intended recipient, you are hereby notified that any
> disclosure, reproduction, distribution or other use of this communication
> is strictly prohibited.
> If you have received this communication in error, please notify the sender
> by reply transmission and delete the message without copying or disclosing
> it. (*13POrtC*)
>
> ---
> 
>
> ** **
>


Re: out of memory..urgent

2013-09-09 Thread Shane Nall
You should consider working with streams and a fixed buffer size rather than 
the encoding the whole thing at once. 

Cheers, 
Shane






On 10/09/2013, at 1:04 PM,  wrote:

> Getting out of memory exception when I try to
>  
> Dim s as string
> Dim b() as Byte
>  
> s=System.Text.Encoding.GetEncoding(“utf-8).GetString(b)
>  
> Definitely something about the length of b..works fine most of the time 
> except if b length is very large
>  
> Anthony
> Melbourne StuffUps…learn from others, share with others!
> http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/
> 
> --
> NOTICE : The information contained in this electronic mail message is 
> privileged and confidential, and is intended only for use of the addressee. 
> If you are not the intended recipient, you are hereby notified that any 
> disclosure, reproduction, distribution or other use of this communication is 
> strictly prohibited. 
> If you have received this communication in error, please notify the sender by 
> reply transmission and delete the message without copying or disclosing it. 
> (*13POrtC*)
> ---
>  



out of memory..urgent

2013-09-09 Thread anthonyatsmallbiz
Getting out of memory exception when I try to

 

Dim s as string

Dim b() as Byte

 

s=System.Text.Encoding.GetEncoding("utf-8).GetString(b) 

 

Definitely something about the length of b..works fine most of the time
except if b length is very large

 

Anthony

Melbourne StuffUps.learn from others, share with others!

http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/



--
NOTICE : The information contained in this electronic mail message is
privileged and confidential, and is intended only for use of the addressee.
If you are not the intended recipient, you are hereby notified that any
disclosure, reproduction, distribution or other use of this communication is
strictly prohibited. 
If you have received this communication in error, please notify the sender
by reply transmission and delete the message without copying or disclosing
it. (*13POrtC*)

--- 

 



Re: WPF - Get scrollbar position of WebBrowser control

2013-09-09 Thread Ben Scott
MarkPad does this to sync the position of the editor and preview. It 
uses Chromium but you might be able to find something useful. I don't 
recall exactly how it works but you would look in the preview view.


https://github.com/Code52/DownmarkerWPF





On 10/09/13 10:18 AM, Jim Baker wrote:

Hello All,

I have a WebBrowser control in my WPF application (Yes some of us still write 
WPF apps !) and I need to find out the x,y positions of the scrollbars.

I'm using this to set the scroll position

mshtml.IHTMLDocument2 doc = WebBrowser1.Document as mshtml.IHTMLDocument2;

doc.parentWindow.scrollBy(x,y);   // x and y  passed in to the method.

Sometimes I need to save the scroll positions when scrolling stops for saving 
for use later in the program.

Any assistance appreciated :)

Thanks, Jim




Re: Mocking up a designer surface

2013-09-09 Thread Stephen Price
Have a look at behaviours. There was a gallery with some for download and I
did a demo at a user group meeting once showing how to add drag behaviours
to shapes. Also gravity and physics... Knock up something in half hour. Not
sure if the gallery is even still up. I may have the demo somewhere
still... Will check when I get near a computer
On 10/09/2013 8:54 AM, "Greg Keogh"  wrote:

> Folks, for a Silverlight 5 demo I have to create a control that looks and
> behaves like a simple "designer" we see in modern IDEs. They want to see a
> blank canvas, then use the mouse to drag rectangles onto parts of the
> canvas, delete, arrange and resize them, and possibly z-order them as well.
> I would then save the layout of the resulting rectangles. The saved
> definitions would be used by a different app to fill a screen's rectangular
> areas with reports, charts and pictures.
>
> Creating the designer experience from scratch would be pretty taxing as
> I'd have to manually move visuals around in response to mouse gestures.
> Before I embark upon such an exercise I was wondering if anyone could think
> of a way of cheating and perhaps piggy-backing on something else to help me.
>
> Greg
>


Mocking up a designer surface

2013-09-09 Thread Greg Keogh
Folks, for a Silverlight 5 demo I have to create a control that looks and
behaves like a simple "designer" we see in modern IDEs. They want to see a
blank canvas, then use the mouse to drag rectangles onto parts of the
canvas, delete, arrange and resize them, and possibly z-order them as well.
I would then save the layout of the resulting rectangles. The saved
definitions would be used by a different app to fill a screen's rectangular
areas with reports, charts and pictures.

Creating the designer experience from scratch would be pretty taxing as I'd
have to manually move visuals around in response to mouse gestures. Before
I embark upon such an exercise I was wondering if anyone could think of a
way of cheating and perhaps piggy-backing on something else to help me.

Greg


WPF - Get scrollbar position of WebBrowser control

2013-09-09 Thread Jim Baker
Hello All,

I have a WebBrowser control in my WPF application (Yes some of us still write 
WPF apps !) and I need to find out the x,y positions of the scrollbars.

I'm using this to set the scroll position

mshtml.IHTMLDocument2 doc = WebBrowser1.Document as mshtml.IHTMLDocument2;

doc.parentWindow.scrollBy(x,y);   // x and y  passed in to the method.

Sometimes I need to save the scroll positions when scrolling stops for saving 
for use later in the program.  

Any assistance appreciated :)

Thanks, Jim

RE: Kentico users?

2013-09-09 Thread Katherine Moss
I tried it as well, and found that it sort of broke the spirit of open source.  
And nor was I paying that much for something that should be open source in my 
mind.

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of David Connors
Sent: Saturday, September 07, 2013 5:45 AM
To: ozDotNet
Subject: Re: Kentico users?


We used to. It is slow and expensive and hard to customise. We switched to 
WordPress.
On 7 Sep 2013 16:09, "Greg Keogh" mailto:g...@mira.net>> wrote:
Is anyone in this group using Kentico? -- Greg


Re: 3rd party component for sftp

2013-09-09 Thread Tristan Reeves
Thanks for your suggestions.

Tristan.

On Mon, Sep 9, 2013 at 6:47 PM, William Luu  wrote:
> I'm using SSH.NET, which is hosted on codeplex
> —
> Sent from Mailbox for iPhone
>
>
> On Mon, Sep 9, 2013 at 4:57 PM, Tristan Reeves  wrote:
>>
>> Hi List,
>> Does anyone know of a good 3rd party (free + OS) component that can do
>> sftp? I was using ftplib for ftp but it seems it can't do anything
>> with sftp.
>>
>> Also I do not want to use FtpWebRequest.
>>
>>
>> Thanks,
>> Tristan.
>
>


Re: 3rd party component for sftp

2013-09-09 Thread William Luu
I'm using SSH.NET, which is hosted on codeplex

—
Sent from Mailbox for iPhone

On Mon, Sep 9, 2013 at 4:57 PM, Tristan Reeves  wrote:

> Hi List,
> Does anyone know of a good 3rd party (free + OS) component that can do
> sftp? I was using ftplib for ftp but it seems it can't do anything
> with sftp.
> Also I do not want to use FtpWebRequest.
> Thanks,
> Tristan.

Re: 3rd party component for sftp

2013-09-09 Thread David Richards
oops, should have read the email properly, ignore my response :-)

David
On 09/09/2013 5:03 PM, "David Richards" 
wrote:

> I'm pretty sure FileZilla does and its free.
>
> David
>
> "If we can hit that bullseye, the rest of the dominoes
>  will fall like a house of cards... checkmate!"
>  -Zapp Brannigan, Futurama
>
>
> On 9 September 2013 16:57, Tristan Reeves  wrote:
>
>> Hi List,
>> Does anyone know of a good 3rd party (free + OS) component that can do
>> sftp? I was using ftplib for ftp but it seems it can't do anything
>> with sftp.
>>
>> Also I do not want to use FtpWebRequest.
>>
>>
>> Thanks,
>> Tristan.
>>
>
>


Re: 3rd party component for sftp

2013-09-09 Thread Shane Nall
I've used SharpSSH before… seems to work fine.

Cheers, 
Shane






On 09/09/2013, at 4:57 PM, Tristan Reeves  wrote:

> Hi List,
> Does anyone know of a good 3rd party (free + OS) component that can do
> sftp? I was using ftplib for ftp but it seems it can't do anything
> with sftp.
> 
> Also I do not want to use FtpWebRequest.
> 
> 
> Thanks,
> Tristan.



Re: 3rd party component for sftp

2013-09-09 Thread David Richards
I'm pretty sure FileZilla does and its free.

David

"If we can hit that bullseye, the rest of the dominoes
 will fall like a house of cards... checkmate!"
 -Zapp Brannigan, Futurama


On 9 September 2013 16:57, Tristan Reeves  wrote:

> Hi List,
> Does anyone know of a good 3rd party (free + OS) component that can do
> sftp? I was using ftplib for ftp but it seems it can't do anything
> with sftp.
>
> Also I do not want to use FtpWebRequest.
>
>
> Thanks,
> Tristan.
>