Could you please provide code example with jquery chatbot code example for static answers?
byka
Posts
-
jquery chatbot code example for static answers -
ImageButton inside DatalistI have datalist with imageButton generated from folder with Images. I am trying to change border on clientClick event to indicate that user selected that image. I was able to get click event for image but how to I unselect others images? function ccSelectedImage(e) { { alert(e); e.style.border = "1px solid Red"; return false; } }
Dim dir As DirectoryInfo = New DirectoryInfo(MapPath("Images")) Dim files As FileInfo() = dir.GetFiles() Dim listItems As ArrayList = New ArrayList() For Each info As FileInfo In files listItems.Add(info) Next dtlist.DataSource = listItems dtlist.DataBind()
-
Open template word doc and replace valuesBelow is my code. I can't figure out how to find specific text and replace it
Dim byteArray As Byte()
Dim myDataTable As DataTable = objDB.GetTemplates(plan.YearCode, "Templates", plan.State)If Not myDataTable Is Nothing AndAlso myDataTable.Rows.Count > 0 Then byteArray = DirectCast(myDataTable.Rows(0).Item("Template"), Byte()) Else Throw New Exception("Unable to retrieve the specified template") End If Using mem As MemoryStream = New MemoryStream mem.Write(byteArray, 0, CInt(byteArray.Length)) Using doc As WordprocessingDocument = WordprocessingDocument.Open(mem, True) ??? How do I find specific word and replace it Helper.DownloadStream("Schedule" &" .docx", mem, Helper.WORD\_CONTENT\_TYPE) End Using End Using
-
Open template word doc and replace valuesI have a web application where I have a template (word) which I need to open/save and replace some values at run time. How do I do this?
-
Extract numbers with % sign from a stringgot it. thank you
-
Extract numbers with % sign from a stringwhat am I doing incorrect: Dim number = Regex.Match("50%", "\d+$").Value number is empty
-
Extract numbers with % sign from a stringI need to Extract numbers with % sign from a string. Example: "50%", "test 100%","ttest 50% test test". thank you
-
Windows server OnTimedEventhere my updated code. I have replace email with : Throw ex. Is that what you mean? I am not sure I am clear on what you have in mind. Could you share maybe the code? :
Private Sub OnTimedEvent(source As Object, e As ElapsedEventArgs)
TryRetryOnTimeout(source, e) Catch ex As Exception While \_currentRetry < 3 RetryOnTimeout(source, e) \_currentRetry = \_currentRetry + 1 End While modCommon.SendEmailExceptionToDev("ASH File System Watcher Outgoing: OnTimedEvent Exception", ex) Err.Clear() End Try End Sub Private Sub RetryOnTimeout(source As Object, e As ElapsedEventArgs) Try aTimer.Stop() Dim fileName As String = String.Empty While queueList.Count > 0 If \_SFTP.Connected = False OrElse \_SFTP.SFTPState = Dart.Ssh.ConnectionState.Closed Then \_SFTP.Connect() End If fileName = queueList.Dequeue.ToString If Not fileName Is Nothing AndAlso fileName <> String.Empty Then ProcessFile(fileName) End If End While If \_SFTP.Connected = True Then \_SFTP.Disconnect() End If aTimer.Start() Catch ex As Exception Throw ex End Try End Sub
-
Windows server OnTimedEventHere is what I did: 1.Add new sub: RetryOnTimeout 2. Add retry in Catch. Is this what you suggested ?
Private Sub OnTimedEvent(source As Object, e As ElapsedEventArgs)
TryRetryOnTimeout(source, e) Catch ex As Exception While \_currentRetry < 3 RetryOnTimeout(source, e) \_currentRetry = \_currentRetry + 1 End While modCommon.SendEmailExceptionToDev("OnTimedEvent Exception", ex) Err.Clear()
End Try
End Sub Private Sub RetryOnTimeout(source As Object, e As ElapsedEventArgs) Try aTimer.Stop() Dim fileName As String = String.Empty While queueList.Count > 0 If \_SFTP.Connected = False OrElse \_SFTP.SFTPState = Dart.Ssh.ConnectionState.Closed Then \_SFTP.Connect() End If fileName = queueList.Dequeue.ToString If Not fileName Is Nothing AndAlso fileName <> String.Empty Then ProcessFile(fileName) End If End While If \_SFTP.Connected = True Then \_SFTP.Disconnect() End If aTimer.Start() Catch ex As Exception modCommon.SendEmailExceptionToDev("OnTimedEvent Exception", ex) Err.Clear() End Try End Sub
-
Windows server OnTimedEventI have the following onTime event in windows server. I would like to try 3 times to connect and submit files before I throw an exception. How would I do this?
Private Sub OnTimedEvent(source As Object, e As ElapsedEventArgs)
Try aTimer.Stop() Dim fileName As String = String.Empty While queueList.Count > 0 If \_SFTP.Connected = False OrElse \_SFTP.SFTPState = Dart.Ssh.ConnectionState.Closed Then \_SFTP.Connect() End If fileName = queueList.Dequeue.ToString If Not fileName Is Nothing AndAlso fileName <> String.Empty Then ProcessFile(fileName) End If End While If \_SFTP.Connected = True Then \_SFTP.Disconnect() End If aTimer.Start() Catch ex As Exception modCommon.SendEmailExceptionToDev("OnTimed: OnTimedEvent Exception", ex) Err.Clear() End Try
-
Error too many changes at once in directory from the filesystemwatcherI am getting Error too many changes at once in directory from the filesystemwatcher. How do I fix it?
-
Starting the process as user will not work on Win2012Maybe this details will help. SID1 have access to cmd.exe and shares. SID2 have access to DB . When I run this I am passing SID2 while accessing cmd.exe under SID1 psi.Domain = Domain psi.UserName = UserName Dim pword As New System.Security.SecureString() For Each c As Char In Password pword.AppendChar(c) Next psi.Password = pword Settings windows to normal don't help
-
Starting the process as user will not work on Win2012it's a console app and user is admin user and even if I remove Verb = "runas" still getting the same issue
-
Starting the process as user will not work on Win2012Starting the process as user will not work on Win2012. Getting access Denied and user is an admin
Dim psi As New System.Diagnostics.ProcessStartInfo
psi.UseShellExecute = False
psi.WindowStyle = ProcessWindowStyle.Hidden
'Win2012 run as admin
psi.Verb = "runas"'This will not for Win2012 need to pass User as argument
'psi.Domain = Domain
'psi.UserName = UserName
'Dim pword As New System.Security.SecureString()
'For Each c As Char In Password
' pword.AppendChar(c)
'Next
'psi.Password = pword -
BCP or Bulk InsertDo you have a code example how to implement BCP or Bulk Insert in .net using .frm files.
-
CreateProcessAsUser or LogonUseryes.
-
CreateProcessAsUser or LogonUserYou're writing the scheduler app? - Yes Is this written as a standard console or Windows Forms application or is it a service? - Consolse application Does the application this scheduler is launching have to show up as a window that the user can type in? - No Why must you call CMD instead of just launching BCP directly?- you mean call bcp.exe instead of cmd?
-
CreateProcessAsUser or LogonUserMaybe this explanation will help : scheduler running under user account with no permission to C: drive. Application account should have some permission to C:drive in order to access cmd.exe I need to add code ( CreateProcessAsUser or LogonUser) for application user in order to call cmd.exe
-
CreateProcessAsUser or LogonUserit's a console application running on a server from a scheduler. I need to start a process as specific user with access to cmd.exe and pass userID in my process
-
CreateProcessAsUser or LogonUserHow can I use the CreateProcessAsUser or LogonUser when staring the process:
Dim ps As New System.Diagnostics.Process
ps.StartInfo.UseShellExecute = False
ps.StartInfo.Domain = Domain
ps.StartInfo.UserName = UserNameDim pword As New System.Security.SecureString() For Each c As Char In Password pword.AppendChar(c) Next ps.StartInfo.Password = pword ps.StartInfo.LoadUserProfile = False 'This Works: ps.StartInfo.WorkingDirectory = ApplicationWorkingDir ps.StartInfo.FileName = "cmd.exe" 'Win2012 run as admin ps.StartInfo.Verb = "runas" If BatchSize = String.Empty Then ps.StartInfo.Arguments = "/c bcp " + DbTable + " in " + SourceFile + " -m " + MaxErrors + " -f " & FMTFile & " -e " & ErrorFile & " -o " & LogFile & " -S " & ServerName & " -T " Else ps.StartInfo.Arguments = "/c bcp " + DbTable + " in " + SourceFile + " -m " + MaxErrors + " -f " & FMTFile & " -b" & BatchSize & " -e " & ErrorFile & " -o " & LogFile & " -S " & ServerName & " -T" End If ps.StartInfo.WindowStyle = ProcessWindowStyle.Hidden ps.Start() ps.WaitForExit()