|
hi
i am using CR10, VB.NET, SQL
i have a table in SQL that has one of its fields as the address of a JPG picture. i want to use this address to display a picture in crystal report.
any ideas?????
thanks in advance
|
|
|
|
|
There are four guys trying to get home at night and in order to do so, they MUST cross a bridge. It's very dark and there is only one torch available. The bridge can ONLY support "TWO" person at a time. Now, a bomb has been set on the bridge which will explode in 18 mins. Due to the fact that each person's travelling speeds are different, therefore some will obviously take longer to cross than others.
The time that each person takes are as followed:
A = 1 min
B = 2 min
C = 5 min
D = 10 min
Torch = 1 Qty
Here's how it works: If D & A goes first, it'll require 10 mins for them to cross the bridge together. By the time A gets back with the torch to B&C...11 mins will be passed already.
The total time required is : 17 mins
the solution to it is:
A and B first - 2 minutes (max 2 )
A runs back with torch = 3 minutes
C and D Next = 13 minutes ( max 10 )
B comes back with the torch = 15 minutes ( max 5 )
A and B again = 17 minutes
Can anyone tell me the code to this problem in vb or vb.net please please. many many thanks in advance.
|
|
|
|
|
|
babur khan wrote:
Can anyone tell me the code to this problem in vb or vb.net please please. many many thanks in advance.
Like Colin said, a candidate for a genetic algorithm. Can we give you the code? Hell No! This is classwork! Get together with someone from class to hash this out. We can help with questions about problems you're having with code, but in no way will anyone here write the code for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
HAI
I want to create a slide show program which has to show tga files as slide show presentation with full screen resolution can any body help me in the following
Which Control should i use image is not working because that will not support tga picture format....
Kindly help me....
|
|
|
|
|
|
hello,
i am trying to write a program that hooks an existing socket(opened by another application),
reads the data that the app is sending/receiving
and sends my own data through that socket.
if you dont know an excact solution, can you please point me to a tutorial about hooking sockets?
thanks,
GX
|
|
|
|
|
Simple, you don't. You can't hook a socket opened by another application. Just think of the security risks and you'll understand why.
Now, you CAN intercept the network traffic the socket rides on. This would require writting something akin to a packet sniffer. If your serious about this, then I suggest you can get an idea of what this involves by picking up the book "Network Programming in .NET". Try Amazon...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
then how do programs like WPE (winsock Packet Editor) and NetXRay work?
i have read a few tutorials on sniffers but that's not what i need. i need to be able to send data through that socket too.
thanks for the reply!
|
|
|
|
|
Those are also packet sniffers. They don't hook into an open port, but actually intercept ALL traffic going in and out of the NIC. Filters allow you to see the traffic on specific ports. This is what's probably making you think you can hook a port. If you can intercept all the traffic, you can also stop any traffic you want, alter any traffic you want, and create any traffic you want. Think of how a Firewall works.
Better yet, you a complete understanding of how this stuff works, pick up the book. Chapter 13 covers exactly what you're looking for. But I'd read the whole thing first.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thank you very much for making this clear for me!
i will read that book.
|
|
|
|
|
Hello,
Using VB.NET, I have developed a code which runs on PPC and XP.
For the moment I have two projects, one for Windows Application and one for Smart Device Application, and when I do a modification in one project, I copy and paste the code into the other project.
My question is: Is there a means to have only one single common file holding the code and which can be "loaded" in into one of both projects?
LeMat
|
|
|
|
|
I have a binary file (3D object file .LWO format) and I am having terrible joy getting the information out that i require.
The file consisits of several Chunks which relate to different 3D data. But for the moment I am interested in only 1 section known as the PNTS chunk. The file format viewed in a hex editor is as follows:
<br />
464F524D 0000017E 4C574F32 54414753 FORM...~LWO2TAGS<br />
0000000E 446B426C 75004465 6661756C ....DkBlu.Defaul<br />
74004C41 59520000 00120000 00000000 t.LAYR..........<br />
00000000 00000000 00000000 504E5453 ............PNTS<br />
00000060 C0000000 C0000000 C0000000 ...`À...À...À...<br />
40000000 C0000000 C0000000 40000000 @...À...À...@...<br />
C0000000 40000000 C0000000 C0000000 À...@...À...À...<br />
40000000 C0000000 40000000 C0000000 @...À...@...À...<br />
40000000 40000000 C0000000 40000000 @...@...À...@...<br />
40000000 40000000 C0000000 40000000 @...@...À...@...<br />
40000000 42424F58 00000018 C0000000 @...BBOX....À...<br />
C0000000 C0000000 40000000 40000000 À...À...@...@...<br />
40000000 504F4C53 00000040 46414345 @...POLS...@FACE<br />
00040000 00010002 00030004 00000004 ................<br />
00050001 00040001 00050006 00020004 ................<br />
00030002 00060007 00040000 00030007 ................<br />
00040004 00040007 00060005 50544147 ............PTAG<br />
0000001C 434F4C52 00000000 00010000 ....COLR........<br />
00020000 00030000 00040000 00050000 ................<br />
50544147 0000001C 53555246 00000001 PTAG....SURF....<br />
00010001 00020001 00030001 00040001 ................<br />
00050001 53555246 0000002A 44656661 ....SURF...*Defa<br />
756C7400 0000434F 4C52000E 3F48C8C9 ult...COLR..?HÈÉ<br />
3F48C8C9 3F48C8C9 00004449 46460006 ?HÈÉ?HÈÉ..DIFF..<br />
3F800000 0000 ?€.... <br />
The data I require is the list of points in the PNTS chunk, The first 4 bytes that follow the PNTS header text are the length of the chunk (so I am lead to believe). Following that each co-ordinate is made of 12 bytes, 3 axis create a co-ordinate X,Y,Z which are 4 bytes each. In this particular 3D model i chose a real basic cube 4m each side. so there should be 8 points to build the object. 8*12 = 96 which should be the same as the length set by the 4 bytes following the PNTS header. Whichever way i try to read the file the most I am able to get is the first Y co-ordinate to the end, therefore im always missing the first X co-ord of the first point, I have tried moving my current file positions to get this value but to no avail. Instead of pasting here every way i have tried to read this file, is there anyone here who could suggest the best way in vb.net to get this information?
I need to seek the PNTS Header, get the length of the PNTS chunk using the next 4 bytes, then read in the VB SINGLE vlaues to hold each x,y,z co-ordinates. The points are stored in IEEE Floating Point 32bit Hexadecimal. I can read in the HEX no problem but again I am not qualified enough to do the mathmatical conversion required to convert to decimal.
The points should be as follows:
-2: -2 : -2
2 : -2 : -2
2 : -2 : 2
-2: -2 : 2
-2: 2 : -2
2 : 2 : -2
2 : 2 : 2
-2: 2 : 2
For some reason when i read from the start of this chunk i always get -3.5 for the first co-ord when using the binaryreader object in vb.net
I would appreciate any help or pointers anyone can give me
Thanks in advance
Stewart
|
|
|
|
|
I would like to begin to learn how to make my own custom controls. However, I have absolutly no worthwhile knowledge on how to do this. Could someone point me to an article, explaining simply, but throughly the process of making my own controls?
Thanks -
Wayne P.
|
|
|
|
|
Try to check the information from here[^] as the initialize concept. For more information, try to search google.com[^] or MSDN website.[^].
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
hi
How can I work with DAO databases and recordsets in VB.NET.please send me an example code.
thank you so much
|
|
|
|
|
Sorry man, as far as I know, DAO is not present any more in VB.NET. If you want to work with VB.NET try to use ADO.NET. Try to check the information from here[^] about using ado.net with vb.net.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
hey,
how do u do the progress bar exactly?
i would like to see the progress of saving a file.
i am not showing/using the "savefiledialog"
-thanks
|
|
|
|
|
WartHog000 wrote:
how do u do the progress bar exactly?
i would like to see the progress of saving a file.
What do you mean by this question? You mean how to use the progress bar (like copy the file in windows explorer)? If so, try to check the information from here.[^]
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
progress bar to see the progress of the saving file, i never did a progress bar before, but there is a first for most things.
i dunno if thats clearer?
|
|
|
|
|
I have an ms access db with many 'views' (queries) within the database that I want to use with ADO.NET but it seems I'm having to reinvent the wheel to use them the way i want.
Simplified example:
Lets say i have a query within Access
"Select FirstName, LastName, FirstName + ' ' + LastName as FullName FROM Customers"
Now I use that in a DataTable bound to a DataGrid -- When i enter (or edit) the FirstName and LastName and move to the next row it doesn't update the 'calculated field' FullName.
I know I can make a 'Calculated Column' and make it work but im trying not to have to write so much dang code and use what already works. Am I just missing somthing obvious? Is there a way to tell ADO that the field should calculate 'LIVE' using the sql, or do I have to insert into code every calculation done with the data as a calculated column?
|
|
|
|
|
OICU812 wrote:
When i enter (or edit) the FirstName and LastName and move to the next row it doesn't update the 'calculated field' FullName.
That's because it's not a calculated column. It's a 3rd column, called FullName, in a table returned by the Jet Engine, which did the "calculation." In order to see the changes with the code you've written, you'll have to write the FirstName and LastName fields back to the database and then refresh the dataset, thereby returning a new FullName column.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for replying. Thats what I thought I would have to do. I just wanted to be sure there wasn't something more efficent that did that automatically.
|
|
|
|
|
I have written a routine to manipulate a large bitmap (actually it is a raster image of a map).
After loading the bitmap into memory I have used DrawImage() to zoom in and out and scroll the map in a picturebox.
However, the quality of the same bitmap in the picturebox is OK, but no where nere as good as the image displayed in the windows Picture and Fax viewer. Can anyone explain why? Does the windows viewer use GDI+ or perhaps DirectX. Is there a way of tweaking drawimage to get better results.
thanks in anticipation.
regards,
MP
|
|
|
|
|
Please note that I am a beginner VB.net programmer. Any help you can offer would be appreciated.
I am trying to sort a datatable loaded from an SQL db table. There are 2 sort keys, both ascending, and 9 other columns. The primary key, "PurchaseOrderID", can contain nulls, although it is usually a string of format "999999_999". After loading the ds, I use the following code to try to sort the records:
Dim myDataView As DataView
myDataView = ds.Tables("tPIA").DefaultView
myDataView.Sort = ("PurchaseOrderID, TimeNeeded")
The problem is I need the rows with null values in PurchaseOrderID to all sort to the high end. I know one can write a custom comparer to modify sort order but I haven't seen the syntax of how one can use a comparer with a dataview.
Can this be done? If so, what's the syntax?
If not, do you have any other suggestions? I originally loaded the SQL table into a Collection but there didn't seem to be a sort method available there. So I loaded the Collection into an array and wrote a custom comparer, but then I couldn't seem to sort on the 2 fields, as required.
Thank you,
mif
mif
|
|
|
|