evaluation – Print function value at specified coordinate

Below is the code to evaluate the function.
I am trying to print the function values at a specified coordinate as shown in ActCoor.

 t = 9600;
    HillPlot = 
     Plot(E^(-((-2000 + 0.5 (-t + 2 x))^2/139392)), {x, 0, 12000}, 
      PlotRange -> Full, PlotStyle -> {Green, Dashed})
    ActCoor = Do(Print(x), {x, 0, 12000, 500})

Above gives me the plot.

enter image description here

f(x_) := E^(-((-2000 + 0.5 (-t + 2 x))^2/139392))
(*ptint solution at ActCoor*)
Do  ii = 1 : ActCoor
PhiAn = Evaluate(f(ii))

Here I tried to print the function values at ActCoor but no success.
I also tried with

p = Cases(HillPlot, Line(p_) :> p, All)

But it gives the function values at random x-coordinate.

Any suggestion would be appreciated.

java – Print the App Name Using Latest Version

I am trying to solve a problem. Where we are given with app name , service name , version number of api
we need to print the name of app which is using the latest version for most of the service.


Mail App, Authentication API, v6
Video Call App, Authentication API, v7
Mail App, Data Storage API, v10
Chat App, Data Storage API, v11
Mail App, Search API, v6
Chat App, Authentication API, v8
Chat App, Presence API, v2
Video Call App, Data Storage API, v11
Video Call App, Video Compression API, v3

Answer – Chat App

Here chat app is using the latest version for Data Storage API, Authentication API & Presence API (As Presence API is used in only one app so its version in itself is the latest)

I have pasted the code below that I have written to solve this problem. How we can solve it better than this.

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class Main {

    static Map<String, Integer> map = new HashMap<String, Integer>();
    static Map<String, List<VersionDetails>> versionDetails = new HashMap<String, List<VersionDetails>>();
    static Map<String, Integer> rank = new HashMap<String, Integer>();

    public static void main(String() args) throws IOException {
        String inputPath = "input.txt";
        String outputPath = "output.txt";
        String appName = sortVersionDetails();
        BufferedWriter writer = new BufferedWriter(new FileWriter(outputPath, true));

    private static String sortVersionDetails() {
        Integer max_rank = Integer.MIN_VALUE;
        String answer = "";
        for (Map.Entry<String, List<VersionDetails>> li : versionDetails.entrySet()) {
            String appName = li.getKey();
            for (VersionDetails vd : li.getValue()) {
                if (vd.version < map.get(vd.apiName)) {

                    Integer value = rank.get(li.getKey()) - 1;
                    rank.put(appName, value);
            if (max_rank < rank.get(appName)) {
                answer = appName;
                max_rank = rank.get(appName);

        return answer;

    private static void readFile(String path) throws IOException {
        File file = new File(path);
        try {
            BufferedReader br = new BufferedReader(new FileReader(file));
            String st;
            while ((st = br.readLine()) != null) {
                String arr() = st.split(",");
                String apiName = arr(1);
                String applicationName = arr(0);
                Integer version = Integer.valueOf((arr(2).trim()).substring(1));
                if (!map.containsKey(apiName)) {
                    map.put(apiName, version);
                    rank.put(applicationName, 1);
                } else {
                    Integer value = map.get(apiName) > version ? map.get(apiName) : Integer.valueOf(version);
                    map.put(apiName, value);

                VersionDetails vd = new VersionDetails(apiName, version);
                if (!versionDetails.containsKey(applicationName)) {
                    List<VersionDetails> li = new LinkedList<VersionDetails>();
                    versionDetails.put(applicationName, li);
                } else {
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block

    static class VersionDetails {
        String apiName;
        Integer version;

        public VersionDetails(String apiName, Integer version) {
            // TODO Auto-generated constructor stub
            this.version = version;
            this.apiName = apiName;

        public String toString() {
            // TODO Auto-generated method stub
            return "( apiName ) = " + apiName + " ; ( version ) = " + version;

postgresql – psql command output to print error via -L output.log

The file specified to -L cannot be made to include errors.

To have errors in the same log file than queries and results, both outputs should be redirected to the same file. For example:

$ cat >script.sql
select 1/0; 

select count(*) from pg_class;

$ psql -e -f script.sql &> output.log

$ cat output.log 
select 1/0;
psql:script.sql:1: ERROR:  division by zero
select count(*) from pg_class;
(1 row)

See psql --help for more options:

Input and output options:
  -a, --echo-all           echo all input from script
  -b, --echo-errors        echo failed commands
  -e, --echo-queries       echo commands sent to server
  -E, --echo-hidden        display queries that internal commands generate
  -L, --log-file=FILENAME  send session log to file
  -n, --no-readline        disable enhanced command line editing (readline)
  -o, --output=FILENAME    send query results to file (or |pipe)
  -q, --quiet              run quietly (no messages, only query output)
  -s, --single-step        single-step mode (confirm each query)
  -S, --single-line        single-line mode (end of line terminates SQL command)

python – making a discord bot print coloured text using the css code format

Hi i have a simple bot that takes a command:

@bot.command(name='repeat', help='help me to understand bots')
async def test(ctx, *lines):
    for line in lines:
        coloured_lines.append("```css n"+ line + "```")
    await asyncio.gather(*(ctx.send(line) for line in coloured_lines))

You write to it a command like $repeat “green text is cool”, and you should get an output like:

enter image description here

instead you get enter image description here. My intuition is that this is because something is happening with the ` character – although i am not sure what, or how to fix it.

java – How to print a number of stars corresponding to a some numbers vertically?

i am trying to make a histogram to be displayed vertically , my output gives incorrect pattern.

input :

unqNums = (0.0, 2.0, 1.0, 5.0)
repeated = (2, 2, 1, 1)


*    *
*    *    *    *
0.0, 2.0, 1.0, 5.0

my code:

 //(0.0, 2.0, 1.0, 5.0)
 //(2, 2, 1, 1)
//getting the max rep
        int mxRep = Main.getMax(repeatedVal);
        for(int i = mxRep; i > 0; --i){
            for(int l=0; l<gradesNoRepead.length; ++l){
                System.out.print((gradesNoRepead(l) >= i) ? " * " : "  ");
        for (int m = 0; m < gradesNoRepead.length; m++) {
            System.out.print(" " + gradesNoRepead(m) + " ");

python 3.x – Array returning empty when print statement shows content

I was solving Project Euler Problem 11, and I wrote a program to convert a 400 integer long array into a 20 x 20 2D array. The program is showing the correct array in print statement, but the return statement is returning an array with 20 empty lists. I am unable to figure out the problem in the code. I first wrote the code on python 2.7 on windows xp, it showed empty list. But it isnt working on google collab as well. Please help….

def convert_array(integer_array):
    arr = ()

    for i in range(20):   #For 20 rows
        for j in range(i*20,(i+1)*20): #Iterating over the elements

        print(arr,'->',end = '')  #To print the initial contents


        print(arr)  #To print final contents after append

    return arr

Compare page print pdf magento 2.3.3

Can anyone tell me where is the code written for Compare page Print https://prnt.sc/vmmvgr.

The print page is totally messed up.Can anyone help me on this. I need to remove header and footer from the print page.

css – Will having a poor print page format hurt SEO?

Google does index PDF files. So if you have a script setup that converts your pages into PDF format and the design looks very sloppy, Google might notice this. I could potentially foresee an issue arising in which Googlebot begins to crawl many of these PDF renderings and reduces a site’s design because of it.

Let’s say that your website has a design score of 10/10, and your PDF renderings have a design score of 0/10. If Google crawls the same number of PDF renders as it does webpages, the average score of your domain might then be 5/10.

The Googlebot algorithm does factor in website design, UX and mobile friendliness into its scoring system. And so if it attaches the design of your PDFs into that score, it could diminish your site.

Google does seem to like PDF files, and so rendering PDFs could potentially give you a ranking boost as you’re giving Googlebot extra content to digest. But it’s possible that poor PDFs could hit you as well.

Also, anything on your site that reduces a user’s experience could negatively impact your SEO. Let’s say that your pages have a large print button on them which causes a high click through percentage. And your print PDFs are a bad format. This means that a high percentage of users are going to have a bad experience because of the bad formatting. On the other hand, if the print button is obscure and small, less people will have a bad experience. Since user experience is a ranking factor, how this is implemented can effect you.

I haven’t seen any studies on PDF design affecting SEO, but there is a good chance it is correlated to the same principles of overall design and UX since it does affect the user experience.

printing – What steps should I be taking specifically for print when shooting?

Like the title says, I have a project in mind that I envision as a book in the end. I’m using a Z6 with a variety of lenses, from the kit lens to a few F-mount prime lenses (I’ll have to use the FTZ adapter).

What should I be doing to ensure the best quality in my final prints?

  • Steps I should take in-camera?
  • Steps I should take in Lightroom?
  • Specific color profiles I should use?
  • Steps I should take when sending the images off to a printer?

legal – Where can I find a sample print release form for business/commercial photographs?

The American Society of Media Photographers not only has a very useful tutorial on this subject, but they also have, as you requested, sample forms, available here — and unlike other pro orgs that lock their samples behind a login, these are freely available.