Programming :: QListView - Way To Turn Off / Reverse Sorting?

Aug 23, 2010

QTreeView and QTableView have sort functions, but I need to sort a QListView, and for there to be no way for the user to turn off or reverse sorting.

View 11 Replies


ADVERTISEMENT

Programming :: Sorting 2 Dimension Array?

Aug 5, 2010

how to sort the 2 dimensional array below by column 1 then by column 2?

22 55
2222 2230
33 66
44 58
222 240

[Code].....

this is a small part in my awk script. the input data is not in file, but it was manipulated in my script.

View 6 Replies View Related

Programming :: List Sorting In Python?

May 10, 2011

I have a list of list and I'd like to sort the list according to the last value of each row.

Let's say we have the list

L1 = [ [1,2] , [4,6] , [78,-3] ]

I wish to get

L2 = [ [78,-3] , [1,2] , [4,6] ]

Is there a simple way to do that in python?

View 4 Replies View Related

Programming :: Sorting A Dictionary File?

Nov 1, 2010

I have this dictionary file that has this format:

SUBSTITUTE_VALUE, Real Value
SUBSTITUTE_VALUE_2, Real Big Value
SUBSTITUTE_VALUE_HECL, Hardware Abstract
SUBSTITUTE_V, Valley Mem

I want to sort this file so the LONGEST Substitute Values are listed at the top ( so SUBSTITUTE_VALUE_HECL would be first in the list). Obviously I want to keep the related values tagging along with them, so the whole first line would be
SUBSTITUTE_VALUE_HECL, Hardware Abstract

Playing with sort This has me pretty close: sort dict.file -k1.1n,1

View 2 Replies View Related

Programming :: (PHP / XML) Sorting Through Multi Dimensional Array

Sep 17, 2010

I am parsing through XML documents with a PHP script and creating an array because, as far as I know, I can manipulate arrays better than the features DOM gives me. That part is not as important, though. The array it produces though is multi-dimensional, but somewhat inconsistent. If I have the following XML:

PHP Code:
<domains> <domain>
<title>google.com</title> <bookmarks>
<bookmark>maps.google.com</bookmark>
<bookmark>news.google.com</bookmark>
<bookmark>mail.google.com</bookmark>
</bookmarks> </domain> <domain>
<title>bankaccount.com</title>
<bookmarks> <bookmark>login.bankaccount.com</bookmark>
</bookmarks> </domain> </domains>

To call the first bookmark from the first domain, it would be:
PHP Code:
$array['domains']['domain'][0]['bookmarks']['bookmark'][0]
To call the first bookmark from the second domain, it would be:
PHP Code:
$array['domains']['domain'][1]['bookmarks']['bookmark']

The problem is, I want to simply call bookmarks through a simply 'foreach()' or 'for()' function and the lack of consistency might be a problem, but the fact that some levels have a '0' array key and others do not is causing a problem.

View 1 Replies View Related

Programming :: Reorganizing / Sorting Spreadsheet Using Shell?

Jun 25, 2011

I have a problem to reorganize a spreedsheat using shell, I want to use "sort" to organize the first column (descending scale) and then organize the second column in an ascending scale related to the first column so that the final result should be that one displayed at the end of the message. I have tried "sort -r -n" but I don't know how to reorganize the second column related to the first column.

40.0 20.0 9
40.0 15.0 8
40.0 10.0 14
40.0 5.0 12
39.0 15.0 18
39.0 10.0 19
39.0 20.0 5
39.0 5.0 4
41.0 20.0 10
41.0 15.0 12
41.0 5.0 8
41.0 10.0 7

Solution:
41.0 5.0 8
41.0 10.0 7
41.0 15.0 12
41.0 20.0 10
40.0 5.0 12
40.0 10.0 14
40.0 15.0 8
40.0 20.0 9
39.0 5.0 4
39.0 10.0 19
39.0 15.0 18
39.0 20.0 5

View 14 Replies View Related

Programming :: Sorting Specific Values From An XML File

Sep 21, 2010

I need a shell script which gathers the data from a remote XML file and then displays it according to my needs.. I need this for my job due to the fact that I need to keep track price changes of euro, usd, gold, etc. The XML file I am talking about is located at this page: here. The reason I am posting the URL is that I need to use curl to get this file and it does NOT have newlines after each tag. I thought that that would be a problem. Here is what I need from the script: 1) curl to get the page 2) make use of sed, awk, etc. to display its contents in a more structured and readable manner as shown below:

A: 64.125 (% -0.26)
B: 81.130 (% -0.32)
C: 1.4930 (% 0.00)
D: 1.9590 (% 0.36)

View 5 Replies View Related

Programming :: PHP - Sorting Multi Dimensional Arrays By One Column

Mar 17, 2009

I just started programming in PHP so I haven't figured out how to do this yet, but I have a multi-dimensional array that I need to sort by one column. That's fine...but I need the sort to ignore case! Right now I have it sorted by 'name' (the other column is 'uid').

The problem is that by the default the sort is case-sensitive so the array looks like this:
Code:
Apple 4015
Banana 4011
Cherry 4045
avocado 4046

I want to be able to sort the the 'name' column in a case-insensitive manner so that the array actually looks like:
Code:
Apple 4015
avocado 4046
Banana 4011
Cherry 4045

How to accomplish this? Just FYI I'm not actually sorting the PLUs for fruits...but it was a simple example. I'm actually doing this for a Facebook application.

View 2 Replies View Related

Programming :: Reverse Dns Lookup In C?

Sep 27, 2009

Reverse dns lookup in C?

View 3 Replies View Related

Server :: Bind Reverse Zone : No Name With Reverse Lookup

Oct 12, 2009

I am using RHEL5. These are my config files:

Code:

options {
listen-on port 53 { 127.0.0.1; 192.168.14.54; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";

[code]....

View 3 Replies View Related

Programming :: Reverse Bit Order In MIPS/SPIM?

Apr 27, 2009

Here is what I have so far.The program receives and echos characters without syscalls. I am trying to add 2 procedures(rev7 and putint)Rev7: Reverses the least significant 7 bits and outputs $s2Putint: Prints the decimal value of $s2.When i run it, it echos the character then prints a "P". I have no idea where that comes from.Everything seems correct to me but I do not understand why it does not print the decimal digits

Code:
.data
hello:.asciiz "Enjoy This Program

[code]....

View 2 Replies View Related

Programming :: Reverse A String Without Using Standard Library?

Sep 22, 2010

I am making a program to reverse a string

Code:
#include<stdio.h>
int main ()
{
int i,j;

[Code].....

View 5 Replies View Related

Programming :: C Function To Reverse The Byte Order In A Double?

Aug 12, 2010

I'm trying to write an extension to PHP which means coding in C. I'm really really rusty at C coding and was never very good at it.

Can anyone propose an efficient, safe, and [hopefully] future-proof way of reversing a double? Keep in mind that it should work on as many systems as possible and on 32- and 64-bit systems (and on ???-bit systems in the future?). Will the size of a 'double' ever change or will it always be 8 bytes?

I've tried this and it doesn't work...the compiler complains about "invalid operands to binary" because I'm trying bitwise shiftw on a non-integer.

Code:
x = (x>>56) |
((x<<40) & 0x00FF000000000000) |
((x<<24) & 0x0000FF0000000000) |
((x<<8) & 0x000000FF00000000) |

[Code]....

View 3 Replies View Related

Programming :: Ajax To Open An Ftp Connection - Download A File And Then Turn Around And POST It To A Web Server?

Jun 23, 2011

just curious, this might not be possible, but is there any way with ajax to open an ftp connection, download a file and then turn around and POST it to a web server? the reason i ask is because i'm writing a script on a shared hosting plan that doesn't give me permission to directly talk outbound on the ftp port but i need to synchronize a file from a csv on an ftp server, this means i have to do the process manually, is there any way i can just click the button and let my browser do the work?

View 4 Replies View Related

General :: HPLIP - When Turn Off The PC And Turn It On Again The Printer Does NOT Work

Nov 4, 2009

I have Ubuntu 9.04, and a HP laserjet 1018 printer.

I install the printer using:

And when it ask me about plugin I give the path to it. (the 3.9.2 version of the plugin, because Ubuntu 9.04 has the 3.9.2 version of hplip)

well I install the printer, everything works perfectly.....but, when I turn off the PC, and turn it on again, the printer does NOT work!, I send work for being printed but mothing happens , Ubuntu tells me that the job was printed but ... no case, my printer does not print it.

I have to install it again since cero. what can I don to stop install it every time I turn off the computer ?

View 1 Replies View Related

Ubuntu :: Automatically Sorting Files?

Mar 25, 2010

I download files onto my networked file server which is running Ubuntu 9.10.By default, all files are moved into the Downloads folder, I'd like to use a script or program to automatically send them into one of 5 shared folders based on what the file is.For example: archived files would be software by default, .avi or mpeg Videos, and .flac or .ogg would be Music.

View 1 Replies View Related

General :: Sorting A File With A Variable Name?

Jun 27, 2011

I am trying to sort a file, so I can compare it to another file later. I am storing the file name in a variable called curMo. I then call sort $curMo and it hangs for a very long time and I have to quit the process. why this is not working or how to make it work?

Here is part of my code:

#sort this file for this Location
sort -u $curMo -o $curMo.sorted

View 1 Replies View Related

General :: Sorting Files In A Directory?

Jan 6, 2010

I have some files in a directory like

file1.txt
file10.txt
file2.txt

[code]...

View 5 Replies View Related

Debian Configuration :: Sorting When Locale Is Set To UTF-8 In Squeeze?

May 6, 2011

I have a problem with sorting when locale is set to UTF-8 in Squeeze. Example:

echo -e "ą
a
b
c

[Code].....

View 8 Replies View Related

Fedora :: Nautilus Not Sorting Data Properly?

Jul 16, 2011

why nautilus is sorting my files in such a weird way? I would think it would sort numerically by the first number, then second number, etc.

View 13 Replies View Related

General :: How To Refresh Htop After Sorting (via Shift+m)

Jun 22, 2011

I love using htop, but I have noticed that whenever I sort by a parameter (for example, Shift+m for sorting by Memory usage), the htop stats stop dynamically refreshing. Is this intended? I also notice this with top as well.

View 1 Replies View Related

Ubuntu Installation :: Sorting Out A Triple Boot?

Feb 5, 2010

For completeness here's the history that got me to this point:

Stage 1
/dev/sda - disk with XP OS, set to be first boot disk in BIOS
/dev/sdb - a small data disk to supplement sda

[code]....

View 4 Replies View Related

Ubuntu :: 'sort', Not Sorting Some Characters, Just Ignoring?

Aug 28, 2010

i used 'sort' to sort a 160k line file and looked though it and noticed this

RS:HALP
RS HD
RSHD

[code]....

View 2 Replies View Related

Ubuntu :: Sorting Files Based On Filename?

Nov 2, 2010

I'm currently trying to organize a media server so that things will be in some kind of logical order rather than the current setup of dumping everything of a certain content type into a single folder. However, the size and diversity of content within these disorganized folders precludes me doing things manually. Does anyone know of a program or script that could sort the files into folders based on part of a filename

View 7 Replies View Related

General :: Sorting A First Non-numerical Column In A File?

Jul 13, 2011

I have a file like:

ER- V67
ER+ V68
ER- V69
ER+ V70

[Code]....

I am using the code:

sort -k1

but it prints it by sorting the second column.

View 8 Replies View Related

General :: Sorting In Aggregate Rather Than Tree Fashion With 'ls -Rt'?

Apr 28, 2010

The command: Code: ls -lRt Shows a recusrive listing, and sorts by modification time. But this in in tree fashion, where it first lists the contents of the current folder sorted by time, and then the contents of each child folder sorted by time. How would one accomplish this type of sort, but with an aggregate listing - all items recursively sorted together, rather than by individual folder?

View 3 Replies View Related

General :: Sorting In Vi Editor & Copying To Clipboard

May 6, 2010

(1)There should be a command to send content to clipboard instead of 36 buffers available in vi just like ':set paste' allows pasting from clipboard inside vi using ctrl+shift+v in insert mode.(Currently I select area using mouse & right click then copy )


2)Let us say I have sentence "I am young" I want to arrange the words in this line in alphabetical order so that I get 'am I young'. First I thought replacing space by in sentence.Then !#j then type sort -n where # represents number of words.Then #J to join the filteredlines.It works but now I have file with hundreds of sentence of varying length.If I make a macro how will it know the number of words?

View 9 Replies View Related

Server :: Sorting Bounced Back Mail?

Sep 6, 2010

Sometimes I get a bounce back mail saying the e-mail address used wasn't valid. Is there a way to create a folder in "mail", and automatically sort these bounced back mails into this folder? Once this is done, how can I view these mails in a flat file manner? Am thinking of writing a script to parse through the mails to get the invalid e-mails all in one go.

View 3 Replies View Related

Fedora :: Automatically Renaming Files While Sorting By Date?

Apr 17, 2010

I often record music from the webradio with Streamtuner.How can I rename the mp3 files recorded in a way that numbers are added to the beginning of the filename representing the order in which the titles were played on the webradio station?I am looking for an automated solution like a renaming tool since there are usually hundreds of files in a directory. I used autorename / ARen for windows back in the day when I was still on XP. What I could do with the tool was:a) Sort the files by date of creationb) add an increasing number at the beginning of the filename based on the position in the sorted list.

View 3 Replies View Related

Ubuntu Multimedia :: Exaile Rc 3.2 Again No Sorting By Album Artist

Jun 16, 2010

I was glad to see another release of exaile. I'm always happy to see improving mainstream desktop apps, especially when they start being much superior to their commercial counterparts in both, quality and quantity, of features. But as if developers are ignoring the simple usability problems - again - exaile like all other gnome music players (apart from amarok, but that's kde!) can't browse your library by album artist!

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved