Input file
Header
1
2
3
1
2
3
Trailer
We need to validate input file line first character like 1 2 3 like these sequence or not. Can you please help me with scripts
Related
I have wrote that in notepad
a b c d e
1 1 1 1 0 0
2 1 1 0 1 0
3 1 0 1 0 1
4 0 1 1 1 0
then I save it as s.ar
I open WEKA and try to insert it but it doesn't show me that.
.ar is not a file extension that Weka recognizes.
If you meant to create an ARFF file, then please see the documentation for that file format.
Have you thought about just using CSV (comma-separated values, .csv extension) instead? You could rewrite your data like this:
ID,a,b,c,d,e
1,1,1,1,0,0
2,1,1,0,1,0
3,1,0,1,0,1
4,0,1,1,1,0
Then you can load it in Weka's Explorer (after selecting CSV data files as type from the file chooser dialog).
Could you please help me to understand this problem:
Convert the input sequence of N (1 ≤ N ≤ 20) input numbers so that
the subsequences of the same numbers are replaced with the first
numbers of the subsequences. Each input number is in the range [1, 2
000 000 000].
For example, the input sequence 1 2 2 3 1 1 1 4 4 is converted into
1 2 3 1 4.
Input: First, the number T of test cases is given. Each test case is
specified using two lines. The first one contains the number N and the
second one contains the numbers of the sequence.
Output: The converted sequence. The result for each test case should
be printed in a separate line.
For example, the input sequence 1 2 2 3 1 1 1 4 4 is converted into 1 2 3 1 4.
It looks like the idea is to remove duplicate numbers that occur adjacent to each other when creating the output.
You can do that by just keeping a state variable recording what the previous value was. When you get a new value, compare it to the state value. If it's the same, skip. If different, output it and update the state variable. Remember to initialize the state variable to a value not found in the input stream (e.g. -1 should work in this case).
I have a problem in SAS, I would like to know how can I input several columns in only one column(put everything in a single variable)?
For example, I have 3 columns but I would like to put this 3 columns in only one column.
like this:
1 2 3
1 3 1
3 4 4
output:
1
1
3
2
3
4
3
1
4
I'm assuming you're reading from a file, so use the trailing ## to keep reading variables past the end of the line:
data want;
input a ##;
cards;
1 2 3
1 3 1
3 4 4
;
run;
If the dataset is not big just split it to several small data set with one variable each, then rename all variables to one name and concatenate vertiacally using simple set statement. I am sure there are more elegant solutions than this one and if your data set is big let me know, I will write the actual code needed to perform this action with optimal coding
After run Macro on my Excel file (.xlsx) I have output like this:
With 3 first empty columns for each row.
Then when I try to save this as Text with Tab delimited I got output (.txt) but without 3 first empty rows:
Others empty rows was displayed properly as tabulation, but these 3 first rows was somehow deleted. But in my case I need this.
Any solution how to avoid that situation? Adding it manually don't be a soltuion, because I have huge amounts of data.
Thanks.
In the First Row of First 3 Columns enter any dummy special character like "#".
Example:
# # # 1 999 999 2 10 3
Just enter these # symbols in first ROW. and now save the excel as Tab delimited text file. I get output as below.
Output:
# # # 1 999 999 2 10 3
1 999 999 2 10 3
1 999 999 2 10 3
1 999 999 2 10 3
Hope this solves the problem in this case. If the empty rows or columns are not consistent, then the code present in Alex page can be used.
Put a formula in the last columns of rows that are empty that evaluate to empty (e.g. =""). And then export.
select * from ........
this query out put are
sn id name fatherName
1 1 A Asssss
2 2 B ABssss
3 3 C ABCsss
4 4 D ABCDss
show RDLC report on basis of SN .Each SN print on each page. After print on row information rest of page must be blank......
like :
page 1
1 1 A Asssss
rest of page blank
page 2
2 2 B ABssss`
all are same as.....i have four SN so i must get the four page and each page just have one row information........which property or which condition help me to do?
Simple. Put a page break after every row.