How do you do it? You obviously can't place a property in an interface exposed for COM interop, and the following doesn't work either:
public interface IWhatever
{
int nElements { get; }
}
-Bones
How do you expose C# properties as COM properties for a COM .dll project? You obviously can't place a property in an interface exposed for COM interop, and the following doesn't work either:
public interface IWhatever
{
int nElements { get; }
}
-Bones
I honestly don't know what -encoding binary does, but without it a simple little to big endian conversion doesn't reformat the numbers properly. Without it the number doesn't appear to be formatted properly on the Java side.
-Bones
It would make sense that Tcl has an underlying algorithm for converting every newline character into \r\n, thus going from a 4 byte segment of number to a 5 byte one. And I believe it does:
fconfigure -translation option
But I thought I had tinkered with this command before. I think more...
So, I assume what you're sending is 4 (1 byte each) characters."
It is my assumption as well. I've read this several times in some Tcl documentation regarding the f option for the binary commmand:
However, I went ahead with it because when I tested the value I received in Java; it was exactly...
Hmm, true...
From tcl to Java. I'm converting the number to a binary string first because, otherwise, tcl sends text. To send text it would be a byte for each character (in the case above that would be 11 bytes) whereas a float would be 4 bytes. When I send several numbers this might make a big...
Here is some of my Java code on the other end. I'm convinced that I did something stupid because 4 bytes is 4 bytes is 4...
ByteBuffer inputBffer = ByteBuffer.allocate(BUFFER_SIZE);
try {
isConnectionClosed = fromWavescopeChannel.read(inputBffer); // SocketChannel.read()
byte[] inputArray...
No, didn't do anything special. I tried changing the buffer size on both ends of the connection. On the receiving end when I changed it to 4 bytes my test message said:
:::4
:::1
instead of :::5!
Interesting idea though. I've been suspicious of those buffers adding stuff in to make themselves...
...$clientSocket -buffering none
fconfigure $clientSocket -buffersize 10
fconfigure $clientSocket -encoding binary
....
set testStr {-0.0879111}
set binstr [binary format f* $testStr]
puts -nonewline $clientSocket $binstr
and three other numbers that don't work: 0.134918, -0.134903, 0.0879...
One thing that is particularly bothersome to me is that negative numbers don't work right at all. The negative changes the value by one, but I thought only one bit should change independantly of the others? The binary on the Intel machine looks like this:
3 = 00000000 00000000 01000000...
I'm getting a message from a server which has an intel dual core processor and Windows. The message is supposed to be a bunch of binary single-precision floating point numbers. The size of the numbers appear to be the same as the Java float, but the format does not seem to be the same.
I used...
What I'm writing isn't going to be on the web at all: it is an application running on top of the Mozilla platform (like firefox). So anything (including C code) is fair game as long as I can put the string data from C/vb/whatever program into a javascript string without having to store it in a...
I am having issues with the Mozilla development platform and am getting tired of XPCOM.
To simplify this mess I want to place the path to the program installation directory in a JavaScript string. I know that JavaScript is not supposed to be able call the OS to get file information for security...
Through much thinkering and (unfortunately) little thinking, I found that the -fill option was doing its job -- it just didn't seem like it. The frame (.buffer) was invisible so stretching it to fill the area made no noticable difference. To cause the contents of the frame to fill up all the...
Add a d to the end of disable, and separate your commands (with a semicolon or newline). I am sort of new to Tcl too, but I think you have to have "write_file" declaired before defining the button. write_file won't need quotes when you call it.
# Define button
button .but -text "OK" -bg cyan...
So...
I have this cute little listbox packed at the bottom of my gui.
listbox .transferBuffer -height 6
pack .transferBuffer -side bottom -fill x
This worked great, until I had this crazy idea that adding a scrollbar would make the users happy.
frame .buffer
listbox .buffer.transferBuffer...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.