Programming Languages-Other

20K

Solutions

19K

Contributors

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.

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

Sign up to Post

I am on a RedHat Linux server.  I have a folder of files that files are being added to every minute or so.  I need a way to FTP these files to another server.  But I need to make sure that I don't try to transfer a file that is currently being written to.  I will be running the FTP script every 15 minutes or so.  What would be the best way to handle this?

Thanks,
Mark
0
I need help with my assembly language assignment.  I'm not sure how to write three times a step to repeats. And how can I write code for
          DisplayDiff: calculates and displays the difference. (first input - the second input)

   Please, somebody, help me I feel frustrated. I need to submit this tomorrow but I want to finish it today. Can someone help me as soon as possible??!!

This is my assignment looks like Write a program that:

1.     Clears the screen, locates the cursor near the middle of the screen.

2.      Prompts the user for two signed integers.

3.      Displays their sum and difference.

4.      Repeats the same steps three times. Clears the screen after each loop iteration.

5.     You might need to call the following procedures from irvine32 library:

·        ClrScr

·        WriteString

·        WriteInt

·        ReadInt

·        Crlf

·        ReadChar

·        Gotoxy

The Gotoxy procedure locates the cursor at a given row and column in the console window. By default, the console window’s X-coordinate range is 0 to 79 and the Y-coordinate range is 0 to 24. When you call Gotoxy, pass the Y-coordinate (row) in DH and the X-coordinate (column) in DL. Sample call:

mov   dh,10 ; row 10

mov   dl,20 ; column 20

call  Gotoxy; locate cursor

 

6.     You need to create the following procedures:

        Locate. It needs to be called before anything displays on the screen. Where it sets the cursor position.…
0
Is it possible to create an overlay on an iOS device that does not interact with an application? I am a newbie at programming and wanted to know if SwiftUI can accomplish this?
0
I am submitting a program from a CLLE program with 5 variables.  Inside the receiving program, the value from the second parameter is appearing in the first; the same for third to the second and so on.

The variables are relatively long; I allowed extra space in each of them to allow for growth and/or extended values.

When I call the second program (vs. SBMJOB) the variables behave.  I know it has something to do with the fact the variables are being passed by reference but I can't find how to keep it from happening.  Any suggestions?

Thank you for any help you're able to provide.

Drew
0
Can anyone help with an advise please? I am using a csv file converted to arff in Weka and it converted my numeric values to Nominal, hence not allowing me to perform Times Series analysis. Does anyone know how to specify that my data are actually Numerical please? Thank you in advance.
0
I'm on a MacOs mojave which comes with a ruby version 2.3.7. I tried to install rails with gem install rails command, but got an error below : -

ERROR : you don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory. I'm guessing as this version of Ruby comes with the MAC OS , it is not letting me change/update it.

How do I install a newer version of Ruby. Also, I have installed RVM (Ruby version manager )  and Homebrew as well, in my system.
0
Need help modifying my Racket interpreter to accept the following:

Expressions in L1
(+ "Very" "Cool" "Stuff") ; returns "Very Cool Stuff"
(* 2 "Well") ; returns "Well Well"
Expressions in L2
(print-str "Got that") ; prints and returns "Got that"
(print-str 1 "+" 1 "=" 2) ; prints and returns "1 + 1 = 2"

Here is my current code-

#lang plai-typed
(define-type L
[Operand (n : s-expression)]
[L1Type (l : L1)]; like saying that L1 is a "subclass" of L
[L2Type (l : L2)]; like saying that L2 is a "subclass" of L
)

(define-type L1
[Inc (l : L)])
(define-type L2
[Pos (l : L)]
)

(define (parse [s : s-expression]) : L
(cond
[(s-exp-list? s)
(let ([sl (s-exp->list s)])
(cond [(s-exp-symbol? (first sl))
(case (s-exp->symbol (first sl))
[(inc) (L1Type(Inc (parse (second sl))))]
[(pos?)(L2Type(Pos (parse (second sl))))])]
[else (Operand s)]))]
[else (Operand s)]
))

(define (interp [a : L]) : s-expression
(type-case L a
[Operand (n) n]
[L1Type (l)
(type-case L1 l
[Inc (l) (number->s-exp(+ (s-exp->number (interp l)) 1))])]
[L2Type (l)
(type-case L2 l
[Pos (l) (if (s-exp-number? (interp l)) (if (< (s-exp->number (interp l))0)(boolean->s-exp #f)(boolean->s-exp #T))(boolean->s-exp #F))])]
))

(display "699 incremented by 1 = ")
(interp (parse '(inc 699)))

(display "1110 incremented by 1 = ")
(interp (parse '(inc 1110)))

(display "Is 524 a positive number?\n")
(interp (parse '(pos? 524)))

(display "Is -1 a positive number?\n")
0
I currently have Magic Mirror installed as well as both the MMM-Facial-Recognition and MMM-Facial-Recognition-Tools modules.  I captured training images and ran the necessary scripts.  However, I am having a problem setting up the config.js file and making my mirror selectively display contents on the screen by who is looking at it.  I am not sure how exactly to go about this because everything I have found online so far has provided no guidance.
0
what are the most famous open source AI models to deal with numerical datasets (not images)? can you please provide links?  are CNN models best for images? not numbers?
0
Hi everyone,

in SAS I am trying to sort one SAS dataset by a certain variable (var1) and then write all records to SAS datasets (name includes "var1") and ASCII files (name includes "var1"). I am thinking to do everything in two steps as below but I am not sure if Step 2 should be done in PROC SQL or maybe in a DATA step with macros?  If anyone knows how to do Step 2 please let me know. Any suggestions or examples would be greatly appriciated.  

Step 1. Sort olddata.sas7bdat SAS dataset by var1
Step 2. Write all records from olddata.sas7bdat for each unique var1 to its correcponding data<var1>.sas7bdat SAS datasets and data<var1>.in ASCII files

*********************
* Step 1- sorting initial dataset
***********************
proc sort data=olddata;
   by var1;
run;

****************************
* Step 2 - creating data<var1>.sas7bdat
****************************
proc sql noprint;
  select distinct var1 into : x separated by ' ' from olddata;
quit;
%macro create;
  %do i = 1 %to %eval(%sysfunc(count(&x, %str( )))+1);
  data data%scan(&x,&i.);
  set olddata;
  if var1 = "%scan(&x,&i.)";
  run;
  %end;
%mend;
%create

Open in new window

0
Can a PLC extract information from a XML stream ?  How?
0
1.What code can be uses to looks for values in the below XML code example?  For example,  looks for "LaserPower" and then extract the values that follows . In the below code the value that follows is 95.  

2- Can we do that with FactoryTalk or a PLC?

RESULT GETXML
<?xml version="1.0" encoding="UTF-8"?>
<DynaMark-Project title="Demo" version="0.2">
   <OfflineEditorData>
      <MachineSetup type="string" />
      <EditorType type="string" />
      <EditorVersion type="string">0.0.0.0</EditorVersion>
   </OfflineEditorData>
   <Dynamark-Object type="CObjText">
      <CObjBaseData template-version="0.2">
         <ObjName type="string">Text</ObjName>
         <ParamDelaysName type="string">Default</ParamDelaysName>
         <Invers type="bool" value="false" />
         <Mark type="MarkEnableMode" value="true" />
         <Offset type="CPoint" value="-56.0489 16.1231" />
         <ScaleX type="float" value="2" />
         <ScaleY type="float" value="2" />
         <RadiantX type="float" value="-1.5708" />
         <RadiantY type="float" value="-1.5708" />
         <MirrorX type="bool" value="true" />
         <MirrorY type="bool" value="true" />
         <Hatching type="Hatching" value="none" />
         <LaserNr type="integer" value="0" />
         <MinVectorLength type="float" value="0" />
         <XCenterMode type="CenterMode" value="center" />
         <YCenterMode type="CenterMode" value="center" />
         <Locked type="bool" value="false" />
         

Open in new window

0
Hi,
I have written following Python code,But it's Not working. No results showing

with open('Test.csv') as csvfile:
	      readCSV=csv.reader(csvfile,delimiter=',')
	      print(readCSV)
	      for row in readCSV:
		      print(row)

Open in new window

Program executes on the Python 3.7.0 Shell
0
hello all

i am trying to hide some nodes in graphviz while preserving the relationships between visible nodes

a -> b
b -> c
b[style=invis]

should be somehow transformed into

a -> c

----

one simple real use case is the following
which i'm generating quite simply by hiding all the libs from debtree's output

#debtree -I -R -r --show-all --rdeps-depth=100 --max-depth=0 x11-common | sed "/\"lib/ s/style=filled/style=invis/"
digraph "x11-common" {
	node [shape=box];
	"libice6" -> "x11-common" [color=blue];
	"libice6" [style=invis,fillcolor=azure];
	"libxt6" -> "libice6" [color=blue];
	"libsm6" -> "libice6" [color=blue];
	"libxt6" [style=invis,fillcolor=azure];
	"graphviz" -> "libxt6" [color=blue];
	"libxmu6" -> "libxt6" [color=blue];
	"libxaw7" -> "libxt6" [color=blue];
	"graphviz" [style=filled,fillcolor=azure];
	"debtree" -> "graphviz";
	"debtree" [style=filled,fillcolor=azure];
	"libxmu6" [style=invis,fillcolor=azure];
	"graphviz" -> "libxmu6" [color=blue];
	"libxaw7" -> "libxmu6" [color=blue];
	"libxaw7" [style=invis,fillcolor=azure];
	"graphviz" -> "libxaw7" [color=blue];
	"libsm6" [style=invis,fillcolor=azure];
	"libxt6" -> "libsm6" [color=blue];
	"x11-common" [style="setlinewidth(2),filled",fillcolor=honeydew];
}

Open in new window


i expect to produce a simple graph with "debtree -> graphviz -> x11-common"

any way to achieve that in graphviz alone without parsing the whole thing ?

thanks for your time
0
When I type
foo(a,X)=foo(Y,b).
 in the listener, I get X=b and Y=a.
However, if I create a clause
foo(a,X).
and type
foo(Y,b). in the listener, Unification doen't occur, and I get no as an answer.
I am using Amzi Prolog with the Eclipse interface.
What is wrong?
Thanks
0
I Got the app to post to my server ??? what I though would be more difficult... I what I need is to have the app to show the Geolocation changes on the screen ... I need to post longitude and latitude to the screen... I'm also sending Altitude and speed to server ... I can not assign  the longitude and latitude to a variable ... I also thought it may be a lazy load so I move the Geolocation function  prior to the "createLabble" still error ... How can I get the e.coor.latitude to print to label

var lat = Ti.UI.createLabel({
		top : 215,
		left : 40,
		text : latitude,
		color : "black",
		font : {
			fontSize : 10
		}
	});
	var Long = Ti.UI.createLabel({
		top : 215,
		left : 200,
		text : "longitude",
		color : "black",
		font : {
			fontSize : 10
		}
	});

Open in new window

function getLocation() {
	Ti.Geolocation.getCurrentPosition(function(e) {
		console.log(e);
		var latitude = e.coord.latitude;
	    var longitude = e.coord.longitude;
		
	});
}

Open in new window

Get this error
Script Error {
[ERROR] :      column = 19;
[ERROR] :      line = 32;
[ERROR] :      message = "Can't find variable: latitude";
[ERROR] :      sourceURL = "file:///Users/clayrichmond/Library/Developer/CoreSimulator/Devices/2185D8C3-E658-43EC-AE86-9AB1558DD5DE/data/Containers/Bundle/Application/AA37B7DA-55C2-47E1-8C23-6AF9F9E2FECB/tryAgain.app/app.js";
[ERROR] :      stack = "    at createTab(/app.js:32:19)\n    at (/app.js:9:26)\n    at global code(/app.js:168:70)\n    at require@[native code]\n 

Open in new window

0
I have just used RAD Studio Tokyo to complete my first program for Android. I have this program running well on my Amazon Fire.

There is one odd problem I am having with text. I am using Edit boxes for entry and display of numbers. Everything looks perfect at design time. But when I run it on the Fire, all of the numbers in the edit boxes are slightly cut off at the bottom as if they didn't quite fit into the edit boxes.

For a while I tried to make the edit boxes taller, but every time I changed the Height setting, it reverted to what it had been. I thought I had successfully made the edit boxes taller in the style designer. Apparently it reverted again.

It looks to me like the text should fit and so I suspect it might not be a matter of the text being too large for the edit box. Currently my Font is probably default, tahoma. I changed one Edit to Ariel, but they look exactly the same to me.

Currently the text is set to 28 and the height of the edit is 32. I would like to change this to 36. It won't let me change the height of the edit. I have text align set to center for both horizontal and vertical. I tried the other two settings for vertical. One moves the text up and now the top of the numbers are cut off. The other one lowers it and then there is even more of the bottom of the numbers being cut off.

I tried using a smaller font and that does fix it, when I get down to 24. But really I would rather have larger text in taller edit boxes.

How can I …
0
I am looking for a Delphi 7 example of an RDC Virtual Channel implementation.  

The need is for Topaz digital signatures that use SigSock.exe.  Sigsock.exe takes a command linek parameter that has to be the public ip of the RDP server, and Topaz does not support an RDP server cluster.  We use RemoteApp to deliver a Delphi 7 application to our end users from Azure, and we are building in redundancy.  The RemoteApp.rdp file points to a DNS A record that points to our traffic-manager(Load balancer), so we do not kow the ip of the actual server that the session will be on.

Sigsock.exe is used to capture the digital signature and send it to their OCX control that is running on the RDP server.  

The virtual channel's server executable will send the servers IP back to the client side channel dll, and the dll will spawn sigsock.exe with the correct parameters.  I can write this, but a shell that has already been tested would save a lot of time learning the ins and outs.

IT_Saige sent me some code, but it is in C# and I would rather not install VS.
0
Hi, I'm writing a simple text editor as coding practice in C++ using the Win32 API
and I wanted to add line numbers to the left hand side of the RichEdit control. I
have created a margin by sending a EM_SETMARGINS message to the RichEdit then I
subclassed the RichEdit and responded to the WM_PAINT message. Here's the subclass code :

LRESULT CALLBACK WndEditProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
	case WM_PAINT:
		{
		CallWindowProc((WNDPROC)OldWndProc, hWnd, message, wParam, lParam);
		HDC hdc = GetDC(hWnd);
		DisplayLineNumbers(hdc);
		ReleaseDC(hWnd, hdc);
		return 0;
		}
		break;
	case WM_DESTROY:
		SetWindowLong(hEdit, GWL_WNDPROC, (LONG)OldWndProc);
		break;
	}

	return CallWindowProc((WNDPROC)OldWndProc, hWnd, message, wParam, lParam);
}

Open in new window


As you can see I called the old window procedure first and then called my DisplayLineNumbers
function coz it didn't work properly if DisplayLineNumbers was called then the old window
procedure was called. But I have a problem with my DisplayLineNumbers function and I'm
not sure how to fix it. It seems to work but when I open a big file then scroll to the end
of the file the line numbers don't line up to the line of the RichEdit and when I hit enter
at the bottom of the file the line numbers skip a few. I must stress that I am a novice
coder so don't expect the code to be perfect but here's the DisplayLineNumbers function
that I wrote (hEdit is the handle of the RichEdit and hFont is the handle of the font and
it accepts a DC for the RichEdit, szBuffer is a buffer for the line number text) :


Open in new window

0
Hello all,

I hosting a hackathon event and I need some ideas for a t-shirt that will be given to the winning "crowd" favorite team. There are 1st, 2nd, and 3rd prizes (judged by an executive committee), but I added an additional award for all the participants to have their own say.

I need a t-shirt that is relevant to this group of Scala programmers. However, I am not immersed enough in coding and Scala to determine what isn't stupid/cheesy, but genuinely funny or "oh so true".

A few other facts that may give context:
- It a hard working group of about 200 developers
- Largely coding in Scala on Macs and Ubuntu  - WHAT? Scala is a rejected topic by EE??
- Our product is designed for the business enterprise market

Any suggestions are appreciated. They can be as actual t-shirt examples, a graphic, or a quote that I can use to make my own.

Thank you :)
0
I'm following this tutorial: https://medium.com/swift2go/building-grpc-client-ios-swift-note-taking-app-6133c7d74644
The problem is I can't understand what exactly is happening in the following code:

func listNotes(completion: @escaping([Note]?, CallResult?) -> Void) {
        _ = try? client.list(Empty(), completion: { (notes, result) in
            DispatchQueue.main.async {
                completion(notes?.notes, result)
            }
        })
   }

Open in new window


I need someone to explain me the above piece of code in detail.
Can anyone please help?
0
Team,

I am trying to create a script for listing emails count which are blocked by Transport Rules. I have totally three transport rules in place, 1. Block credit card and SSN, 2. Block Driver License, 3. Block Driver License in attachments.  The whole purpose of this script is to categorize emails count based on transport rules, so that we can see how many hits for Credit card, SSN and Driver license. I have searched couple of articles but that doesn't give me the exact results what i was looking for.

Do i need to put condition based on Message body (for ex..  Messagebody contains "credit card" and Eventid contains "Fail" or "DSN"?) or Based on Transport rules Name.

It would be a great help if someone can help me with this,


Thanks
Krish
1
Hello Team,

I have the below scripts which will provide me the details of emails which are blocked by transport rules. Can you please help me to get the report in HTML format ?

(Get-TransportService) | Get-MessageTrackingLog -ResultSize Unlimited -Start (Get-Date).AddHours(-168) | Wh
ere {$_.EventID -eq"FAIL"-OR$_.EventID -eq"DSN"} | ForEach {Get-MessageTrackingLog -ResultSize Unlimited -MessageID $_.M
essageID -Start (Get-Date).AddHours(-168) | ? {$_.EventID -notlike"HA*"-and$_.EventID -ne"PROCESSMEETINGMESSAGE"-and$_.E
ventID -ne"NOTIFYMAPI"} | Select Timestamp, EventId, Source, Sender, {$_.Recipients}, {$_.RecipientStatus}, MessageSubje
ct, TotalBytes, RecipientCount, MessageId, ClientIp, ClientHostname, OriginalClientIp, ServerIp, ServerHostname, Message
Info, MessageLatency, MessageLatencyType, {$_.EventData}, SourceContext, ConnectorId}

Thanks
Krish
1
After migrating my Delphi application from XE2 to X10.1, I have a strange behavior at design time for one TForm
I can't enlarge it (with the mouse), it stays relatively small regarding how it was on XE2 !!!
There is no dimension constraint (all = 0)
0
I just now am finding out about the KMTimeLine component.  It is a multimedia timeline control similar to older version of Premiere.  It appears to have been released as BETA in 2001 for Delphi 5.0.  Nothing further was done with it.

I've Googled and contacted people associated with the control in hope to purchase it or get the source to be able to compile it with current compiler, but no success.  My last effort, before re-inventing the wheel, is to reach out to the EE community for help.  There was a similar question asked back in 2004 and someone mentioned they had the source and contacted the author for permission to redistribute.  The question was marked resolved.  

In posting here, I'm hoping for some sort of success as well.

Details about this component down below (most of the links are dead).
Merchant listing:
https://webcache.googleusercontent.com/search?q=cache:Tp2ZKgD5x3cJ:https://www.ciemmesoft.com/components_comp/1164/+&cd=1&hl=en&ct=clnk&gl=us
http://www.torry.net/vcl/datetime/packs/kmtimeline.zip

Product homepage :
http://kmmed.tripod.com
0

Programming Languages-Other

20K

Solutions

19K

Contributors

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.