Click here to Skip to main content
15,072,504 members

Comments by Fredrik Bornander (Top 200 by date)

Fredrik Bornander 10-Jul-15 7:42am View
Fredrik Bornander 18-Jun-15 2:05am View
I think there is more doubt, and I think you can ask us.
Fredrik Bornander 12-Jun-15 17:01pm View
Glad I could help.
Fredrik Bornander 10-Jun-15 2:23am View
What does your draw method and loadTextures method look like?

Unless you specifically tell openGL to render the shapes using just color, it'll render them with what ever settings were applied and in your case it looks like you're binding the texture and then leaving it bound for all shapes.
Fredrik Bornander 20-May-15 7:08am View
It would have to be a dynamic_cast for it to throw an exception.
Fredrik Bornander 20-May-15 5:04am View
Open the Error Log window and see what error was reported at the last crash.
Fredrik Bornander 19-May-15 3:07am View
The code looks like it should work, are you saying it's not printing "Tie Game" if the board is filled up without a winner found?

One thing you could try to change is
Array [0] == Array[otherPlayer]
You shouldn't really be comparing strings like that, use the .equals method instead.
Fredrik Bornander 18-May-15 6:45am View
If you have a scenario where the content view changes frequently and is heavy to create then, Yes, I would consider a different approach. But in this case I think the use-case is simpler so a straight forward approach like this is most likely Ok.
Fredrik Bornander 31-Mar-15 4:28am View
Probably not, in most cases you do not need to worry about this. Just re-throw using throw; and you'll be fine.

I managed to find the extract from Richter's book;
Fredrik Bornander 31-Mar-15 4:11am View
It does, but only as far as the CLR is concerned. The exceptions in the CLR (on Windows) are implemented using SEH (Structured Exception Handling), and it's that that's creating a new stack frame.
If you use it from within the CLR, it works as you thought, if you need to inspect a crash dump it works the other way.
Fredrik Bornander 1-Mar-15 7:38am View
Glad I could help.
Fredrik Bornander 27-Feb-15 10:32am View
Cool. Glad I could help.
Fredrik Bornander 24-Feb-15 9:54am View
How are you getting the content out of the file and into the byte array you pass to DeSerailise?
Fredrik Bornander 24-Feb-15 9:33am View
How are you serializing it?
Fredrik Bornander 6-Feb-15 5:41am View
Can you show any code?
Fredrik Bornander 5-Feb-15 5:07am View
Are you applying SAT before you do the line-line intersection checks?
Fredrik Bornander 4-Feb-15 17:21pm View
Sorry I was too lazy putting that together. In addition to translate the cylinder along the distance between point a and b, you also need to translate it to point a to make sure it's in the correct place.
I've fixed that for you in this project; (10.9 KB)

Apologies for the mistake.
Fredrik Bornander 3-Feb-15 10:45am View
Can't figure out where that went wrong. But lets try this instead; (10.8 KB). This is a WPF app that replicates what you're trying to achieve. Look at that code, all in the MainWindow essentially and see if that helps. If you set up the WPF app to have the same input in terms of where the red line start and stops you should be able step through both and figure out where your values go wrong.

Really hope we'll get it right this time :)
Fredrik Bornander 2-Feb-15 10:08am View
Glad I could help.
On a side note, if you're trying to do a win32 game pretty much from scratch (as your code suggests a little bit), check this out;
Fredrik Bornander 31-Jan-15 4:19am View
Can you show me a image of what the result was, maybe I can deduce what went wrong from that.
Fredrik Bornander 30-Jan-15 7:59am View
I can't read that code and tell you what's wrong, I don't know how all the used methods work.
Fredrik Bornander 29-Jan-15 7:13am View
Glad I could help.
Fredrik Bornander 28-Jan-15 16:43pm View
If you take a vector that is the direction of the red line, in your code x, y, z, and call it Vr, then take the vector that is the direction the cylinder extends in before being rotated to match the red line (lets say [0,1,0], or whatever your CreateCylinder call yields), call that Vc.
I think that if you then get the angle between those vectors, call it A, then you'll want to rotate the cylinder A radians around the axis that is the cross product of Vr and Vc.
Fredrik Bornander 23-Jan-15 8:02am View
And you've verified that there is indeed a file here;
/home/rega/NetBeansProjects/Packet/dist/./conf/logger.xml ?
Fredrik Bornander 23-Jan-15 5:40am View
In what directory are you running this? The path is relative to the directory you run it in, not the directory where the .jar is located.
Fredrik Bornander 15-Jan-15 3:24am View
How long after you published did you try to update?
Sometimes it takes a while for the updates to appear in the Google Play store.
Fredrik Bornander 8-Jan-15 7:51am View
Glad I could help.
Fredrik Bornander 8-Jan-15 7:51am View
Glad I could help.
Fredrik Bornander 17-Dec-14 7:46am View
Glad I could help.
Fredrik Bornander 16-Dec-14 2:23am View
Are you doing network operations on the main thread?
android.os.NetworkOnMainThreadException seems to indicate that and you can't do that. Do all your network calls on a separate thread.
Fredrik Bornander 9-Dec-14 9:49am View
It doesn't matter that much if it's a service or a "normal" activity, you listen to broadcast events the same way, more or less.

If you want someone to do this for you I think you're better off here;

This Q/A forum is for questions, not for getting whole applications written.
Fredrik Bornander 9-Dec-14 5:31am View
Are you adding the "x-microsoftajax" header to your HttpWebRequest?
Fredrik Bornander 8-Dec-14 8:30am View
Have you forgotten the break statement?
Fredrik Bornander 8-Dec-14 7:09am View
Is there a particular reason for trying to do this from code rather than just use the IlMerge.exe command line?
Fredrik Bornander 5-Dec-14 9:36am View
I updated the answer with a flip for 32bit.
Fredrik Bornander 5-Dec-14 9:10am View
Then flip the lower 16 bits with the upper 16 bits as well, the process is the same.
Fredrik Bornander 5-Dec-14 9:02am View
BitConverter.ToString will dump the values in hexadecimal format.
Fredrik Bornander 2-Dec-14 9:59am View
Are you doing anything silly with pointers and accidentally overwrite the vtable for some of your objects? Do you have any potential buffer-overruns?
Fredrik Bornander 24-Nov-14 5:48am View
Added something that will calculate that.
Fredrik Bornander 21-Nov-14 4:41am View
Glad I could help.
Fredrik Bornander 21-Nov-14 4:30am View
Pretty much, yeah. EF will create a proxy and it can only override the virtual properties (obviously), and to to lazy loading EF needs to intercept the call to the getter/setter and provide the lazy implementation instead of the standard property implementation.
Fredrik Bornander 21-Nov-14 4:27am View
Are you sure you have allowed access to the reader? I think the GetDefaultAsync will return null rather than chucking an exception on access rights issues.
Fredrik Bornander 19-Nov-14 11:02am View
Yes. my_array is a dynamically allocated array.
Fredrik Bornander 19-Nov-14 9:56am View
My code does that.
The array will be filled with the number from the second line, the my_array int-array holds as many numbers from the second line as is specified on the first line. And the count variable holds the count of numbers.
Fredrik Bornander 19-Nov-14 9:31am View
Oh, ok, I thought the file was line based, it's space separated as well. I'll update the code.
Fredrik Bornander 19-Nov-14 8:06am View
What does your file look like?
How does it crash?
Are you debugging this?
Fredrik Bornander 19-Nov-14 7:34am View
Did you give the full path to your file?
Has the file got lines that aren't numbers in it?
Fredrik Bornander 19-Nov-14 7:19am View
Change the for loops from
for(int i = 0; i < length; ++i)
for(i = 0; i < length; ++i)
and declare int i; at the top of the function where the loop is.

I updated the sample code to account for this.
Fredrik Bornander 19-Nov-14 7:17am View
You pass the filename in as a command line argument, if you don't want to do that just change
fopen(argv[1], "rb")
fopen("in.txt", "rb").

It's true that you don't need to read the entire file as you only need to read the number of lines specified in the first line, but unless the file has a lot more lines after the last number, that's not going to be an issue. Reading the file is fast.
Fredrik Bornander 7-Nov-14 8:27am View
How can it not be considered valid? He did Capitalize Every Word, that's the best way of emphasizing validity.
Fredrik Bornander 30-Oct-14 13:46pm View
Glad I could help.
Fredrik Bornander 27-Oct-14 5:53am View
Is it the remove call that fails? Have you tried checking the ret variable for false?
Fredrik Bornander 20-Oct-14 8:45am View
True. But that's not what's causing him to read the input four times instead of three.
Fredrik Bornander 17-Oct-14 8:05am View
No. And there's no point, just take your float value and multiply it by 100 (provided it's clamped to 0<=value<=1).
Fredrik Bornander 17-Oct-14 4:22am View
Your ReportProgress should be set to m, I updated my answer.
Fredrik Bornander 17-Oct-14 4:20am View
The highest that code can return is (20/21)*100=95.
What's the min/max value of the progressbar?
Fredrik Bornander 16-Oct-14 6:44am View
WinForms or WPF or something else?
Fredrik Bornander 14-Oct-14 4:44am View
I'd expect C to give you little over the unsafe version. What you can do though is optimize the unsafe version with quick bail-outs like Bill's suggestion about length comparisons.
Fredrik Bornander 13-Oct-14 9:10am View
If it doesn't need to be thread-safe, you can extract the copy buffer to a static member (initialize to some size guaranteed to be longer than or equal to the length of your longest from string. And that will run about 10% faster than the version allocating copy on every call.
Fredrik Bornander 13-Oct-14 8:27am View
Was it faster for you?
Fredrik Bornander 13-Oct-14 8:25am View
Actually I think it's next to impossible to optimize this without knowing more about it. The performance of a method will likely be different depending on the length of the strings and so on.
Fredrik Bornander 13-Oct-14 8:10am View
Because doing it another way is faster?
Fredrik Bornander 13-Oct-14 7:55am View
Cheers. I just ran the figures; on my box I get 70% faster going unsafe with pointers and about twice as slow going with linq. I would still probably go with the linq method you suggested unless proven beyond a doubt that this method is the biggest performance hog. Pointers will come back to bite your a** I think.
Fredrik Bornander 13-Oct-14 6:41am View
Yeah, a spec on what to achieve rather than just a view of OPs current implementation would have been good.
Fredrik Bornander 13-Oct-14 6:30am View
That won't yield the same result as his implementation, though.
IsStringMadeOf("A", "AA") will return true whereas IsCharMatch would be false for those parameters.
Fredrik Bornander 12-Oct-14 9:47am View
How many dimensions do you need to be able to process?
Fredrik Bornander 8-Oct-14 7:05am View
I answered your other question with an example on how to use AsyncTask.
Fredrik Bornander 25-Sep-14 4:19am View
And what does your data_line class look like now?
Fredrik Bornander 25-Sep-14 3:48am View
What error are you getting?
Fredrik Bornander 25-Sep-14 3:24am View
What error are you getting?
Fredrik Bornander 24-Sep-14 8:03am View
Sorry about that, I forgot the initial 0: in the format string.
Fredrik Bornander 24-Sep-14 3:29am View
I don't think that's possible to do.
Fredrik Bornander 24-Sep-14 3:07am View
Do you mean that you want some code that given a string such as checks if that is indeed a valid email?
Fredrik Bornander 22-Sep-14 11:48am View
An uncaught exception in a thread will not hang/freeze your application, it will kill the thread and likely the application as well.

If you ask me, "current thread" is only relevant from within that thread. It makes no sense for an outside observer.
Consider a deadlock where you have two treads A and B waiting for each other, which of these is the current one?

I think you're better off looking into hang and crash dumps, and how to generate them. But that's just my $0.02.
Fredrik Bornander 22-Sep-14 10:38am View
What do you mean by "current thread" in this context?
If the E1 process has several active threads, which one would you consider to be the current one?
Fredrik Bornander 22-Sep-14 3:39am View
Log is a class, e is a static method on Log, he's passing null as the second parameter and e does not like that.
Fredrik Bornander 18-Sep-14 11:35am View
Glad I could help.
Fredrik Bornander 16-Sep-14 9:05am View
Sweet, glad I could help.
On a side note, you technically don't need the inner group as you could query the list of Types for .Count() to get the count.
Fredrik Bornander 12-Sep-14 8:42am View
Glad I could help.
Fredrik Bornander 12-Sep-14 7:42am View
Is it urgentz?
Fredrik Bornander 8-Sep-14 4:26am View
Do you have any log output in the console window?
Fredrik Bornander 4-Sep-14 3:21am View
Store is as an Asset in the project.
And I don't think it cab be added as a writable file to the storage during setup, that's something you'd have to implement yourself and have your application do on startup.
Fredrik Bornander 3-Sep-14 8:06am View
Glad I could help.
Fredrik Bornander 3-Sep-14 2:52am View
Glad I could help.
Fredrik Bornander 1-Sep-14 10:30am View
Made it more versatile to cover your requirements.
I think it's going to be difficult to use expression trees if you want the user to be able to enter "123" and have that match (for example) a decimal property with value 1234.
Fredrik Bornander 27-Aug-14 3:41am View
Still not enough information to provide more than a general example (like I did above).
Show more code and more actual details if you want someone to help.
Fredrik Bornander 27-Aug-14 3:40am View
Glad I could help.
Using matrices will allow you to easily scale, skew, rotate and translate (move) paths.
They're awesome.
Fredrik Bornander 26-Aug-14 9:40am View
I don't, I simply assumed because he said that even with a call to a "Normal simple" method it's slow. But I can be wrong. Either way, it's probably not caused by how he off loads the work to other threads.
Fredrik Bornander 18-Aug-14 4:47am View
Glad I could help.
Fredrik Bornander 7-Jul-14 3:51am View
What permissions do you have in your manifest xml?
Fredrik Bornander 30-Jun-14 9:27am View
Select in what sense?
Fredrik Bornander 3-Jun-14 7:30am View
What tutorial are you following?
Do you have a link?
Fredrik Bornander 3-Jun-14 7:28am View
I don't think you want the \bin suffix there. Get rid of it and try with just the rest of the path.
Fredrik Bornander 3-Jun-14 7:25am View
Your code makes very little sense, for example why are you setting up the Draw-callback and timer function only if the Form initalization fails?
Fredrik Bornander 12-May-14 9:21am View
Are you sure it's being thrown from in there? Is that not just where it's being displayed?
Look at the stack trace of the exception and figure out the line from that, or turn on "break on exceptions".
Fredrik Bornander 12-May-14 9:12am View
Where is that exception being thrown? What line?
Fredrik Bornander 7-May-14 2:41am View
What do you mean by "external java file"?
Fredrik Bornander 6-May-14 7:20am View
That is exactly what that code I showed you does!
Calling GetVariable will get you the string on the left, regardless of what that string is.
Fredrik Bornander 5-May-14 3:34am View
What do you mean by 'capture'?
Get the image from the image into something that you can manipulate or save or what?
Fredrik Bornander 1-May-14 6:30am View
You're going to have to provide a lot more information than that for anyone to be able to help you.
Fredrik Bornander 10-Apr-14 6:13am View
The function is not "inside" the class, it's somewhere else in memory. The class merely holds a pointer (4 bytes for 32 bits) that is the address of the function.
Fredrik Bornander 8-Apr-14 4:57am View
I'm not using a server, I'm writing one.
The class Server implements a server by listening for incoming connections and pushing out a message on the socket when a connection is made.
The class Client connects to the server and receives the message.
Fredrik Bornander 11-Mar-14 4:59am View
What does your Complain table look like?
Fredrik Bornander 3-Feb-14 3:29am View
The JQuery datepicker is capable of that as well;
Just read the documentation for the full info on what the control can do.
Fredrik Bornander 31-Jan-14 6:14am View
What do you mean by Date then? Do you not want this as an instance of the type DateTime?
Fredrik Bornander 31-Jan-14 6:09am View
What happened?
Fredrik Bornander 16-Jan-14 8:09am View
That's what I would do.
If he can't change that type then cast the Array parameters;
new Game((int[,])myLevel[thislevel, 0], (int[,])myLevel[thislevel, 1], (int[,])myLevel[thislevel, 2], thislevel); </pre>
Fredrik Bornander 10-Jan-14 4:06am View
Show some code, difficult to tell what you are doing wrong otherwise.
Fredrik Bornander 9-Jan-14 3:50am View
Fredrik Bornander 9-Jan-14 3:45am View
The code will also fail if the source image contains a fully black pixel as
r = R/(R + G + B);
will then lead to a division by zero.
Fredrik Bornander 9-Jan-14 3:27am View
What does the method look like?
Fredrik Bornander 6-Jan-14 8:13am View
What have you tried so far?
Where are you stuck?
Fredrik Bornander 11-Dec-13 10:11am View
What about it doesn't work. Does it not compile, does it crash?
Fredrik Bornander 5-Dec-13 9:33am View
If you're using the 'unsafe' keyword, then you're using unsafe code.
Fredrik Bornander 4-Dec-13 8:33am View
Create a new WinForms application with a single button that has the payload of the above OnClick handler to verify that it is not an environment issue.
If that application does not crash then it's something that your application has done to it's memory before calling that method.

Are you PInvoking anything?
Are you using unsafe code?
Fredrik Bornander 21-Nov-13 4:39am View
TypeMock ( can mock static methods, but honestly I would argue against trying to mock the Linq methods. You'll be better off sticking to Moq and mocking the input to the Linq method.
Fredrik Bornander 20-Nov-13 2:55am View
It's not entirely clear what you're trying to achieve, can you provide some code or further explanation?
Fredrik Bornander 19-Nov-13 8:06am View
Fredrik Bornander 19-Nov-13 5:50am View
You can't, it's not C#.
But the logic is the same even if some class names and method names might differ slightly.
Fredrik Bornander 18-Nov-13 10:41am View
Dude, that is the fastest +5 I've ever seen! Kudos to you, Sir!
Fredrik Bornander 14-Nov-13 2:55am View
No worries. For a web application the solution I provided should work, I think I covered all of the html named colours in that list.

Glad I could help.
Fredrik Bornander 13-Nov-13 9:25am View
What, according to your debugger, is the value of dateTimePicker1.Value?
Fredrik Bornander 13-Nov-13 9:23am View
What line throws that?
Fredrik Bornander 13-Nov-13 4:06am View
Framework used?
Web, Winform or WPF?
Fredrik Bornander 11-Nov-13 9:40am View
Elaborate please, what do you mean by "binary" in this context?
public X ConvertToBinary(string source);

What type would X be?
Fredrik Bornander 11-Nov-13 8:26am View
Is your problem detecting the rectangles or merging them?
Fredrik Bornander 11-Nov-13 8:20am View
That's an interesting problem. I would have to think about it.
Fredrik Bornander 11-Nov-13 7:26am View
Ok, I think I get it. If you have
You want to first detect rectangles (2,1)-(2,2) and (4,1)-(5,3), and then because of their proximity you want to select rectangle (2,1)-(5,3) as the encompassing rectangle?
Fredrik Bornander 11-Nov-13 7:16am View
That's the kind of encouraging comment that makes my day.

Thank you.
Fredrik Bornander 11-Nov-13 3:41am View
Is your problem finding the different rectangles in the source array or is it (as you say) to "merge" them?

In the above example you've found rectangles
is there a reason as to why you picked those three over
Fredrik Bornander 8-Nov-13 5:31am View
Fredrik Bornander 8-Nov-13 5:06am View
Is this on Android?
Fredrik Bornander 8-Nov-13 4:48am View
Can you write a bare minimum application that exhibits the problem?
By bare minimum I mean the smallest possible application that still manages to reproduce the problem.
Fredrik Bornander 8-Nov-13 2:54am View
Thank you, good sir!
Fredrik Bornander 7-Nov-13 6:36am View
Glad I could help.
Fredrik Bornander 5-Nov-13 9:18am View
I mean run it in the debugger at see what the error is.
Is is an access violation?
Is it trying to read a null pointer or a bad pointer?
What does the debugger say when then application crashes?
Fredrik Bornander 5-Nov-13 7:43am View
How is it crashing? What error message are you getting?
Fredrik Bornander 1-Nov-13 8:36am View
Fredrik Bornander 1-Nov-13 5:22am View
Glad I could help.
Fredrik Bornander 1-Nov-13 4:52am View
You can add any number of lines and they'll be executed sequentially.
For really complex post-build scripts you can use a .bat file or a powershell script that you call form the post-build event.
Fredrik Bornander 31-Oct-13 9:37am View
Is this a school assignment?
Fredrik Bornander 31-Oct-13 4:10am View
We need to see how your using or passing the initialized struct.
Fredrik Bornander 30-Oct-13 7:40am View
How would you find the line break?
Using a binary writer what's the difference in writing a '\n' and byte value of 10?

If you want to read line based, then you're not looking to use Postion and Seek(), I think.
Fredrik Bornander 30-Oct-13 5:31am View
You can't with that data format. Unless you know exactly how wide each field or group of fields are, then you can't seek to the next position.

In your case, you're using a string and that's going to take up a variable amount of space so without reading each element, there's no way of knowing.

Either re-think your data format or use sequential reads.
Fredrik Bornander 29-Oct-13 7:34am View
It's because my command implementation assumes a command that can always be invoked.
You're supposed to fire that event when the CanExecute of the command changes, but since this is always true it's irrelevant in this implementation.

Google WPF RelayCommand for a more complete implementation of ICommand.
Fredrik Bornander 29-Oct-13 5:42am View
I left that out deliberately, but it would like something like this;

using System;
using System.Windows.Input;

namespace WpfMvvm {
public class Command : ICommand {
private readonly Action action;

public Command(Action action) {
this.action = action;

public bool CanExecute(object parameter) {
return true;

public event EventHandler CanExecuteChanged;

public void Execute(object parameter) {
Fredrik Bornander 21-Oct-13 8:16am View
Which event are you listening to?
Fredrik Bornander 21-Oct-13 8:08am View
So the event completes, the magically the payload that is supposed to run on a background thread runs on the same thread?

Are you installing a custom thread scheduler to the Task factory?
Fredrik Bornander 21-Oct-13 7:14am View
I think it's unlikely that the library is waiting for any threads created in the event handler, that's a fairly complex and weird piece of functionality to add.

If you try something like this; what is printed to your output window:
public void Call_Comes(object sender, EventArgs e) {
System.Diagnostics.Debug.WriteLine("Event fired from thread " + Thread.CurrentThread.ManagedThreadId);
Task.Factory.StartNew(() => HandleEvent(sender, e));
System.Diagnostics.Debug.WriteLine("Event processessing done");

private void HandleEvent(object sender, EventArgs e) {
System.Diagnostics.Debug.WriteLine("Handling on thread " + Thread.CurrentThread.ManagedThreadId);
System.Diagnostics.Debug.WriteLine("Done handling on thread " + Thread.CurrentThread.ManagedThreadId);
Fredrik Bornander 18-Oct-13 4:35am View
Can you destroy the current session if a user tries to log on again, so that the latest session is always the valid one?
Fredrik Bornander 4-Oct-13 2:56am View
But you're going to have to provide a lot more information about your particular performance issue for anyone to be able to help you.
Fredrik Bornander 4-Oct-13 2:41am View
Read this;
Fredrik Bornander 3-Oct-13 5:44am View
Glad I could help.
You should mark the answer as accepted if it solved your problem so that we can close the question.
Fredrik Bornander 3-Oct-13 5:43am View
You need to make sure you include the .jar file containing the jdbc drivers when running you application.
Fredrik Bornander 3-Oct-13 4:27am View
Are you sure? :)
I misread it, well spotted.
Fredrik Bornander 3-Oct-13 3:02am View
Fredrik Bornander 2-Oct-13 7:34am View
I think you should set the DataContext to your DataTable and ignore the BindingSource. Why do you need the BindingSource?
Fredrik Bornander 1-Oct-13 3:16am View
What should change from 0?
Should the 0 become the value it "eats"?
Fredrik Bornander 30-Sep-13 7:38am View
How are you launching the new Activity? Can you show some code?
Fredrik Bornander 27-Sep-13 9:24am View
Debug it and figure out what's null. Then make sure that isn't null.
Fredrik Bornander 26-Sep-13 13:29pm View
No worries, glad I could help.
Fredrik Bornander 24-Sep-13 8:45am View
Post a new question instead of commenting, it means more people will have visibility of it and you're likely to get help quicker.
Fredrik Bornander 23-Sep-13 10:33am View
You can either check if .Count == 0 or, if you import Linq (using System.Linq;) you can use Data.Any() which returns true if it is NOT empty.
Fredrik Bornander 23-Sep-13 6:24am View
Yes. So putting them in a library (like a DLL) is likely to be more convenient.
But it depends on the circumstances, sometimes including the sources in every project makes sense.
Fredrik Bornander 17-Sep-13 12:18pm View
Dude, you need to explain it to me.
You can't answer "Yes" when I ask What do you mean send the notification?", it makes no sense.
Fredrik Bornander 17-Sep-13 10:39am View
What do you mean send the notification? Send it how?
Fredrik Bornander 17-Sep-13 10:35am View
Glad I could help.
Fredrik Bornander 17-Sep-13 10:30am View
I would if I understood what you wanted help with.
Fredrik Bornander 17-Sep-13 10:22am View
Yeah, I'm sorry to say I'm not following you at all now.
Fredrik Bornander 17-Sep-13 10:14am View
Did it work for you?
Or are you asking me if it will work?
Fredrik Bornander 17-Sep-13 10:00am View
Do you know how to take a screenshot of a window using C# on the local machine?
Fredrik Bornander 15-Sep-13 2:33am View
Glad I could help.
If the answer solved your problem please mark the answer as Accepted so that we can close the question.
Fredrik Bornander 13-Sep-13 12:06pm View
Thank you, good sir.
Fredrik Bornander 12-Sep-13 2:47am View
In your query A is an alias for a select hitting only table TableB, that doesn't work as that table does not have column AID. Your example query is incorrect as it is clearly only hitting TableB.
Fredrik Bornander 11-Sep-13 9:53am View
Your query makes no sense, alias A will not have column AID on it. What does the query for populating TableC actually look like?
Fredrik Bornander 11-Sep-13 4:55am View
You will need to provide more information that for us to be able to help you.
Fredrik Bornander 6-Sep-13 8:14am View
Cool, glad I could "help" :)
I realize it's not perfect but I don't think this is something you really want to do anyway.
I assuming that since you asked a fairly complex question you're aware that casting away const on your own return value means you might as well remove the const from the return type all together.
Fredrik Bornander 6-Sep-13 6:19am View
I've adorned my answer with a working example. Let me know if this helps you.
Fredrik Bornander 4-Sep-13 3:31am View
Can you show us the stacktrace?
Fredrik Bornander 3-Sep-13 8:18am View
Glad I could help.
Fredrik Bornander 30-Aug-13 9:39am View
What is BUFSIZ set to?
Fredrik Bornander 30-Aug-13 7:49am View
Glad I could help.
Fredrik Bornander 30-Aug-13 7:25am View
Is your problem the duplicated log lines?
Fredrik Bornander 30-Aug-13 5:43am View
Is your problem the duplicated log lines?
Fredrik Bornander 30-Aug-13 3:22am View
Fredrik Bornander 29-Aug-13 5:55am View
Not a problem, glad I could help.
Fredrik Bornander 29-Aug-13 4:13am View
You can't just copy and paste my answer, it wont work as it's based on the fragment of code you supplied in your question. If you replace var with SqlCommand that should work, but you need to initialize your own Connection (cn).

Read the wikipedia article on SQL Injection and you'll understand why you NEVER want to concatenate a bunch of strings into your sql statement (especially if those strings are entered by a user).
Fredrik Bornander 29-Aug-13 3:06am View
Glad I could help.
Fredrik Bornander 29-Aug-13 3:02am View
You call p.Kill() or wait for the process to finish.
Fredrik Bornander 27-Aug-13 2:43am View
Reason for my vote of 1 \n Too short to be an article, more like a tip.
Fredrik Bornander 23-Aug-13 9:32am View
Could you add an image with a rectangle positioned in 3D space like you would want the text, draw it in paint or something, then I can (probably) show you how to position your camera.
Fredrik Bornander 23-Aug-13 2:41am View
Look-at target can be used to calculate LookDirection on the camera, and for some it's more intuitive to use instead of the LookDirection;
<pre>camera.LookDirection = myLookAtTarget - camera.Position;

Sometimes it helps thinking about the camera having a position and a point it's looking at rather than changing the direction (which I know is the equivalent but still different).
Fredrik Bornander 13-Aug-13 3:08am View
What is the return value of the system call?
Fredrik Bornander 12-Aug-13 11:08am View
Cool. Note that I updated the example as the first attempt was leaking memory.
Fredrik Bornander 12-Aug-13 11:07am View
It allocates enough space for one.
Fredrik Bornander 9-Aug-13 10:11am View
Wouldn't the problem still be coming up with the correct rounding?
If the user specifies the float to 7 decimals and the sprintf rounds that to 5 then the result would be unexpected again
I think the problem is, as you said, the problem with representing nber as floating point typea. If there is a strict requirement that the input is float then something like thos cant be.reliable implemented. I.think.
Fredrik Bornander 9-Aug-13 9:35am View
I'm not sure how I would implement that?
Fredrik Bornander 9-Aug-13 9:32am View
You get "not valid port" because you haven't allow pack URIs.
New up an Application object and it'll register it for you.
Fredrik Bornander 9-Aug-13 9:26am View
I know, even the example I posted prints 6 decimals for the input given.
But if the input is a float it's going to be very difficult to work around that.
Fredrik Bornander 9-Aug-13 9:16am View
True, but it's his/hers first question so I think he/she deserves a little slack :)