Click here to Skip to main content
15,389,661 members

Comments by Thomas Daniels (Top 200 by date)

Thomas Daniels 17-May-20 10:29am View
I don't know, sorry.
Thomas Daniels 9-Feb-20 7:01am View
Well, if you have a good reason to believe that the automatic GC firing is insufficient for your application, then you can do it. But as phil.o said, it requires a thorough understanding of the GC.
Thomas Daniels 9-Feb-20 6:56am View
But why would you do that?
Thomas Daniels 18-Jan-20 8:48am View
now you have strHtml = '' and strHtml += something. Replace that first by strParts = [] and the second with strParts.push(something). After the loop, you can do strHtml = strParts.join("");

For the second question, I don't know what you mean. You can just do shuffle(yourArray);.
Thomas Daniels 12-Jan-20 6:07am View
I said that in my last comment... easiest way it to follow my second bullet point. Then you just have to replace one line of code.
Thomas Daniels 12-Jan-20 5:09am View
Aha, then I think the problem is that your array is actually a JSON string rather than a JavaScript array. There are two solutions (choose one of them, not both!):

* when using localStorage.setItem to store LoginUserData, make sure that you're storing the array and not a string
* replace the first line of your function with: auth = JSON.parse(localStorage.getItem('LoginUserData'));
Thomas Daniels 12-Jan-20 4:56am View
Strange, at a first glance that should work... if you do console.log(auth[0]), does that say "undefined" or does it give the object?
Thomas Daniels 5-Jan-20 13:49pm View
Sorry, I don't tend to just give out my contact details
Thomas Daniels 4-Jan-20 17:08pm View
I don't find it a problem at all that you leave this post up here :) I only think it's way less likely that we can help you out than the maintainers.
Thomas Daniels 8-Sep-19 3:06am View
What format is your time value in? In other words, can you share an example value of textbox1.text?
Thomas Daniels 3-Sep-19 8:54am View
Yes, and replace PrintPageEventArgs with PaintEventArgs
Thomas Daniels 3-Sep-19 8:43am View
Yes, Load does not pass any Graphics. The Paint event, however, does.
Thomas Daniels 3-Sep-19 6:15am View
You'll still need the hook, at least. At some point you may also need the handle of the button (to differentiate between other clicks), although I have not found any examples of this so now I'm not sure if it's even possible to do that. I'd still recommend looking into SetWindowsHookEx because it's the closest you can get.
Thomas Daniels 1-Sep-19 13:16pm View
Is your question just how to replace "water" with "5057" in a string, or how to 'fix' any kind of expression in a format like this?
Thomas Daniels 1-Sep-19 12:47pm View
You're welcome!
Thomas Daniels 1-Sep-19 12:34pm View
Okay, what I _think_ you want to be doing, is calling checkBoxOnTophandleA instead of checkBoxOnTop_CheckedChanged... so like this:
if (checkBoxOnTophandleA != null) checkBoxOnTophandleA(null, null);
Not tested but I think that's what you're trying to do.
Thomas Daniels 1-Sep-19 12:21pm View
I can't really give a suggestion because I'm not sure what else checkBoxOnTophandleA is used for or what would make sense in your code.
Thomas Daniels 19-Aug-19 15:49pm View
And why is that a problem?
Thomas Daniels 29-Jul-19 7:35am View
That's a lot, I'm sure that none of us will go through all these errors. Have you tried inspecting the code analysis and clicking the "Learn more." link wherever it appears?
Thomas Daniels 29-Jul-19 7:32am View
What are your requirements? Do you want a WYSIWYG editor? Or do you want something like a text field (for the HTML code) with a browser next to it, where the text field has features such as syntax highlighting and code completion?
Thomas Daniels 25-Jul-19 8:35am View
Hmm, not, then :)
5 to your answer
Thomas Daniels 21-Jun-19 13:46pm View
From what I can see, the parentSelector parameter to getParents should be one single element, not an array of elements. If you'd like to tweak that, you'll have to edit the getParents function yourself.
Thomas Daniels 21-Jun-19 13:37pm View
That means that whatever element you're requesting the parent node of, is null. If you're expecting it not to be null, check why that happens (for example, if you have the right selectors).
Thomas Daniels 21-Jun-19 13:13pm View
'first' does not exist in pure JavaScript, try the array indexer [0] instead.
Thomas Daniels 21-Jun-19 13:01pm View
You can do this.getParents, you'll have to do getParents(this).
Thomas Daniels 21-Jun-19 11:58am View
What doesn't work?
Thomas Daniels 19-Jun-19 16:25pm View
Oh, I think I see why it wouldn't work. Well, parents just has no pure JavaScript/TypeScript alternative as single function call. Here is a way to implement an alternative for parents:

But when rewriting jQuery to pure JavaScript (or TypeScript), it can be beneficial to just re-write the whole code instead of translating it directly, because a direct translation can become messy.
Thomas Daniels 19-Jun-19 15:28pm View
Ah, you're using it as a function. You have to use it as a property, e.g. this.parentElement and NOT this.parentElement().
Thomas Daniels 19-Jun-19 15:21pm View
What about .parentElement? Even though that's the same in the vast majority of cases... How does it not work?
Thomas Daniels 19-Jun-19 15:06pm View
I'm not sure what you mean by "saves".

What OrderBy does is: it receives a collection. In this case, that's jaggedArray.Skip(1). It sorts the elements by the way you specified and returns that.
Thomas Daniels 19-Jun-19 14:58pm View
OrderBy merely specifies how to order, but the elements itself as in jaggedArray.Skip(1) are kept as-is.
Thomas Daniels 19-Jun-19 14:48pm View
querySelectorAll returns an array, and addEventListener only works on elements, not arrays. Loop over the array and set the event listener on each element. Or, if you know there will only be one element, you can do querySelector (without 'All') to get just one element.
Thomas Daniels 19-Jun-19 14:17pm View
I edited my answer.
Thomas Daniels 18-Jun-19 7:41am View
Oh, I see. I didn't know about that restriction... then I have no other suggestion.
Thomas Daniels 18-Jun-19 4:20am View
Thank you!
Thomas Daniels 6-Jun-19 4:05am View
How is it "not working"? Is there an error? A wrong result?
Thomas Daniels 5-Jun-19 11:13am View
I'm not sure then... you could try to have your JSON keys start with a capital letter like in your C# code (although I think it should be parsed case-insensitively, but it's worth a try).

Or check the Content-Encoding header that your client sends - that header may also cause a 415.

If the issue is neither of these two then I'm afraid I'm out of ideas.
Thomas Daniels 5-Jun-19 8:51am View
Oh right, LinkedList stores objects. You have to cast the return value to HarddriveStorage like this:

HarddriveStorage myHD = (HarddriveStorage)hdList.get(1);
Thomas Daniels 5-Jun-19 8:44am View
HarddriveStorage yourObject = hdList.get(1);
Thomas Daniels 5-Jun-19 5:22am View
Use Length to find the length of parts and take the element at index length minus 1 to get the last element.
Thomas Daniels 5-Jun-19 5:16am View
Yes, so use Split with an appropriate delimiter and take the last element of the array.
Thomas Daniels 5-Jun-19 5:15am View
I don't think I know enough about pcntl_fork to know what exactly that script does, let alone to suggest an alternative... so sorry, I don't think I can help you further.
Thomas Daniels 5-Jun-19 5:10am View
I don't know what "last 10 argument" means.
Thomas Daniels 5-Jun-19 5:06am View
Not anymore, I gave you a link which could help finding the closest possible alternative, I found no other resources.

I also don't know what your code wants to do, perhaps there's an alternative to forking and you don't need forking at all. But I can't say anything about that if I don't know your use case.
Thomas Daniels 5-Jun-19 5:04am View
I based my code on the exact string in your question -- if your real data looks different, then you might need a different argument to the Split method or you may need to take other elements than the first and the second, or you may need to split twice.
Thomas Daniels 5-Jun-19 5:02am View
Yeah, the concept of "forking" doesn't actually exist on Windows.
Thomas Daniels 5-Jun-19 4:57am View
The point would be that you simulate a fork by running the same process as the currently running one. But I don't really have experience with it myself.
Thomas Daniels 5-Jun-19 4:41am View
This is all I cound find:
Thomas Daniels 5-Jun-19 3:56am View
I don't know if you can do that, and because I don't really know what you want to do, I also can't say what the right way is to do it. But if you don't want IndexOurOfRange, then do a check before trying to access a row.
Thomas Daniels 5-Jun-19 3:40am View
But also in that code, after row++, you aren't checking if the row actually exists...
Thomas Daniels 4-Jun-19 16:21pm View
Good point, didn't think of that. I updated my answer to quote you.
Thomas Daniels 4-Jun-19 14:15pm View
What's your question?
Thomas Daniels 27-May-19 2:41am View
Sounds like it does not like your SVG, then... I don't know what to do about that.
Thomas Daniels 24-May-19 9:43am View
The simplest ways to use them: for svgcleaner use the GUI (download at ), for svgo use the web-app at
Thomas Daniels 22-May-19 13:44pm View
You can comment at the bottom of the page, there's a forum there.
Thomas Daniels 19-May-19 17:31pm View
Yes, that approach should also work. And glad to hear that my article was helpful :)
Thomas Daniels 19-May-19 17:14pm View
I think setting it to zero will make it wait indefinitely, yeah.

Though, on second thought, you probably shouldn't use BabbleTimeout. The RecognitionResult will be null in that case, which you probably can't use.
Thomas Daniels 19-May-19 16:59pm View
I also haven't done experiments with this, but perhaps you could try an empty string or empty GrammarBuilder in a Choices object? And/or set the BabbleTimeout property on the SpeechRecognitionEngine to a nonzero value?
Thomas Daniels 19-May-19 16:35pm View
Yes, perhaps I should have emphasized that -- the fact that you can have Choices of GrammarBuilders makes it a good option for you. You could create a GrammarBuilder that has "[Instruction 1]" followed by choices "[1a]", "[1b]", etc. - and create such a GrammarBuilder for each top-level instruction and put all those in another Choices.
Thomas Daniels 6-Apr-19 6:16am View
Instead of fetching the messages every 10ms, you might consider using WebSockets to maintain a connection between the clients and your server, that works way better for this purpose.
Thomas Daniels 14-Mar-19 7:32am View
Thank you
Thomas Daniels 12-Mar-19 18:02pm View
I haven't ran the code, but what is bytes.Length on the server before you send the image? Your buffer on the receiving end has only 255 bytes, it would not surprise me if your image is bigger than that.
Thomas Daniels 2-Jan-19 14:05pm View
I wanted to test it but unfortunately I couldn't even fully render the document. All I got was a "Translate" header and a bunch of script errors...
Thomas Daniels 2-Jan-19 11:57am View
I think I may have found the cause. The value isn't "Listen" of your Google interface is not English. Please try my current code.
Thomas Daniels 2-Jan-19 11:41am View
I'm out of ideas then, for now. Perhaps I'm able to test it tonight...
Thomas Daniels 2-Jan-19 11:38am View
Are the buttons already visible in the control at the time you call this code?
Thomas Daniels 2-Jan-19 11:34am View
I posted an alternative that you can try, but currently I don't have the chance to actually test it myself.
Thomas Daniels 13-Jul-18 13:24pm View
Did you add the necessary 'using ...;' statements?
Thomas Daniels 20-Jun-18 11:42am View
Did you add a Reference to said library?
Thomas Daniels 5-Jun-18 11:51am View
Looks like I missed something when writing the answer... ignore what I said initially, I updated my answer and now it should be correct.
Thomas Daniels 4-Jun-18 11:32am View
Yes, that's what my answer should do.
Thomas Daniels 3-Jun-18 14:23pm View
You do not need to take a User in the constructor if you do not want to; you know better than I what further goals you have, so you should decide. I just wanted to mention it, in case you felt it would be better for your application.
Thomas Daniels 2-Jun-18 13:53pm View
You don't add it to your option tag. Add it separately to your form.
Thomas Daniels 2-Jun-18 13:48pm View
Ah. There's an <input type="text"> tag
Thomas Daniels 2-Jun-18 13:45pm View
I really don't know what you mean.
Thomas Daniels 2-Jun-18 13:26pm View
I'm not sure how you want to "integrate a form into an option tag", but what you can do, is integrating an option into a form.
Thomas Daniels 2-Jun-18 13:03pm View
You're welcome!
Thomas Daniels 10-May-18 8:48am View
What is SystemFunction? Does it come from an external library?
Thomas Daniels 8-May-18 16:48pm View
5; I was very focused on the errors but indeed, this is a much eleganter way to solve the whole problem.
Thomas Daniels 8-May-18 16:00pm View
Thank you!
Thomas Daniels 7-May-18 13:30pm View
+5, especially for that ,ng trick - learning something new every day! :)
Thomas Daniels 7-May-18 12:54pm View
"it gives me like this" - where exactly do you see that string?
Thomas Daniels 7-May-18 10:14am View
Hello! You wrote another comment on my answer yesterday asking for clarification and I did not have the time to answer it back then, but now you seem to have deleted the comment.

If you still need an answer to your question in the comment, it would be this:

That is actually unrelated to the scope. An integer is a value type so when you write "var b = t;", the value of "t" is copied into "b" and from then on, the variables are independent. But again, that's unrelated of scope.
Thomas Daniels 6-May-18 13:28pm View
I edited my answer; see the last paragraph.
Thomas Daniels 16-Mar-18 13:02pm View
For the third time, use your debugger to see what goes wrong. I do not have access to your computer or database so I cannot give more advice.
Thomas Daniels 16-Mar-18 12:56pm View
It does not seem to be entirely correct, otherwise you wouldn't get the error. But I cannot access your computer or your database so I cannot exactly see what your data looks like and why you are getting the error. That's why you should use a debugger to see what goes wrong.

(As a side note, you may want to Google for "parameterized queries c#", because right now you use string concatenation for your SQL queries so you are vulerable to SQL Injection)
Thomas Daniels 16-Mar-18 12:35pm View
The question isn't about string/int concatenation though, it's about creating variables with dynamic names :)
Thomas Daniels 16-Mar-18 12:34pm View
You can't dynamically create infinite variables but then again there isn't really a need for infinite variables as you can just store many elements in an array or List (I won't say "infinite" because practically, there are memory constraints).

If you use an array, you have to know the number of elements at the time of creation. Then indeed, you can ask the user how many elements they want to input.

If you cannot know the number of elements in advance, then go for a List (that's the second link I provided).
Thomas Daniels 10-Feb-18 10:50am View
Thank you!
Thomas Daniels 10-Feb-18 10:50am View
Yes, it would be accepted. 53 + 87 (so actually 140) is the first parameter 'a', 0 is the second parameter 'b'.

It will be accepted because WriteNumber wants two ints. And you have two ints: 140 (53 + 87) and 0.
Thomas Daniels 2-Feb-18 15:51pm View
Note that System.Speech works server-side, and that's pretty useless for a web application, because you'd want to have speech recognition on the client side. Do a Google search for "Web Speech API" and you'll find how to do that, with JavaScript.
Thomas Daniels 31-Jan-18 13:41pm View
Thomas Daniels 30-Jan-18 14:38pm View
As OriginalGriff said in his answer:

"And inherited members can be overridden, hidden, or replaced."

That's a notable difference: you cannot do that for the 'name' variable.
Thomas Daniels 25-Jan-18 10:46am View
I really have no idea what you mean. Please, instead of asking me, use your debugger to step through your code and figure out what's wrong.
Thomas Daniels 24-Jan-18 11:32am View
You're welcome!
Thomas Daniels 22-Jan-18 15:06pm View
Then, I have no ideas anymore. But keep Dave Kreskowiak's comment in mind.
Thomas Daniels 22-Jan-18 10:23am View
I've also come across a suggestion to put the c in brackets, like ^(c). If that doesn't work either, I'm out of ideas.
Thomas Daniels 21-Jan-18 9:01am View
I tried to run this and it's alerting "test", as expected and desired.
Thomas Daniels 21-Jan-18 6:12am View
Also, you probably have to increase placedmas at some point or it will always be below LandMasa.
Thomas Daniels 21-Jan-18 6:12am View
I described in my answer how to fix it: "You probably meant [x, y]"

So, replace [x1,y1] by [x,y].
Thomas Daniels 20-Jan-18 11:08am View
You're welcome!
Thomas Daniels 20-Jan-18 11:03am View
Ah, I found something. See the edit in my answer.
Thomas Daniels 20-Jan-18 10:51am View
Explain "doesn't work". Does it give an error? Is it the wrong process? Or does it just not copy the text? When I tried it, it worked fine.
Thomas Daniels 20-Jan-18 10:50am View
Just like you did it. The only difference is that you use GetActiveProcess instead of Process.GetProcessesByName.
Thomas Daniels 20-Jan-18 10:31am View
Uhh.. what exactly is impossible?
Thomas Daniels 20-Jan-18 8:30am View
Well, what will happen, is just that the first and the last element in the array will be empty strings. Knowing that, you can adjust your code to fix the problem. I don't know what you're trying to do, what the expected results are and what the actual results are, but you do know that, so you can use a debugger to figure out what goes wrong.
Thomas Daniels 20-Jan-18 7:09am View
I'm not sure what you mean.
Thomas Daniels 18-Jan-18 11:37am View
Is it your class? Then the interns of that class decide whether you can remove something from it or not.
Thomas Daniels 18-Jan-18 11:32am View
But what's DynamicArray?
Thomas Daniels 18-Jan-18 11:31am View
As I said, with a List<int>
Thomas Daniels 18-Jan-18 11:28am View
Not with an array; but you can use a List<int> and then you can do .Remove(6) on the list.
Thomas Daniels 18-Jan-18 11:26am View
You can't remove elements from arrays, but you can use a List<int>, then generate a random integer (that's a valid index of the List) and then use the RemoveAt method: see the documentation of List<T> and Random.
Thomas Daniels 18-Jan-18 11:19am View
Beat me to it! :laugh: +5
Thomas Daniels 16-Jan-18 15:50pm View
You're welcome!
Thomas Daniels 15-Jan-18 1:51am View
I see. Please see my edited answer.
Thomas Daniels 14-Jan-18 10:37am View
Can you share your code (and a JSON example so we can test)?
Thomas Daniels 12-Jan-18 10:36am View
Hmm, I don't know a lot about those algorithms, but take a look at the System.Security.Cryptography namespace, there are several implementations for symmetric algorithms there.
Thomas Daniels 10-Jan-18 10:16am View
You're welcome!
Thomas Daniels 10-Jan-18 10:09am View
Yes, it would fail - I made this regex specifically for strings with the country name at the end, because that was your example.
Thomas Daniels 10-Jan-18 10:04am View
$ means "end of the line", so this will match a sequence of "word characters" that's immediately followed by the end of the line.
Thomas Daniels 9-Jan-18 12:33pm View
I don't just know that; I suggest Googling the error message.
Thomas Daniels 7-Jan-18 16:48pm View
Well... that's impossible to tell based on that description. You could do that with both a compiler and an interpreter - refer to the definitions I gave in my answer. If they are not enough, the corresponding Wikipedia pages provide more elaborate definitions.
Thomas Daniels 6-Jan-18 3:42am View
Can you share the piece of code where the error happens? The error says what's wrong, but we can't see why you're expecting that it would work and why it doesn't.
Thomas Daniels 4-Jan-18 16:28pm View
You're welcome!
Thomas Daniels 4-Jan-18 16:26pm View
Yes, that's wrong usage: you must use Regex.IsMatch or this will not work.

If you really have to use Contains, I don't see another option than something like Alias.Contains("0") || Alias.Contains("1") || ...
Thomas Daniels 3-Jan-18 12:21pm View
Yep, I voted 4.
Thomas Daniels 3-Jan-18 12:02pm View
Ahh, I see. The definition of respectively is "separately or individually and in the order already mentioned" which made me think the order was important; of course I cannot tell whether OP's intention was my or your interpretation. It's possible I'm just nitpicking here :)
Thomas Daniels 3-Jan-18 8:30am View
I might have imagined that requirement, but the OP states in his example that the keys "should be (1,4,6) respectively" and the choice of the word "respectively" made me assume that the order must be respected in all cases.

Either way, it's definitely a neat solution if the order does not matter.
Thomas Daniels 3-Jan-18 7:12am View
Unfortunately this does not guarantee the correct order of the keys: try {9, 4} as values to find and the keys will be {3, 8} rather than {8, 3}.
Thomas Daniels 2-Jan-18 16:47pm View
You're welcome!
Thomas Daniels 2-Jan-18 12:54pm View
Thomas Daniels 2-Jan-18 9:12am View
You're welcome!
Thomas Daniels 1-Jan-18 4:35am View
input:not(submit) selects all input tags (because you're selecting all <input>-tags that are not <submit>-tags, so that's just all <input>-tags).
Thomas Daniels 1-Jan-18 3:51am View
After the whole selector you already have, put a comma and then a second selector.
Thomas Daniels 1-Jan-18 3:47am View
Right never worked for me, so I suggest left to fix it.
Thomas Daniels 1-Jan-18 3:42am View
Well, of course it's enabled - otherwise my code wouldn't work either :) But no, "right: '+=250px'" doesn't work for me on both Chrome and Firefox.
Thomas Daniels 1-Jan-18 3:37am View
Your code wasn't working for me with "right: '+=250px'"... but anyway, I'm not sure what you mean by this comment.
Thomas Daniels 1-Jan-18 3:30am View
The jQuery :input selector selects all input, textarea, select and button elements.
Thomas Daniels 1-Jan-18 3:26am View
Then you can just add button inside the 'not', like :input:not(textarea,button,:submit)
Thomas Daniels 31-Dec-17 13:06pm View
Thank you!
Thomas Daniels 30-Dec-17 15:15pm View
You're welcome!
Thomas Daniels 30-Dec-17 1:40am View
I don't know a lot of PHP/MySQL from the top of my head; I'd have to read the docs before I could do that. So instead, I encourage you to read the documentation so you learn how to do it yourself.
Thomas Daniels 29-Dec-17 8:05am View
I think you don't even need ToUpper, but you can use 'X2' instead of 'x2'.
Thomas Daniels 29-Dec-17 7:02am View
You could try uppercase hexadecimal. If that doesn't work, I'd contact the payment gateway system, they know way better what's going on.
Thomas Daniels 29-Dec-17 6:39am View
Your code seems to be working fine. The output is hexadecimal already.
Thomas Daniels 28-Dec-17 6:30am View
Thomas Daniels 28-Dec-17 2:35am View
I think so; I found that in this Stack Overflow answer.
Thomas Daniels 27-Dec-17 15:34pm View
Try adding an additional /y switch at the end of the net command.
Thomas Daniels 27-Dec-17 6:04am View
It's getTime, not gettime. JavaScript is case-sensitive.
Thomas Daniels 24-Dec-17 7:07am View
You're welcome!
Thomas Daniels 20-Dec-17 13:10pm View
Yeah... the thing is, you're accessing the site using a way that isn't officially supported, and totally not documented either. That means that the cause of the request rejection can be everywhere, in some server-side detection that we can never see, even though the code should work at a first glance.

Doing this is possible (if you can log in with your browser, it should be programmatically possible) but it's a work of much trial-and-error, so I'm not going to dig deeper into why it doesn't exactly work.
Thomas Daniels 20-Dec-17 8:58am View
It appears that Spotify returns a 400 if your username or password is incorrect. Have you checked these?

That being said, realize that you are probably using the Spotify login page in a way that it wasn't made to be used (but I have no idea what your application does, so this is just a guess); maybe the Spotify Web API is something for you? This API is made to be requested programmatically, whereas I doubt that for the login page you try to reach.
Thomas Daniels 20-Dec-17 7:48am View
You only want the 'tokenHere' part actually, then your current code will probably work (if the csrf_token= part is kept, then your request may have two csrf_token= strings in the body, if you don't change your code). The problem that caused Bad Request was indeed the 'random stuff' (that's what I suppose at least - I haven't tried the code with my Spotify credentials).
Thomas Daniels 20-Dec-17 7:15am View
To follow up on my previous comment: I took a look at the Set-Cookie header contents myself. I think you can extract the csrf_token easily like this: split on the = sign and on the semicolon with .Split('=', ';') and take the second element of that array (the first will be "csrf_token", the second will be the actual token).
Thomas Daniels 20-Dec-17 7:11am View
You aren't parsing the Set-Cookie header. You can't just "store and forget", it's more complicated than that. Quoting my previous comment:

However, it's not really sufficient: the Set-Cookie header tells you the name of all cookies (one in this case), their value, and additional properties. Print the value on the console and see what it looks like, and then you can see what you want to extract from it and how to parse it."
Thomas Daniels 20-Dec-17 7:06am View
Thanks :)
Thomas Daniels 20-Dec-17 6:57am View
Yes, that workflow sounds correct. I don't think you should worry about the new token in the POST request, unless you're submitting some other forms.
Thomas Daniels 20-Dec-17 6:19am View
You're welcome, I'm glad I could help!
Thomas Daniels 20-Dec-17 6:14am View
No, you can't put those parameters in the URL. The login request has to be a POST request, whereas putting the parameters in the URL would make it a GET request. See here to make a POST request:
Thomas Daniels 20-Dec-17 6:01am View
Yes, that line works because Headers[...] returns a string.

However, it's not really sufficient: the Set-Cookie header tells you the name of all cookies (one in this case), their value, and additional properties. Print the value on the console and see what it looks like, and then you can see what you want to extract from it and how to parse it.
Thomas Daniels 20-Dec-17 5:54am View
Ah. The purpose of such a cookie is to avoid Cross-Site Request Forgery (you can look that up for more details). Anyway, I have no idea why it's not in .Cookies... but it's still possible to retrieve it using the headers: response.Headers[HttpResponseHeader.SetCookie].
Thomas Daniels 20-Dec-17 5:43am View
I can reproduce not receiving a cookie, but what is the cookie that PostMan gets? Without seeing it, I have no clue why .Cookies is empty.
Thomas Daniels 8-Oct-17 15:20pm View
I don't know, I don't use FoxPro.
Thomas Daniels 27-Sep-17 12:12pm View
Oops. Fixed :)
Thomas Daniels 3-Sep-17 5:50am View
Thomas Daniels 3-Sep-17 5:50am View
Ah, I see now, I missed that part when originally reading the question. I believe Graeme_Grant's answer is what you're looking for then.
Thomas Daniels 1-Sep-17 17:03pm View
Thank you.
Thomas Daniels 31-Aug-17 13:34pm View
"But as this is a format specific to one application, you can't just convert it to HTML"
Thomas Daniels 31-Aug-17 12:55pm View
You ask how to get the real HTML file back... how are you sure this was an HTML file? Where did you find this?

[Edit] Also, in the 'source' of this question, there are several &nbsp; occurrences: are these part of this 'code', or were they inserted to actually represent spaces?
Thomas Daniels 31-Aug-17 6:18am View
Just like with the 'gender equals female' condition: create an if statement for a read line that equals "exit".
Thomas Daniels 30-Aug-17 13:04pm View
System.exit(0) exits the application.
Thomas Daniels 30-Aug-17 6:53am View
How does 'akxde' correspond to 1, 2, etc.? Is that just the position?

[Edit] Oh, I see now...
Thomas Daniels 29-Aug-17 13:37pm View
Yes, that is correct.
Thomas Daniels 29-Aug-17 13:29pm View
The browser is able to parse the HTML code into a tree of elements, and the code of the browser also implements the 'meaning' of the tags so it knows how to render them.

The algorithms to parse HTML are too complicated to simply explain in a comment here. There are definitely articles about it on the internet, but they won't be useful if you don't have prior programming experience.

What do you mean by 'data flow'?
Thomas Daniels 29-Aug-17 13:18pm View
I don't know what you mean by "source" - the tags and their effects have been defined by the W3C, if that's what you mean.

Tags don't "execute", they merely define the markup of a web page: a browser parses the HTML and renders it in the browser window, the way the HTML spec defines.
Thomas Daniels 24-Aug-17 6:15am View
I can't immediately see why that happens -- I'd recommend you to debug your queries. It can tell you where it goes wrong, and then you have a better idea about where to look.
Thomas Daniels 23-Aug-17 9:22am View
You don't leverage two actions using HTML; You use one action, and let the PHP script do everything it has to do. If you use PHP, you don't even need formspree anymore, because you can just use your own server.
Thomas Daniels 23-Aug-17 7:44am View
You need to have an URL that executes the code to send the data chunk-by-chunk.

I can't really give an example because I don't know if you're using WebForms or MVC. In case of WebForms, I wouldn't know myself, it's been a long time since I used Webforms. But you can surely find examples of it online.
Thomas Daniels 23-Aug-17 7:39am View
In my previous comment, I meant <audio> rather than <media>
Thomas Daniels 23-Aug-17 7:38am View
You don't process it any different than as if you'd send the whole file as once. You could just request this in a <media>-tag, for example.
Thomas Daniels 22-Aug-17 13:06pm View
In the System.IO.Path class, there is a method GetFileNameWithoutExtension method, you can use that.

Also you can use the Replace method on a string to remove the "-b", like yourString.Replace("-b", "");
Thomas Daniels 22-Aug-17 5:47am View
On top of your file: using System.Collections.Generic;

Before your for loop: List<string> list = new List<string>();

Inside the 'if' statement of the loop: list.Add(arr1[i]);

After the for loop, you can access the list like an array.
Thomas Daniels 22-Aug-17 5:40am View
If you want to store multiple of these variables, you can create a List<string> and store them there.
Thomas Daniels 22-Aug-17 5:27am View
Add using System.Linq; at the top of your file.
Thomas Daniels 22-Aug-17 5:24am View
See my edit.
Thomas Daniels 20-Aug-17 15:29pm View

using System.IO; // put this at the top of your file

string path = tagFile.Name;
string result = Path.GetFileNameWithoutExtension(path);
Thomas Daniels 20-Aug-17 15:28pm View
No, you need the static method GetFileNameWithoutExtension in the Path class in the System.IO namespace.
Thomas Daniels 20-Aug-17 13:33pm View
I built some deserialization code; see my edited answer for the code and an explanation.
Thomas Daniels 20-Aug-17 13:12pm View
It should be possible to reverse the bit operations logic -- but I don't know what the point of '& 0x3F' is. I may be missing something, but it looks pointless, and removing it would help with the reverting logic. Also, your 'year' calculation sounds dangerous: what about years under 2000? When reverting, how will you be sure between 1999 and 2255? (because you're casting -1 to a byte, thus underflowing, getting 255 again)
Thomas Daniels 20-Aug-17 6:52am View
What do you mean by "isn't working"? Does it give an error? Or does it just not move the file? And does the file in Label1.Text exist?
Thomas Daniels 20-Aug-17 2:48am View
Learn to use a debugger. It's a tool that lets you run your code step-by-step and check what the current values of variables are and such. If the debugger step would be at this if statement, you'd look at it and probably notice what you did wrong. Everyone makes mistakes, and a debugger helps you find them :-)
Thomas Daniels 18-Aug-17 13:05pm View
:) Also +5 for your reference! I hadn't found that
Thomas Daniels 18-Aug-17 12:36pm View
I don't exactly know what a hierarchyID is, but you could try starting with adjusting the example I linked to -151, and then debug to go into your converter method and figure out what dto_value (in the Python code) contains.
Thomas Daniels 18-Aug-17 7:05am View
Thomas Daniels 18-Aug-17 6:31am View
I have not looked at your full code, but maybe using a method argument (like _reqUrl and _reqType here) would work?
Thomas Daniels 18-Aug-17 6:26am View
That's hardly a question. I'm not going to try to understand such a big piece of code, especially if I have no idea what the problem actually is.
Thomas Daniels 18-Aug-17 5:48am View
Then you call the BrokerRequest method in the handler of your button click event.
Thomas Daniels 17-Aug-17 7:06am View
What folder do you mean? The folder of your project? That doesn't seem like the right location - put it somewhere in %AppData% and then access it from your code like you did when it was in Program Files.
Thomas Daniels 17-Aug-17 6:37am View
Those errors seem to be unrelated to the database, but they also aren't really errors that I can help with because only you can access your project (and it seems pretty big, so I'm not really interested in receiving it to look into it myself). Read the error messages and Google for clarification if necessary.
Thomas Daniels 17-Aug-17 5:42am View
One option is to run your application as administrator, another option is to place the database file in a folder where you don't need administrator permissions (such as AppData). I recommend the second option.