Programming

52K

Solutions

40K

Contributors

Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi, we have two tapes to be used for daily backup. and we have scheduled jobs to run the daily backups at night. previously, we only need 1 tape but now, it asks for 2nd tape. we have a program to initialize single tape, but not for 2 tapes. can anyone helps on how to intialize more than 1 tape  for daily backup   (1 week rotation basis). 2 tape cartridges per day, 14 tapes/week. os version: v6r1. thanks.
      PGM                                                                
      DCL VAR(&DAY) TYPE(*CHAR) LEN(4)                                  
      DCL VAR(&DLYVOL) TYPE(*CHAR) LEN(6)                                
      RTVSYSVAL SYSVAL(QDAYOFWEEK) RTNVAR(&DAY)                          
      CHGVAR VAR(&DLYVOL) VALUE('DLY' *CAT %SST(&DAY 2 3))              
      INZTAP DEV(tapxx) NEWVOL(&DLYVOL) NEWOWNID(xxxx) CHECK(*NO) -
 ENDOPT(*REWIND)                                                        
      ENDPGM
0
Ultimate Tool Kit for Technology Solution Provider
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

What could affect access_token behaviour? The question rises from a programming problem that an URL gives access to login information and functions in a site when opened in a mobile device browser, but works properly with no security leaks on PC?
0
I have a code below that finds CSA and places it into a specific cell and then removes CSA from the original cell. My question is there a way to search for anything between parentheses and do the same thing? Copy it out and place it into a specific cell and then remove it from the original cell?

One thing that makes it tricky is some of the parentheses could start in one column and end in another. For example the starting parentheses  could be in column A1 and the end parentheses could be in E1.  If I could copy the text between those and put them in one cell somewhere else that would be ideal.  

I uploaded an excel doc with an example of what I have on sheet1 and what I am attempting to make it look like on sheet2.

Sub CSA2()
Dim findrange As Range
Dim finddata As String
Dim k As Integer
Dim cel As Range

'k = Range("A" & Rows.Count).End(xlUp).Row
'
'Set findrange = ActiveSheet.Range("A1:A" & k)
Set findrange = Selection
finddata = "CSA"

For Each cel In findrange

    If IsEmpty(cel.Value) = False And cel.Value <> "CSA" Then
        If InStr(1, cel.Value, finddata, 0) Then
            cel.Value = Replace(cel.Value, finddata, "")
           
            cel.Offset(0, 2).Value = "CSA"
           
        End If
    End If

Next cel

End Sub
example1.xlsx
0
Hi there,
If I'm searching for phrase "A B" and I define the values , for example, of A as (Red, blue, green, yellow, brown,) and B as (Jacket, hat, blouse, car), then the number of phrases I'm looking for is 20 and the number of words is 40.
Red Jacket ,Red hat, Red Blouse, Red Car
Blue Jacket etcc….  
Is there a way/tool/ search engine that would allow me to search for all the 20 phrases/40 words by just specifying A:  and B (total 9 words) (Red, blue, green, yellow, brown)?
Regards
Hashem
0
Hi

We would like to be able to dynamically select a row in Excel that we can then underline. We can have any amount of columns so it will never been from the same one. We have some code that selects cells, merges etc. It then highlights these. We then need to select the bottom cell and then highlight the row and going left to column A. We are using Excel 2016.

Apologies if this doesn't make sense :)...but I have attached what we need.

Thanks In Advance
Excel-2010-Selection.png
0
Nothing to do with sheet1
delete the last cell data of each row of Sheet2
delete the last cell data of each row of Sheet3
delete the last cell data of each row of Sheet4

see the Result , I want the result in same sheet not in separate sheet



I have to do all this by Vba
Kindly see the sample file
Book1.xlsm
0
im getting this error message in my ruby on rails blog app and i have no idea why

this is my controller file:

class PostsController < ApplicationController
  def index
    @posts=Post.all.order("created_at DESC")
  end

  def new
    @post=Post.new
  end

  def show
    @post=Post.find(params[:id])
  end

  def create
    @post=Post.new(post_params)
    if @post.save
      redirect_to @post
    else
      render "new"
    end
  end

  def edit
    @post=Post.find(params[:id])
  end

  def update
    @post=Post.find(params[:id])
    if @post.update(params[:post].permit(:title, :body))
      redirect_to @post
    else
      render "edit"
    end
  end

  def destroy
    @post=Post.find(params[:id])
    @post.destroy
    redirect_to posts_path
  end

  private

  def post_params
    params.require(:post).permit(:title, :body)
  end

end

Open in new window


and this is my edit file: (i get the error when trying to delete a post and the link to the destroy path is on my edit page)

<font color="#BD004B">
    <h1 class="smallBorder">Edit Post</h1>
</font>
<br/>
<hr size="10" width="auto" color="#BD004B">

<%=render "form"%>

<ul>
  <li>
    <%=link_to "Delete", posts_path(@post), method: :destroy, data:{confirm:"Are you sure you want to delete this post?"}%>
  </li>
</ul>

Open in new window

0
var hour = DateTime.Now.Hour;
            ViewBag.WhenToCall = hour < 12 ? "this Morning" : "this Afternoon";

            return View();

This is on a website. How do I adjust the above so it shows = this evening if between 6pm and 11pm in the evening and how can I improve to show certain messages say on a Saturday or Sunday.
Kind regards.
0
I'm from Russia, I'm sorry for my English, I use google translator
I'm using the HTA file. It is necessary that when the console starts (cmd), which this hta file does, the command is executed and the ENTER key is pressed. My code, but it's probably incorrect.

       
 var cmdRun;
  function kb(userid, token, server, options) {

        var autoR = document.getElementById('a-r');
        var autoC = document.getElementById('a-c');
        var path = "cmd /c chcp 65001 & cmd.exe -t " + token + " -i " + userid + " -f ./kfa/nonever/" + server + ".cfg " + options;
        var WshShell = new ActiveXObject("WScript.Shell");                      
        function st () {
            //WshShell.Exec("exec zzz");
            cmdRun.StdIn.WriteLine("exec zzz");
        }                                            

        if (autoR.checked && autoC.checked) {                
            cmdRun  = WshShell.Run(path, 2);                
            setTimeout(st, 20000);
            setTimeout(function() {
                if (autoR.checked) {                        
                    login();
                }
            }, 60000);                
        } else if (autoR.checked) {
            cmdRun = WshShell.Run(path);
            setTimeout(setCon, 2000);
            setTimeout(function() {
                if (autoR.checked) {
                    login();
                }
            }, 60000);           
        } else if (autoC.checked) {
           cmdRun = 

Open in new window

0
Hi there,
Is there a way/tool/ search engine that would allow me to search for multiple variations of the same phrase at the same time?
For example, I want to search for "revealing his true belief". But I also want to search for all the phrases that have the same or similar meaning like"betraying their real opinion".
The total number of words here is 8 but there are many different ways to combine the words so there are many different potential alternative phrases: "revealing his true opinion" "revealing his real opinion" "betraying our real opinion" etc….
Is there a way to accomplish this in two conditions?
1- I determine the alternatives. So I specify that for "word 1 word 2 word 3 word4", the alternatives for word 1 are: Only revealing or showing.
2- Use all the possible synonyms or even antonyms for "revealing" in word 1.
The tips I got so far from Reddit
"
Word2Vec or Doc2Vec is something that can be used for this, depending on whether you just wish to substitute synonyms or match the distributional semantics of arbitrary phrases.

---
If you don’t know your alternatives (e.g., you don’t know that revealing is similar to showing), then you need something than can do synonyms. Most search engines (e.g., Google) can do this, as can some natural language processing programs.

If you do know the alternatives, you can describe your pattern to a search engine or most computer programs using regular expressions. A regex that would match your example would be …
0
On-Demand: Securing Your Wi-Fi for Summer Travel
LVL 1
On-Demand: Securing Your Wi-Fi for Summer Travel

Traveling this summer?Check out our on-demand webinar to learn about the importance of Wi-Fi security and 3 easy measures you can start taking immediately to protect your private data while using public Wi-Fi. Follow us today to learn more!

How to Add MIME type like .json  type in iis by installer.
0
I have been trying to follow the videos and extract data from an HTML file and I was able to do so on my system. BUT when I try to use the same code/module to extract data from the html file from my Friend's system it shows me an "error 91: object variable or with block not set" at line 2 and sometime even at line 1. Basically it is not reading the html document on a different system. The HTMLButton1  when tried in debug.print show nothing
Dim file As String
Dim IE As New SHDocVw.InternetExplorerMedium
Dim HTMLDoc As MSHTML.HTMLDocument
Dim HTMLButton1


file = "C:\temp\HTML\page1.html"

IE.Visible = False
IE.navigate file 'line 1
Do While IE.Busy = True
Loop

Set HTMLDoc = IE.Document
Set HTMLButton1 = HTMLDoc.elementFromPoint(338, 462)


array_objects(index).date = HTMLButton1.innerText 'line2


IE.Quit
Set IE = Nothing

Open in new window

0
I need some advice on learning a new programming language.    I have background in computer graphics so I am a visual type of person.  I want to create a program that will help my wife back up her files to the external hard disks and learn how to code other programs.  Soon I am going to go over some online videos about programming terminology so I can learn different terms and what they mean.

Next:
I have written some short scripts in PowerShell and I like it a lot because it is very fast, but I also recently downloaded Visual Studio 2017 and am thinking about using Visual Basic instead because I think it would be easier for me to learn.

How fast is Visual Basic compared to PowerShell and what do you think I should use?
0
To hire android app developers, you need to know if the person you are looking for is suited for the job. When you surf the web for “Android app developers for hire” or anything close to that you will find results listing sites where programmers and their data and background is already included.
0
Hi

I have a worksheet with a specific character (E.g. "X")  in various cells along a row. The user has the option to hide the columns that do not apply to them (a button linked to a macro that hides the selected columns). Some of the hidden columns may contain the "X".

I am trying to use COUNTIF, COUNTA or a variation of these to count the number of cells that contain "X" in the range(D13:AR13), but ignoring the columns that have been hidden by the macro.

I have tried several suggested solutions on EE but either it ignores the hidden columns and just gives me the total number of occurrences of "X", or the wrong answer (For example, when I use =COUNTA(103,D13:AR13, I get 8 (there are actually only 7 "X"s). I have also tried using user defined functions, but these throw up 'Invalid name" errors.

I could probably do this using a macro that recounts the number of "X"s every time columns are hidden or unhidden but I'd prefer a simpler solution. Surely, it can't be that difficult to count the number of cells that contain a character, but ignore hidden columns?

The solution, whether macro driven or a formula, needs to be dynamic. I.e. when the user hides columns the new count appears instantly.

Any help greatly appreciated.

Regards

Terry
0
Hi Guys, I have an accounts spreadsheet where all the Account Numbers begin with 93 or 94 in Column A. How do I create a macro that can loop down Column A , find all the numbers in the rows that begin with 93, then multiply all the values in the same row by -1? For example, if Cell A45 = 935678, then multiply all the numbers in row 45 to the right of Column A by -1 so if B45 = 57, the result will be -57?
0
I am getting below error


[INFO] Scanning for projects...
Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.example.howtodoinjava:spring-boot-soap-service:0.0.1-SNAPSHOT: Failure to find org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.M4 in http://111.2.222.111:8081/archiva/repository/internal was cached in the local repository, resolution will not be reattempted until the update interval of archiva has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 14, column 10
 @
The build could not read 1 project -> [Help 1]
 
  The project com.example.howtodoinjava:spring-boot-soap-service:0.0.1-SNAPSHOT (C:\Users\gmy\tes\spring boot_webservices_soap_rest\spring-boot-soap-service\pom.xml) has 1 error
    Non-resolvable parent POM for com.example.howtodoinjava:spring-boot-soap-service:0.0.1-SNAPSHOT: Failure to find org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.M4 in http://111.2.222.111:8081/archiva/repository/internal was cached in the local repository, resolution will not be reattempted until the update interval of archiva has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 14, column 10 -> [Help 2]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

0
spring boot security

how SimplePasswordValidationCallbackHandler dfferent from other implementatons like
SpringCertificateValidationCallbackHandler

SpringDigestPasswordValidationCallbackHandler


what is meaning of call back handler

Please advise
0
apart from the "Elements" at top like GetCourseDetailsRequest, GetCourseDetailsResponse
 why we have Types at bottom like Status and CourseDetails at the bottom
<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://xyz.com/courses" xmlns:tns="http://xyz.com/courses"
	elementFormDefault="qualified">

	<xs:element name="GetCourseDetailsRequest">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="id" type="xs:int" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="GetCourseDetailsResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="CourseDetails" type="tns:CourseDetails" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="GetAllCourseDetailsRequest">
		<xs:complexType>
		</xs:complexType>
	</xs:element>

	<xs:element name="GetAllCourseDetailsResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="CourseDetails" type="tns:CourseDetails"
					maxOccurs="unbounded" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="DeleteCourseDetailsRequest">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="id" type="xs:int" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="DeleteCourseDetailsResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="status" type="tns:Status" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:simpleType name="Status">
		

Open in new window

0
Identify and Prevent Potential Cyber-threats
Identify and Prevent Potential Cyber-threats

Become the white hat who helps safeguard our interconnected world. Transform your career future by earning your MS in Cybersecurity. WGU’s MSCSIA degree program was designed in collaboration with national intelligence organizations and IT industry leaders.

<wsdl:portType name="CoursePort">...</wsdl:portType>
<wsdl:binding name="CoursePortSoap11" type="tns:CoursePort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetAllCourseDetails">


Similar to above SOAP over http


any examples on below

<wsdl:portType name="CoursePort">...</wsdl:portType>
<wsdl:binding name="CoursePortSoap11" type="tns:CoursePort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/mq"/>
<wsdl:operation name="GetAllCourseDetails">


basically i am looking for examples on soap over mq not soap over http
what are advantages, disadvantages, practical uses of SOAP over MQ vs SOAP over http
Please advise
0
for consuming web service apart from WSDL why we need to provide XSD of XML again?

WSDL it self has all information about request and responses right?

in <wsdl:types> element of wsdl has the xsd name in it?
xmls:tns means what in wsdl
what is
xmlns:soap means?
targetNamespace="http://xyz.com/courses"> means what?
in <wsdl:types> what is <xs:complexType name="courseDetails"> means?
why we use it?
Please advise with any good links, references, code examples, video tutorials etc
0
from fpdf import FPDF
  import multiprocessing
  from multiprocessing import Pool

  class pdf_gen():
    def __init__(self):
      pdf = self.pdf = FPDF()
      pdf.set_auto_page_break(True,0.1)

    def get_data_from_mysql(self) :
      pdf = self.pdf
      # connection is established and result is stored in 'res'.
      dup = []
      dup.insert(0,res)
      z = tuple(dup)
      return z

    def mysql_to_pdf_data(self,*result) :
      try :
        pdf = self.pdf
        # Entered data need to be in pdf
      finally:
        return pdf

  if __name__ == "__main__" :
   class_pdf_object = pdf_gen()
   pdf_object = FPDF()
   recover_data = class_pdf_object.get_data_from_mysql()
   pool = multiprocessing.Pool(multiprocessing_count())
   pdf = pool.map(class_pdf_object.mysql_to_pdf_data,recover_data)
   pool.close()
   pool.join()
   pdf_object.output('savefile.pdf','F')


In the above program, pdf_object is creating empty pdf file as the object in class needs to be passed for output. But, recover_data contains a list and each value is passing and returning different objects and need to be merged and give single pyfpdf object and passed it to output function of pyfpdf. Any help would be appreciated. I know it can be done with the help pdf_object('savefile.pdf','S').
0
hi,
while working with the SOAP web service i gave below as request from wizdler.

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
   
   
    <Body>
        <GetCourseDetailsRequest xmlns="http://xyz.com/courses">
            <id>123</id>
        </GetCourseDetailsRequest>
    </Body>
</Envelope>

i am getting below response when i click go button with POST method selected from drop down

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <faultcode>SOAP-ENV:Client</faultcode>
            <faultstring xml:lang="en">com.sun.xml.wss.XWSSecurityException: Message does not conform to configured policy [ AuthenticationTokenPolicy(S) ]:  No Security Header found; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.XWSSecurityException: Message does not conform to configured policy [ AuthenticationTokenPolicy(S) ]:  No Security Header found</faultstring>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


can you please advise how to resolve this
whizler1.png
0
while executing spring boot soap example keep getting error like below

Description:

The Tomcat connector configured to listen on port 8081 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8081, or configure this application to listen on another port.


I tried 8080 as well in application.properties even that did not work


how to find what ports are free on my windows 10 laptop to use that ?

please advise
0
what are differences between project explorer and package explorer in eclipse.

how to open package explorer by default when opening eclipse

Please advise
0

Programming

52K

Solutions

40K

Contributors

Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.