Go Premium for a chance to win a PS4. Enter to Win

x

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 All,

I am trying to put together a little GUI to be used by my team so that we can run a selection of PS scripts at the click of a few buttons.

The idea i have seen in an old job several years back was something sort of like this,

Basically a page with Buttons and text box descriptions,

then a text file or even integrated for a task list that I can edit the Function and Description of the buttons.

Has anyone seen anything like this, i am new to programming and cant afford to spend several hundred for PowerStudio i was hoping to find a easier way that I can edit someone elses work?

thanks
ideas
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Please see attach spreadsheet for example,

Can you please help me automate the counting of records using a macro.

There are three worksheets
1. Priorities - Lists all the Priorities in column A that will be used in responses on the Responses worksheet
2. Responses - Each row is a set of responses by a user and there may be up to 50 user responses.  I will populate these manually.  The worksheet has some examples.  The responses going across the row can go up to 150 after the name in column b.
3. Results - Counts the responses for every row by user that is in the responses worksheet. The responses are are totaled in the last column. (or on a separate worksheet if easier)

When you look at the attached file you can see two examples.
CountResults.xlsx
0
I have a website coded in .aspx and I need to get help in coding.
Can someone please tell me exactly what programming language it is?

Here is a snippet:
		Out ('<script language="Javascript" type="text/Javascript">');
		Out ('function valCoupon() { ');
		Out ('var oForm=document.forms.form1; ');
		Out ('var sError=""; ');
		Out ('var nID=0;')
		Out ('for (var i=0;i<oForm.radCoup.length;i++){');
		Out ('if (oForm.radCoup[i].checked==true) {');
		Out ('nID=oForm.radCoup[i].value; }}')
		Out ('if (nID==0) {sError="'+ErrorOut2(73)+'"; alert(sError); }');
		Out ('else {oForm.submit();} ');
		Out ('} </script>');
		Out ('<table cellspacing="0" cellpadding="0" width="745" align="left" border="0"><tbody><tr><td class="header" valign="top" background="images/Community/graphic_com_creambkg.gif" colspan="3"><img alt="SOTA Referral Number" width="643" height="40" src="images/Community/graphic_com_header_referral_number.gif" /><p></p></td></tr>');
		Out ('<tr><td valign="top" background="images/Community/graphic_com_creambkg.gif" colspan="3"><table cellpadding="0" width="655" align="center" border="0"><tbody><tr><td class="content" valign="top" background="images/Public/graphic_pub_rightcontent_bkg.gif">');
		Out ('<div class="subheader_sec">Where did you discover your Referral Number?</div><br />');
		Out ('<p>We love to know how our customers are discovering our Referral Numbers - it\'s such a great way to see how word of our products grows and spreads. We appreciate you 

Open in new window

0
See this code:
$piece1 = $test;
$piece2 = "";
$piece3 = "";
$ln = strlen($test);
if ($ln > 84) {

	$arrayWords = explode(' ', $test);

// Max size of each line
	$maxLineLength = 84;

// Auxiliar counters, foreach will use them
	$currentLength = 0;
	$index = 0;

	foreach ($arrayWords as $word) {
    // +1 because the word will receive back the space in the end that it loses in explode()
		$wordLength = strlen($word) + 1;

		if (($currentLength + $wordLength) <= $maxLineLength) {
			$arrayOutput[$index] .= $word . ' ';

			$currentLength += $wordLength;
		} else {
			$index += 1;

			$currentLength = $wordLength;

			$arrayOutput[$index] = $word . ' ';
		}
	}
	$piece1 = $arrayOutput[0];
	$piece2 = $arrayOutput[1];
	$piece3 = $arrayOutput[2];
}	

Open in new window


This works perfectly, except I need a variation where I can limit the FIRST line ($arrayOutput[0]) to 84 & the subsequent lines to 94. See attached image for visual of this need. The text is printed using a pdf generator on an existing form image (with the word Remarks & the lines.)

How can I do this?

Thank you
Capture.JPG
0
Hello Experts,
how does make a bat file for continuous Ping multipal IP with background Colour changes ?
for example:-
start ping -t 192.168.207.11 -l 0
start ping -t 192.168.207.12 -l 0
start ping -t 192.168.207.13 -l 0
start ping -t 192.168.207.14 -l 0
start ping -t 192.168.207.15 -l 0
0
I created a simple Macro that cleans some data from an excel file that generated from ServiceNow every month.  The Macro simply formats some fields, creates columns, splits data in one column to two columns and sorts the data.  Here is the current code, I know the code isn't optimized but I am under a time constraint to get this done.  

Sub MIMCleanup()
'
' MIMCleanup Macro
'
' Keyboard Shortcut: Ctrl+k
'
    Columns("A:A").Select
    Selection.NumberFormat = "mm/dd/yyyy"
    Columns("B:B").Select
    ActiveWorkbook.Worksheets("Page 1").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Page 1").Sort.SortFields.Add Key:=Range("B2:B16") _
        , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Page 1").Sort
        .SetRange Range("A1:O16")
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Columns("E:E").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Columns("D:D").Select
    Selection.TextToColumns Destination:=Range("D1"), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
        Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
        :="-", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True
    Range("E1").Select
    ActiveCell.FormulaR1C1 = …
0
I am attaching a file and I'm wondering if this needs to be done with a macro or can it be done using formulas e.g. indirect?
1. On the Week names and numbers sheet I have a list of week dates and numbers. Is there a way to create and rename sheets only using the week dates marked in yellow e.g. 3/11/2017, 17/11/2017, 1/12/2017 either using a macro or formulas (ideally it would be great to have it done so that the file with the dates could just be re-created for the following year?
2. Then to have the contents of 03-11-2017 automatically copied to all these newly created renamed sheets..and last but not least,
3. to have the corresponding week date and week numbers for the sheet entered automatically in the areas in yellow on the sheet.

Thanks.
EE_update_sheet_names.xlsx
0
I am using a Software called Epicor that uses Progress Open Edge or 4gl.  I am needing to do a rounding function on a number field that stores a "seconds since midnight value.  What I need to do is take that value and convert it to a decimal and then round it up to the nearest quarter hour for clockin and down to the nearest quarter hour for clockout.  What I have found is in the GUI if I take the number field And create a character calculated field I can translate the value to a time.  Here is an example of the code that works
String(Integer(LaborHed.Number01),"HH:MM")  This will give me the military time I am looking for but it is separated by a colon instead of a dot.  So 15:42 is what it may translate to but 15.42 is what I am looking for.  From there I need to take that value and round it up to the nearest quarter hour which would be 15.45 but do not know the syntax to do that.  I also have the ability to just write progress code but too much of a novice to be successful.  Hope anyone can help as manually updating 1500+ employees a day is wearing on me.
0
Hello:

In ERP solutions, a "BOM" is a bill of material where the BOM is made up of other inventory items.  And, those inventory items are made up of other items.  So, each of these additional inventory items represent an additional "level" of the BOM.

I, therefore, need to have T-SQL conduct "iterative" calculations, where the programming tracks the costs at each level of the BOM--no matter how many levels the BOM has.

The first attachment shows the results of the following query:

select BM_View_SL_BOMS.Assembly_Item_Key as [Assembly Item Key], IV00101.ITEMDESC as [Item Description],
BM_View_SL_BOMS.Assembly_Location as [Assembly Location], BM_View_SL_BOMS.Entry_Date as [Entry Date],
BM_View_SL_BOMS.Status as [Status], BM_View_SL_BOMS.BOMUOM as [BOMUOM], BM_View_SL_BOMS.Material_Cost as [Total Material Cost],
BM_View_SL_BOMS.Labor_Cost as [Total Labor Cost], BM_View_SL_BOMS.Overhead_Cost as [Total Overhead Cost],
IV00101.STNDCOST as [Standard Cost], IV00101.CURRCOST as [Current Cost]
from BM_View_SL_BOMS INNER JOIN 
IV00101 on
BM_View_SL_BOMS.Assembly_Item_Key = IV00101.ITEMNMBR
where BM_View_SL_BOMS.Assembly_Item_Key like '70-%'

Open in new window


The three fields called "Total Material Cost", "Total Labor Cost", and "Total Overhead Cost" are wrong.  Each of those fields needs to conduct the calculations shown in cells B34, B32, and B33 found within the attached Excel spreadsheet called "Cost Breakdown".

Each of the six attached result sets that are shown in this case are derived from the following six "select" scripts:

--material costs and quantity of each "make" item
select * from BM_View_SL_BOMItems where Assembly_Item_Key = '70-1010-BRX0014'

select * from BM_View_SL_BOMItems where Assembly_Item_Key = '1001311'

select * from BM_View_SL_BOMItems where Assembly_Item_Key = '1001258'

--labor and overhead costs
select * from BM_View_SL_BOMS where Assembly_Item_Key = '70-1010-BRX0014'

select * from BM_View_SL_BOMS where Assembly_Item_Key = '1001311'

select * from BM_View_SL_BOMS where Assembly_Item_Key = '1001258'

Open in new window

0
I want to change ''magic.exe'' to  ''mytool.exe'' , i rename the .exe but in processes does not change,keep the same name, what to do?
thank you!
0
Free Tool: IP Lookup
LVL 11
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hello,

***UPDATE****
As I use OpenOffice on Windows 7 for manually making the work that follows, maybe that an OpenOffice Guru can find a better solution than a Perl script, so I've added also OpenOffice in the topics
***************

I'm searching for a good solution for converting Windows xlsx/xls files (Windows 1252 WinLatin 1) in csv (UTF-8) files with a script like:

perl script.pl<file.xlsx>file.csv

my environment is Windows 7 with ActiveState Perl 5.24.0

The script should also "cut-off" the first line & the first column of every Excel spreadsheet

Thanks a lot,

Fabiano
0
I have used Octopus Deploy but never Jenkins.

What are some big differences?

Thanks
0
Hello, how can we tell what is is causing high load average? TOP has some processing using anywhere from 15-30 % CPU but none stays at 100% CPU.
0
Greetings .VBS script guru's!

I'm trying to write a FOR loop that continually loops every 15 minutes (in the background) until the user clicks the "OK" button. If the user clicks the "cancel" button, then the VBS script will run in the backgroup and pop-up again every 15 minutes until the user clicks the "OK" button (which then performs an action). I've tried a DO, and WHILE and a FOR loop, without any success.

Any ideas how I could accomplish this?

Thank you so much for your expert assistance!

-Mac
0
hiii...
I want to interface ir sensors and leds with 8051 microcontroller.......And how to programme an ic
0
I have a spreadsheet that contains extracted data from another source, and I need to change the structure of the data to a more usable format for output to a pivot table. As I will be receiving the data in this format on a regular basis and need to perform this restructuring task every time, I would like to automate this task with a macro.

Spreadsheet description:
Each WO task has same 5 column headings: WO#, WO_Type, Date, Min, and Min_Type, and the WO numbers are repeated in each 5-column section across the spreadsheet:
Column A to E: WO task 1
Column F to J: WO task 2
Column K to O: WO task 3
Column P to T: WO task 4

While the current spreadsheet has 455 rows, the number of rows will vary each time.

I would like a macro that does the following:
  • Copies data from A2 to E2 and down to last row containing data, and pastes this data into B2 of table in "Tasks" tab.
  • Copies data from F2 to J2 down to last row containing data, and pastes this date into next available blank row in Column B of table in "Tasks" tab
  • Copies data from K2 to O2 down to last row containing data, and pastes this date into next available blank row in Column B of table in "Tasks" tab
  • Copies data from P2 to T2 down to last row containing data, and pastes this date into next available blank row in Column B of table in "Tasks" tab

I have attached the spreadsheet with sample data.

Thanks,
Andrea
EE_RestructureData.xlsm
0
A friend had a site that went down years ago, and any hope of getting the source code is gone.

What can I do with the URL to that site from a prior year? I want to save the entire site to my disk, in hopes it could be hosted once again.

I am pretty sure it's a simple HTML site with no back-end, so I want the HTML files, the CSS files, the JavaScript file and the Images folder.

What's the easiest was to get this from the WayBack Machine?

Thanks
0
Hello everyone,
I am trying to create XML record counts in the XML data file header.
Below code creates a XML data file "FinalXMLDataFile" from a SAS dataset "NewData" and the code works fine except counts are not working at all. Current record counts "previousCount" creates "0" counts in the XML Header in the counts section.  

Please let me know where the issue with record counts might be?

libname   mydir '/mydirectory'; 
filename outxml  '/mydirectory/FinalXMLDataFile.xml';

/* Macro variables to provide appropriate tab spacing */
%let tab="   ";
%let tab2="      ";
%let tab3="         ";
%let tab4="            ";
%let previousCount = 0; 


/*XML file information and headers*/
data _null_;
    file outxml;

if _N_ = 1 then
    do;
    
    put '<?xml version="1.0" encoding="UTF-8"?>';
    put '<XMLFile >';	
    put &tab. '<Header>';  
    put &tab2. "<CaseCount>%trim(&previousCount)</CaseCount>";     /* get record count of all XML records */ 
    put &tab2. '<Year>2017</Year>';
    put &tab. '</Header>';
    put &tab. '<Payload>';
    end;
run;

/* Using SAS dataset to create similar XML data file */
data _null_;
    file outxml mod;
    set mydir.NewData NOBS=lst;

    record = _N_ + &previousCount;
    
    if _n_=1 then do;
        put &tab2. '<MasterFile>'; 
    end;

    /*All Data records */
    put &tab3. '<AllData>'; 
    put &tab4. '<unit:VAR1>' VAR1+(-1)'</unit:VAR1>';
    put &tab4. '<unit:VAR2>' 

Open in new window

0
Hello

I'm new to coding (total novice) and i am having trouble with the following program. (see below and question attached)

How do I print out my assignGrade method??? I had to initialise it in Main manually. The rest of the program works fine?
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
package Lab8;
import java.util.Scanner;

public class ClassTest2Retry {

    static Scanner input = new Scanner(System.in);

    //method enterName()
    public static String enterName(){
        System.out.println("Enter name");
        return input.nextLine();
    }
    //method enterMark()
    public static int enterMark(String value){
        System.out.println(value);
        return input.nextInt();
    }
    //method calculateAverage()
    public static int calculateaverage(int solo, int prose, int poem){
        return ((solo + prose + poem) /3);
    }
    // method assignGrade
    public static String assignGrade(int overall){
        if (overall <40){
            return "Fail";
        }else if (overall >40) {
            return "Pass";
        }
            else{
                return "Distinction";
            }
    }
    //method output results
    public static void outputResults (String name, int solo, int prose, int poem, int average, String grade){
        System.out.println("Name\t\t\t\t Solo\t\t\t\t …
0
What does it mean to be "Always On"?
LVL 5
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Hello,

The attached sample has an existing macro which creates different workbooks based on the data in column C.  I am hoping someone can help add to this code by making the following updates:

1.  For every new workbook created the column width is expanded to 15
2.  For every new workbook created columns B, C, F, G H, I, O, P, T, U, V, X, AE, AJ and AK are hidden and locked.
3.  For every new workbook created the entire workbook is password protected.  Sample password can be:  password.

Any assistance would be greatly appreciated!  I am not very proficient in VB code and hoping some of you Excel/VB ninjas can figure this out.

Thank you.
EE-Sample.xlsm
0
Dear All experts,

I already use this link's Mr Patrick Matthews's suggested code for delete all rows below data provided at this link of this site.

https://www.experts-exchange.com/questions/27255636/Delete-All-Rows-after-Last-Row-with-Data.html

but same question for columns...how to delete all columns  after last filled data on row 1.
or how to modify above linked code to delete columns.

Please Help.

Regards,
Chirag Raval
0
I need help creating custom graphics in an Excel VBA Userform. Preferably I'd like to create a control with properties and a custom paint method, but at this point I'm leaning towards using an image and then drawing onto the bitmap with gdi32. I've tried to draw directly to the form but this disappears as soon as the form gets repainted so I'm thinking that approach might be a dead end.

On my userform I need to visualize an errorvalue consisting of a deltaX and a deltaY. Control layout.
0
I first started out trying to learn C# but found out that in order to code the trading strategies and functions that we want, we would have to use this package called Sierra Charts

The developer I am working with is very familiar with SC and pointed me to this C++ Tutorial https://www.sierrachart.com/index.php?page=doc/AdvancedCustomStudyInterfaceAndLanguage.php#CPlusPlusReferences

This software looks rather dated in comparison to something like MultiCharts https://www.multicharts.com/net/ which uses .NET.

I might consider switching at some point to another platform like MC .net version, but in all my research, I see that C++ is the most prevalent among traders.  It is fast, which is the main consideration, and lots of pre-written functions already exist for it.

So I have switched my focus, since I am developing in C++ currently with SC, to learning the basics of C++ over C#.

I have been through the tutorial above and think I have absorbed just enough of it to barely understand what it is, but I am determined and now want to find a better tutorial that won't take me too far off base from what I am trying to do which is to code trading strategies.

I'd still like to learn the basics of C++ a little bit better before really getting my feet wet with Sierra Charts as I am currently letting my developer work on developing the function, which he is much better off doing, without my interference.

I'd like a tutorial for C++ that is much more interactive, lets me …
0
Hi,

I imported one project as existing maven project. I am seeing below error while adding tomcat 8 as runtime

An internal error occurred during: "Updating workspace".
assertion failed: Mismatched begin/endOperation


While resolving below errror by going to properties
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

please advise
0
hi how to see post man response. i installed post man now instead of advance res client
postMan401.png
postMan200.png
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.