Questions tagged [tie]

Perl command to hide an object class in a simple variable.

Perl command to hide an object class in a simple variable. See also: http://perldoc.perl.org/functions/tie.html.

86 questions
1
vote
1 answer

PHP Check for tie in vote, variable number of winners

I ran an election that has a variable number of winners for each category. (One category can have 3 winners, another 1 winner, another 2 winners, etc.) Currently I am displaying the results like this: foreach($newarray as $key => $value){ …
1
vote
2 answers

Excel Ranking tie issue

Does any one know how to deal with tie records issue in Excel? I only want to show the record once on first occurrence. If same number is found twice, it will not show as I show above.
James0419
  • 123
  • 3
  • 5
  • 15
1
vote
2 answers

Perl autovivification with TIEHASH

This is the expected and intuitive behavior of a tied hash to handle $h{a}++: $ perl -E' sub DESTROY {} sub AUTOLOAD { say "$AUTOLOAD @_"; bless {} } tie %h, main; $h{a}++; ' main::TIEHASH main main::FETCH main=HASH(0x7fb6c982a188)…
creaktive
  • 5,193
  • 2
  • 18
  • 32
0
votes
1 answer

Rank based on one column and use another column if tie breaker is needed

I have some "names" of groups in column A and I want to rank each "name" based on its value in column B. If any of the "names" have the same value in column B, it will need to look to column C to determine a tie breaker (then column D value if any…
0
votes
1 answer

Elasticsearch 7 - Tie breaker when three doc has same score

I have a tutors index in elastic search. I have stored all tutors data there. I want to make tie breaker query if two doc has same score in elasticsearch. Like if two tutor has same score then i want to display the tutor first which has more…
Kajal Pandya
  • 75
  • 1
  • 7
0
votes
1 answer

C++ The if statement is still true even when only one condition is met

I am creating a tic tac toe program in c++ and am almost finished with it, the issue I'm having is when the game needs to end in a tie. I created an if-statement to check when specific combinations are selected and it finds it true even when only…
Devin Bowen
  • 127
  • 1
  • 1
  • 13
0
votes
2 answers

How to choose records with ties in SQL?

I am trying to choose the posts with highest likes or comments from a database. I want to include all options in case of a tie. I tried to use TOP 1 WITH TIES in MYSQL WORKBENCH but it does not give any value. What else can I try? The question goes…
0
votes
1 answer

Ranking in Spotfire with Multiple arguments

New to spotfire here and have a question: I need to rank people based on a few different criteria. "Start_date" is the most important. If there is a tie for "start_date" I want to rank by "Age" and if there is still a tie because they started the…
0
votes
2 answers

Java - Sorting Grouped by Ties

I'm writing a Java program in which I want to sort a set of items and get the N-highest elements of the set. The thing is, though, that I want the elements to be returned grouped by their rank -- so if I want the 3 highest elements, but there is a…
Masterofpsi
  • 769
  • 6
  • 17
0
votes
1 answer

Can anyone explain the code about cin.tie() in C++?

// redefine tied object #include // std::ostream, std::cout, std::cin #include // std::ofstream int main () { std::ostream *prevstr; std::ofstream ofs; ofs.open ("test.txt"); std::cout << "tie example:\n"; …
cola
  • 12,198
  • 36
  • 105
  • 165
0
votes
1 answer

Get value from next N rows of a file

I'm having problems intercepting the contents of the lines above what I'm reading $lines[0] as following foreach loop my $IN_DIR = "/tmp/appo/log"; # Input Directories my $jumprow = ''; # This is a…
clarkseth
  • 229
  • 4
  • 16
0
votes
1 answer

Perl: referencing/blessing question

The idea is to implement a class that gets a list of [arrays, Thread::Conveyor queues and other stuff] in a TIEHASH constructor, use AbstractHash; tie(%DATA, 'AbstractHash', \@a1, \@a2, \$tcq); What is a correct way to pass object references…
kagali-san
  • 2,964
  • 7
  • 48
  • 87
0
votes
1 answer

Error in using Net::Lite::FTP

I am using the Perl library Net::Lite::FTP for FTP TLS protocol. I am getting the error Damn! undefined response while connecting to a remote. I think the problem is with Net::SSLeay::Handle. If I comment the line 151, 271, 310, 373 in the…
issac
  • 11
  • 1
0
votes
3 answers

Why does underscore in path name make Perl script hang?

I'm troubleshooting a Perl script that unexpectedly hanging when it never hung before. I don't know Perl. I finally traced the problem to a file path string. This code works: $eng_morph = "~/datafile.en.db"; tie %eng_morph, "DB_File", $eng_morph,…
tahoar
  • 1,788
  • 3
  • 20
  • 36
0
votes
2 answers

In Excel, how can i break ties when ranking students' tests?

I'm doing like a bit of a competition for my students in which they have a weekly test they have to complete and submit. The grade is stored in an excel column next to their names. Following instructions i found, i was able to create a full working…
Victor Roger
  • 1
  • 1
  • 2