System Programming

40K

Solutions

18

Articles & Videos

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

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

Sign up to Post

Hi,
Is there one example to read each message, one by one, for one specific text string, within Sent folder of Outlook?
0
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: 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!

Hi,
Further to this
https://www.experts-exchange.com/questions/29029100/Problem-to-show-list.html?anchor=a42174635¬ificationFollowed=190745230#a42174635

and I have ImageHandler.cs like
using System;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.Data.OleDb;
using System.Xml;
using System.Globalization;
using System.Collections.Generic;
using System.Drawing;
using System.Text; // This was needed to make ASCIIEncoding function
using System.Security.Cryptography; // This was needed to make everything related to MD5 function
using System.Web.Services;

namespace Own_rec
{
    public class ImageHandler : IHttpHandler
    {
        /// <summary>
        /// You will need to configure this handler in the Web.config file of your 
        /// web and register it with IIS before being able to use it. For more information
        /// see the following link: http://go.microsoft.com/?linkid=8101007
        /// </summary>
        public void ProcessRequest(HttpContext context)
        {
            //string userId = string.Empty;
            int userId = 0;
            //-- get the ID from query string you get from <img src tag
            if (null != 

Open in new window

0
Hi,
Using these codes

        public static List<HouseData> GetHouseList()
        {
            List<HouseData> houseList = new List<HouseData>();
            using (SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["Mssqlconn3"].ConnectionString))
            {
                using (SqlCommand sqlCmd = new SqlCommand("SELECT house_name, address1, address2, price, price_curr, raised_by_user_id FROM house_tab", sqlConn))
                {
                    sqlConn.Open();
                    sqlCmd.CommandType = CommandType.Text;
                    SqlDataAdapter sqlAd = new SqlDataAdapter(sqlCmd);
                    DataTable sqlDt = new DataTable();
                    sqlAd.Fill(sqlDt);
                    sqlConn.Close();
                    if (null != sqlDt)
                    {
                        houseList = sqlDt
                                        .AsEnumerable()
                                        .Select(dataRow => new HouseData
                                        {
                                            house_name = dataRow.Field<string>("house_name"),
                                            address1 = dataRow.Field<string>("address1"),
                                            address2 = dataRow.Field<string>("address2"),
                                            price = dataRow.Field<decimal>("price"),
                                            price_curr = 

Open in new window

0
I use Ola Hallengren's maintenance for all of my customer's, https://ola.hallengren.com/sql-server-backup.html.
Have used it for years, never any real problems -- until now.  For some reason the @CleanupMode and @CleanupTime are not working. The backup step is configured to retain bak files for only 24hrs, and to cleanup the old bak before generating the new.  For some reason, it is not working, and the job keeps failing due to insufficient disk space.

My temporary workaround is below.  I am deleting the largest bak file from disk as a first step in the job, until I get Ola's logic corrected.  Well, it works great as-is, but I've found I need to run it for all subdirectories.

The way it works now is to del the bak file in this path explicitly:
SET @path = 'dir \\backups\servername\dbname\FULL\'

I need it to delete the bak files from all subdirectories within \\backups\servername\

Any help?



SET NOCOUNT ON;

IF OBJECT_ID('tempdb..#files') IS NOT NULL
DROP TABLE #files;
CREATE TABLE #files (Line VARCHAR(512)) 
DECLARE @path VARCHAR(49) 
DECLARE @cmd1 VARCHAR(155)
DECLARE @cmd2 VARCHAR(155)
DECLARE @filename VARCHAR(255)
SET @path = 'dir \\backups\servername\dbname\FULL\'
SET @cmd1 =  @Path+' /A-D  /B' 
--PRINT @cmd1

INSERT #files
EXEC master..xp_cmdshell @cmd1
DELETE #files WHERE Line IS NULL
--SELECT * FROM #files

SET @filename = (SELECT Line FROM #files)
SET @cmd2 = 'del \\backups\servername\dbname\FULL\' + @FileName
--PRINT @cmd2

IF EXISTS(SELECT

Open in new window

0
I am attempting to register a remote machine on team services with Powershell. When I enter the script on the remote machine and attempt to run it, I get the error below: Cannot add type. The assembly 'System.IO.Compression.FileSystem' could not be found. I have copied the registration script from the Deployment Groups section on team services online.

The server that I am using is windows server 2008 R2. The script is below:

$ErrorActionPreference="Stop";If(-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] “Administrator”)){ throw "Run command in Administrator PowerShell Prompt"};If(-NOT (Test-Path $env:SystemDrive\'vstsagent')){mkdir $env:SystemDrive\'vstsagent'}; cd $env:SystemDrive\'vstsagent'; for($i=1; $i -lt 100; $i++){$destFolder="A"+$i.ToString();if(-NOT (Test-Path ($destFolder))){mkdir $destFolder;cd $destFolder;break;}}; $agentZip="$PWD\agent.zip";(New-Object Net.WebClient).DownloadFile('https://github.com/Microsoft/vsts-agent/releases/download/v2.116.1/vsts-agent-win7-x64-2.116.1.zip', $agentZip);Add-Type -AssemblyName System.IO.Compression.FileSystem;[System.IO.Compression.ZipFile]::ExtractToDirectory($agentZip, "$PWD");.\config.cmd --deploymentgroup --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://aaosprojects.visualstudio.com/' --projectname 'xxxxxxxProjects' --deploymentgroupname "xxxxxxxxxDeploymentGroup" ; Remove-Item $agentZip;
0
Is there any way to search for all instances of a string in notepad++ and delete the whole line
on which the string is found?
0
Hi,
I am looking for String Format Method example using various date formats
https://www.javatpoint.com/java-string-format.

I found above link but no example there using the date format though like MMDDYYYY or YYYYMMDD etc to represent date?
please advise
0
Hi,
Is there any C# example code (or other kind of codes) to be able to show a relevant map part from Baidu, per one given city/place location?
0
Hi

In Java, as per a hashtag or a twitter opportunity,

how can I get a list of users that incorporated / responded to that hashtag / question?

Thanks
0
have a basic mfc c++ project built in vs2005 and am just trying to place some text into an edit box on a form
the forms name is and code that access the for is

csdiialog dlg;
dlg.DoModal();
// on the form i have an edit box called IDC_EDIT1 (Edit Control)
// have defined it as dlg then have tried to set the text using
dlg.SetDlgItemText(dlg.m_edit2,"Welcome");
// but throws up the error   c:\c++ projects\usingvccplus\firstsdi\sdi2\sdi2.cpp(98): error C2664: 'CWnd::SetDlgItemTextA' : cannot // convert parameter 1 from 'CString' to 'int'
any help would be appreciated
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!

Hi,
How to correct
Error      3      The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

while I have Excel 2007 on my Desktop?
0
I need to detect particular opened apps in my desktop to decide further process in my program by getting its window title. For instance, I will search "Untitled - Notepad" to ensure Notepad is opened and will search "Calculator" to ensure Calculator is opened. Please see the following image for what window title is:
snapshot1.png
The following is the code I have built.

#include "stdafx.h"
#include <windows.h>
#include <tlhelp32.h>
#include <tchar.h>

//  Forward declarations:
BOOL GetProcessList();
void printError(TCHAR* msg);

int main(void)
{
	GetProcessList();
	return 0;
}

BOOL ListProcessThreads(DWORD dwOwnerPID)
{
	HANDLE hThreadSnap = INVALID_HANDLE_VALUE;
	THREADENTRY32 te32;

	GUITHREADINFO guiInfo = { sizeof(guiInfo) };
	DWORD dwErr = 0;

	LPTSTR app1 = _T("Untitled - Notepad");
	LPTSTR app2 = _T("Calculator");

	// Take a snapshot of all running threads  
	hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
	if (hThreadSnap == INVALID_HANDLE_VALUE)
		return(FALSE);

	// Fill in the size of the structure before using it. 
	te32.dwSize = sizeof(THREADENTRY32);

	// Retrieve information about the first thread,
	// and exit if unsuccessful
	if (!Thread32First(hThreadSnap, &te32))
	{
		printError(TEXT("Thread32First"));  // Show cause of failure
		CloseHandle(hThreadSnap);     // Must clean up the snapshot object!
		return(FALSE);
	}

	// Now walk the thread list of the system,
	// and display information about each thread
	// associated 

Open in new window

0
I am trying to find a program that I can download to record church offerings .  Sunday, Wednesday, Missions and Sunday School offerings. Also to record specific members weekly offerings
0
LRESULT CMainFrame::OnKeyStroke(WPARAM wParam, LPARAM lParam)
{
      AllowSetForegroundWindow(GetCurrentProcessId());
      BringWindowToTop();
      SetForegroundWindow();
       return 0;
}

For above code, I am  trying to get window to top, but instead of it goes to top, I have flash icon on taskbar. Does anyone knows why it does not my window does not go to top?
Thanks for any help.

Evan
0
When a shortcut file is double-clicked in Windows, the shell dereferences the shortcut and launches the application associated with the file type from the dereferenced shortcut, in other words the path to the actual file. The application receives the dereferenced path instead of the path to the shortcut.

In our application, the user is saving shortcuts to image files as well as updated image files. That is, shortcut files are used to categorize an image file; e.g. "roses", "large\flowers", "floral". The image file itself is stored in a hidden directory.

When a user double-clicks a shortcut and the shell launches our editing/viewing application to display the image, the application correctly displays the image but all path information to the shortcut from which the application was launched is lost.

The question is how to obtain a path to the shortcut file which initiated the application. In other words, is their a way to capture the path to the shortcut file that is double clicked before it is dereferenced by the Shell.

The application is a proprietary app of which we are writing all of the code, so we are flexible with any solution down to a code level.
0
How to create a .bat that will rotate me "n" number of applications open on the screen, and that each screen will show for 10 seconds and change to the next one.

As if we were using Alt + Tab

Thanks and regards
0
Hi,

how to enable my finger print for switching on or logging to my phone to make it more secure. i know it has that feature but i do not not know how to use it?
please advise
0
I am in an Exchange admin with about 15 years experience, starting off in Helpdesk.

I recall the days when every company, regardless of size, had an on-site technical crew to manage their Exchange servers and everything else.

Then the smaller ones opted for the cloud, and the larger organisations kept dedicated technical teams

Now the larger ones are moving to the cloud too, and the only ones left with on-prem infrastructure are the ones with separate teams for exchange, storage, and so on.

Once these move to the cloud, I wonder what is next? So my question is, for someone in IT would it make sense to focus on software development rather than infrastructure skills?
0
I have a table

OrderDetail

PK                                      FK                            
OrderDetailID                OrderID           LineNo          
8238                                7780                  1
8239                                7780                  2
8240                                7781                  1

How do I create the column LineNo based of OrderID to increment starting with one?  So once the FK OrderID changes it starts back to 1
0
Technology Partners: We Want Your Opinion!
Technology Partners: 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!

HI I had a task in my company where I I need to edit error message "You’re not connected to a network" In IE when ever I have no internet connection . is IT possible to edit and customized my own message error message ?if yes please provide solution . am fine with google chrome too
0
When i log into certain machine with my user name (username1) i don't have access to certain folders etc... however if use a sesu command and i log as another user (lets call it username2) i do have access (however and i dont know the reaseon, when i sesu username2 im not required for a password but im logged ok as that user) to the resources i need.

Now im developing a script fro my username1 that will require to log as username2 to be executed, by using a sesu, but somehow it does'nt work, it seems like i can't sesu from a script or even a command and execute the sript i want as username2 using the sesu option.

I get the next error on my unix console:


I execute:
opt/AB/AccessControl/bin/sesu - username2 /home/username1/scripts/script1.ksh

Open in new window


And i get
Invalid option /home/username1/scripts/script1.ksh

Open in new window


Any ideas?
0
Hi,
I got one problem only to upload the App apk file (which has been accepted by Baidu, Ali), to the following

http://op.open.qq.com/single_game_reg?appid=1105979092

do you know contact of their Customer Service?
0
Hi Experts

We have an application deployed on weblogic cluster, the application creates and publishes documents. During the creation phase the  application throws the below exception:

========================================================================================================

org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: EOF after reading only: '130432' of: '533010' promised bytes, out of which at least
: '512' were already buffered; nested exception is java.net.ProtocolException: EOF after reading only: '130432' of: '533010' promised bytes, out of which at least: '512' were a lready buffered
        at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:224)
        at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.read(AbstractJackson2HttpMessageConverter.java:208)
        at org.springfr
===========================================================================================================

The application was tested on our Dev and QA environments and works fine, in production it throws the above exception.

May you please assist.

Thank
0
Is there a way to have a pop up message when opening a specific program on a Windows 7 computer? Using Notepad as an example, if I click on Notepad in my list of programs, before it opens it will give me a message in a popup window and then it will open.

I've checked the task scheduler but no options there to trigger by opening an application. Thanks!


Tracy
0
I have a large dataset (30K rows) generated from an access database, which is imported into an Excel spreadsheet on a quarterly basis.  They are a series of 24 questions from multiple surveys in the set.  All of the answers are "Yes", "No", or NA.

Within the question set there are internal logic constructions, like  If question 2 is No, Questions 3 and 4 MUST be NA, or if question 2 is Yes, then Question 3 MAY be Yes and then Question 4 Must be NA, OR Question 3 MAY be No, and then Question 4 MUST be No.

And so it goes.

I've been attempting to develop a VBA or Macro to automate this cleaning but am struggling to think through how to structure this so it goes through beginning to end of all of the surveys and evaluating the question sets within the survey numbers.

Any thoughts on this would be greatly appreciated.
0

System Programming

40K

Solutions

18

Articles & Videos

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.