Click here to Skip to main content
14,741,142 members

Comments by Maarten Kools (Top 200 by date)

Maarten Kools 21-Mar-18 1:18am View
$_GET gives you access to the variables passed through the URL. If these are not defined, you'll get this notice. I don't know what you're doing to send the values to the server, but I would assume these are send through a form. And in that case you'll probably want to use $_POST, which gives you access to the POST variables.
Maarten Kools 20-Mar-18 18:26pm View
oh, so it's on the first split probably. Try
Maarten Kools 20-Mar-18 18:02pm View
What's your syntax error? Not sure if you're actually doing it (your code isn't formatted in your question), but you need to indent the code block for the for loop, see also
Maarten Kools 20-Mar-18 17:40pm View
TagLib# is still around, Doesn't matter if it's dated I suppose, the standards are still supported.
Maarten Kools 22-Jul-14 3:26am View
I suggest to strip the statement until it works,and from there try to determine what exactly is causing the problem. For now, I suggest instead of building the query the way you're doing now to use prepared statements[^]. This has a couple of advantages, one of them is security and the other is that you don't have to bother with determining datatypes and escaping your input. If I had to take a guess at why the update statement fails, I would think it's because the input has a quote in it. Again, using prepared statements will fix this.
Maarten Kools 7-Apr-14 14:15pm View
To be honest, I haven't worked with an ObjectSet or CompiledQuery before, so I don't know the inner workings of it. But you have to make sure that you're not querying all records from the database, store it in memory and select the records from that set. If you need only 10 records, it makes no sense keeping all 100 (or whatever it is) in memory. But like I said, I haven't worked with an ObjectSet before, so I don't know whether it's doing that or not.
Maarten Kools 7-Apr-14 9:01am View
Hi Andy,

Using a Where clause has no effect, as you can pass the same predicate to FirstOrDefault. context.tblEMailPostBox.FirstOrDefault(f => == id) and context.tblEMailPostBox.Where(f => == id).FirstOrDefault() will yield exactly the same result. The Where clause is obsolete in this case (if you use a tool like Resharper[^] for example, it will tell you so).

It really depends on what context.tblEMailPostBox represents. If it's an IEnumerable[^] that is being created with LINQ to SQL you have to watch out for something called deferred execution[^]. Each time you would call FirstOrDefault[^] the LINQ query would be executed. So if you would loop over, let's say, 10 Ids, then the LINQ statement would be executed 10 times as well. That makes it, very inefficient and I can imagine perhaps an issue with memory as well.

I'd say it would be much more efficient to query the right records from the database, instead of querying everything and resolving it in your application (as you are doing now).
Maarten Kools 3-Apr-14 4:23am View
When you have the debugger stop at your breakpoint, check out the stack trace. This will give you a clue how this method is called, and whether there is any difference between the two calls. From the code snippet you posted it is impossible to tell why this code is called twice.
Maarten Kools 3-Apr-14 4:16am View
That was rather quick, thanks! :)
Maarten Kools 28-Mar-14 2:37am View
What does the property context.tblEMailPostBox represent? If I had to wager a guess, I'd say all records. When you execute FirstOrDefault, the IEnumerable will be iterated (which, by the way, is very inefficient in your loop over the ids). If this property contains all records then you might have a problem with memory, because it would load every single record in memory (no idea how many we're talking about here?) and from that collection you select only one.
Maarten Kools 27-Mar-14 12:21pm View
You're welcome! Keep in mind that this solution only works for primitive types, as Keith Barrow mentioned in his answer.
Maarten Kools 26-Mar-14 7:36am View
If you don't post code we cannot help you. We cannot look on your hard drive, see your screen or read your mind. As RyanDev suggested, it might be an infinite loop that's allocating memory. There might be many reasons the Garbage Collector doesn't run (objects might still be in use for example, again, impossible to tell without seeing code).
Maarten Kools 25-Mar-14 5:25am View
I may be completely wrong here, but you pass new Entities() to the GetValidRecords method. And in that method, you iterate through the context variable, which is equal to new Entities().
Maarten Kools 21-Mar-14 8:50am View
I assume toggler is some kind of jQuery plugin? Are you including the scripts? Your code doesn't show that.
Maarten Kools 20-Mar-14 11:52am View
Perhaps this[^] can help you? (scroll down to the second answer).
Maarten Kools 20-Mar-14 9:07am View
You either expose the whole thing, or you don't. If you wish to keep the struct "telephone" private, you cannot expose a public list of it either, makes sense, doesn't it?
Maarten Kools 12-Mar-14 10:04am View
Please, do not repost[^]
Maarten Kools 11-Mar-14 8:26am View
I would assume building the solution creates a new assembly. Are you having problems compiling the solution?
Maarten Kools 11-Mar-14 8:24am View
It's a compiler error? And are you sure you get it from this file? Because there's no reference to that method at all.
Maarten Kools 11-Mar-14 8:23am View
You can define your connection strings in the App.config file, and assign each a name. The idea of the ConfigurationManager.ConnectionStrings[string] property is that you can use that name to retrieve the actual connection string. So you either hardwire the connection string in your code (not a good idea), then you do either string conString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=G:\Applications\MOICIDB\MOICIDB\MOICIDB.mdf;Integrated Security=True" or you use the configuration, string conString = ConfigurationManager.ConnectionStrings["thenamethatisusedinappconfig"]. This example[^] explains step by step how it works and what to do.
Maarten Kools 10-Mar-14 11:17am View
Use the right URL? 404 is resource not found, meaning the file/page does not exist.

If you are sure the file/page exists, post some relevant code so we can actually see what you're doing.
Maarten Kools 10-Mar-14 9:55am View
Just to be sure, are you sure POP3 is enabled in your GMail settings?
Maarten Kools 10-Mar-14 9:22am View
Why is a date stored as an integer? Why wasn't a DATETIME[^] data type used instead?

Anyway, convert the integer to a string and then retrieve the appropriate substrings to format it in the proper way.
Maarten Kools 10-Mar-14 9:17am View
If I may make a suggestion, the way you're executing your query to check the password and username match is extremely unsafe.

First of all your password is unencrypted. Never store your passwords unencrypted[^].
Secondly, this code is vulnerable to SQL Injection[^]. Always use parameterized queries, never accept unfiltered user entry as parameters for your query.
Maarten Kools 10-Mar-14 9:11am View
SuspendLayout[^] is a method inherited from Control.

What is the exact error you're getting?
Maarten Kools 10-Mar-14 7:38am View
You have it compiling now then?
Maarten Kools 10-Mar-14 7:24am View
I saw in the source code listing that there is a batch file[^] that you can use to build the solution and package a zip. But all it really does is just build the solution that is included with the sources. Just build the solution and use the newly compiled assembly.
Maarten Kools 10-Mar-14 7:16am View
Are you talking about the AJAX Control Toolkit[^]?
Maarten Kools 7-Mar-14 7:21am View
If you are outputting every row of the query your json isn't going to be correct. You can debug your JavaScript in various browsers with built in tools or extensions (in the case of Firefox)
Internet Explorer[^]
Maarten Kools 7-Mar-14 3:33am View
Have you added a reference to your assembly?

You're not importing the correct namespace, you should add a using directive to TCSCloud.Domain.RepairOrder.Model, because that's the namespace UpdateRepairOrder is in.
Maarten Kools 5-Mar-14 9:04am View
You didn't mention your problem. But I would suggest moving the echo json_encode call out of your while loop, otherwise you're outputting for each row.
Maarten Kools 5-Mar-14 7:17am View
Having Read permissions doesn't mean you can write files at that location. Test for Write/Modify permissions instead.
Maarten Kools 5-Mar-14 6:52am View
Just because you have reading access doesn't mean you can create files at that location. For that you need write access (or modify, whatever it is)
Maarten Kools 5-Mar-14 6:51am View
I've added a little code snippet in my solution
Maarten Kools 5-Mar-14 6:45am View
I don't know what the web service returns, from your initial post I gathered it's a comma separated string. I suggest you look carefully at what the server is returning, and act accordingly. If you need the help, please post what exactly is returned and then I (or someone else) can help you better.
Maarten Kools 5-Mar-14 6:02am View
The subscript operator has probably been overloaded[^] in the PULONG class. You'll be able to tell by studying the header of that particular class.
Maarten Kools 4-Mar-14 3:58am View
Have you installed MVC 4 perhaps? Seems there's an issue with that[^]
Maarten Kools 4-Mar-14 3:53am View
Seems to me this code should work fine. There's no mention of a click though, and what do you mean "it's not showing"?
Maarten Kools 4-Mar-14 2:25am View
You didn't mention what your issue is...?
Maarten Kools 4-Mar-14 0:16am View
Homework? CodeProject is not a market place for code, and certainly not the place to ask solutions for your homework.

If you have a certain problem you are more than welcome to ask questions, but it is well appreciated if you have made a proper effort in solving the problem yourself.
Maarten Kools 3-Mar-14 0:54am View
Yes, the code will reach that line just fine. Stepping through with the debugger and checking all variables on that line (should be easy, there are only two, DepartmentName and AssDepartment) will tell you exactly what is null (unless, of course, mCDP_VCDepartmentName is a property which does all kinds of things that throws a NullReferenceException). Now, the most probably suspect for a variable being null is AssDepartment, and that means your FirstOrDefault expression returns a null value. If it doesn't, then DepartmentName is null.
Maarten Kools 1-Mar-14 3:29am View
When running your website in IIS it's associated with an Application Pool. By default this runs under ApplicationPoolIdentity. Try running the Application Pool using a different user (as you would do when running from Visual Studio). See here[^] for more details on how to set it.
Maarten Kools 1-Mar-14 0:29am View
There's a space in front of Content1, remove it and it should work.
Maarten Kools 28-Feb-14 16:12pm View
+5 Great explanation, good of you for taking the time to do that!
Maarten Kools 28-Feb-14 12:40pm View
No. There are a couple of things different here:

1. This way you loop through the list only once. In your own version you loop through the list, retrieve the UpdatedText value and test it for null. If it is null, you again loop through the list, select exactly the same item in the list. But instead of returning UpdatedText, you return DefaultText. And you do the same if the value is not null, except you return UpdatedText. In the version I gave you here you loop through the list only once, select the correct list item and at that point decide whether to select either UpdatedText or DefaultText (depending on which is null or empty).
2. The reason you got an error is that if UpdatedText is null, you essentially call ToString() on a null value.
3. You might have noticed I put in SingleOrDefault. What this does is ensure that the result will not throw. The Single method will raise an exception if the collection is empty (i.e. there is no list item containing the DefaultText value "Comments on Job Description"). SingleOrDefault will always return a value (which will be null since that's the default value of a String object).
4. The call to String.IsNullOrEmpty is just a preference. What it does it not only checks whether the string value is null, but also checks if it is empty.
Maarten Kools 28-Feb-14 9:11am View
You're welcome
Maarten Kools 28-Feb-14 9:11am View
You can try DateTime.ParseExact[^] in case your string does not match any known patterns. But it's impossible to say if that fixes your problem, since you haven't posted the string that you're trying to parse.

What's the problem with the answers you previously[^] have gotten?
Maarten Kools 28-Feb-14 8:04am View
So hide it. The point of the example is that you can use the onerror event to detect a load error, and then to handle it accordingly.
Maarten Kools 28-Feb-14 6:41am View
Let me know if it works. Otherwise, post the exact error you're getting. It is also possible you might have to cast the items in the list to the correct type (depends on how the list is declared).
Maarten Kools 28-Feb-14 6:39am View
The solution is indeed what Maciej posted, and the why is probably because an older version was found in the GAC. The GAC will always take precedence over the bin folder, which is actually rather annoying sometimes.
Maarten Kools 28-Feb-14 6:06am View
You want to generate an executable to copy files? Does your application have access to the other machine? If so, why not create the xml files directly on that machine using a network path? And otherwise, I suggest writing a batch script that just copies the xml files to the other machine.
Maarten Kools 28-Feb-14 5:35am View
Do you have a MySql.Data assembly in your GAC by any chance? Looks like it's finding some assembly, but not the right version. See also here[^]
Maarten Kools 28-Feb-14 5:27am View
You should be able to use lambda expressions just fine. However, when you do Select(u => u.DefaultText).ToString() you're actually calling ToString on an IEnumerable<string>. Either do Select(u => u.DefaultText).First().ToString() or Select(u => u.DefaultText).Single().ToString() (but only if you are sure there's only one element in the enumerable).
Maarten Kools 28-Feb-14 1:28am View
Didn't you post this yesterday as well? And didn't everyone tell you to do your own homework?
Maarten Kools 27-Feb-14 9:37am View
We don't either. Use the "Improve question" link to improve your question and post the relevant code.
Maarten Kools 27-Feb-14 8:48am View
If everyone connects with the same username/password, how are you ever going to figure out who is who?
Maarten Kools 27-Feb-14 5:55am View
And what is it you're having problems with exactly?
Maarten Kools 27-Feb-14 3:20am View
It works fine for me:[^]
Maarten Kools 25-Feb-14 15:45pm View
You're welcome!
Maarten Kools 25-Feb-14 15:44pm View
To add to that: SelectedItem might actually be a valid object, but not a ContentControl. The as operator[^] in this case will cast the object to a ContentControl, if possible, and otherwise return null.
Maarten Kools 25-Feb-14 6:06am View
Thank you. You and Maciej.Los are too kind :)
Maarten Kools 25-Feb-14 5:42am View
+5 Much cleaner than my solution. My SQL is a bit rusty :|
Maarten Kools 24-Feb-14 0:49am View
Try specifying jquery.noConflict()[^]. And then instead of $(document) (and others) as jQuery(document). Both jQuery and Microsoft use the $ symbol as an alias in their libraries.
Maarten Kools 22-Feb-14 16:33pm View
You're welcome :)
Maarten Kools 22-Feb-14 16:24pm View
One thing that does stand out for me on this code is that there's no check on whether coll is valid in the loop. The code assumes that both vec and nameVector are equal in length. However, if nameVector has less elements than vec you have a problem (and potential segfault).
Maarten Kools 22-Feb-14 16:21pm View
Just did it myself, I get the installation page just fine. I installed joomla 2.5 in a folder joomla25, and then joomla 1.5 in a folder called joomla15. The installation page shows up just fine.
Maarten Kools 22-Feb-14 16:12pm View
What does the Info class look like, and what is the implementation of the setName function look like?
Maarten Kools 22-Feb-14 16:03pm View
but do you let them point to different databases? You can't use the same database with different versions.
Maarten Kools 22-Feb-14 15:51pm View
if they're in separate folders, sure. Like C:\wamp\joomla15 and c:\wamp\joomla25. Each website you make with Joomla! will have its own copy.
Maarten Kools 22-Feb-14 15:37pm View
Segmentation faults[^] indicate corrupt memory. For example dereferencing a pointer that is already freed, or having a buffer overflow would do the trick as well. Is it possible for you to post your code? If it's not a huge amount, we might be able to help you spot the error.
Maarten Kools 22-Feb-14 7:15am View
So you convert the doc to a pdf, using one of the links above and return it to the client. No?
Maarten Kools 22-Feb-14 7:03am View
Not sure, probably PdfSharp or PdfSharp.Pdf. Think the samples are included with the download though, so if you download the library from SourceForge or CodePlex, you'll get the samples as well.
Maarten Kools 22-Feb-14 5:47am View
Uhm, where's the recursive part?
Maarten Kools 22-Feb-14 5:45am View
It's either that, or your column size is not set to 100. Step through it with a debugger, and check the length of each string. Also ensure in your database the length is indeed set to 100 for the columns.
Maarten Kools 22-Feb-14 5:18am View
+5 for all the good tips!
Maarten Kools 22-Feb-14 5:16am View
I'm not sure what you mean. Do you want to deserialize JSON into an array?
Maarten Kools 22-Feb-14 4:22am View
I know there is native message that is sent through the event loop for system shutdown, but I didn't know there was a .NET event either. Thanks for the 5 stars :)
Maarten Kools 21-Feb-14 7:51am View
Well, I'm not too familiar with Spring/Java, but I can take a guess. A FileSystemResource would be a file on disk, in the working folder of the application. A ClassPathResource would be a file that is located in a folder that is declared in the class path.
Maarten Kools 21-Feb-14 7:45am View
If the file is there, then perhaps it's a permission issue. You might not have permission to read the file at that location when running your program?
Maarten Kools 21-Feb-14 7:44am View
What are your own thoughts about the right answer? And why would you pick the answer?
Maarten Kools 21-Feb-14 7:41am View
Well, as the exception is a FileNotFoundException, I'd say the file doesn't exist at the specified path.
Maarten Kools 21-Feb-14 5:43am View
Yes, I assumed you used C# but I now notice you've tagged it C++. Here is an example[^] in C++.
Maarten Kools 21-Feb-14 3:49am View
Thanks Sergey!
Maarten Kools 21-Feb-14 2:33am View
Not sure what the problem is there. I don't have IE 7 or 8 myself, but when I set IE to emulate either one it works fine for me (I know it's not quite he same, but the best I can do). According to the site jQuery UI does support IE7+, so it really ought to work. What version of jQuery UI did you include? Perhaps you can try with older versions of jQuery/jQuery UI.

Maarten Kools 21-Feb-14 1:01am View
Oh good you solved it yourself. Not sure what went wrong before though.
Maarten Kools 20-Feb-14 13:17pm View
How do you store the variable in Session["inst_id"]? It's probably another TextBox control. When you call ToString() of a TextBox, you'll get that particular string.
Maarten Kools 20-Feb-14 6:27am View
What do you mean validate time? Do you want to validate that some kind of string input validates to a time between 00:00:00 AM to 11:59:00 PM?
Maarten Kools 20-Feb-14 2:30am View
You mean instead of having all the individual files? You can try using the aspnet_compiler[^] (but I'm not sure if it applies to MVC as well)
Maarten Kools 20-Feb-14 2:05am View
It doesn't work, as it doesn't compile? Your disp method does not return a value in all code paths. You have your if and else if, but nothing if command is neither "Create" or "cancel".
Maarten Kools 20-Feb-14 2:02am View
Are you using Forms authentication? Can you also post that part of your web.config file?
Maarten Kools 20-Feb-14 1:29am View
Is it expiring after being idle, or even while there is activity?
Maarten Kools 20-Feb-14 1:20am View
RegExr[^] has an online library of community expressions, I'm sure there is one available that applies for you.
Maarten Kools 19-Feb-14 9:17am View
No idea why it would fail for you. I tested the code (turned off the proxy though) and it works fine. Although instead of XML, JSON is returned from that URL.

Also with the proxy line it works, but I'm not behind a proxy server. Perhaps that's where the problem lies? Don't know if you can test it without a proxy?
Maarten Kools 18-Feb-14 11:20am View
Don't think sectionGroup is a valid element. Try configSections instead
Maarten Kools 18-Feb-14 8:14am View
Glad to help!
Maarten Kools 18-Feb-14 5:07am View
XML is case sensitive, if you have XML with mixed case I would suggest to clean that up and use a specific naming convention. Of course there are ways around it, instead of doing d.Element("name") do something like d.Elements().Where(e => String.Equals(e.Name.LocalName, "name", StringComparison.OrdinalIgnoreCase).FirstOrDefault().

As for searching values of elements, you can do case insensitive comparisons of course. If you're getting a NullReferenceException on that one line, it means either d is null, or there is no element called name (note the lower case), or Value is null (or event textBox1 can be null). Only by debugging it you will be able to tell what exactly is null here.
Maarten Kools 15-Feb-14 17:47pm View
Is there no message in the exception? It might give you a hint what is going on.
Maarten Kools 15-Feb-14 17:20pm View
You're welcome, happy to help :)
Maarten Kools 15-Feb-14 16:41pm View
RegExr[^] has a community library, which also contains plenty of URL validation expressions, that should give you a quick start. From there you'd have to tweak the expressions a bit to get the result you want.
Maarten Kools 15-Feb-14 6:25am View
What do you want to achieve? Run an executable on the client when a user clicks a button?
Maarten Kools 15-Feb-14 4:38am View
If you're going to run a program, for example chkdsk.exe, why do you want to call it through cmd.exe? I would think it's possible to directly call chkdsk. But if this works for you, you can also just leave it the way it is I suppose.
Maarten Kools 15-Feb-14 1:36am View
Post the relevant bit of code please.
Maarten Kools 14-Feb-14 16:03pm View
Oh boy, just that one line. Glad you found what the problem was!
Maarten Kools 13-Feb-14 3:46am View
Uhm, you use https instead of http? What are you having problems with?
Maarten Kools 12-Feb-14 5:08am View
What line? Under what circumstances?
Maarten Kools 12-Feb-14 4:28am View
Hi Yvan, I was curious to see if you managed to find and fix your problem yet? (changed my display name since the last time I commented here). It's still find it quite puzzling.
Maarten Kools 12-Feb-14 4:21am View
Marquee is not a standard tag. Microsoft introduced it a long, long time ago but it's never been part of the standard. If you really want a marquee effect, I'd look into a JavaScript solution.
Maarten Kools 12-Feb-14 4:14am View
It works perfectly fine for me. What does the HTML look like what you're trying to strip?
Maarten Kools 11-Feb-14 12:31pm View
Heh, thanks!
Maarten Kools 10-Feb-14 7:57am View
Is it working if you execute the program from the command line? Sometimes when you run a program out of the debugger (are you using Visual Studio?) the working directory is not where the executable is build.
Maarten Kools 10-Feb-14 7:53am View
Perhaps the status returned by the stored procedure indicates an error occurred. I would assume the Value property remains null, hence the error.
Maarten Kools 7-Feb-14 13:22pm View
Tease ;)
Maarten Kools 6-Feb-14 16:19pm View
Why would you want to?
Maarten Kools 6-Feb-14 4:11am View
And what do you expect from us? Code? That's not how it works on the CodeProject. But here's a JavaScript library to help you on your way: DropzoneJS[^]. You'd have to create the server side yourself.
Maarten Kools 5-Feb-14 4:40am View
Maarten Kools 5-Feb-14 4:38am View
I've added a sample, and that works fine for me. Maybe you didn't implement it right?
Maarten Kools 5-Feb-14 4:31am View
When you implement the Equals method it is apparently important to implement the GetHashCode as well. More info on that can be found here[^]
Maarten Kools 5-Feb-14 3:48am View
Why not load the RSS feeds client side using AJAX? The feeds will still have to be loaded, but the user experience will be so much better.
Maarten Kools 4-Feb-14 9:36am View
Maarten Kools 4-Feb-14 9:29am View
That only works in IE though, doesn't it?
Maarten Kools 4-Feb-14 9:27am View
Done. Sometimes I wonder if I shouldn't just post it as an answer, ah well.
Maarten Kools 4-Feb-14 8:41am View
You mean copy things to the clipboard client side? I don't think that's possible. Usually there's a Flash[^] solution for it
Maarten Kools 4-Feb-14 8:08am View
You're welcome!
Maarten Kools 4-Feb-14 7:51am View
Looks fine, apart from the fact you're adding everything to the PlaceHolder1.Controls collection, so you're not nesting the divs. Each HtmlGenericControl will have its own Controls collection, so child elements can be added to that. For example:

Dim div1 As New System.Web.UI.HtmlControls.HtmlGenericControl("DIV")
div1.Attributes("Class") = "row-fluid"

Dim div2 As New System.Web.UI.HtmlControls.HtmlGenericControl("DIV")
div2.Attributes("Class") = "span13"
div1.Controls.Add(div2) <-- Instead of adding this div to the PlaceHolder1 control, add it to div1.
Maarten Kools 4-Feb-14 7:40am View
What have you tried so far?
Maarten Kools 4-Feb-14 6:22am View
Perhaps this[^] helps?
Maarten Kools 4-Feb-14 6:14am View
Please use the Improve question link to update your question, and post the code that raises the exception.
Maarten Kools 4-Feb-14 5:49am View
Now it is, sorry about that. The element tag shouldn't have been around it.
Maarten Kools 4-Feb-14 5:39am View
Just click on the link, it has various examples, including enumerations.
Maarten Kools 4-Feb-14 5:19am View
CodeProject messed up the paste, that wasn't supposed to be in there.
Maarten Kools 4-Feb-14 4:15am View
Then your input is incorrect. Like I said, if you use ParseExact, the input must exactly match the pattern. Any other case will give you a FormatException.
Maarten Kools 4-Feb-14 3:55am View
if (tb_DateTo.Text.Length != 0) // do something else
Maarten Kools 4-Feb-14 1:31am View
Sounds to me you just have to fix the script error. Suppressing it will just make sure you don't get notified of errors, but if the error causes the site not to load it won't load of course.
Maarten Kools 3-Feb-14 9:46am View
You can use CSS media queries to hide elements while printing.
Maarten Kools 3-Feb-14 4:42am View
Usually there's a message in the event viewer regarding to the error. Possibly it's because you have the validation element in there twice. As well as the system.webserver element.
Maarten Kools 2-Feb-14 7:33am View
mysql_query[^] will return False on an error, so either one of your select queries is incorrect. Hint: Balance your quotes in queries.
Maarten Kools 31-Jan-14 14:11pm View
Oh! I didn't realize this was actual client code, since it's C#. I was really confused about point 3, but Xamarin takes care of that. In that case, if you're going to change the exception, I'd print the method name and the names of the parameter types (and perhaps include a list of available methods with their signatures as well, might as well right?)
Maarten Kools 31-Jan-14 13:34pm View
And the parameterTypes array is correct as well?

To be sure that's the line that throws the exception, have you actually set a breakpoint there? Or did something like throw new Exception("This is really the right one")?
Maarten Kools 31-Jan-14 13:13pm View
Just a thought, but have you tried, where you're calling contract.GetMethod(), to call contract.GetMethods()[^] and see what the list contains?

Although I can't think of any reason why that particular part would fail when the app is downloaded from the App Store (the server is the same whether you do or don't). You're sure that's the line that is causing the error?
Maarten Kools 31-Jan-14 10:35am View
What zip file?
Maarten Kools 31-Jan-14 5:38am View
either look for $(".liquid") or $("#liquid1"). Currently you're looking for #liquid which means you're looking for a control with the ID liquid, and that doesn't exist.
Maarten Kools 31-Jan-14 5:09am View
Is the control an IScriptControl by any chance? Post some code otherwise, you can use the "Improve question" button to edit your question.
Maarten Kools 31-Jan-14 4:59am View
did you try document.ready() or $(document).ready()?
Maarten Kools 29-Jan-14 17:26pm View
You're using the Datepicker from jQueryUI I assume? Use the onClose[^] method
Maarten Kools 29-Jan-14 16:40pm View
What you're looking for is doc.Descendants("form"). This will return an IEnumerable of XElement representing each form element.
Maarten Kools 29-Jan-14 16:32pm View
And what have you tried to retrieve the data..?
Maarten Kools 29-Jan-14 15:06pm View
We actually use the DataTables[^] jQuery plugin. It offers all that, and more.
Maarten Kools 28-Jan-14 4:23am View
And this is the whole file? Or are there any includes, or is this file included in a different file?
Maarten Kools 28-Jan-14 3:43am View
Don't really spot the error just like that. But usually there's a line number with the error. And you can always apply the process of elimination otherwise.
Maarten Kools 23-Jan-14 6:29am View
Without code it's not really possible to tell you where exactly the error is. But the issue is that the ID property of the control you're using to fill in TargetControlID is not filled in.
Maarten Kools 21-Jan-14 11:53am View
Why not encrypt the root element then?
Maarten Kools 21-Jan-14 7:45am View
Your dictionary returns a List<Object>, and by passing this to the Replace method, the list's ToString method is called. Maybe if you post some more code we can properly help you out.
Maarten Kools 21-Jan-14 5:26am View
And what are you having problems with exactly?
Maarten Kools 20-Jan-14 8:51am View
The example at MSDN, which I linked in my answer, uses an INSERT statement. The idea is that you have a statement, where the values are passed as parameters. The parameters are specified separately in the command. The prepare statement will then "compile" the actual statement before you execute it.

You can find more info about prepared statements here[^] and here[^]
Maarten Kools 17-Jan-14 5:04am View
Brilliant! Haha
Maarten Kools 17-Jan-14 3:59am View
Of course you can run Apache on Windows 2000. Are you having any problems?
Maarten Kools 17-Jan-14 3:53am View
I would either just have two websites, or restructure the database design so that you can separate things for different users. Of course it would be possible to use two different databases, there's no technical limitation to it, but save yourself the trouble and don't.
Maarten Kools 17-Jan-14 2:36am View
Sounds to me that resp is null. Did you debug your code and stepped through the getUrlResponse method? I would assume that returns null somewhere.
Maarten Kools 17-Jan-14 2:14am View
Just hook it up to iTunes...?
Maarten Kools 15-Jan-14 6:02am View
You should post the code of that class then, use the "Improve question" to add this code.
Maarten Kools 15-Jan-14 5:48am View
What is the loginBLL class? Is it something from a library, or something you've created yourself?

Either way, the loginBLL class is either internal or private in the assembly where it comes from, and hence you'll not be able to use it in a different assembly.
Maarten Kools 14-Jan-14 5:49am View
lijst.Add(new Analyses() { Stappen = "OdbcDataAdapter da = new OdbcDataAdapter();" });
Stappen is a list, not a string. So instead of Stappen = "OdbcDataAdapter da = new OdbcDataAdapter();" do Stappen = new List<string> { "OdbcDataAdapter da = new OdbcDataAdapter();"}

[edit]sometimes I get so fed up with CP's tendency to change brackets! Hope you're not getting spammed with email because of this[/edit]
Maarten Kools 14-Jan-14 4:05am View
Try isolating the issue by taking things out. If you do this enough times you'll be left with the part that causes the error. Perhaps it's this part? IDPROOFNUMBER='' that seems to me to be a number, yet you pass a string.
Maarten Kools 14-Jan-14 4:02am View
Maarten Kools 14-Jan-14 1:37am View
What browser? Usually you can right click on the element in the inspector, and copy as html.
Maarten Kools 14-Jan-14 1:36am View
Unhelpful related to your question, but there's also the Console.Beep[^] method (so you won't have to mess with native methods). And on another note, the PC speaker won't beep on 64bit systems apparently. And here's why[^]
Maarten Kools 13-Jan-14 8:50am View
String.Format("{0:g}", dt) is the same as dt.ToString("g"). That's not the same as dt.ToString(CultureInfo.CurrentCulture). You'll be looking for dt.ToString("g", CultureInfo.CurrentCulture)
Maarten Kools 13-Jan-14 8:18am View
There is also a String.Format[^] method which allows you to pass a IFormatProvider.
Maarten Kools 8-Jan-14 10:44am View
I believe Silverlight also runs in a sandbox. Breaking out of the sandbox requires a change in policy files on the client machine, and that might not even apply to silverlight apps running in a browser (not sure). Perhaps someone else has a better solution for this issue.
Maarten Kools 8-Jan-14 10:37am View
Yes, the applet runs on the client's machine. I'd love to know a different way to break out of the browser's sandbox, because using a signed applet is far from ideal (for example when Oracle decides to change the security model *sigh*), but as far as I know there isn't any. So if you really need this functionality, a signed Java applet is the way to go.
Maarten Kools 8-Jan-14 10:17am View
Our web application contains a Java Applet that handles the whole local client access issue. As you said, security settings will prevent you from getting the full path, and as far as I know only a signed applet will be able to circumvent the issue.

You can also let the applet handle opening the file from disk.

Here's an example[^] on how to handle JavaScript-Java communication.
Maarten Kools 8-Jan-14 7:42am View
I assume by "IIS server" you mean it's a different machine? If so, then localhost will obviously not work. As the request will go to the client's computer, instead to the server. Otherwise, please post some code about how you're specifying the url for your iframe.
Maarten Kools 30-Dec-13 9:57am View
A little bit more context wouldn't hurt. What kind of object is image? And what exactly is the problem?
Maarten Kools 20-Dec-13 11:14am View
And the error is...?

I would advise you to use prepared statements instead of what you are doing now. This makes your code vulnerable to SQL injection[^].
Maarten Kools 20-Dec-13 5:47am View
Are you getting (JavaScript) errors? And can you post the JSON that is being returned?
Maarten Kools 19-Dec-13 11:45am View
The sample code on the jQuery site doesn't have that line, why do you have it though? And if you remove it, does it work?
Maarten Kools 19-Dec-13 7:59am View
Yes, I understand your problem. You can also debug JavaScript though, have you done so? My guess is the line xhr === lastXhr does not result in true.
Maarten Kools 19-Dec-13 7:41am View
Have you debugged it? Are you getting errors?

I would advise you to use a library/use serialization to create the JSON server side, appending data to a string is going to be terrible to maintain. If you insist to use strings though, use a StringBuilder instead, this will give you much better performance.
Maarten Kools 19-Dec-13 3:58am View
Looks pretty straightforward, the TravelAdapter class does not implement the IAdapter interface. If you post some code of the TravelAdapter class then we can tell for sure, but based on the given information, I'd say it doesn't implement the interface.
Maarten Kools 13-Dec-13 6:16am View
Maarten Kools 13-Dec-13 5:58am View
Have you tried searching Google?[^].
Maarten Kools 13-Dec-13 5:55am View
This is not a question. What exactly is your problem? What have you tried yourself so far? Please use the "Improve question" to update your question,
Maarten Kools 11-Dec-13 11:00am View
I like the tags you've added :)
Maarten Kools 6-Dec-13 10:16am View
LOL, no worries, I'm planning to win the lottery next week ;)
Maarten Kools 6-Dec-13 10:13am View
42 please! Sucks I missed the deal though, is that every Monday? I might have to come back at another time.
Maarten Kools 6-Dec-13 10:02am View
Ohh! Do you do requests?? I want a purple one with golden polka dots!
Maarten Kools 6-Dec-13 9:48am View
Why not ask the database administrator to reset the password for you?
Maarten Kools 29-Nov-13 4:48am View
What does the const keyword have to do with the fact whether you want to overload the copy constructor? You can still do that. As for the reason, read this[^] (or do a search on the web for other articles regarding the subject).
Maarten Kools 18-Nov-13 6:25am View
Try jQuery('#slider .slides') instead of $('#slider .slides') and see if it makes a difference.
Maarten Kools 11-Nov-13 9:42am View
If your method is publicly accessible, then there's no need to use reflection (I'd even strongly advise against it!). However, if the new method is internal or private, and they wish to use it anyway, reflection is their only option.
Maarten Kools 1-Nov-13 7:28am View
add() does not return a result, so echo add() won't output anything.
Maarten Kools 6-Sep-13 9:04am View
So get all zip files in the directory and loop over them, it's not too hard to find in Google...
Maarten Kools 5-Sep-13 6:10am View
Search[^], and thou shalt find
Maarten Kools 5-Sep-13 5:41am View
What file, what save? We can't guess what you're making, add a little bit more context to your post.
Maarten Kools 5-Sep-13 5:37am View
"The directory path"?
Maarten Kools 4-Sep-13 17:59pm View
Sorry for the late reply, been a bit busy. When storing a password you want to do it one way only, so when someone manages to get a hold of the database, it isn't easily decrypted. For an example on how to do it, refer to this site: Salted Password Hashing - Doing it Right[^]. It explains the how and why, and it has some C# example code as well.
Maarten Kools 4-Sep-13 8:52am View
Well, doesn't it suck when that happens? Homework?

Anyway, you should post some code, then we can actually help you.
Maarten Kools 3-Sep-13 11:09am View
What have you tried so far?
Maarten Kools 3-Sep-13 8:43am View
Looks can be deceiving. Properly balance your curly brackets, and you'll see what your problem is.
Maarten Kools 3-Sep-13 6:10am View
What have you tried yourself so far?