Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

System Programming

40K

Solutions

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

I just bought a golf cart  that has a pro link monitor. Is it possible to reprogram for the gps when the golf course doesn't have the system. I basically just want the gps.
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!

I am curious about finding the cost to a big bank to process something like a bank transfer from one account to another...

I am thinking about my bank, where I have two accounts, where I may move a few hundred dollars from one account to another.

Is the cost less than a penny for such a transaction for a website or an iPhone app to make such a transfer? I assume there are overhead costs where auditors review blocks of transactions, but I am not asking about that. Just the marginal cost for a hosted and highly secure website to process a transaction.

Does anyone have an idea about this?
0
Hi Experts,

I have written a program that reads the network interfaces to retrieve the MAC addresses for the network cards/interfaces in the computer.

The program sets up a http server to run locally on every machine, listening on a port for the API calls. For each request I'm starting a new thread, and in that thread I make a call to retrieve this information.

However, sometimes the program crashes entirely (not just the thread serving the request, but the entire program itself), without any logs or exceptions.

I'm not too sure what the cause is, but I suspect it may have to do with the NetworkInterface.GetAllNetworkInterfaces() call, as my logs stop there everytime it randomly crashes. Usually, even if a COMException occurs (due to some native DLL I'm using), the server would still be up and running, but in this case, the server closes entirely.

I have also tried this on my colleague's computer; it seems to be fine for him, but mine crashes randomly, perhaps once every 100 requests?

My question is, is there a known issue with the NetworkInterface.GetAllNetworkInterfaces() call? If not, is there a way for me to properly debug and find the cause of this issue?


Best Regards,
Zack
0
Hi,
i need ideas (or a script) how to search all MAC Addresses of a windows system and pass these as parameter to an external program...with PERL.

script should do the following:
1. get all MAC-Adresses (LAN1, LAN2, WLAN,...)
      = AA-AA-AA-AA-AA-AA , BB-BB-BB-BB-BB-BB , CC-CC-CC-CC-CC-CC-CC

2. start external programm and pass every MAC (one after another) ... possible within a loop
extProg.exe AA-AA-AA-AA-AA-AA
extProg.exe BB-BB-BB-BB-BB-BB
extProg.exe CC-CC-CC-CC-CC-CC-CC
0
Ready to get certified? Check out some courses that help you prepare for third-party exams.
5
In Microsoft Access, I have a form which currently opens up a number of pdf's (currently in Acrobat Reader). My goal is to open up the same number of pdf's in IE, but have them grouped by color. The way the sort of the list is made, the first tab in a group is an image of a purchase order, the following tabs are pdf's of vendor invoices. Often times there is a one to one relationship between purchase order and invoice, however on a fairly regular basis there may be more than one invoice to the purchase order. I would like to make it clear to the user by colored tabs, the relationship of Purchase Orders to Invoices.

The selection criteria and Path has been commented out. Printing works fine, but is also commented out at the moment.

Private Sub Command0_Click()
Dim db As Database
Dim rst As DAO.Recordset
Dim StrSQL As String
Dim PathName As String
Dim PO As String

Set db = CurrentDb()

StrSQL = "SELECTION CRITERIA"

Set rst = db.OpenRecordset(kaySQL, dbOpenDynaset, dbSeeChanges)
Do Until rst.EOF
  PathName = "SomePath" & rst("Image-no") & ".PDF"

 CreateObject("Shell.Application").Namespace(0).ParseName(PathName).InvokeVerb ("Open")
 
 'CreateObject("Shell.Application").Namespace(0).ParseName(PathName).InvokeVerb ("Print")

  rst.MoveNext
Loop
rst.Close

End Sub
0
Guys,
I saw some script that in our applications server has the gawk.exe with parameter as  below, do anyone here familiar with gawk and mind to explain what is this parameter does ?

gawk.exe "!x[$0]++"
0
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.gp.com/Patient"
	xmlns:tns="http://www.gp.com/Patient" elementFormDefault="qualified">

	<element name="patient" type="tns:Patient" />

	<complexType name="Patient">

		<sequence>
			<element name="id" type="tns:ID" />
			<element name="name" type="tns:string15chars" />
			<element name="age" type="int" />
			<element name="dob" type="date" />
			<element name="email" type="string" />
			<element name="gender" type="tns:genderEnum" />
			<element name="phone" type="string" />

		</sequence>

	</complexType>

	<simpleType name="ID">
		<restriction base="int">
			<pattern value="[0-9]*"></pattern>
		</restriction>
	</simpleType>

	<simpleType name="string15chars">
		<restriction base="string">
			<pattern value="15"></pattern>
		</restriction>
	</simpleType>



	<simpleType name="genderEnum">
		<restriction base="string">
			<enumeration value="M"/>
			<enumeration value="F"/>
		</restriction>
	</simpleType>


</schema>

Open in new window


Based on aboveXSD i generated below XML which gives error at line 4 of XML as
Multiple annotations found at this line:
      - cvc-type.3.1.3: The value 'Maaa' of element 'tns:name' is not valid.
      - cvc-pattern-valid: Value 'Maaa' is not facet-valid with respect to pattern '15' for type
       'string15chars'.


<?xml version="1.0" encoding="UTF-8"?>
<tns:patient xmlns:tns="http://www.gp.com/Patient" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gp.com/Patient Patient.xsd ">
  <tns:id>1</tns:id>
  <tns:name>Maaa</tns:name>
  <tns:age>0</tns:age>
  <tns:dob>2001-01-01</tns:dob>
  <tns:email>tns:email</tns:email>
  <tns:gender>M</tns:gender>
  <tns:phone>tns:phone</tns:phone>
</tns:patient>

Open in new window



why i am getitng this error and how to fix it. i using eclipse for this as IDE.
any other open source XML IDEs bettr than eclipse to work on these simple xml, XSDs etc
please advise
0
SysAdminDay2017-SocialMedia-Native.pngHappy SysAdmin Day! To celebrate we collected some your most humorous and downright ridiculous stories of tech tasks that are part of your day to day schedules but, we believe deserve more recognition and appreciation. Enjoy!
1
SysAdmin Day is this Friday! If you have a story of a time when your technical skill and expertise saved the day comment here. You can also message us!

Looking forward to reading more of your experiences!
3
Moving data to the cloud? Find out if you’re ready
LVL 3
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Hi experts, i want to change PHP to POWERBUILDER, any help please!
below the php script :

========encrypt===============
function mc_encrypt($data, $key)
{
/// make binary representasion of $key
$key = hex2bin($key);

/// check key length, must be 256 bit or 32 bytes
if (mb_strlen($key, "8bit") !== 32) {
throw new Exception("Needs a 256-bit key!"); }

// create initialization vector
$iv_size = openssl_cipher_iv_length("aes-256-cbc");
$iv = openssl_random_pseudo_bytes($iv_size);

/// encrypt
$encrypted = openssl_encrypt($data, "aes-256-cbc", $key, OPENSSL_RAW_DATA, $iv );

/// create signature, against padding oracle attacks
$signature = mb_substr(hash_hmac("sha256", $encrypted,  $key,   true),0,10,"8bit");

/// combine all, encode, and format
$encoded = chunk_split(base64_encode($signature.$iv.$encrypted));

return $encoded;
}

========decrypt===============
function mc_decrypt($str, $key)
{

/// make binary representation of $key
$key = hex2bin($key);

/// check key length, must be 256 bit or 32 bytes if (mb_strlen($key, "8bit") !== 32) {
throw new Exception("Needs a 256-bit key!"); }

/// calculate iv size
$iv_size = openssl_cipher_iv_length("aes-256-cbc");

/// breakdown parts
$decoded = base64_decode($str);
$signature = mb_substr($decoded,0,10,"8bit");
$iv = mb_substr($decoded,10,$iv_size,"8bit");
$encrypted = mb_substr($decoded,$iv_size+10,NULL,"8bit");

/// check signature, against padding oracle attack
0
private void FileDataRequest(StreamedFileDataRequest r)

{

MemoryStream m = new MemoryStream();

r = m.AsOutputStream as StreamedFileDataRequest;
}
void loop(){
StorageLibrary l = await StorageLibrary.GetLibraryAsync(FromKnownId.Pictures);

Scrollviewer scrollviewer = new Scrollviewer();

RenderTargetBitmap r = null;

 r = new RenderTargetBitmap();

                await r.RenderAsync(scrollviewer);

                

                var file0 = await l.SaveFolder.CreateFileAsync("poikidiki");

                await FileIO.WriteBufferAsync(file0, await r.GetPixelsAsync());

                Windows.Storage.Streams.IRandomAccessStream b = await file0.OpenAsync(FileAccessMode.ReadWrite);

               

                var file = await StorageFile.CreateStreamedFileAsync("effort06.jpg", new StreamedFileDataRequestedHandler(FileDataRequest),Windows.Storage.Streams.RandomAccessStreamReference.CreateFromFile(file0));





   

              
                await file.CopyAsync(l.SaveFolder);

}

Open in new window

I have this:

it doesn't copy the bytes to the streamed file.

help appreciated
0
Calling all System Administrators!!

We are excited for SysAdmin Day on July 28th! To celebrate, we are compiling the best SysAdmin stories from our community. We would love the opportunity to showcase your heroic tales of crazy problems you solved to keep the tech world going in our upcoming blog piece.  

Comment below or message us before Friday July 21st at 12pm PST to have your story included.
2
 
LVL 10

Author Comment

by:Experts Exchange
Thanks! We are looking for stories from within the EE community!
0
 
LVL 7

Expert Comment

by:Brian Matis
Not sure if this really counts, because I wasn't the SysAdmin in this scenario; instead, I was the problematic user! But here goes: back when I was a student at CalPoly, we had access to the school's UNIX system for things like our email. I had taken the C and UNIX class, so I knew my way around the command line enough to do more than just use PINE to check my email. I also really liked the SETI @ Home project, so I got the UNIX version of the client and installed it on my account on the school's system and would just let it run.

I think maybe I had it going for a month and I have no idea what sort of resources it was taking up. I imagine it wasn't really all that bad, but eventually, a SysAdmin did shut it down and told me not to do that again...

I imagine college SysAdmins have to deal with a lot of shenanigans like that! :-D
1
Hello everyone.

I've seen that what I'm trying to do which is monitoring the file IO require the use of Window File System Filter driver and I've also looked into it but was a bit hard to understands especially as I'm not a C++ developer. What I want to achieve is to be able to trap file copy, creation, as well as file sources and destinations, lets say I'm copying a file within my computer I want to get the source path of the file as well as destination path of the file and also the file name as well and if possible with the application that is sending the file.

I saw that this can also inform you if there is file access(opening of file, reading of file) this is very much important to me to also get it if possible while the request of file open is created. I wan to trap this and if the file is one of my file then I want to first work on the requested file first (decrypt).

Thank you.
0
HOW TO CONVERT * char to string (linha):

const unsigned char
*menino1 = (const unsigned char *)0;


menino1 = p - 17;

string linha = menino[1]+menino[2]+menino[3]+menino[4]+menino[5];
0
What I need is to return a single partition ID by supplying a LABEL so I can use it in a bash script.

For instance partid = somecommand DATA-BU would store the partition is in a variable.  

What sayeth the group ?

Jay
 
I have seen ls -l /dev/disk/by-label will show me ALL LABELS > Partitions as shown in this picture, however I only need a single one and I need it in a variable form.

label-info.png
0
hi,

http://codingbat.com/prob/p136950

for above challenge
Map-1 > mapAB4
prev  |  next  |  chance

Modify and return the given map as follows: if the keys "a" and "b" have values that have different lengths, then set "c" to have the longer value. If the values exist and have the same length, change them both to the empty string in the map.

mapAB4({"a": "aaa", "b": "bb", "c": "cake"}) → {"a": "aaa", "b": "bb", "c": "aaa"}
mapAB4({"a": "aa", "b": "bbb", "c": "cake"}) → {"a": "aa", "b": "bbb", "c": "bbb"}
mapAB4({"a": "aa", "b": "bbb"}) → {"a": "aa", "b": "bbb", "c": "bbb"}

what are input parameters for the method.

what is the return for it?


"a": "aaa", "b": "bb", "c": "cake"//is these are bunch of string values pretending to be key and value for a map??

please advise on how to understand and approach this challenge
0
The script below does a count of the existing folders and if the count is different the next time it runs then it will generate an Event ID. The problem that I have with the existing approach is that when a folder is purged/deleted the count is no longer valid and we will be a false positive.

Instead of the .count we need to find if a new folder has been created. I am not sure if there is a way to do it by date? or some other way so that when folders are deleted we don't get falser positives.

Basically the goal is to have a script which will run from SCOM the target machine (every 30 min) to verify if a new folder has been created in a specific path, if so then will generate an event ID. SCOM will monitor the event-id and generate an alert.

The script below works great, but we need to replace the count with something that will be more date oriented.

Thank you!

---------------

#requires -version 3
New-EventLog -LogName Application -Source "MyScript" -ErrorAction SilentlyContinue
$basecountfile = "$env:HOMEDRIVE\scripts\basecount.txt"
if (test-path -Path $basecountfile){
  # if file not found then this is the first run so there is no baseline
  # otherwise check the path and count the directories and compare against the baseline
        $previouscount = get-content -path $basecountfile
        $basecount = (get-childitem -Path \\server\folder -Recurse -Directory).count
        if ($basecount -ne $prevouscount) {
        # found a difference
         

Open in new window

0
Hi,
Using these codes (in the project),
        private static Cell InsertCellInWorksheet(string columnName, uint rowIndex, WorksheetPart worksheetPart)
        {
            Worksheet worksheet = worksheetPart.Worksheet;
            SheetData sheetData = worksheet.GetFirstChild<SheetData>();
            string cellReference = columnName + rowIndex;
            Row row;
            if (sheetData.Elements<Row>().Where(r => r.RowIndex == rowIndex).Count() != 0)
            {
                row = sheetData.Elements<Row>().Where(r => r.RowIndex == rowIndex).First();
            }
            else
            {
                row = new Row() { RowIndex = rowIndex };
                sheetData.Append(row);
            }
            if (row.Elements<Cell>().Where(c => c.CellReference.Value == columnName + rowIndex).Count() > 0)
            {
                return row.Elements<Cell>().Where(c => c.CellReference.Value == cellReference).First();
            }
            else
            {
                Cell refCell = null;
                foreach (Cell cell in row.Elements<Cell>())
                {
                    if (string.Compare(cell.CellReference.Value, cellReference, true) > 0)
                    {
                        refCell = cell;
                        break;
                    }
                }
                Cell newCell = new Cell() { CellReference = cellReference };
                row.InsertBefore(newCell, refCell);
                

Open in new window

0
On Demand Webinar: Networking for the Cloud Era
LVL 10
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Hi,
Is there one example to read each message, one by one, for one specific text string, within Sent folder of Outlook?
0
I installed C++ builder 6.0 on windows 10.
when I reopen a project , my working directory don't change to new project path and my new forms create on the directory that last time I used "FILE->Open Project" method.
if every body knows how can say to it change to the project path after reopen .
-- thanks reza
0
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
Hi,
How to adjust to list below, to have also one picture file included, that is retrieved from database?

            using (SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["Mssqlconn3"].ConnectionString))
            {
                using (SqlCommand sqlCmd = new SqlCommand("SELECT house_name, address1, address2, price, price_curr 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 = dataRow.Field<string>("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

System Programming

40K

Solutions

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.