|
can anyone pls help me to explain what is the meaning of the regex
variableSyntax = new Regex("\\w+(\\.\\w+)*[ ](?<variablename>\\w+)\\s*(=|;)");
what's the ?<variablename> meaning???
|
|
|
|
|
Nothing.
You can use it in the meaning of {0,1}: [a-z]?
You can use it to make matches non-greedy: [a-z]*?
You can even use it to make ? in the form of {0,1} non-greedy: [a-z]??
You can use it in several extensions in the form (?x...) where x is any of the characters: iLmsux:P#=!<(
There is however no form where it will appear first in a parenthesis followed by the \ character.
If it is allowed, it has no special meaning, and it will be one of the few cases where it actually matches a question mark without needing to be escaped.
---
b { font-weight: normal; }
|
|
|
|
|
I tried to build a test commandbar in Infopath following the direction in Microsoft.Com. However, I found that the command bar is only available when I preview the template. Now, I want to code a command bar so that it could help users to submit the templates to WebService (not those data but the template). So my question is how can I estable a command bar which could execute codes in design mode. THANK YOU ALL!
|
|
|
|
|
Is the .exe file in the bin folder the real .exe file that you would distribute, if not how do I make that distributabel .exe?
|
|
|
|
|
Make sure that you perform a build in Release mode. Then use the *.exe file from the [project_directory]\bin\Release folder. Good luck with your projects.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
|
|
|
|
|
|
And don't forget any *.dll files in the same folder, in case your project has some dependencies.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
When you say dependencies do you mean references?
|
|
|
|
|
|
And what do you mean same folder. Does it always need to be present with the .exe?
|
|
|
|
|
In .NET, yes, unless the assembly is registered in the global assembly cache. But most of the time, if you reference a .DLL, it will be copied to your .EXE's folder.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Where do I find the .DLL?
|
|
|
|
|
It depends. If you don't reference any DLL, your program will only use DLLs included in the .NET Framework, and thus installed on the client system if your app is to run.
If you use any non-standard DLL (say, a library of reusable utility routines) then you must reference it (select it in the References dialog in Visual Studio). Most DLLs referenced this way will be copied to your EXEs folder, so just search there (in the bin\Release folder).
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
You mean only copy a DLL if I make a DLL myself?
|
|
|
|
|
Just copy all the DLLs with your EXE in the bin\Release folder. That should do it.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Can a picture box display multiple images? If it can can you easily determine where they are and change the values?
|
|
|
|
|
Unless mistaken, I think you can only display a single image at a time in a picture box. Depending on your needs, you might want to consider using multiple picture boxes if possible. I hope this helps.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
|
|
|
|
|
I was afraid I would have to. No problem though, it will still be possible to do it as a want with multiple. Thanks for the help.
|
|
|
|
|
Anyone know of a good method for extracting the text from an HTML document (loaded from an address). I would also be interested in knowing the size of the text as well. Any thoughts?
|
|
|
|
|
StreamReader should be able to read the text.
|
|
|
|
|
You can try applying a regex that replaces everything between < and > with empty strings. There is also this[^] SGML parser which you can use to extract the text.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
Can anyone tell me how to get the name of a variable as a string. Actually I want to store the values of the varibale( my varibale is a 2D array) in a text file named the same. Like if the name of the variable is myMatrix, then it should be able to store the values of the array in myMatrix.txt
One more thing I want to do is that, I want to get user input as what should be given name of the variable. So, if user says,
>>a=[1,2,3;2,3,4];
My program should be able to create a matrix with variable name a and initiate it with the values given by the user.
Regards
Amit
|
|
|
|
|
You can't create variables dynamically, so there is no point of getting the name of a variable as a string. You already know the names of all your variables.
What did you intend to use this for? I imagine that something like a collection would be more useful for you.
---
b { font-weight: normal; }
|
|
|
|
|
thanks for your answer. but, i was wondering how MATLAB creates the variable name dynamically. if you enter something like the following
>> a=[1,2;2,3]
Then it creates a variable of name a and stores its value in its workspace, which you can later access it.
Regards,
Amit
|
|
|
|
|
MATLAB most likely created their own parser that can interpret their language. Depending on how far you wish to go you could do the same thing. You'll need to create a stack that contains all of the variables and there relevant values.
If you want to just assign values to names you could create a Map of all the names to their values. You would then be able to access them like so: String myVal = (String)variables["a"]; This is a simplistic point of view on the whole matter of creating a parser though.
Look up some articles on Abstract Syntax Trees (AST), and some parser generators such as Lex, Bison, SableCC, and ANTLR.
Hope this helps.
-
Drew
|
|
|
|