line

How to skip a data line in fortran [duplicate]

回眸只為那壹抹淺笑 提交于 2019-12-13 10:40:14
问题 This question already has answers here : Skip a line from text file in Fortran90 (3 answers) Closed 3 years ago . enter image description here I have this data file and want to read this data without line 1,2,3,4,5 program example real data(15,9) OPEN ( unit=10, file='filename' ) do i = 1, 15 READ (10, *) (data(i,j), j=1,10) enddo print *, data(4,1), data(4,2), data(4,3) stop end this is my fortran code. how can i change this code 回答1: Looking something like this? input file: data line1 line2

How do I parse a line into pieces and ignore parts of it?

馋奶兔 提交于 2019-12-13 10:05:05
问题 I am sorry. I wasn't clair previously. I have a file that include data in the following format A(3) B(4),A C(2),A E(5),A G(3),A J(8),B,H H(7),C,E,G I(6),G F(5),H ... These data represent a graph. I will use the critical path method to calculate how to get through this text file. the char is the step the int is the length of each task the other char is step that come before the first char So I have created the class Task to read the file and its constructor have the following parameters Tache:

can't send rich messege to line on dialogflow

て烟熏妆下的殇ゞ 提交于 2019-12-13 09:35:54
问题 as the title, i want to know how to send rich massage like carousel,button ,image,etc to line from dialogflow. i try to fill the costum payload on an intent. but i keep failed to get respond on line.(i do get respond when i check the diagnostic info) my costum payload is just like this..from the dialogflow docs { "type": "template", "altText": "this is a buttons template", "template": { "type": "buttons", "thumbnailImageUrl": "https://example.com/bot/images/image.jpg", "title": "Menu", "text"

Restricting pan gesture to move to 90 degree

爱⌒轻易说出口 提交于 2019-12-13 09:24:07
问题 If I have created a line for ex. shown in the figure as connecting A and B through CAShapeLayer and in that line's centre I have a UIView which has pan gesture integrated in it. How to make that UIView to move to a certain direction that creates 90 degrees to that line as shown in the figure the red line indicated the direction that the UIView can be moved? The mid-point should start moving from the centre of the line, in the direction that shown in the figure that I have updated. 回答1: I

C Program to count comment lines (// and /* */)

半腔热情 提交于 2019-12-13 09:22:17
问题 I need a program to count the lines of a .txt or .c file and return me the following things: File: Simple Comment: N lines Multiline Comment: N lines Total Lines: N lines I have this: if (pFile != NULL) { do { c = fgetc(pFile); if (c == '\n') n++; } while (c != EOF); And I don't know how to implement the rest of it. I tried with the strstr() function as well, didn't get it neither. 回答1: You can write a state machine that should handle most cases. As you scan the file, you'll be in one of the

min and max in certain lines of input file with the tag of line number

◇◆丶佛笑我妖孽 提交于 2019-12-13 08:56:34
问题 I want to find the minimum between the line number 2000 and 3000. I want to find the minimum and maximum of the values and when the minimum and maximum are found , I also need to find the line on which it was found. Then I want to go to one line above the maximum or minimum containing line and output the first integer out of the 6 integers on the same line. My input is of the following form. *KEYWORD $TIME_VALUE = 1.4000002e+001 $STATE_NO = 15 $Output for State 15 at time = 14 *ELEMENT_SHELL

django shows only last line while looping

别来无恙 提交于 2019-12-13 08:00:43
问题 I am trying to upload csv file to filesystem and show within the html without storing in the database. Below code is working but... I added below line to my code; messages.add_message(request, messages.INFO, line) so that I can follow line variable. I can see that code is looping all the csv file def check_fp(request): if not request.user.is_active: return render(request, 'login.html') else: if request.method == 'POST' and request.FILES['csv_file2']: myfile = request.FILES['csv_file2'] fs =

read line by line with awk and parse variables

巧了我就是萌 提交于 2019-12-13 07:59:43
问题 I have a script that read log files and parse the data to insert them to mysql table.. My script looks like while read x;do var=$(echo ${x}|cut -d+ -f1) var2=$(echo ${x}|cut -d_ -f3) ... echo "$var,$var2,.." >> mysql.infile done<logfile The Problem is that log files are thousands of lines and taking hours.... I read that awk is better, I tried, but don't know the syntax to parse the variables... EDIT: inputs are structure firewall logs so they are pretty large files like @timestamp $HOST

Issue with a drawing a vertical line in ggplot for categorical variable x-axis in R

最后都变了- 提交于 2019-12-13 07:52:31
问题 I have the following table. I want to plot a vertical line using the "st_date_wk" column for each county. Please see my code below but it DOES NOT draw the vertical line using the "st_date_wk" column. Cannot figure out what I am doing wrong here. Any help is appreciated. Thanks. dfx1: YEAR Week Area acc_sum percentage COUNTY st_date_wk 1998 10-1 250 250 12.4 133 10-4 1998 10-2 300 550 29.0 133 10-4 1998 10-3 50 600 58.0 133 10-4 1998 10-4 100 700 75.9 133 10-4 1998 10-5 100 800 100.0 133 10-4

how to draw multiple lines in d3.js , there are 3 limit lines. the values are retrieved from db

半城伤御伤魂 提交于 2019-12-13 05:37:08
问题 i have a line graph, and perform a calculation for values of the line and based on some criteria the mean, upper limit and lower limit changes. so in the graph i'll b have 3 limit lines(mean , upper and lower) and the normal value line. right now i am able to achieve the limit lines perfectly through the said code. here im looping and at each iteration im drawing the 3 limit lines. but now im now storing the values of the limits in a db , the calculation is done in a diff file and stores the