Search Results

Search found 131 results on 6 pages for 'rearrange'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • Rearrange items in ListBox

    - by superexsl
    Hey, I have a ListBox with a number of ListBoxItem objects. What is the best way to allow users to rearrange the items by dragging and dropping? Do I have to use StackPanels instead? Thanks for any suggestions

    Read the article

  • Python: Most efficient way to concatenate and rearrange files

    - by user300890
    Hi, I am reading from several files, each file is divided into 2 pieces, first a header section of a few thousand lines followed by a body of a few thousand. My problem is I need to concatenate these files into one file where all the headers are on the top followed by the body. Currently I am using two loops; one to pull out all the headers and write them, and the second to write the body of each file (I also include a tmp_count variable to limit the number of lines to be loading into memory before dumping to file). This is pretty slow - about 6min for 13gb file. Can anyone tell me how to optimize this or if there is a faster way to do this in python ? Thanks! Here is my code: def cat_files_sam(final_file_name,work_directory_master,file_count): final_file = open(final_file_name,"w") if len(file_count) > 1: file_count=sort_output_files(file_count) # only for @ headers for bowtie_file in file_count: #print bowtie_file tmp_list = [] tmp_count = 0 for line in open(os.path.join(work_directory_master,bowtie_file)): if line.startswith("@"): if tmp_count == 1000000: final_file.writelines(tmp_list) tmp_list = [] tmp_count = 0 tmp_list.append(line) tmp_count += 1 else: final_file.writelines(tmp_list) break for bowtie_file in file_count: #print bowtie_file tmp_list = [] tmp_count = 0 for line in open(os.path.join(work_directory_master,bowtie_file)): if line.startswith("@"): continue if tmp_count == 1000000: final_file.writelines(tmp_list) tmp_list = [] tmp_count = 0 tmp_list.append(line) tmp_count += 1 final_file.writelines(tmp_list) final_file.close()

    Read the article

  • Unity Dashboard won't find local files, rearrange icons on two computers

    - by Stanton.Sculpture
    Suddenly I can't move icons around my unity launcher and the Dash won't search for my local files and folders. Was working when I first installed 13.10, but now it won't search for local files, and it won't let me rearrange the icons in any way. I've tried turning on and off all the scopes (lenses?) in multiple combinations, but it won't find any files unless I use nautilus to find them its mostly unresponsive. I can't see my recently used files, or files and folders scope at all. Dragging and dropping the icons on the side dock doesn't work, they only stick to my mouse until I put them back where they were. I cannot unlock any icons from the launcher, it just doesn't do anything when I click it. I tried rebooting both of my computers and its still won't function normally. I used ubuntu-bug -w to report a bug, no one has gotten back to me. Is there some option that I changed to cause this? This is a problem on both my laptop and Desktop. Please Help, Alex

    Read the article

  • Rearrange content of a file

    - by VikJES
    I'd like to rearrange the content of a file on a per line basis (see below), ideally without using Perl or Python (I'm not allowed to... Don't ask.) The input file contains unordered header lines and lines with backup operation results. The output files should contain the lines ordered as shown below. Original file: Completed Backups Backups with Warnings Failed Backups Server A backup was completed with warnings Server B backup was successful Server C backup failed Server D backup was completed with warnings End result: Completed Backups Server B backup was successful Backups with Warnings Server A backup was completed with warnings Server D backup was completed with warnings Failed Backups Server C backup failed

    Read the article

  • SAS: rearrange field order in data step

    - by Dan
    In SAS 9, how can I in a simple data step, rearrange the order the field. Data set2; /*Something probably goes here*/ set set1; run; So if set1 has the following fields: Name Title Salary A Chief 40000 B Chief 45000 Then I can change the field order of set2 to: Title Salary Name Chief 40000 A Chief 45000 B Thanks, Dan

    Read the article

  • how to rearrange randomly and show all the 5 elements

    - by user295189
    how can I rearrange it randomly and NOT use shuffle function and still be able to randomly arrange all the elements $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand($input, 5); echo $input[$rand_keys[0]] . "\n"; echo $input[$rand_keys[1]] . "\n"; echo $input[$rand_keys[2]] . "\n"; echo $input[$rand_keys[3]] . "\n"; echo $input[$rand_keys[4]] . "\n"; so it shows random names everytime the function is ran. thanks

    Read the article

  • Rearrange a python list into n lists, by column

    - by Ben R
    Trying to solve this at this hour has gotten my mind into a tail-spin: I want to rearrange a list l into a list of n lists, where n is the number of columns. e.g., l = [1,2,3,4,5,6,7,8] n = 5 ==> [[1,6][2,7][3,8][4][5]] another example: l = [1,2,3,4,5,6,7,8,9,10] n = 4 ==> [[1,5,9],[2,6,10],[3,7][4,8] Can someone please help me out with an algorithm? Feel free to use any python awesomeness that's available; I'm sure theres some cool mechanism that's a good fit for this, i just can't think of it.

    Read the article

  • UIsearch rearrange the indexpath.row

    - by abuyousif
    i have a problem that i have spend about a week trying to solve it, but no luke up to now. i have a uisearchbar implmented into my table view. and i also have two nsarray, one for tilte and one for discription. when i search through the array of the titles it returns the rights search, but when i click on a row that the search came with, i get "row 0" if i click on the first row. my question is how to make a connection between the two arrays so when the search rearrange the titles based on the user search the discription array correspond to the same row the title is at. i appreciate any help.

    Read the article

  • Rearrange array

    - by bradenkeith
    Array starts like this: Array ( [SMART Board] => Array ( [0] => sb1 [1] => sb2 [2] => sb3 ) [Projector] => Array ( [0] => pr1 [1] => pr2 [2] => pr3 ) [Speakers] => Array ( [0] => sp1 [1] => sp2 [2] => sp3 ) [Splitter] => Array ( [0] => spl1 [1] => spl2 [2] => spl3 ) [Wireless Slate] => Array ( [0] => ws1 [1] => ws2 [2] => ws3 ) ) The keys are used as my table columns titles. Their individual arrays are to carry the column information. I have split it up even further with array_slice and array_merge_recursive to look pretty as 2 arrays - 1 holds the column names, the other looks like this: Array ( [0] => sb1 [1] => sb2 [2] => sb3 [3] => pr1 [4] => pr2 [5] => pr3 [6] => sp1 [7] => sp2 [8] => sp3 [9] => spl1 [10] => spl2 [11] => spl3 [12] => ws1 [13] => ws2 [14] => ws3 ) However, when trying to write the table I'm getting keys 0, 1, 2 as the column data, then row break then 3, 4, 5 then row break... etc. I need it to be 0, 3, 6, 9, 12 row break 1, 4, 7, 10, 13 row break etc... How can I either rearrange my array to allow for this, or rewrite how the data goes into the table so that the correct information lines up with the appropriate column? foreach(unserialize($dl->data) as $data){ //first 3 are specialinstructions, system, and room $uniques = array_slice($data,0,3); $rows = array_slice($data,3); $rows2 = array_merge_recursive($rows2, $rows); //get the specialinstructions, system, and room foreach($uniques as $unique){ echo $unique."<br/>"; }///foreach uniques echo "<br>"; }///foreach unserialized $numberofrooms = count($rows2[key($rows2)]); $numberofproducts = count($rows2); print_r($rows2); unset($rows); //write the individual rows foreach($rows2 as $header=>$rowset){ $headers[] = $header; foreach($rowset as $row){ $rows[] = $row; }//foreach rowset }//foreach rows2 echo "<p>"; print_r($rows); echo '<table class="data-table"> <caption>DL</caption> <thead><tr>'; foreach($headers as $header){ echo "<th>".$header."</th>"; } echo '</tr></thead>'; echo '<tbody>'; $i = 0; foreach($rows as $row){ if($i == 3 || $i == 0){ echo "<tr>"; $i = 1; } echo '<td>'.$row.'</td>'; if($i == 2){ echo "</tr>"; } $i++; } echo '</tbody></table>';

    Read the article

  • Can Windows XP remember file icon position?

    - by g .
    Windows allows you to arrange icons however you like in a window. However after some time when I go back to the window, it has forgotten the icon positions and has completely rearranged the icons. Is there a way to preserve the icon positions? In the previous version of Windows I used, this would happen on rare occasions (about 6 months) and it might only move a couple of icons. Now it is happening practically every day and it is every single icon. Attempts to rearrange them manually are futile and it is increasingly maddening. Searching Google, I have found a number of programs that allow you to save and restore icon position on the desktop. But, this is just a regular folder window so I am not sure if any of those would even work. Some details: Windows XP SP 3 running in Parallels 5 virtual machine Auto Arrange and Align to Grid are NOT turned on Fresh OS install and only setting icon positions in one window

    Read the article

  • rearrange multidimensional array on basis of value of inner array

    - by I Like PHP
    i have an array like this Array ( [0] => Array ( [cat_name] => Clothing [cat_id] => 1 [item_name] => shirt [item_id] => 1 [src] => 177 [sic] => 78 ) [1] => Array ( [cat_name] => Stationary [cat_id] => 3 [item_name] => note book [item_id] => 8 [src] => 50 [sic] => 10 ) [2] => Array ( [cat_name] => Stationary [cat_id] => 3 [item_name] => ball pen [item_id] => 10 [src] => 59 [sic] => 58 ) [3] => Array ( [cat_name] => Expandable [cat_id] => 4 [item_name] => vim powder [item_id] => 14 [src] => 34 [sic] => 23 ) [4] => Array ( [cat_name] => Clothing [cat_id] => 1 [item_name] => pant [item_id] => 16 [src] => 100 [sic] => 10 ) ) now what i want first it sorted by cat_id and then a create a new array having below structure Array ( [0] =>"Clothing"=>Array ( [0]=>Array ( [item_name] => shirt [item_id] => 1 [src] => 177 [sic] => 78 ) [1] => Array ( [item_name] => pant [item_id] => 16 [src] => 100 [sic] => 10 ) ) [1] => "Stationary"=>Array ( [0] => Array ( [item_name] => note book [item_id] => 8 [src] => 50 [sic] => 10 ) [1] => Array ( [item_name] => ball pen [item_id] => 10 [src] => 59 [sic] => 58 ) ) [2]=>"Expandable => Array ( [0] => Array ( [item_name] => vim powder [item_id] => 14 [src] => 34 [sic] => 23 ) ) )

    Read the article

  • rearrange Array according to values order of another Array

    - by Exception
    I have two arrays like below var arr = ["x", "y", "z", "a", "b", "c"]; var tgtArr = [{val:"a"}, {val:"b"}]; It does not need to be as lengthy as Array `arr` This is what I have tried var dest = new Array(arr.length); for(var i = 0; i < arr.length; i++){ for(var k = 0; k < tgtArr.length; k++){ dest[i] = dest[i] || []; if(tgtArr[k].val == arr[i]){ dest[i] = arr[i]; } } } console.log(dest); My Expected output is (for above tgtArr value) [{}, {}, {}, {val:"a"}, {val:"b"}, {}]; if tgtArr is empty Array [{},{},{},{},{},{}] Here is the fiddle. Any alternative for this, it seems not a good way to me as I am iterating through the entire array everytime.

    Read the article

  • Move icons around freely in Windows 7

    - by Eikern
    I just installed a pre-RTM build of Windows 7 that I downloaded from Microsoft, so this may have changed in the RTM version, but I do not think so. (EDIT: Same thing in the released version.) In Windows Vista, XP and older you could move icons around freely within a folder, rearranging them like I wanted them -- even though it was automatically ordering the position of them. So I could move a file starting with 'B' down below 'M'. I know this is kind of 'wrong', but is this possible? Thanks.

    Read the article

  • Rearranging a sequence

    - by sarah
    I'm have trouble rearranging sequences so the amount of letters in the given original sequence are the same in the random generated sequences. For example: If i have a string 'AAAC' I need that string rearranged randomly so the amount of A's and C's are the same.

    Read the article

  • ValueError: too many values to unpack in a tuple

    - by falosi
    Please put some light on why am getting a too many to unpack (ValueError in my for loop).Have tried deb naislist = [('CONTROL FILE', '0', '0', '0'), ('REDO LOG', '0', '0', '0'), ('ARCHIVED LOG', '.69', '.59', '3'), ('BACKUP PIECE', '46.54', '0', '192'), ('IMAGE COPY', '0', '0', '0'), ('FLASHBACK LOG', '10.15', '6.31', '82'), ('FOREIGN ARCHIVED LOG', '0', '0', '0')] print "size of naislist is ",len((naislist)) heading = ('MAIN MENU', 'LEVELS', 'LEVEL2', 'LEVEL3') rearrange = dict(zip((0, 1, 2, 3), (len(str(x)) for x in heading))) for tu, x in naislist: rearrange.update((i, max(rearrange[i], len(str(el)))) for i, el in enumerate(tu)) rearrange[4] = max(rearrange[4], len(str(x))) forkit = '|'. join('%%-%ss' % rearrange[i] for i in xrange(0, 4)) print '\n'.join((forkit % heading, '-|-'.join(rearrange[i] * '-' for i in xrange(4)), '\n'.join(forkit % (a, b, c, d) for (a, b, c), d in naislist)))

    Read the article

  • Is there any tool which can rearrange the css based on same type selector?

    - by metal-gear-solid
    I've big css where selector for same things are on different place. Is there any tool which can rearrange the css based on same type selector? This is just example. #main h2 { font-size: 2em; } #sidebar h3 { font-size: 2em; } #main h1 { font-size: 3em; } #sidebar h4 { font-size: 1.6em; } #main #box h2 { font-size: 2em; } #sidebar ul li { font-size: 1em; } it should arranged like this #main h1 { font-size: 3em; } #main h2 { font-size: 2em; } #main #box h2 { font-size: 2em; } #sidebar h3 { font-size: 2em; } #sidebar h4 { font-size: 1.6em; } #sidebar ul li { font-size: 1em; } if parent selector is same then all should be at same place.

    Read the article

  • Merging /boot and rearranging grub2 entries

    - by Tobias Kienzler
    I have used 10.10 and now for testing purposes installed 10.04 to a separate partition. 10.10 is currently on a single partition, while for 10.04 I decided to separate /boot to a third partition. Now my questions: How can I move and merge 10.10's /boot on the new /boot partition What do I have to modify to rearrange the (automatic) entries? How can I have the entries contain the distribution name to reduce confusion? How can I make sure the grub configuration stays identical when either distribution updates?

    Read the article

  • Merging /boot and rearring grub2 entries

    - by Tobias Kienzler
    I have used 10.10 and now for testing purposes installed 10.04 to a separate partition. 10.10 is currently on a single partition, while for 10.04 I decided to separate /boot to a third partition. Now my questions: How can I move and merge 10.10's /boot on the new /boot partition What do I have to modify to rearrange the (automatic) entries? How can I have the entries contain the distribution name to reduce confusion? How can I make sure the grub configuration stays identical?

    Read the article

  • Correct Display configuration. Errors while trying to arrange displays

    - by David Russell Parrish Bojrquez
    I am trying to set up my tv with my laptop trough a VGA cable. The display application in Ubuntu throws a lot of errors to me and I have given up in trying to do it myself. I try to apply the 1920 1080 display. The selected configuration for displays could not be applied Requested size (3200, 1080) exceeds 3D hardware limit (2048, 2048). You must either rearrange the displays so that they fit within a (2048, 2048) square or select the Ubuntu 2D session at login. And Also this: Failed to apply configuration: %s GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._gnome_2drr_2derror_2dquark.Code3: Requested size (3200, 1080) exceeds 3D hardware limit (2048, 2048). You must either rearrange the displays so that they fit within a (2048, 2048) square or select the Ubuntu 2D session at login. Please Help. @Leozitop No I don't see anything when connected to 1920 1080 because the setup fails before actually applying. Yes there are other resolutions which do work. I believe the problem has something to do with the rotation it is set up. My Ubuntu Display application has only clockwise and counterclockwise options for the TV display. I really don't know why this is happening. Basic procedure: Plug in cable, did not get the resolution I wanted. Changed settings, applied them. Re-peat until desired display is shown. I'm not a computer illiterate, really it baffles me that this is happening. Output of xrandr: david@LapUbuntu:~$ xrandr Screen 0: minimum 320 x 200, current 1880 x 800, maximum 4096 x 4096 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm 1280x800 60.0*+ 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 connected 600x800+1280+0 left (normal left inverted right x axis y axis) 1600mm x 900mm 1920x1080 60.0 + 1280x1024 60.0 1360x768 60.0 1280x720 60.0 1024x768 60.0 800x600 60.3* 640x480 60.0 TV1 unknown connection (normal left inverted right x axis y axis) 848x480 59.9 + 640x480 59.9 + 1024x768 59.9 800x600 59.9 Note that VGA says left and indeed it is, but no other option was available in the display. Also, note the TV1 unknown connection which I have no idea what it is. Note, also, that this has nothing to do with the display since W7 on the computer works fine and since while boot up, and also, before starting session in ubuntu the rotation is normal. I'll also mention that I HAVE re-installed Ubuntu since I had posted this question from a Live CD of 12.04 LTS. And that before the posting of the question also using 12.04 before another backup that I had to do, the VGA setup was fine without any problems.

    Read the article

  • Tailoring the Oracle Fusion Applications User Interface with Oracle Composer

    - by mvaughan
    By Killian Evers, Oracle Applications User Experience Changing the user interface (UI) is one of the most common modifications customers perform to Oracle Fusion Applications. Typically, customers add or remove a field based on their needs. Oracle makes the process of tailoring easier for customers, and reduces the burden for their IT staff, which you can read about on the Usable Apps website or in an earlier VoX post.This is the first in a series of posts that will talk about the tools that Oracle has provided for tailoring with its family of composers. These tools are designed for business systems analysts, and they allow employees other than IT staff to make changes in an upgrade-safe and patch-friendly manner. Let’s take a deep dive into one of these composers, the Oracle Composer. Oracle Composer allows business users to modify existing UIs after they have been deployed and are in use. It is an integral component of our SaaS offering. Using Oracle Composer, users can control:     •    Who sees the changes     •    When the changes are made     •    What changes are made Change for me, change for you, change for all of youOne of the most powerful aspects of Oracle Composer is its flexibility. Oracle uses Oracle Composer to make changes for a user or group of users – those who see the changes. A user of Oracle Fusion Applications can make changes to the user interface at runtime via Oracle Composer, and these changes will remain every time they log into the system. For example, they can rearrange certain objects on a page, add and remove designated content, and save queries.Business systems analysts can make changes to Oracle Fusion Application UIs for groups of users or all users. Oracle’s Fusion Middleware Metadata Services (MDS) stores these changes and retrieves them at runtime, merging customizations with the base metadata and revealing the final experience to the end user. A tailored application can have multiple customization layers, and some layers can be specific to certain Fusion Applications. Some examples of customization layers are: site, organization, country, or role. Customization layers are applied in a specific order of precedence on top of the base application metadata. This image illustrates how customization layers are applied.What time is it?Users make changes to UIs at design time, runtime, and design time at runtime. Design time changes are typically made by application developers using an integrated development environment, or IDE, such as Oracle JDeveloper. Once made, these changes are then deployed to managed servers by application administrators. Oracle Composer covers the other two areas: Runtime changes and design time at runtime changes. When we say users are making changes at runtime, we mean that the changes are made within the running application and take effect immediately in the running application. A prime example of this ability is users who make changes to their running application that only affect the UIs they see. What is new with Oracle Composer is the last area: Design time at runtime.  A business systems analyst can make changes to the UIs at runtime but does not have to make those changes immediately to the application. These changes are stored as metadata, separate from the base application definitions. Customizations made at runtime can be saved in a sandbox so that the changes can be isolated and validated before being published into an environment, without the need to redeploy the application. What can I do?Oracle Composer can be run in one of two modes. Depending on which mode is chosen, you may have different capabilities available for changing the UIs. The first mode is view mode, the most common default mode for most pages. This is the mode that is used for personalizations or user customizations. Users can access this mode via the Personalization link (see below) in the global region on Oracle Fusion Applications pages. In this mode, you can rearrange components on a page with drag-and-drop, collapse or expand components, add approved external content, and change the overall layout of a page. However, all of the changes made this way are exclusive to that particular user.The second mode, edit mode, is typically made available to select users with access privileges to edit page content. We call these folks business systems analysts. This mode is used to make UI changes for groups of users. Users with appropriate privileges can access the edit mode of Oracle Composer via the Administration menu (see below) in the global region on Oracle Fusion Applications pages. In edit mode, users can also add components, delete components, and edit component properties. While in edit mode in Oracle Composer, there are two views that assist the business systems analyst with making UI changes: Design View and Source View (see below). Design View, the default view, is a WYSIWYG rendering of the page and its content. The business systems analyst can perform these actions: Add content – including custom content like a portlet displaying news or stock quotes, or predefined content delivered from Oracle Fusion Applications (including ADF components and task flows) Rearrange content – performed via drag-and-drop on the page or by using the actions menu of a component or portlet to move content around Edit component properties and parameters – for specific components, control the visual properties such as text or display labels, or parameters such as RSS feeds Hide or show components – hidden components can be re-shown Delete components Change page layout – users can select from eight pre-defined layouts Edit page properties – create or edit a page’s parameters and display properties Reset page customizations – remove edits made to the page in the current layer and/or reset the page to a previous state. Detailed information on each of these capabilities and the additional actions not covered in the list above can be found in the Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter.This image shows what the screen looks like in Design View.Source View, the second option in the edit mode of Oracle Composer, provides a WYSIWYG and a hierarchical rendering of page components in a component navigator. In Source View, users can access and modify properties of components that are not otherwise selectable in Design View. For example, many ADF Faces components can be edited only in Source View. Users can also edit components within a task flow. This image shows what the screen looks like in Source View.Detailed information on Source View can be found in the Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter.Oracle Composer enables any application or portal to be customized or personalized after it has been deployed and is in use. It is designed to be extremely easy to use so that both business systems analysts and users can edit Oracle Fusion Applications pages with a few clicks of the mouse. Oracle Composer runs in all modern browsers and provides a rich, dynamic way to edit JSF application and portal pages.From the editor: The next post in this series about composers will be on Data Composer. You can also catch Killian speaking about extensibility at OpenWorld 2012 and in her Faces of Fusion video.

    Read the article

  • How do I get the same dual-screen experience on my install as I had on the 12.04 Live CD?

    - by Alexander G
    I downloaded, burned to disc, and booted Ubuntu 12.04 Precise (I defected to Arch for a year when I got fed up of Natty). I was pleasantly surprised by both of my monitors working perfectly on there (needed to rearrange as my secondary monitor is to the left, however). So I installed. There's no recognition of the second monitor now, and it doesn't appear in the settings. I've also enabled the Nvidia driver. What do I do?

    Read the article

  • How to reorder table rows (drag-and-drop) along with their sub rows

    - by Eirik Johansen
    I have a table which looks like this (simplified for the example): <table> <tr class="lvl_1"> <td> Level 1 </td> </tr> <tr class="lvl_2"> <td> Level 2 </td> </tr> <tr class="lvl_3"> <td> Level 3 </td> </tr> <tr class="lvl_1"> <td> Level 1 </td> </tr> <tr class="lvl_2"> <td> Level 2 </td> </tr> <tr class="lvl_3"> <td> Level 3 </td> </tr> The content in the rows with the lvl_3 class are children of the previous lvl_2 row, and the lvl_2 rows are children of the previous lvl_1. Had the data been a list, it would have looked something like this: Level 1 -- Level 2 ---- Level 3 Level 1 -- Level 2 ---- Level 3 I'm not looking to implement drag-and-drop sorting functionality, make it possible to rearrange the level 1 and two rows. The tricky part is that once I start moving a row, the corresponding children (and grand-children, if any) should move along with it. Is this even possible with the current markup, or do I have to rearrange the code? Thanks in advance !

    Read the article

1 2 3 4 5 6  | Next Page >