Weka arff file cannot open using weka software - weka

I am trying to open the following arff file using weak software but it gives me an error.
The error says:- Unable to determine structure as arff(Reasoon:java.io.IOExcaption: Problem reading attribute weight for input string:"Contravene", read Tolen[Contravene],line 20)
#relation ParkingFines
#attribute OffenceDate DATE "D/M/YY"
#attribute OffenceType string {Contravene No Stopping Sign,Fail to Obey Instruction-No Valid Ticket Correctly Displayed,Fail to pay parking fee-Ticket Expired}
#attribute ExpiationAmount {91,50}
#attribute StatusClass {Paid,Exemption,Transferred to FERU}
#data
1/5/17,Contravene No Stopping Sign,91,Paid
1/5/17,Contravene No Stopping Sign,91,Exemption
1/5/17,Contravene No Stopping Sign,91,Paid
1/5/17,Contravene No Stopping Sign,91,Transferred to FERU
1/5/17,Fail to Obey Instruction-No Valid Ticket Correctly Displayed,50,Paid
1/5/17,Fail to pay parking fee-Ticket Expired,50,Exemption
1/5/17,Fail to pay parking fee-Ticket Expired,50,Paid
2/5/17,Contravene-No Stopping Sign,91,Paid
2/5/17,Contravene-No Stopping Sign,91,Exemption
2/5/17,Contravene-No Stopping Sign,91,Paid
2/5/17,Contravene-No Stopping Sign,91,Transferred to FERU
2/5/17,Fail to Obey Instruction-No Valid Ticket Correctly Displayed,50,Paid
2/5/17,Fail to pay parking fee-Ticket Expired,50,Exemption
2/5/17,Fail to pay parking fee-Ticket Expired,50,Paid
3/5/17,Contravene-No Stopping Sign,91,Paid
3/5/17,Contravene-No Stopping Sign,91,Exemption
3/5/17,Contravene-No Stopping Sign,91,Paid
3/5/17,Contravene-No Stopping Sign,91,Transferred to FERU
3/5/17,Fail to Obey Instruction-No Valid Ticket Correctly Displayed,50,Paid
3/5/17,Fail to pay parking fee-Ticket Expired,50,Exemption
3/5/17,Fail to pay parking fee-Ticket Expired,50,Paid

Try to format the csv file with the required headers only as this error may cause due to the extra rows that are neither headers nor data rows and this is a university home work. so try some work around to solve the issue. finally place headers for specific rows and remove other content from the file.

Related

End Amazon Connect call if Store user input does not register any input

all. I have a Contact Flow in which a customer is greeted. The customer is asked to input a nine digit ID number, the time-out before first entry is set to 5 seconds, and the '#' symbol specifies the end of input. However, if the customer doesn't input any value the system continues the flow as it was a success instead of terminating the call.
Desired use case is:
1- Customer calls
2- A prompt tells the customer to input the numbers
3- A save customer input block waits for the input
4- If no input is given within 5-10 seconds the call must be terminated
How can this be achieved?
Very nice use case to solve. Generally in the Stored Customer Input block either you have success or error. This can be handled with the below workaround solution
In a store customer input when you don't put anything then Stored Customer Input value gets returned with Timeout. You can have the returned value as a check in the Check Contact attribute to terminate the call
I have attached the check contact attribute block for your reference Sample Call Flow Block.Check Contact Attribute Block

Getting FR_3085 ERROR when working in Informatica

In a lot of the task flow jobs I'm running, I constantly am getting the
FR_3085 ERROR: Row [1]: 2-th character is a null character, which is
not allowed in a text input file
error. These occur usually in data synchronization tasks but I sometimes see this in mapping configurations as well. How do I resolve this error?
This error occurs when you have NULL characters in your flat file.
One way for doing this is using the OS utilities for removing the NULL characters from your flat file automatically and this will depend on what OS you're using.

How do I renew a namecoin domain?

I own a couple domains, I would just like to renew them using the CLI. I see a thing to renew using the QT client, but my domains are in my CLI wallet, not my QT client wallet.
Credit to https://forum.namecoin.org/memberlist.php?mode=viewprofile&u=1057&sid=ecc0431681aea878e1add77c55dcd741
First of all make sure your CLI client is synchronized, i.e. getinfo (or better: getblockcount) gives you the same block number as you get at http://namecoin.webbtc.com/ or http://explorer.namecoin.info/stats/block_count.txt
You should also check if the amount of NMCs in your wallet is sufficient for the renewal command(s). One renew or update attempt costs you 0.005 NMC or less.
Renewing a name is identical to updating a name. In both cases you use name_update, and the command line looks like this:
./namecoin-cli name_update name "value"
Example: if you own the name d/hrdwdmrbl (which translates to the domain name hrdwdmrbl.bit) then your name renewal command could be:
./namecoin-cli name_update d/hrdwdmrbl "{\"map\":{\"\":\"93.184.216.34\"}}"
Notes:
- The example above is correct for Linux or Mac OSX. I think it looks slightly different in MS-Windows. It may need double or triple backslashes for escaping the inner doublequotes (e.g. "{\\"map\\" ... )
- Older Namecoin client versions use ./namecoind instead of ./namecoin-cli
- If you get it wrong then you either get an error message and you can try again instantly, or you don't get an error message and you have to wait for at least 1 confirmation before you can update again. You can always check the results of your commands with listtransactions

Concurrency Operation in Progress 4GL

REPEAT With FRAME:
prompt-for IN-SCAN3.scan.
if input IN-SCAN3.scan="" then Do:
Message "please input date.".
undo,retry.
end.
else DO:
FIND FIRST in-scan3 USING IN-SCAN3.scan NO-LOCK NO-WAIT NO-ERROR.
if avail In-scan3 then DO:
str="OK".
display str.
next-prompt IN-SCAN3.scan.
end.
else DO:
CREATE In-scan3.
ASSIGN IN-scan3.scan=INPUT in-scan3.scan.
str="NO". DISPLAY str.
next-prompt In-scan3.scan.
END.
end.
begin=begin + 1.
end.
Question desc:
There are 20 users using scanning at the same time,first find input data, if not found, then create one record in the database. The question is, at the same time operating will appear dead lock.
I try NO-LOCK NO-WAIT with record when find,operating will appear dead lock when create a record.
thanks any answer.
You have unfortunately fallen foul of ABL's basic "gotcha" -- record locking will default to SHARE-LOCK even if you specify otherwise, and this is probably not what you want.
The basic rule is that if your transaction scope is smaller than your record scope then the record will drop back to a SHARE-LOCK when you leave the transaction. But I recommend you read the relevant chapter in the ABL guide.
There are a number of ways to fix this. The RELEASE keyword is one. But I tend to favour the idea that you should use a separate buffer for actually locking the record. That way you make things very clear to other programmers.
For example:
def buffer b-in-scan3 for in-scan3.
repeat:
prompt-for in-scan3.scan.
/*** etc. ***/
else
do for b-in-scan3 transaction:
find first b-in-scan3 using in-scan3.scan
exclusive no-wait no-error.
if not avail b-in-scan3
and not locked b-in-scan3
then
do:
create b-in-scan3.
b-in-scan3.scan = input in-scan3.scan.
end.
end. /* of transaction */
end. /* of repeat */
This way if another programmer uses b-inscan3 outside of your transaction block, the program will fail to compile rather than start dropping back to SHARE-LOCK.
Remember that you can check LOCKED as well as AVAILABLE, but if a record is locked then it's not available.

c++ how to read and write within a file

i want to make a text based rpg game, but ive run into a problem, im fairly "new" to c++, know a few concepts but still learning.
So what i want to know is; how do i open a file and edit the values in it?
say i have a file called health, for my characters health and its set to 100. I know you can just subtract the variable by the damage you set the monsters to do, but i dont know how i store the health and edit it, while my program goes along.
ie. this is the farthest i got:
ifstream objectFile("health.txt");
string health;
double NoH;
cout << "welcome" << endl;
objectFile >> health >> NoH;
cout << health << ' ' << NoH - 15;
NoH = Number of health. So far all my program does, is read the file, and subtract 15 from 100 because thats the damage the monster do. But how do i make it "take out" the value and subtract 15 from it? then store it back so it's 85, and next time i get hit its 65 for example etc, so it makes it the objective of the game is about surviving, ie avoiding getting hit and stuff. i mean avoiding your hp to reach 0, but also i want to learn how to implement simple text based creatures you can kill, by letting their hp reach 0.
thanks
what about using ini /properties file?
or using json?
if you are making rpg, player save the values (hp,mp,item, map(x,y) etc) to file when saving the game? and the rest of the time should store/calculate those value in memory I guess.
about json
https://code.google.com/p/vjson/
about ini file
http://www.hyperrealm.com/libconfig/