Programming Languages-Other





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

Fortran90 programming simple syntax understanding. I want to write a simple do loop which takes in a text file of integers (32 integers one after the other) and reads the integers 2 at a time. Any help on this?
do i = 1, 32 !Should I put in 64 and increment by 2 or...? 
		read(11,*) n
		print*, n

Open in new window

Ultimately I want to take two of those integers and multiply them with a 2x2 matrix. On other words, the two integers being read in are like a 2x1 matrix. Help?
The attached text file includes the encryption matrix at the top, just ignore it. For now, I am just focusing on the integers that follow (starting with 1488 and below).

Free Tool: Path Explorer
LVL 12
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

I ran across some python code that allows continuous, live plotting of twitter stream data and sentiment rating. When the author of the code demonstrated it on Youtube, he was able to plot the twitter in a graph, and the graph updated  with each tweet. However, when I run the same code, I get one graph for each tweet and the plot points do not form a continuous line--instead the output consists of one graph, one plot point for each tweet. I would like to  get the graph to show the plotted point for all tweets in one chart in a continuous line.

BTW I am not the  only person who ran into this same problem with the code.  FYI I am currently running python 2.7,  in a Spyder 3.2.8 development environment on Mac.  I have attached the code (without access key information) and it has not been altered from the author's version. Any assistance would be greatly appreciated.

About half our class turned in this assignment on its due date; many of us are lost. Even though it's past-due, it's been nagging me, and I'm curious to find out how it works. I come here, hoping someone will be able to guide me, as to what I need to know about this diagram in order to answer its accompanying questions.

Here is what I know:

  • "Sequential instruction execution" is where each instruction is fetched and executed to completion before the next one begins.
  • The `popl` instruction moves the data element from the top of the stack/register into the specified operand.
  • `%esp` is the stack pointer

Due to problem below
how to identify reason of it, to this?
facade project has manager class calling a below adapter.createRequest method on Adapter class

Class MAnager{
adapter.createRequest(arg1, arg2)


Class Adaptert

createRequest(arg1, arg2){


when i did "call hierarchy by doing control+alt+H on createRequest of Class Adapter i get error
The resource is not on the build path of a java project

facade project is included in one other high level project called XYZ under that there is facade, data, client, webservice etc sub projects there.

IF I do "call hierarchy by doing control+alt+H" itr does show below method in Call Hierarchy view Class MAnager{

I wonder why i got that error in above case not in below case?

Please advise
I am using following code  ( but not clear how to pass a parameter when a user click on firebase notification? )

public override void OnMessageReceived(RemoteMessage message)
            string click_action = message.GetNotification().ClickAction;
            SendNotificatios(message.GetNotification().Body, message.GetNotification().Title, click_action);
        public void SendNotificatios(string body, string Header, string click_action)
            Notification.Builder builder = new Notification.Builder(this);
            //Intent intent = new Intent(this, typeof(MainActivity));
            Intent intent = new Intent(click_action);
            intent.PutExtra("click", click_action);
            PendingIntent pendingIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.OneShot);
            builder.SetLargeIcon(BitmapFactory.DecodeResource(Resources, Resource.Drawable.AppLauncher));
            NotificationManager notificationManager = (NotificationManager)GetSystemService(NotificationService);

Open in new window

If I start a task with a cancellation token, and I later set the cancellation token to "Cancel", can I then immediately dispose of the cancellation token, or do I need to wait for the task to get the "Cancel" message first?

It's appearing as if I don't need to wait for the task to get the "Cancel" message. It seems to get it anyway:
CancellationTokenSource cts = new CancellationTokenSource();
CancellationToken token = cts.Token;
mytask = Task.Run(async () => await MyEndlessTaskLoop(token), token);

// Then later in a button click event:

Open in new window

Do I need to insert a wait between the "Cancel()" and "Dispose()"?

try {
catch (AggregateException e) {
   // Expect e.InnerException to be "OperationCanceledException"


Open in new window

Also do I need to insert an await in front of Task.Run(...)?
mytask = await Task.Run(async () => await MyEndlessTaskLoop(token), token);

Open in new window

And, is there a difference between passing the cancellation token as a parameter as opposed to just using it as a captured variable? As in:
private async Task MyEndlessTaskLoop()

Open in new window

private async Task MyEndlessTaskLoop(CancellationToken token)

Open in new window

Is one preferred over the other?
i need add I18N to my properties files
i have to add properties to all languages (default all are in english now)

In real time i have to add 1000 propreties to all languages
each language properties file i have to add it manually.

For sample i have written below program file having indonesia language properties
i need to take these properties add it in file



import java.util.Properties;
import java.util.Set;

public class MyPropAllKeys {

	private Properties prop = null;

	public MyPropAllKeys() {

		InputStream is = null;
		String input = "E:/file_list/";
		try {
			prop = new Properties();
			is = new FileInputStream(new File(input));
		} catch (FileNotFoundException e) {
		} catch (IOException e) {

	public Set<Object> getAllKeys() {
		Set<Object> keys = prop.keySet();
		return keys;

	public String getPropertyValue(String key) {
		return this.prop.getProperty(key);

	public static void main(String a[]) throws IOException {
		OutputStream output = null;
		Properties prop = null;
		String outputfile = "E:/file_list/";
		try {

			output = new 

Open in new window

I'm attempting to create a dataset where an email list is enriched with the person's metadata such as department, manager, state, etc.  Data set A has a field of email addresses.  Data set B also has  field of email addresses along with multiple rows of metadata for the person.  As illustrated in the attached image, there may be missing values in some records, but not missing in other records.  Supposing that the attached data set is for a John Smith, how can I produce a final report where John Smith has values for each metadata field.  I need to do this in Python and the metadata should come from the latest data record first and then iterate over the other other records if values are missing.  Another point to make is that the metadata field names may change, so it's better that we refer to them by their index value.
source folder vs folder

In eclipse i created java project call UserAdminProj

I right clicked on above project and selected new "Source Folder" option and gave name mentioned Test.

It created test source folder.

My question is when i right click on the UserAdminProj i see other option with "Folder"

How these two different
please advise
Free Tool: Subnet Calculator
LVL 12
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

I did get
due to Open line below
    File0 = Application.ActiveWorkbook.Path & "\..\Index\" & File1 & ".txt"

    'File0 = ActiveWorkbook.Path & "\..\Index\" & File1 & ".txt"
    Debug.Print Application.ActiveWorkbook.Path
    Debug.Print File0
    Open File0 For Output As #1

Open in new window

I do not know why now Application.ActiveWorkbook.Path is showing one totally different path (not the exact path on which the Excel WorkBook is residing)
I'm using the version v4.0.30319 of the .Net API and am running into an issue.  We are setting PrimaryCategory but this is being ignored/overwritten when calling AddItem.  

For example, we listed item 401500920741 (production) and set it to go to category 183721 "Vehicle Parts & Accessories>Car Manuals & Literature>Service & Repair Manuals"  but instead it went to "Computers/Tablets & Networking>Manuals & Resources".  

How can we force AddItem to use the category we set?
When running the below code in Excel VBA, two Internet Explorer Certificate messages appear. They specifically appear when it gets to  the fifth line (i.e., ".send".) What VBA code do I add to the below code to make it physically navigate the two certificate messages I mentioned above? (i.e., 'Click Enter, Tab, Enter etc.,)

Keep in mind that this can be kind of tricky, because VBA pauses as soon as the certificates appear and continues only after the certificates are navigated. I was thinking maybe there is a way to force the certificates to appear without VBA pausing and somehow using API to navigate them. (Pictures of the Certificates are attached.)

Dim vGetHttp
Dim vUrlLink as string   '<-----https link designated by the user.
Set vGetHttp = CreateObject("MSXML2.XMLHTTP.6.0") "Post", vUrlLink, False
vGetHttp.send  '<----------------Internet Explorer Certificates appear after this line initiates.
Looking for a way to add more than one JSON file to the script, below to produce a single CSV, but with multiple rows.  Each row should include the same number of fields and attributes, but be tied to a single JSON (ROW 1 = JSON 1, ROW 2 = JSON 2, etc.).  The following produces a CSV with one row of data from a single JSON.

import pandas as pd
df = pd.read_json("pywu.cache.json")
df = df.loc[["station_id", "observation_time", "weather", "temperature_string", "display_location"],"current_observation"].T
df = df.append(pd.Series([df["display_location"]["latitude"], df["display_location"]["longitude"]], index=["latitude", "longitude"]))
df = df.drop("display_location")
print(df['latitude'], df['longitude'])
df = pd.to_numeric(df, errors="ignore")
pd.DataFrame(df).T.to_csv("CurrentObs.csv", index=False, header=False, sep=",")

Open in new window

i am doing my test preparation but i am unable to do this question so is any one that can help me to do this all question. in advance thanks.

Simple Imperative Language
Suppose we have the following EBNF definition of a simple imperative programming language:
<BL> ::= <S> { <S> }     // Block is a sequence of one or more Statements
<S> ::= <A> | <C> | <L>  // Statement is an Assignment, Conditional or Loop
<A> ::= <V> = <E>      // Assignment is a Variable = Expression
<E> ::= <N> | <V> | (<E> <OP> <E>) // Exp is a Num, Var, Exp Operator Exp
<OP> ::=  * | / | + | - | ^    // Operators with their standard meaning
<C> ::= if <B> then <BL> { else <BL> } end // Conditional is if-then-optional else
<B> ::= true | false | (<E> <BC> <E>) 
                                 | not <B> | (<B> and <B>) | (<B> or <B>)
<BC> ::=  eq | lt | gt | le | ge | ne    // Boolean comparison operators
<L> ::= while <B> do <BL> end
<N> ::= all numbers
<V> ::= <letter>{<letter>|<digit>}<whitespace>

1) Indicate if the following programs are valid or invalid syntax. Assume the language is case-insensitive.
A = 0 ; B = 0
if (X ne 0) then X=0
if NOT (X eq 0)  then X = X – X
do X = X – 1 end while (X gt 0)
while (true) do X = X + 1 end

2) Write a rule so that a Boolean value (i.e. expression) can be assigned to a variable. For example, flag = true. Or flag = (X eq 0).

3) Write the <N> rule that allows positive and negative integers. 
Assume <digit> ::= 0 | 1 | 2 | 3 | 4 | …
I want to find, extract, and replace string on a file.

procedure TForm5.Button4Click(Sender: TObject);
  Stream: TFileStream;
  MS: TMemoryStream;
  Buffer: array [0 .. 1023] of AnsiChar;
  i: Integer;
  myKeyword : string;
  Stream := TFileStream.Create(edtTarget.Text, fmOpenRead);
    while Stream.Position < Stream.Size do
      Stream.Read(Buffer, 1024);
      m1.Lines.Add(Buffer); // no need, just display to evaluate
      (* 1. Get address of given keyword *)
      // i := Stream.PositionOf(myKeyword);   < how to do this?
      (* 2. Stream Replace *)
      // I want to replace MyKeyword with other string

    MS := TMemoryStream.Create;
      MS.SaveToFile(edtTarget.Text + '.mod');
      // save the edited file, is there any other way than using MS?



Open in new window

  1. I want to have the position of  "mykeyword" on my loaded file.
  2. I want to replace / delete "mykeyword" on my loaded file.
  3. I want to extract "mykeyword" + 1000 or some length.

my loaded file is up to 500 MB.
Hi, in Python
It is not totally obvious, to me, how my abstract bass class for my RTS client should look... Threading included
In Java, it is as below, what would it look like in Python? processNewGameState() is the abstract method
Thread - Do I make my own method called run and call it from the __main__ region?

import java.util.Random;

public abstract class GSclient extends Thread{

int clientCount=0;
	int clientCountExpected;	
	public static int SERVER_PORT_BASE=1027;
	public static byte MSG_HELO=1;
	public static byte MSG_START=5;
	public static byte IN_GAME_MSG=4;
	public static byte GAME_MSG_MOVE=8;
	public static byte GAME_MSG_CREATE=16;
	public static int MSG_SIZE = 4098;

	public abstract void processNewGameState();
	public GSclient(int cliNum, InetAddress serveraddress) {
		serverAddress= serveraddress;

Open in new window

My run() Thread method will receive incoming game-state messages and call the process method on each.
I assume the TCP and UDP receiving and analyzing code won't be too out-there
I can do the client networking, no problem.

Hello Experts

what are the pre requisites to learn python, Do we need to have any programming knowledge ? is it easy for the new learners who are trying to learn ?..
We are using JDBCTemplate and not using Hibernate and running native SQL queries.

We need to attach/append tenant id to any query which is being executed. We are using Spring Boot and following MVC pattern.

Can someone help me with suggestion or comments how to attach the tenant id dynamically as jdbc interceptor or apply filter for queries?

Currently all queries goes like select * from...where tenant id = test

Tenant Id can be resolved in the controller. However need a generic way to inject in the business and in the DAO layer.

Passing tenent id as parameter in the controller class and accessing in service class always will be painful and maintenance issue.

Upgrade your Question Security!
LVL 12
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Need to implement Spring Security for a project.


  Structure: User table, Permission table, Module table and PermissionGroup table
  User will have only one permission group.
  Permission table will have read/write/update etc.,
  Module will be product/sales/order
  Permission group table will be product - read/write, sales - read/write/update


 Structure: User table, Roles table, Permission table,
 User can have 1 role
 Permission table will have as product_read, product_write, sales_read, sales_write

Comments on Option2:

 We can able to use Spring hasRole() kind of configuration for each method and can associate a role to it.
 Drawback: We cannot have dynamic roles as we can able to do it option1

Comments on Option1:

We can have dynamic groups however we cannot use spring hasRole(). Instead we need to get the manual decisions based on the http request - PUT/GET/POST and check for the permissions configured and decide whether to allow the URL or not in the interceptor.


This may not be a standard practice
What would be the best approach out of this two as well as preferable one?


I finally got Python images to be plopped on the screen, just blitting, a lonely mutalisk, but not flapping.
To make my mutalisk flap its wings in python, or any of my many animated GIF's, for that matter, must I blit them frame by frame? I was surprised it wasn't automatic flapping, like in other situations.

Here is the blit code that finally worked. . .

Hi all,
I develop an application, MyApp.exe, and for some users only, the application crashes, without any further information than a "the application stopped" message.
Happily, Windows produced a .wer file, below.
1. my 1st goal is to know what usefull information I can grab from this file, in order to find what caused the crash.
eg: can we consider that [LoadedModule[157]=C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Xml.Linq\3dcbb56fa25e02c84447dd22150e3313\] responsible for the crash, as it happened just before the crash?
2. what are the other tracks I can follow to find the cause of the crash
Thanks for your help

Sig[0].Name=Nom de l’application
Sig[1].Name=Version de l’application
Sig[2].Name=Horodatage de l’application
Sig[3].Name=Nom du module par défaut
Sig[4].Name=Version du module par défaut
Sig[5].Name=Horodateur du module par défaut
Sig[6].Name=Code de l’exception
Sig[7].Name=Décalage de l’exception
Example contrived for this question.  I am following a tutorial in .NET for the  Datacontract XML serialization and deserialization.  I created an interface, a base class for serialization.

public interface ISerializer {
        string Serialize(object obj, Type objType);
        object Desrialize(string serializedData, Type objType);

 public abstract class Serializer : ISerializer {
        public string Serialize(object obj, Type objType) {
            MemoryStream ms = new MemoryStream();
            DataContractSerializer ser = new DataContractSerializer(objType);

            ser.WriteObject(ms, obj);

            ms.Position = 0;

            return new StreamReader(ms).ReadToEnd();

        public object Deserialize(string serializedData, Type objType) {
                   //code to deserialize

and for now, I have a XmlDataContractSerializer class, which uses base classes implementation for serializing data. 

public class XmlDataContractSerializer : Serializer {

I used XSD tool to generate a class from an XSD file - sample below

using System.Xml.Serialization;
// This source code was auto-generated by xsd, Version=4.6.1055.0.
namespace SampleProject {

        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]

Open in new window

Hi, so I've got an Ionic 3 app which has a native camera plugin and onesignal plugin as well for notifications.

The native camera plugin works fine in Ionic View or DevApp, and onesignal works when build it to an APK and run it natively on my Android phone.

However, when I use an emulator to run it, even on IOS, it comes up with cordova_not_available. And even the cameras don't work. i run the command

ionic cordova run android or ionic cordova run ios

Emulator shows up but the issue is that cordova doesn't seem to be compiled in. Thus causing cordova plugins to fail.

What can possible be the issue? I've removed all the plugins and android/ios platform, re-installed an still the same.

It's kind of difficult to develop the OneSignal notification when I can't run it with the emulator.

Anyone who has come across this, please advice.
Im trying to do a transfers but they are all pending but Eth never leaves my wallet.
They are all under SIGNER and local transactions.

Im not sure did they even leave my computer?
If I go to TxQueue Viewer I see this
Can anyone tell me whats is wrong?

Programming Languages-Other





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.