Posts

Issue while executing the multi-layer commands on windows

The below is executing on windows : C:\cygwin\bin\bash.exe -c "echo abc; echo 1 ; c:/cygwin/bin/bash.exe -c "c:/cygwin/bin/tcsh.exe echo def; pwd " " Running the above command, and getting the output as: abc 1 [PPP@machine1 ...Users/PPP]$ Desired Output: abc 1 def C:\Users\PPP In all, I want the commands under tcsh to also work (In above command, it is "echo def; pwd"). How can I have the progress on it?

Sitecore instance styles are not available after installation [closed]

After Installing sitecore instance, My login page is looking like this enter image description here after login it is looking without styling you can find the image below enter image description here Can you please help me in this I don't have any idea what to do next

Problem moving lines (one by one) from one text file to another

I try to create a program that moves the first line in a text file to another and then remove said line in the first file (i.e. they are moved one by one). This should continue until there aren't any more lines in the first file to be moved to the second file. The problem I have is that the program freezes and won't quit properly. I have experimented with the code and reached the conclusion that the error probably is in the counting of lines but that's all... Here is the code: # Create the second file open("file2.txt", 'w', encoding="utf-8-sig").close() # Find out how many lines in file one lines = open("file1.txt", 'r', encoding="utf-8-sig").readlines() # Loop the amount of lines while range(len(lines)) != 0: # Get the first line in the first file first_line = open("file1.txt", 'r', encoding="utf-8-sig").readline() # Write the line to the second file out = ope...

.NET core minmal APIs not connecting with react native app (Expo CLI)

Image
I am trying to connect my .Net core minmal apis backend with react native but it keeps giving me network error, I dont know what I am doing wrong. I have double checked the url the ip address too many times but still could not make it to work. Please , I would appreciate your help. I have tried the same application with a node backend it worked fine for node, may be because node was using http while .net backend is using https but I still do not understand if there is any thing wrong.

Moengage Push Notification Click Not Redirecting While App On Foreground/Running in Background

Hello I am currently running a Flutter app that is using Moengage to send push notifications. Currently, the notification is receiving just fine. But, there is a problem that only occurs in iOS: the notification is not redirecting to specified link when the notification is clicked when the application is currently opened/running in background. Is there any specific configuration that I might have missed? Sorry I am unable to give a piece of code but based on the documentation I don't think there is much things to be done in the setup after push notifications are received perfectly right?

Cycles per element in out-of-order execution

Problem your text Consider the following code on a machine that run a multiplication in 5 cycles. double aprod(double a[], int n) { int i; double x, y, z; double r = 1; for (i=0; i < n-2; i += 3){ x = a[i]; y=a[i+1]; z=a[i+2]; r = r * (x * (y * z)); } } Compute the theoretical Cycles per Element (CPE), where the only limiting factor is the data dependencies. Reference The problem is part of the Problem 5.9, p. 589, in Computer Systems: A Programmer's Perspective from Bryant et al. My solution: You have basically three multiplications per iteration. 1. dummy1 := (y * z) dummy2 := x*(dummy1) r*(dummy2) The dummy1 and dummy2 were just introduced to clearly state the multiplications. In the code, they are replaced by their definition, e. g. dummy1 is replaced by (y*z) . The 3. multiplication of an iteration has no data dependency to 1. and 2. multiplication of the following iteration. Thus, the 3. multiplication of an iteration and 1. as well as 2. multipli...

R: Merging Parts of a Graph Together

Image
I am working with the R programming language. I have the following "Tree" that depicts the results of a coin flipping game (start at 5 points, and 0.5 prob of +1 and 0.5 prob of -1 at each turn): outcomes <- c(-1, 1) combinations <- expand.grid(rep(list(outcomes), 10)) colnames(combinations) <- paste("Turn", 1:10) library(data.tree) generate_tree <- function(node, depth, total) { if (depth == 0) { node$Set(total = total) return(node) } else { for (outcome in outcomes) { child <- node$AddChild(name = as.character(total + outcome), total = total + outcome) generate_tree(child, depth - 1, total + outcome) } return(node) } } root <- Node$new("Start", total = 5) root <- generate_tree(root, 4, 5) print(root, "total") plot(root, "total") My Question: Is it possible to reformat (i.e. merge) this graph such that at each turn, all "...