No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I am very new to javascript I am creating a quiz form in which each question has four options. Ex: 1. What is your favourite sport ? A. Cricket B. Football C. Hockey D. Baseball When mouse over on options A, B, C, D bg color has to be appeared … |
|
In the following code, the pattern is reading text between specified tags and I want to replace text in between those specified tags. I tried but replacing in whole file. string input = File.ReadAllText(@"D:\text\div.txt"); string pattern = @"<body.*?>(.|\n)*?</body>";//reads text between specified tags MatchCollection matches = Regex.Matches(input, pattern); // Console.WriteLine("Matches found: … |
|
1) <s>Hai Dani</s> 2) <s>HAI DANI</s> 3) <s>hai dani</s> This code gives correct output for only first sentence Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find.Replacement .Font.SmallCaps = True End With With Selection.Find .Text = "\<s\>(*)\</s\>" .Replacement.Text = "\1" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False … |
|
I am using following code to split a text file where the file path is provided through textbox string[] allFiles = System.IO.Directory.GetFiles(@"textBox1.Text); foreach (string file in allFiles) Regex.Split(textBox1.Text, {"<ty>"}); but getting an error My need is read a large text file and split it based on <th> tag and save … |
|
I am using the following code to create a log file but getting an error "User-defined type not defined" Help me Thanks in advance Sub main() Dim dDate As Date Dim boDP As busobj.DataProvider 'error occured Dim sLast As String Dim sFileName As String Dim sDir As String Dim dTime … |
|
Re:
Hi there, This is the code for opening various files using vb applicaton but here i need to provide the path for file. i want to open any file using vb app using Open Dialog control. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation … |
|
I can search and find text in word doc through vba but I dont understand how to search images Its a big problem to me Can anybody help me thanks in advance |
|
I am using following where it replaces entities like < with <, > with >, &alpha wth α but i need replace "<", ">", "@"......with unique codes like < , > .......... Public Function QuickRead(FName As String) As Variant Dim i As Integer Dim res As String Dim l As … |
|
I am using following code. It creates a macro button on word menu in Add-Ins tab Public Sub ShowToolbar() ' Assumes toolbar not already loaded ' Application.CommandBars.Add TOOLBARNAME AddButton "Button caption", "This is a tooltip", 526, "NameOfASubInYourVBACode" ' call AddButton more times for more buttons ' With Application.CommandBars(TOOLBARNAME) .Visible = … |
|
I am using the following code which creates a toolbar button on excel menu. On button click it executes a macro Private Sub Command1_Click() ' Start Word Dim wdapp As Object 'Excel.Application Set wdapp = CreateObject("Word.Application") ' Make it visible... wdapp.Visible = True ' Add a new workbook Dim xlbook … |
|
I want to create a template file in which I want to create my own styles programatically(in VBA) I have following code Sub Style() Dim myStyle As Style Set myStyle = ActiveDocument.Styles.Add(Name:="Abbreviations", _ Type:=wdStyleTypeParagraph) With myStyle.Font .Name = "Calibri" .Size = 12 .Color = wdColorBlue End With Selection.Range.Style = "Abbreviations" … |
|
I am using following code which is displaying all files in listbox. But only files with specified extension selected from combobox(i.e .txt or .html....) should be displayed private void button1_Click(object sender, EventArgs e) { string search = textBox1.Text; string folder = textBox2.Text; MessageBox.Show(comboBox1); string[] allFiles = System.IO.Directory.GetFiles(folder, "comboBox1");//Change path to … |
|
I am using following code. It displays date and time for each file in log. But I want it to display only once sw.WriteLine("File Name {0}", file); sw.Write("\r\nLog Entry : "); sw.WriteLine("{0} {1}", DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString()); sw.WriteLine ("-------------------------------"); The output is Log File : File Name D:\DotNet\test\1.txt Log Entry : 12:47:05 … |
|
I am having an Html file in which there are some errors. I want all the errors to be dislayed in a log file can anybody help me thanks in advance |
|
I am using following code, it replaces entities in whole html file. But I want to replace only in between specified tags(i.e <div>......</div>) please help me { FileInfo n = new FileInfo(inputpath); string initContent = File.ReadAllText(file); int contentLength = initContent.Length; Matches m; while ((m = Regex.Matches(initContent, "[^a-zA-Z0-9<>=./\\s(&#\\d+;)-]")).Value != String.Empty) initContent … |
|
I am new to C# I want to replace Characters such as("' & < > ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ² ³ ´ µ ¶ · ¸ and so on...) with entity numbers like (" ' & < >   ¡ ¢ £ … |
|
following code replaces Figure 1....so on with <a href=1>1</a> .....so on but want to replace this " <a href=1>1</a> " ....... with <a href="#fig1">Figure 1</a>....so on in single line declaration please help me public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs … |
|
i am new to C# i want to replace Figure 1, Figure 2....... with <a href="#fig1">Figure 1</a>....... i used the following code but no desired output { string targetId = "1"; string pattern = @"(?<=<a[^>]+href=""Figure\?mId=(?<Id>" + targetId + @")(?="">)"; string replace = "<a href>Figure</a>?pId=${Id}"; string result = Regex.Replace(input, pattern, replace); … |
|
want to replace Figure 1, Figure 2 and so on ........ with <a href="#fig1">Figure 1</a> plz help me thanks in advance |
|
Re:
Hello, I have developed an app. I want to protect this app, just like the one where we install some software by entering CD-key/Serial key. But I m not understanding how to do it? I want the serial key to be based on some formulation by MAC address! My Case: … |