220 MILLION or 22 BILLION? Thats a lot of email addresses. Sort of like a list a spammer would have. Either way, its going to take a LONG time to process that lot.
Chinners
Posts
-
Multithreading -
ListboxPerhaps: .SubItems.Add(MyDataReader("A2").ToString) ?
-
Crazy Visual StudioHi All, Has anyone else in the group come across this issue before? In visual studio, I have created a service app using net.tcp. In my client app, I want to add a service reference, and have been using the "add service reference", however, I always get the following error message: Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:9999/GSS-POS/QueryDispatcher'. Could not connect to net.tcp://localhost:9999/GSS-POS/QueryDispatcher. The connection attempt lasted for a time span of 00:00:00. TCP error code 10045: The attempted operation is not supported for the type of object referenced. The attempted operation is not supported for the type of object referenced If the service is defined in the current solution, try building the solution and adding the service reference again. However, my colleague can add a service reference using the same instance of the server app that is running on my PC. Strangely enough, if I run the server as net.pipe or http, I can add a the reference. It is just the net.tcp that fails. I have tried the wcftestclient (in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\), and that finds the service, and svcutil will find the service, but complains about the server not supporting disco. So. I am stuck. I dont know what to do next. I have even reinstalled VS2008, & SP1, .NET 3.5SP1, and XP SP3... disabled the windows firewall... and none of these have worked. Has anyone else been here before, and got out of it? :confused: Thanks
-
Padding with NULL charIt looks like you have a unicode file, not an ascii one... I am sure, armed with this knowledge, google will help you out more than I can ;)
-
VB.NET PropertiesYou should look at the "New" sub. If you put code like the following, then everytime you create an instance the form, all parameters will be required: Public Sub New(Param as String) Blah Blah End Sub Does this work with forms? I think so.
-
VB6 Lost Code - DLL Help [modified]Just a thought - If the SQL was MS SQL2000, I am pretty sure you can use SQL Profiler to dump all sql queries run on the database, which would show the queries actually run by the DLL... Sql Profiler may be availiable for other DBEngines, but I have only used the one in SQL2000.
-
Am I being stupid? How to load an image from SQL and display it as a label background?Yes... I was being stupid...
bmi.BeginInit() **bmi.CacheOption = BitmapCacheOption.OnLoad** bmi.StreamSource = ms bmi.EndInit()
Setting the cacheoption to be onload sorts the problem out. I guess that the image was being created after the stream was closed (or something along those lines). :doh:
-
Am I being stupid? How to load an image from SQL and display it as a label background?Hi all, I'm using VB.net2008SP1, framework 3.51 All I want to do is get an image stored in a database and display it as a background on a label uielement in my grid (have I got the terminology right here?) The code I have is:
Using ms As New IO.MemoryStream With DirectCast(Data, Byte()) ms.Write(DirectCast(Data, Byte()), 0, .Length) End With ms.Seek(0, IO.SeekOrigin.Begin) Dim bmi As New BitmapImage bmi.BeginInit() bmi.StreamSource = ms bmi.EndInit() Dim ImageDrawing As New ImageBrush(bmi) iResult = ImageDrawing End Using
I then pass iResult to the background property of my label. The result is an empty box - no image, just the frame. If I were to load the image from a file using this code, it works.
Dim Bmp As New BitmapImage(New Uri(DR("BackgroundImage").ToString)) Dim BackBrush As New ImageBrush(Bmp) MyLabel.Background = BackBrush
Unfortunately, due to the licensing of the imagelibrary I am using, I cannot save these images in a temp folder or anything simple like that. I have tried googling, rummaging around code project, typing random commands, and have just tried a strong coffee, but I cant get it working. Can anyone help me????
-
StreamwriterHmm. Check out "DTString". When run it could be set to: C:\ETCLINK\2001-01-01 11:11 This isnt a valid filename... The colon symbol ( : ) is a bad char.
-
No one can kill Windows service processIf this were possible, then surely that would be the tact of virus writers??? Try reading http://blogs.msdn.com/oldnewthing/archive/2004/07/22/191123.aspx[^] for a detailed, but simple explanation from a Microsoft developer. [Edit... a bit more reading reveals this...] It is possible by a kernel hack (or rootkit) verrrrrry bad... http://www.rootkit.com/newsread.php?newsid=139[^]
modified on Thursday, August 28, 2008 10:33 AM
-
Extra line breaks while uploading the file on ftp serverThis sounds like it could be a problem with the editor you are using. Linux (and most unix like os) use LF (linefeed, chr(&h0a)) to signify a new line. Windows uses CRLF (Carriage Return+Line Feed, chr(&h0d)+chr(&h0a)) I suspect that some editor you have used has converted from the Linux newline format to the windows newline format. If you could do a hex dump of the file at all stages, and check for the line breaks you should be able to see where this is happening. (oh, and CuteFTP is also set to use Binary for the specific file format you are using isnt it? ;) )
-
String concat slow despite StringbuilderI'm wondering why the sleep command is there? If you are just building a string, then do you need the sleep? Also, reporting progress - I would try cut that down a lot! Perhaps using: if (i mod 255)=0 then worker.ReportProgress(i) end if This will report progress a lot less often, so fewer thread switches etc.
-
math.round function has a bug?You could try using the DECIMAL type instead of DOUBLE. It is much more accurate, however, a bit slower in use. This should get rid of most of these errors as explained by Guffa
-
How to add items to the beginning of an array"The only advantage VB has over some other languages is that it's built into the VB runtime" Not sure how to quote, but the above says what I mean. You know, I know, advanced programmers know that behind the scenes, a lot is going on (although, if the compiler has any sense it will be reduced to a "REP MOVSD" command in the end, which is very quick in small data situations). "It's mearly creating a new one using a very expensive process" The point I am trying to make is that in VB, there are commands that appear to resize an array. How this is done, to an average user, doesn't matter. I mean, if we were all looking for the "least expensive" ways of doing stuff, we would do most stuff in raw assembler. Sure, it will take more time to develop, but code costs running times would be reduced. I am not meaning to start any arguments here, all I am saying is that the dimentions of an array can be changed. There are many more, optimal ways of achiving the same thing... but increasing an array using "redim" is cheaper, in terms of man hours, than developing a proper linked list. VB does hide all the inefficiences of the procedure, but to the end user, the array has been resized
-
How to add items to the beginning of an arrayYep. That is how VB resizes an array. I never said it was efficient. I was responding to the statement saying you can’t resize an array. The original statement inferred it was a manual job to copy data from one array to another. However, from a runtime point of view, the array has been resized. It is not be the most efficient thing to do (well, it may be more efficient on small arrays, but then I am possibly overcomplicating things :)), But the end result of a redim will be to have changed the upper bound of the array. I would never use this sort of "feature" in a loop with lots of elements in the array, but for an occasional hit, especially if the rest of the app written is geared towards arrays, then I would say it is appropriate. I did, however suggest that a list would be more efficient... It was just the word "CANT" I didnt like to see :)
-
Reading binary registry key returns "nothing"I was hoping not to have to do that. Oh hum. Thanks for the reply - at least it puts my mind at rest that I have not gone crazy... (I am just slowly on my way to being there! :) ) Thanks.
-
Reading binary registry key returns "nothing"Hi, I am trying to read some system config from the registry. The config info is stored as a binary value of type "REG_RESOURCE_LIST". If I try read this value with o=registrykey.getvalue(), (with o being an object), o will be set to nothing. I can read a string key from the same group using the same command, and it works. It just always seems to fail on binary keys. The "GetValueKind" of this key type returns Unknown. Any idea what I am doing wrong? I've been googling for what seems like all morning, and I cant find a solution. [Modified to sort out a typo]
-
How to add items to the beginning of an arrayJust a quick note - an array can be resized :o) dim Arr(10) as string redim Arr(100) (works, clearing array first) redim preserve arr(100) works, preserving data... However, I agree a list would be a better choice. You can always dump it back to an array using the .ToArray function of the variable: dim L as list(of string) dim Arr() as string=l.ToArray. Mind you, I guess this would take quite a hefty performance hit if doing it too often.
-
Detecting the Parallel port using VB.NET2003 Window Form ApplicationIt is possible to detect if a device is plugged into the LPT port, but not natively though VB.NET. I have been doing something similar using a free DLL called "IO.DLL", which gives you direct access to the ports required to do what you are wanting. http://www.geekhideout.com/iodll.shtml[^] To see if the printer is availiable, you need to query port &h379 (LPT1 Control Port), and I think it is the second topmost bit (&h40) that says if the printer is attached and ready or not. I cant be much more help than this I'm afraid, but it should have some real good pointers to get you going.
modified on Friday, July 11, 2008 5:31 AM
-
CRC Calculation [modified]I want to downvote you just to see what the treat is! Anyway, looking at what your result is, you are looking at a CRC16 value. The code here: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=12638&lngWId=1[^] can calculate CRC32 or CRC16 values. I havent used it, instead I struggled with the C implementation to make a .NET specific CRC32 (which isnt much use to you!) Hope the link helps?