diff --git a/_includes/string_concat/activities/string_concat.md b/_includes/string_concat/activities/string_concat.md deleted file mode 100644 index 72d0601e..00000000 --- a/_includes/string_concat/activities/string_concat.md +++ /dev/null @@ -1,15 +0,0 @@ -### String concatenation -- Open a script editor. -- Create a log message - - Define two variables: `i` with value `11` and `n` with value `100`. - - Using those two variables create the message: `"Analyzing image 11/100..."`. -- Create a file path - - Use an in-built function to print the string that separates folders on your operating system - - Get the temp folder on your system and store it in a variable - - Create a path to a hypothetical file in the temp folder with the help of the separator string -- Explore the escape string `\` - - Print `\`, depending on the language that may be a little challenge. - - Print the string `"\"` (it should actually print the quotation marks!) - - Create a string with two sentences and a line break. - - Print tab separated values. - \ No newline at end of file diff --git a/_includes/string_concat/activities/string_concat_imagejmacro.ijm b/_includes/string_concat/activities/string_concat_imagejmacro.ijm deleted file mode 100644 index 4cc24b03..00000000 --- a/_includes/string_concat/activities/string_concat_imagejmacro.ijm +++ /dev/null @@ -1,19 +0,0 @@ -// log message -i = 11; -n = 100; -print("Analyzing image "+i+"/"+n+"..."); - -// paths -tmpFolder = getDirectory("temp"); -fileName = "nuclei.tif"; -path = tmpFolder + File.separator + fileName; -print(path); - -// escape character and special characters -print("\\"); // print("\"); will throw an error - -print("\"\\\""); - -print("Line 1.\nLine 2."); - -print("1\t2\t3"); diff --git a/_includes/string_concat/activities/string_concat_python.py b/_includes/string_concat/activities/string_concat_python.py deleted file mode 100644 index edb39742..00000000 --- a/_includes/string_concat/activities/string_concat_python.py +++ /dev/null @@ -1,13 +0,0 @@ -#defining variables -#Please note that in Python, unlike imageJ macro language you cannot concatenate strings directly with numbers. - - -text1 = "Hello " -text2 = "user number " -text3 = "50" - -#concatenating strings -text3 = text1 + text2 + text3 - -#printing the results -print(text3) diff --git a/_includes/string_concat/creating_log_messages.ijm b/_includes/string_concat/creating_log_messages.ijm new file mode 100644 index 00000000..0736b1b7 --- /dev/null +++ b/_includes/string_concat/creating_log_messages.ijm @@ -0,0 +1,4 @@ +// create a log message +imageIndex = 11; +numImages = 100; +print("Analyzing image "+imageIndex+"/"+numImages+"..."); diff --git a/_includes/string_concat/creating_log_messages.md b/_includes/string_concat/creating_log_messages.md new file mode 100644 index 00000000..92cdd7f7 --- /dev/null +++ b/_includes/string_concat/creating_log_messages.md @@ -0,0 +1,6 @@ +