We help IT Professionals succeed at work.






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.

I just got an assignment to create a db at work and it's been years since I did any programming.

Please help me with a quick programming task:

Create a Sample ID # text using the record index from the table: Status

SampleID = "SI-" + Year(Date) +"-" + Status(Index)   - Is this correct?


Drew in Georgia
Need a way to debug.print in a loop in VB6   names of files in in directory AND the all names in de sub-directory below that path and if more sub-sub directories below that path also
sample map

I have tried several different ways of combining my two CTEs within one "UNION ALL" statement but am having no luck.

How do I modify my syntax below to accomplish this?

Thank you!

Software Engineer

; with wip as 
select NULL as [LOTSEQNBR], FG.BatchNo as [FGBATCH], FG.FormulaId as [FG], FG.[Labor Cost] as [FGLABOR], FG.[OverHead Cost] as [FGOH], 
FG.[Material Cost] as [FGMAT], FG.[Labor Cost] + FG.[OverHead Cost] + FG.[Material Cost] as [FGCOST], FG.[TotalFGWeightYielded] as [FGWEIGHT], 
FG.[Labor Cost]/FG.[TotalFGWeightYielded] as [LABORLB],
FG.[OverHead Cost]/FG.[TotalFGWeightYielded] as [OHLB],
FG.[Material Cost]/FG.[TotalFGWeightYielded] as [MATLB],
from BM_View_Dashboard_ProductionCostAnalysis FG
where FG.FormulaId = '506' and FG.BatchNo = '50418G12D' and BOM.SUBCAT_I = 1)
from wip
; with wiplot as 
select * from (

Open in new window

Hello, Experts,

I have a question to ask regarding a python script I have built to find a file, put in an array and SFTP that to a remote location that is running errors. The error I am getting is below.

Traceback (most recent call last):
  File "/Users/isaiah.melendez/Documents/python/alr_to_ho.py", line 38, in <module>
  File "/Users/isaiah.melendez/Documents/python/alr_to_ho.py", line 34, in ftpTransmit
    sftp.put(ftpALR[i], 'C:\CBASYNC')
  File "/Users/isaiah.melendez/Documents/python/venv/lib/python3.7/site-packages/pysftp/__init__.py", line 364, in put
  File "/Users/isaiah.melendez/Documents/python/venv/lib/python3.7/site-packages/paramiko/sftp_client.py", line 759, in put
    return self.putfo(fl, remotepath, file_size, callback, confirm)
  File "/Users/isaiah.melendez/Documents/python/venv/lib/python3.7/site-packages/paramiko/sftp_client.py", line 714, in putfo
    with self.file(remotepath, "wb") as fr:
  File "/Users/isaiah.melendez/Documents/python/venv/lib/python3.7/site-packages/paramiko/sftp_client.py", line 372, in open
    t, msg = self._request(CMD_OPEN, filename, imode, attrblock)
  File "/Users/isaiah.melendez/Documents/python/venv/lib/python3.7/site-packages/paramiko/sftp_client.py", line 813, in _request
    return self._read_response(num)
  File "/Users/isaiah.melendez/Documents/python/venv/lib/python3.7/site-packages/paramiko/sftp_client.py", line 865, in _read_response

Open in new window


Is there a way to SYNC and Schedule SVN - repository (source) with working copy on a server?

Can you please explain me how to do it, step by step?

Sync task needs to run every night to pull changes from repository (source) and update working copy on a server.

Regards, M
Hi Experts,

If you go to www.iwscc.ca you will see in the header 2 orange buttons: Corporate and Self-Registration, both going to #

Under WP Admin, I see that this theme is called Nonprofit, and the buttons are set in Theme Options >Address Bar, and ou will see in the snapshot that I can set the buttons label, but not the url. My questions are...

1- How do I remove the Corporate button? If I leave it blank, I just get an orange square.

2- How can I actually set an url to these?

I know I can create a child theme, and address #1 with CSS and #2 with JS, but I think there should be an easier way since the theme provides these buttons.

BTW- even though in the screenshot it says Webdivia, under themes it says Nonprofit. I just inherited this website.

Thank you,
wp admin
Hi Folks,

When printing an EE article, code snippets are jumbled up...they look like this:

Gustav Brock submitted a bug report on this more than two years ago:
Code blocks of article print view are unreadable

The EE Mod at the time, Modalot, said this:
Ouch. That renders the printout almost useless. I've filed this internally as a major bug.
Not being aware of Gustav's bug report, I submitted one about two months ago:
Print feature at articles does not format code snippets properly

In response to my bug report, the same Mod (Modalot) informed me that it is an old bug and is "still unresolved". Being more than 2-1/4 years old and filed as a "major bug" by a Mod who has been an EE member for more than 10 years, it seems to me that EE is either incapable of, or not interested in, fixing the bug. As a result, I'm looking to the experts here for a workaround. I want to use the workaround to "print-to-PDF" my 63 EE articles and the Steps at my 47 EE video Micro Tutorials. Although that's 110 publications, only some of them have code snippets, so while I would prefer as automated a solution as possible, having to do some manual effort on each one is fine. I'm also fine with a solution that requires other products, such as Microsoft Word, or other commercial software. Thanks for your ideas! Regards, Joe
Dear Experts

In software development what does reversibility means, if we have to develop application what are the measures on reversibility,  please help us to understand this and best practices.

Thanks in advance
Sending text message for free?

I saw a price by Twilio to send text message for $75 per 100 message sent. But, this kills my business model.

Anyone know of a service that can sent Text Message for far less?

I have a class car and an inner class engine. The inner class shouldn't be visible outside of the class car.
Is there still a way to give a Car an Engine as parameter?
Error: Car.Engine has private access in Car
Here is my code:

public class Main {
    public static void main(String[] args) {
        Car car = new Car("VW", "Red", new Car.Engine("Diesel"));

Open in new window

public class Car {
    private String brand;
    private String color;
    private Engine engine;

    public Car(String brand, String color, Engine engine){

    public Engine getEngineType(){
        return new Engine(engine.getType());

    public void setEngine(Engine engine){

    private class Engine{
        private String type;

        public Engine(String type){

        public String getType() {
            return type;

Open in new window

The program is about playing the next or previous song, replay or remove a song.
If I want to delete a song immediately after starting the program (case 5), I get an "IllegalStateException".
How do I fix the error?
If you see further errors or have improvements to the code, then you can also tell me.

import java.util.LinkedList;
import java.util.ListIterator;
import java.util.Scanner;

public class Songs {

    public static void main(String[] args) {

        LinkedList<String> songs = new LinkedList<>();
        songs.add("Song 1");
        songs.add("Song 2");
        songs.add("Song 3");
        songs.add("Song 4");
        songs.add("Song 5");
        songs.add("Song 6");

        Scanner scanner = new Scanner(System.in);
        boolean quit=false;
        boolean forward=true;
        ListIterator currentSong = songs.listIterator();

                case 1:
                case 2:
                        System.out.println("Now playing " + currentSong.next());

Open in new window

I have updated my android studio from a version 2, to the newer version 3.6.1.
When I loaded my existing project into the newer version of Android studio, the gradle would no longer sync correctly. I am getting the error

"Gradle sync failed: Could not find method google() for arguments [] on repository container.
                  Consult IDE log for more details (Help | Show Log) (7 s 47 ms)"

I cannot seem to find a solution that works to resolve this error so that I can continue working on the project? Any help is appreciated.
Finding MySQL on my MacBook and remote DB access

I think I used to access MySQL from the browser (Chrome) on localhost, but I do not recall the exact URL.

Can someone explain how to find MySQL?

Also, I have a developer who will be hosting my website, not yet at AWS, but on an internal server. Can I view that database from my version of MySQL? I would of course need to be given access. I will access the website from an IP address I will be given.

I had this question after viewing Looking for a new SMS provider for my PowerBuilder application.

I have been using Twilio's SMS messaging service since I originally asked the question I'm referencing.  Now my issue is that my corporate client is requiring that I deploy my application on their internal network and servers.  While my PowerBuilder code which has worked fine while running on my own server, fails to send text messages when deployed on the corporate servers, specifically because they block access to the internet and the only solution they've suggested would require the use of their PROXY server.  I know NOTHING about proxy servers and I'm looking for some help in making the required program changes to be able to utilize a proxy server to permit access to Twilio (api.twilio.com) in order to maintain this feature in my application which has become very popular with my users.

So, besides the PowerBuilder powerscript code, I had to incorporate a third party's APIs (Chilkat Software) in order to send the SMS messages.  My existing code follows:

        loo_Glob             =       create oleobject
      li_rc                   =       loo_Glob.ConnectToNewObject( struct_1.tw_global_object )
      if li_rc < 0 then
            as_response = "Connect to New GLOB Object Error: " + loo_Rest.LastErrorText
            wf_send_warning_email( as_response )      
            destroy loo_Glob
            return false
      end if
I have this statement that I would like to run in python as a for each loop then insert all of the data into a table...… I'd like to use pyodbc and maybe pull the data into dataframes…. ?? then take the panda df and insert into a table, but the first thing is to get this running for every table

the first query would be to get the tables then loop thru each table and run the last query

select * from sys.tables- Get this into a variable or list and loop thru and run the below query 

--Filter out all of dates, and the id attributes metadata
 DECLARE @Table SYSNAME = 'ArrestInfo'
-- REVERSE and STUFF used to remove trailing UNION in string
                                     + ', COUNT(DISTINCT(' 
                                     + QUOTENAME(name) + ')) AS [Count] FROM '
                                     + QUOTENAME(@Table) + ' Group by ' + name + '' + ' UNION ' 
                              -- get column name from sys.columns  
                              FROM   sys.columns 
							  WHERE  object_id = Object_id(@Table) 

                              -- concatenate result strings with FOR XML PATH
                              FOR XML PATH (''))), 1, 7, ';'));

Open in new window

Is BitBucket the best choice?

I am starting a project which will involve various developers, some offshore. I need a GIT Repo I can use for source code management and have good memories of BitBucket.

Is it still a great choice?

I saw a difference between Free/Standard/Premium that I dis not understand...

"Build Minutes"...

I do not recall using BitBucket to Build anything. What does this mean? To Build on BitBucket??

This site will have a EJS front end with a JAVA back-end. Does this mean on JAVA code commits, an auto-compilation can be configured? That is probably an option, I presume...it may be a very good option, but I'd like to understand it.

Hello experts,

Following the question: Question 29174017 I would like to set up a GUI with the following need:
-Based on a clipboard selected display a GUI in which I will be able to report specific string and modulate each line with the following modes:
-Keep: Find the first occurrence of the string reported in each line of clipboard, retains that first occurrence of the string reported and everything in each line of the clipboard that is after it.
Remove: Find the first occurrence of the string reported in each line of clipboard, retains that first occurrence of the string reported and everything in each line of the clipboard that is prior to it.

I attached my first attempt.

1.Could you please let me know your expertise concerning the coding structure.
2.Let me know if there is a best approach to report the example in text instruction such as reduce the font or bold specific text. I don’t know if this is possible.
3.Analyse the feasibility to add an additional radio mode related to keep lines not concerned.
The idea will be to remove or to keep the various lines of the clipboard that doesn't contain the string reported. With the current version nothing is done, they remain in the clipboard. I was wondering if we can add a mode to keep them or remove them.

Thank you for your help.
I want to get "Explanation, what would happen if a control flow graph consists of multiple start and/or stop nodes?"
Hello experts,

The following statement allows me to retain strings from an specific column in VBA:

    For lngRow = 1 To lngLastRow
        intPos = InStr(1, UCase(Cells(lngRow, strCol).Value), strPrefix)
        If intPos > 0 Then
            Cells(lngRow, strCol).Value = Trim(Mid(Cells(lngRow, strCol).Value, intPos))
        End If

Open in new window

strPrefix is the string that is reported in a Msgbox.

I was wondering which function/process should I use in AutoHotkey to cover this need.

The final objective is to set up a GUI in which I should report the string involved in the process. Paste the clipboard with the revised text.


I have the following lines:

If I report as prefix id, I should get:
Any advice, will be really appreciated.

Thank you for your help.
Hello Experts,

I was wondering if there is a way in AutoHotkey to get size of an specific folder reported.

The idea is the following:
1.Report the folder that you want to get the size through a GUI
2.Two alternatives, display a Msgbox with it size and send to the clipboard or generate a TempFolderSize txt file located in the folder reported in the GUI and run it. This file will contain the Folder reported in the GUI and the size.
For the moment I am not going to analyse the recurse approach if reported folder has subfolders in order to avoid complexity

Here is my attempt of the GUI however I don't know how to tackle this with AutoHotkey. If you have some advice and proposal it would be great! Thank you very much for your help.

AddTextEditWidth:=400 ; Text specific with
Gui,Add,Text,,Report the folder in order to get it size
Gui,Add,Edit,vFolderPathForSizeAttribute cPurple w600 xm,%FolderPathForSizeAttribute%\Downloads
Gui,Add,Button,xm gButtonOKSizeAttribute Default,&OK ;Button Ok
Gui,Add,Button,x+10 gButtonCancelSizeAttribute,&Cancel ;Button Cancel
Gui,Show,,Folder size attribute

Open in new window

Hello experts,

The following AutoHotkey allows me to list files & folders attributes (question related: Question 29172877)

I have a little issue.
File listing is generating however the action related to open the file with excel is not performed and at the end of the AutoHotkey script I have the following20200225_121352-screenshot.pngAutoHotkey script:
;Gui: list files and folders attributes

If (WinExist("File Listing"))
  MsgBox,4112,Error,File Listing dialog is already open
Gui,Add,Edit,vFolderPath cPurple w570 xm,%FolderPath%\Downloads
Gui,Add,Button,x+10 +Default vBrowseFolder gBrowseFolder,&Browse
Gui,Add,Text,xm,If you want a different folder, type/paste into the field above or click the Browse button on the right above and navigate to the folder
Gui,Add,Text,,Select folders to process:
Gui,Add,Radio,Checked vRecurse,&Recurse
Gui,Add,Text,xm,Select filename information to put in file listing:
Gui,Add,Radio,Checked vFileInfo,&Without path without date
Gui,Add,Radio,x+10,With &Path without date
Gui,Add,Radio,x+10,Without path with &Date
Gui,Add,Radio,x+10,With &Both path and date
Gui,Add,Button,xm gButtonOKFilesFoldersListing Default,&OK
Gui,Add,Button,x+10 gButtonCancelFilesFoldersListing,&Cancel
Gui,Show,,File Listing

Open in new window

Hello experts,

I am trying to set up an AutoHotkey script that I will use on a regular basis to swiftly export file as Pdf and open folder in which it has been saved

I need some advice with the following:
1.      Coding structure and optimization proposal.
2.      Line 6 to 8 are required?
3.      Set up a return if active document has not been saved.
Example: I open a document and I forgot to save the document. If I launch the script an if statement should be set up to block the pdf export.
4.      Find the right saveas method for powerpoint and excel the save as method applied doesn't work. File is exported however When I open the file I got an error message.
5.      End the script by opening the pdf export file
6.      Find a method to applied the same mechanism for outlook>emails
If some requirements are complicated to cover I am willing to give up
If you have questions, please contact me.
I am looking for a vbscript to find files with filenames of a certain length within one folder
another vbscript to delete files with filenames of a certain length within one folder
Hello experts,

I have in my AutoHotkey/Hotstring file multiple hotstrings that sendinput date.

I would like to convey them into a single hotstring and modulate them through a GUI.

The idea is the following:

Could you please help me to:

Set up the process behind to sendinput based on the selection.
I attached current version.

Thank you for your help.
I am willing to test face recognition on a sample set of images, to check their quality. The basic idea is to have around 1000 images of people and send the to the app and the test if a specific image is there or not. But I would like to avoid any programming.

Does anyone know an app that I could use?






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.