[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Programming

53K

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

I'll need a Shell (Bash) script (rather an exact command) that outputs

a)  files' name in the Solaris system, one file per line in the UNIX systems
b) that were modified/created the last 1470 minutes
c) exclude FIFO files, symbolic links, sockets (ie *.sock)
d) names of files of between 1 byte to 20MB in size
e) files in /dev, /devices, /kernel, /cdrom, /platform, /proc, /net
f) files mounted on NFS

I have about 1million files so hoping the command/script of outputting
the file can complete in 30mins, so may need efficient coding.


I need to amend the following script to read (ie for AV to scan) the above output file:

#!/bin/bash
LOGFILE="/var/log/clamav/`hostname`-$(date +'%Y-%m-%d').log";
## suggest to change dirs below to root but exclude databases
DIRTOSCAN="/var /opt /home /etc /tmp /export";

for S in ${DIRTOSCAN}; do
DIRSIZE=$(du -sh "$S" |grep -v "/proc" |grep -v "/dev" |grep -v ...  /2>/dev/null | cut -f1);
## add to grep -v for any other file types to exclude

echo "Starting a daily scan of "$S" directory.
Amount of data to be scanned is "$DIRSIZE".";

clamscan -ri "$S" >> "$LOGFILE";
0
Become a CompTIA Certified Healthcare IT Tech
LVL 12
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Using:
  • Microsoft Visual Code 1.28.2 x64
  • Python 3.7

I've the smallest code ever
import ldap
print (ldap.__version__)

Open in new window


And i'm getting the error:
  • Exception has occured: ModuleNotFoundError
  • "No module named 'ldap'

I've installed the Wheel found on Christoph Gohlke web site.
using this command: pip install .\python_ldap-3.1.0-cp37-cp37m-win32.whl

I've checked the dependencies as shown here:
Capture.PNG
What am i missing?

Because when i run the following command in terminal, i'm getting "3.1.0" which mean that it can find the ldap module.
python -c "import ldap;print (ldap.__version__)"

Thanks a lot for your help
0
Is there a way to reprogram a shortcut icon so users cannot pin it to the taskbar on Windows 7?  I found this link where you can disable pinning for a certain string, but I don't want to include that in the name of the shortcut.  Anyway of doing something in Powershell or VB?

https://docs.microsoft.com/en-us/windows/desktop/shell/appids

If any of the following strings, regardless of case, are included in the shortcut name, the program is not pinnable and is not displayed in the most frequently used list:

Documentation
Help
Install
More Info
Read me
Read First
Readme
Remove
Setup
Support
What's New
1
Hello,

I never tire of asking me: To be a good programmer, what is the relevance of getting a degree in computer science? And a good programmer has in mind all the commands of a programming language, like PHP or JAVA? The oldest languages (MSDOS) had less than 200 commands and functions, currently they must have more than 1000

I would like to hearing from you

sincerely
0
followup question to Website Development Case Study (https://www.experts-exchange.com/questions/29124521/Website-Development-Case-Study.html)

I plan to get a Review Website off the ground (with affiliate marketing the right way).

WordPress is set up on my site: https://wireoo.com/

Now, my question is ...

I am ready to customize the website.  I am attaching a video of Dashboard.generatepress.swf

How do I proceed? I upgraded to Generatepress Pro. Will this be a problem?
0
I am hoping to find an expert who specializes in creating websites that set up as affiliate review website using rss feeds and feedburners.  I really would like the inner working of this type of website and how I can create one. I have a builtwith link to a website that I know is using this type of technology here is the link https://builtwith.com/?https%3a%2f%2fthewirecutter.com%2f 

News is that RSS and Feedburners are a thing of the past but, website are still using them. And, making a kill.

Can I get a little help here with this question?  Step by Step, pls. Sorry
0
I am starting this discussion early.  I am motivated and obsessed with getting this website off the ground.

I have found myself with self-imposed errors of grand magnitudes.  

I want to get this website off the ground, so I am going to ask for help every step of the way.

1.  Now, I have gone to wordpress.org to get a theme called GeneratePress https://wordpress.org/themes/generatepress/
as advised by Expert Favor.

2.  Next, I have downloaded the Plugin Beaver Page Builder from https://wordpress.org/plugins/beaver-builder-lite-version/
as advised by Expert Favor.

3.  I am going to upload these files to my website http://www.wireoo.com.
I am going to make sure that the HTTPS is upgraded in a few hours for security and SEO.

I plan to get a Review Website off the ground (with affiliate marketing the right way).

Now, my question is where do I go from here.  I do not want to make any mistakes as I have in the past three months.
I, respectfully, ask that you be patient with me as I am taking small steps and in the learning stages.  Just be aware that I am passionate about this quest so, please do not take me seriously.  I laugh, sometimes, for I am embarrassed in some instances. Have a good day!
0
Building a workflow and I need a couple of "tricky" pieces to complete it.  I am using a SharePoint 2013 Workflow.
  • How to get the value from a column that is the lookup from another list
  • How to get a value using a lookup column when that value is another column in that lookups list (say the lookup shows a role and I want the associated persons email address or addresses)
0
I found this cute little affiliate website online called Testfreaks https://www.testfreaks.com/

This website has been around since 2007.

I would like to recreate it.  It is a very lucrative website.

It looks like a category directory for reviews.

Can someone tell where I can get this script or an alternative?  Also, it looks to have a customer reviews in a data feed. I have looked everywhere.  

It is so easy to take this one! Lol
0
I was advised to use Cntrl + Shift + F9 to unhide a hidden tab (that is password protected) on an excel 2013 document.  That is not working - please advise if there is another way to unhide a tab. I do have the password.

Thanks,
0
Determine the Perfect Price for Your IT Services
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Hi Folks,

I'm starting to get myself in C#, I am as far as writing my own basic "hello world" sample ;) -see below
IDE: Visual Studio Community 2017
PCs: Laptop, Desktop
Problem: when I write and test the code on computera everything works as it should, but when i copy the same folder files incl. the my test.cs onto another PC the debugging feature becomes disabled(-see figa) and if i try to run it from the play button it brings me to a "attach process"... (-see figb)
Background experience: Powershell, Bash, Batch.
Odd solution?: copy/paste the content of the file onto a new one and then save it then run it..., is this normal, or am i doing something wrong?  

By the way does anybody have a link to a cheatsheet for c# with basic commands?

{
    class Program
    {
        static void Main(string[] args)
        {
            //The Code always starts Here
            //This example is to various methods to write txt
            Console.WriteLine("Hello I'm at your service. \n2ND Line This is a new line");
            Console.Write("Press Any Key to Continue"); 
            Console.ReadKey();
            Console.WriteLine("");
            Console.WriteLine("");

            //This example involves variables TXT , (this involves declaring variables first)
            string greeting, who;
            greeting = "Salut, ";
            who = "Mon Ami";
            Console.WriteLine(greeting + who + "!");
            Console.WriteLine("Press Any 

Open in new window

0
I need a powershell script that will do the following.

1.  I have a powershell command that will read the subkeys of a mail profile
Get-ChildItem -Path HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles

Open in new window


The output of the subkeys are below...

Name                                Property
----                                      --------
cool Outlook Profile
Outlook Profile
outlook



2.  I need each of the subkeys into a variable, how do I do that in Powershell?

3.  After I have that answer, I would like to run the command for each subkey variable, inst.exe /u /service dmol /p "Variable=mailprofile"

I really appreciate the feedback!
1
Hi, Please help me to approach this project in the best way possible and can be done in the shortest time.


Create      PHP      classes      for      Student,      Program      and      Course      (plus      child      classes      as      described below).      All      of      these      classes      should      have:

(1)      Appropriate      overall      class      structure;      use      comments      to      identify      sections      and       elements      of      each      class.

(2)      Constructors      that      populate      object      properties,      either      directly      within      the      constructor      AND/OR      passed      to      the      method      when      an      object      is      created.

(3)      For      all      classes,      demonstrate      proper      encapsulation,      with      properties      and      methods made      public      ONLY      if      other      coders      need      direct      access      to      that      element,      and      only      if      the      element      can't      potentially      break      if      it      is      accessed      directly!

(4)      Student      class      should      have      a      property      of      'paid',      which      is      true      or      false;      student      objects      should      also      have      an      'enrolled'      (true/false)      property      and      an      enrol()      method;      the      method      first      checks      to      see      if      the      student      in      question has      paid,      then      only      enrols      him/her      in      a      program if      so.

(5)      Student      should      also      be      the      parent      of      GradStudent      and      Undergraduate      classes;      these      child      classes      should      differ      in      at      least      1-2      significant      ways      (e.g.,      GradStudent      has      an      advisor      property,      as      well      as      other      properties      and      methods,      that       Undergraduate      does      not      need).

(6)      Program      should      have      title      and      info      properties,      minimally;      neither      of      these      properties      should      be      editable,      only      returned      for      echoing      out.

(7)      Course      should      have      basic      description      information      as      appropriate.

0
Hi everyone
Can anyone help me or show me the right way to approach this assignment for my class? I am new to programming and missed lots of class. I just want to know the step by step process or the things I need to learn it.


Node-Express      Site      with      Nodemailer      – Research      Assignment
Using      a      brand      new      Express      Generator      App      skeleton,      add      the      following:
(1) Build      out      a      few      ‘standard’      routes (contact,      team,      etc.)      in      the      application;      
each      of      these      routes should      in      the      end      render      out      a      full      HTML-based      page
(from      included      partial files,      see      below),      but      you      do      not      need      any      content      
other      than      placeholder      text/image      content      in      each      view.
(2)Install      the      Nodemailer module      through      npm to      make      it      available locally,      
(using      SMTP) in      your      application.      Use      the      Nodemailer      documentation      as      a      
guide      and      build      a      route      and      a      view (form) to      enable      sending      an      email      through      
a      mail      service      (NOTE:      If      you      use      Gmail      you      may      get      a      warning      email      when      
you      test      it      that      your      Google      credentials      were      used      by      an      ‘unsafe’      app,      that      is      
to      be      expected). Search      for      Nodemailer      from      the      npm      main      site,      and      you      will      
get      to      the      documentation      that      will      show      you      how      to      set      everything      up.
(3) Use partials in      ejs,      the      page      renderer      you      are currently using,      so      that      you      can      
create      and      include      ‘proper’ views      (e.g.,      header,      footer).      Then      modify      all fullpage
ejs      examples into      a      more      modular      form.
(4) Add      some      CSS      styling to      the      ejs      template      views      in      your      application, again      not      
a      fully      designed      …
0
Good Day Experts

I am looking for reference material help.  My most recent programming experience was with vb.net.  I essentially taught myself with books and online tutorials.  
The last company I worked was small with 3 people in IT and I was one of them.  With the company being small, my projects were mainly small one off applications.

I am looking for guidelines on how to structure a vb.net project in VS that uses best practices and is scalable.  Is there anything out there that can help with naming conventions, where to put global variables and connection information etc.

If I constructed my question without enough information please ask questions and I will do my best in providing more details.

Thanks,
jimbo99999
0
Dear experts

Is there a way to shorten the code below somehow? I need the $CustomerID to be alive and dynamic that i can change all the times and the $SSN as well.
You could save the query into a text file and use foreach syntax, but then the CustomerID in the text file will become static. Any idea?

$SQLServer = "SQLT01"
$SQLDBName = "Preprod"
$tempfolder = 'c:\test\test.csv'
$CustomerID = "466363464"
$SSN= "342564636"

function get-sqlquery{
	$SqlQuery1 = "
	Select FirstName as Name from Data_Person WHERE CustomerID = '$CustomerID'"
	$SqlQuery2 = "
    Select * from Data_Address WHERE CustomerID= '$CustomerID'"
    $SqlQuery3 = "
	Select * from Data_Email WHERE CustomerID= '$CustomerID'"
    $SqlQuery4 = "
    Select * from Data_Employment WHERE CustomerID= '$CustomerID'"
    $SqlQuery5 = "
    Select * from Data_Membership WHERE CustomerID= '$CustomerID'"
    $SqlQuery6 = "
    Select * from Data_Telephone WHERE CustomerID= '$CustomerID'"
	$SqlQuery7 = "
    Select * from Index_IncompleteCases where SSN= '$SSN'"
	$SqlQuery8 = "
    Select * from Data_CustomerNotes where SSN= '$SSN'"
	$SqlQuery9 = "
    Select * from Work WHERE ContactId= '$CustomerID'"
	$SqlQuery10 = "
    Select * from History_Work where pxHistoryForReference in (Select pzInsKey from Work where ContactId= '$CustomerID')"
	$SqlQuery11 = "
    Select * from Index_Interactions where ContactId= '$CustomerID'"
	$SqlQuery12 = "
    Select * from Data_MembershipHistory where CustomerID= 

Open in new window

0
Hi,

Can someone assist please, i am having issues with trying to customize the this table. This table needs to be imported by a text file of shift timings, i got it to make the table but it looks abit grey.

Link: Table Design
Link: Example

The example shows both a short version and a bigger version, can you help to change the layout to look similar please? Also, how do i get the smaller version setup.

Index.php
<?php
header("Content-type: text/html");
echo "<html>
<body>";
 
$file = fopen("day.txt","r") or die("Error");
?>
 
<table border=“1”>
	<tr>
		<th>Date</th>
		<th>Monday</th>
		<th>Tuesday</th>
		<th>Wednesday</th>
		<th>Thursday</th>
		<th>Friday</th>
	</tr>
	
<?php
 
while(($row = fgets($file)) != false) {
	echo "<tr>";
	$col = explode(',',$row);
	
	foreach($col as $data) {
			echo "<td>". trim($data)."</td>";
	}
	echo "</tr>";
}
?>
 
</table>
</body>
</html>

Open in new window


Text file: day.txt
 ,  Sub1a |  Sub1b  , Sub2a | Sub2b , Sub3a |  Sub3b  , Sub4a | Sub4b ,  Sub5a |  sub5b   
01 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 
02 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 
03 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 
04 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 
05 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 

Open in new window

0
I work with Delphi Rad seattle 10.
My program needs to get the real date from the internet.
It would be better if could get the date from the server of my site
I am using FireDac which  enables me to connect to external server.
0
Hey Experts!  As I evolve my script, I wanted to improve the log file format.  I need to help with the programming portion.  

Right now the script will delete the files that meet the criteria set and output basic info to a log file.

$logfile = "C:\Tools\Logs\SW_Cleanup.log"
cd "C:\tools\Scripts\Test"

forfiles /d -0 /c "cmd /c echo @path @fdate" > $logfile
forfiles /d -0 /c "cmd /c del /q /f @file"

Open in new window


I would like to include a header like this:

$scriptversion = 10.12.18


Add-Content -Path $sFullPath -Value "Started processing at [$([DateTime]::Now)]."
Add-Content -Path $sFullPath -Value "***************************************************************************************************"
Add-Content -Path $sFullPath -Value ""
Add-Content -Path $sFullPath -Value "SpiceWorks purge of backups older than 10 days"
Add-Content -Path $sFullPath -Value ""
Add-Content -Path $sFullPath -Value "Running script version [$ScriptVersion]."
Add-Content -Path $sFullPath -Value ""
Add-Content -Path $sFullPath -Value "***************************************************************************************************"
Add-Content -Path $sFullPath -Value "

Through my testing, I've tried various add-content and write-log options with no success so I figured it was time to ask the professionals.  I appreciate your time and assistance.
0
PMI ACP® Project Management
LVL 12
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Dear expert, below code returns:
CustomerID
-----------------
32455666

I would like to format the result that it only shows the number and as a string or int.

How could i do this?

function sqlquery {
	$SqlQuery = "
	SELECT CustomerID
  FROM [MIR_Preprod].[Data].Mbr_Data
  where ssn = '34445666'
	"
	
	$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
	$SqlConnection.ConnectionString = "Server = $SQLServer; Database = $SQLDB; user id ="
	
	$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
	$SqlCmd.CommandText = $SqlQuery
	$SqlCmd.Connection = $SqlConnection
	
	$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
	$SqlAdapter.SelectCommand = $SqlCmd
	
	$DataSet = New-Object System.Data.DataSet
	[void]$SqlAdapter.Fill($DataSet)
	
	$SqlConnection.Close()
	#-----------------------------------------
	
	return $DataSet.Tables[0].Rows
}
$result = sqlquery 

Open in new window

0
What does       O(n2) algorithm mean? and How to test it to show running time?
0
Hello, I am using AutoHotKeys (AHK) to make Control + P to paste the content of the clipboard and then immediately clear it. The idea is to not leave sensitive information such as passwords hanging around on the clipboard. Basic functionality using the script below is working OK:

; Paste and clear clipboard with Control + P
^p up::
send ^{v}
sleep 100
clipboard := ""
MsgBox, 0, Notice, Clipboard cleared, 1
return

But I am tryng to improve it in two ways:
1. Not have the message appear if there is nothing on the clipboard to be pasted (or alternatively have another message "Clipboard is empty" appear).
2. Remove the "OK" button from the message box (since the message autodisappears it is not needed)

Regarding 1. I have tried all sorts of If....Else variations but just cannot seem to get the condition for "empty clipboard" right.
Regarding 2. maybe this is just not possible going by AHK's documentation https://autohotkey.com/docs/commands/MsgBox.htm. But if anyone has alternative ideas they would be appreciated.

I am using the latest version of AHK ( v1.1.30.00 ) on Windows 10 Pro. Thank you in advance for any comments.
0
I have an asp.net page with a panel (with scroll bars) inside a panel with an update panel.  The button (MstrQLst) used for making the popup visible requires 2 clicks to work.

Can someone help?

Thanks,

<asp:Table ID="Table1" runat="server" Width="100%" CellPadding="0" CellSpacing="0"
            Height="25px">
            <asp:TableRow ID="TableRow2" runat="server" Width="100%" BackColor="#336699" Height="100%">
                <asp:TableCell ID="TableCell2" runat="server" Width="90%" HorizontalAlign="Left"
                    Height="100%">
                                                            <asp:Button ID="MstrQLst" runat="server" Text="Master Question Library" Font-Names="Arial" Font-Size="10"
                        Font-Underline="True" ForeColor="#FFFFCC" BackColor="Transparent" BorderStyle="None"
                        Font-Bold="True" CausesValidation="False" OnClick="MstrQLst_Click" />&nbsp;
                                                       </asp:TableCell>
                            </asp:TableRow>
        </asp:Table>
<asp:Panel ID="CoreQuest2" runat="server" Width="40%" Visible="False" ViewStateMode="Enabled"
            BackColor="#E9E9E9" BorderColor="#999999" BorderStyle="Inset" BorderWidth="1"
            HorizontalAlign="Center" Height="50%">
            <asp:Table ID="Table6" runat="server" Width="100%" BorderColor="#003366" BorderStyle="Inset"
                BorderWidth="1" Height="30px" ViewStateMode="Enabled" 

Open in new window

0
After years of programming in most of the Microsoft Office suite applications, this morning I was hit by an anomaly.

The VBE will not show the code, any existing code. I can write code but once saved and reopened it all vanishes. This happens with all Office files (Word, Excel, Access etc.). The modules appear the the VBE tree, but when opening one, the VBE remains blank as if a module was never opened. The code however does exist as it runs as expected and when a module is exported the bas file contains all the code. Yet for some reason the code is not shown in the VBE.

On other computers everything works, so the problem is not with the files but rather with the computer\ Office installation. Rebooted Windows, re-installed Office, yet problem persists.

Searching online it seems that a handful of users experienced the same issue but I couldn't find a solution.

Ideas are welcome and your help is greatly appreciated.


EDIT: If I search for a function only that function will be shown.
0
Should I use Netbean or Eclipse for Java development ? Is it better to use JavaFX or Swing for my programming ?

Thx
0

Programming

53K

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.