|
SELECT MAX(order_id) FROM buffet_list
and then you do the update, OR
UPDATE buffet_list SET buffet = 2500 WHERE order_id IN( SELECT MAX(order_id) FROM buffet_list )
or some other flavour, but you get the idea.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
It would be very useful to see some code for how to put an
Ethernet card into promiscusous mode in a Windows environment
since M$ figures if you don't buy a Server OS, you don't need
to see your local packet traffic. I know this is possible,
I just don't have even an idea of how it is accomplished.
|
|
|
|
|
You want WinPcap - see the offical website:
http://netgroup-serv.polito.it/winpcap/
From the website:
"WinPcap is an architecture for packet capture and network analysis for the Win32 platforms. It includes a kernel-level packet filter, a low-level dynamic link library (packet.dll), and a high-level and system-independent library (wpcap.dll, based on libpcap version 0.5).
The packet filter is a device driver that adds to Windows 95, Windows 98, Windows ME, Windows NT and Windows 2000 the ability to capture and send raw data from a network card, with the possibility to filter and store in a buffer the captured packets.
Packet.dll is an API that can be used to access directly the functions of the packet driver, offering a programming interface independent from the Microsoft OS.
Wpcap.dll exports a set of high level capture primitives that are compatible with libpcap, the famous UNIX capture library. These functions allow to capture packets in a way independent from the underlying network hardware and operating system.
WinPcap is released under a BSD-style licence."
|
|
|
|
|
i`ve just posted the ultimate winsock sniffer ! that`s all you ever wanted !
//rate me or hate me
I am the mighty keeper of the book on knowledge . Contact me to get your copy .
|
|
|
|
|
My company uses People Scheduler (an obsolete product) for employee scheduling. They can't upgrade it, and it won't run on anything newer than Win98. So I've been playing with writing my own replacement.
I've been searching for a control that simplifies employee scheduling; most Time & Attendance programs use such a beast to graphically build and adjust schedules. In such a control, a horizontal bar is movable and resizeable using the mouse, or by changing a tabular time entry. Within it there is a region in a contrasting color that behaves similarly, and represents a lunck break. I haven't seen anything resembling one yet - any ideas?
|
|
|
|
|
|
|
hi there
I used access2000 to create my database,
and it has some field(text,memo...) that contains other
languages, when i connect to database with ado (in vb or vc)
it fills "?" mark instead of any character .
I can't understand what is my problem!!!!!
|
|
|
|
|
Unicode is used in MS apps now by default (at least I think thats true of all of them). So, provided your Windows language extentions are present displaying other languages in Word/Excell/Access is automatic, except in code. Different functions are used for Unicode in some situations,
for example
Chr( charcode ) char code is actually a 'long' rather than a 'byte' or 'short' as you might expect. But Chr will only work within the normal ASCII range.
ChrW function returns a String containing the Unicode character except on platforms where Unicode is not supported, in which case, the behavior is identical to the Chr function.
See StrConv functions for help with unicode within your code.
Also remember that if you have written a string to a field through your code, you will of needed to treat it as Unicode. As I said much of this is done for you, but you have to be aware of functions that do not handle Wide character formats.
We do it for the joy of seeing the users struggle.
|
|
|
|
|
Hi,
I wants to use more than one base classes in a single project. For example , is i wants to make my application web based then the base class should be CHtmlView. Other than this fecility I want the other fecilites given by some other base class , say CView. How can i achieve this?
|
|
|
|
|
CHtmlView inherits form CView so you can access CView member functions from a class which inherits from CView.
Or do you mean you want two kinds of views, one HTML and one other kind?
Michael
|
|
|
|
|
I think, you mean you want two kinds of class, example one CHTMLView and one CMenu, you can inherit for the two class,
do you know:
CYouClass:CHtmlView, CMenu
{
}
nothing but everything
|
|
|
|
|
I have inhereted a PP application written in VC++6. It has two slides -- slide1 and slide2. At runtime, I may need to add additional sets of these two slides, in the same order as the original two -- something like slide1a, slide2a, slide1b, and slide2b. When I use the Slides collection Duplicate() method, they always come out in this order: slide1a, slide1b, slide2a and slide2b. How can I rearrange the slides in the order I want? I've seen methods that return the slide number but no function to set the slide number.
|
|
|
|
|
where can i find the c/c++ souece code of notepad.exe.detail,please!thanks!
qdash
|
|
|
|
|
Visual C++ and the platform SDK both used to come with notepad/wordpad type application source. Try searching on http:\\msdn.microsoft.com.
Michael
|
|
|
|
|
It is called MULTIPAD, and is supposed to be the MDI version of Notepad.
Regards,
Gennady
|
|
|
|
|
The MFC source for wordpad is also on MSDN.
---
"Transmit in all known frequencies and in all known langauges, including Welsh."
|
|
|
|
|
Hi everyone,i encounter one problem in asp programming.Anyone know the log-out source code rather than using session.abandon.
|
|
|
|
|
This is something I could write, buit at the moment I'm short of tie and it seems someone must have done one by now.
I'd like to do have a dialog with a generic properties list - you know, a two-column CListCtrl that displays property names in one column and values in another, as below:
Name Jim
Height 5'11"
Age 42
Friendly Yes
Hat Off
Shoes On
Again, not too hard, but there are enough details involved in doing it right that I don't feel I can justify the time now. Has anyone done one of these?
|
|
|
|
|
I want to create a programm that would read data from a file and will put each distinct item in a hashtable,counting how often it appears.I want to count first how often single characters or numbers appear,then how often the combination of two characters appear,three characters etc.
More specifically...
How can I use hashtable to count the appearances of some items in a file.For example how often is the letter a used,letter b etc.I am using hashtable.class in java.util.* ,but what I can not do is associate each letter that I am reading with a place in the hashtable.
For example the following code creates a hashtable called numbers with the default capacity and load factor.Then one-two-three are used as the keys and 1-2-3 as the values.
Hashtable numbers = new Hashtable();
numbers.put("one", new Integer(1));
numbers.put("two", new Integer(2));
numbers.put("three", new Integer(3));
I want my hashtable to read a file one character or one number at a time and count their appearances.
The data would most probably be in the form
abc
abcd
a
abce
ecf
e
fg
or
123
12346
12
348
7
2
3456
52
364725
Thanks a lot for suggestions to my previous question as well as to future ones.
jkouris@hotmail.com
|
|
|
|
|
const f = "C:\...\file.txt"
set fso = CreateObject("Scripting.FileSystemObject")
redim count(255)
set ts = fso.OpenTextFile(f)
do while not ts.AtEndOfStream
c = asc(ts.Read(1))
count(c) = count(c) + 1
loop
ts.close
set ts = fso.CreateTextFile(f & ".count")
ts.WriteLine "asc" & vbTab & "chr" & vbTab & "count"
for i = 0 to 255
if count(i) > 0 then ts.WriteLine i & vbTab & chr(i) & vbTab & count(i)
next
ts.close
input: your mail
output:
asc chr count
10 (LF) 37
13 (CR) 37
32 176
34 " 6
40 ( 7
41 ) 7
42 * 1
44 , 8
45 - 4
46 . 19
49 1 5
50 2 8
51 3 7
52 4 4
53 5 3
54 6 3
55 7 2
56 8 1
59 ; 4
61 = 1
64 @ 1
70 F 2
72 H 3
73 I 10
77 M 1
84 T 3
97 a 102
98 b 24
99 c 39
100 d 20
101 e 115
102 f 20
103 g 12
104 h 47
105 i 38
106 j 2
107 k 3
108 l 38
109 m 25
110 n 57
111 o 61
112 p 22
113 q 1
114 r 53
115 s 52
116 t 94
117 u 31
118 v 3
119 w 23
120 x 2
121 y 6
|
|
|
|
|
as i m doing a food ordering programme for cisco ip phone 7960.i have difficulty in sending the data into the correct area of the table i wan.As i m not sending the whole row of data together,i m sending it column by column.but through this method,the data i sent is not of the same row.for each column,the data will in each column will be one row below the previous one,which is not what i wanted.wat should i do to be able to send the data column by column n they will still stay at the same row???
aaa
|
|
|
|
|
Michelle,
Can you give some more detail on what method you are trying to use? I haven't seen the SDK for the Cisco IP Phone 7960 yet.
Cheers!
Colin
|
|
|
|
|
You have to account for your data being sorted differently in each place.
So, your orriginal table may look like this,
ItemID FoodItem QtyStock QtyChanged
100 Eggs 10 Y
101 Cheese 25 N
102 Fish 5 Y
You only want to send the new stock figures rather than the whole table and then only information that has changed, but you need the ItemID sent too so that your receiving program knows which data Item is being changed.
So you send 100,10;102,5
A point with synchronising multiple data sources. If the remote system is purely a view then you do not need to take account of time. But, if your cisco ip (or what ever the remote device is) can also change the data then you need a synchronising policy.
This is nearly always based on time. So the simple table above would be something like,
ItemID FoodItem QtyStock QtyChanged TimeChanged
100 Eggs 10 Y 20/10/01 2:15:02
101 Cheese 25 N 21/10/01 3:35:11
102 Fish 5 Y 20/10/01 2:00:00
Now, when you synchronise your data you need three fields,
send 100,10,20/10/01 2:15:02;102,5,20/10/01 2:00:00;
Receive {any changed data from the remote device}
I just added this part to sort of spur you on. Sorry if I'm rambling. People often accuse me of rambling, I don't see it myself.........
We do it for the joy of seeing the users struggle.
|
|
|
|
|