Search Results

Search found 17068 results on 683 pages for 'merge array'.

Page 6/683 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Convert array of hashes to array of structs?

    - by keruilin
    Let's say I have two objects: User and Race. User has two attributes: first_name, last_name. And Race has three attributes: course, start_time, end_time. Now let's say I create an array of hashes like this: user_races = races.map{ |race| {:user = race.user, :race = race} } How do I then convert user_races into an array of structs, keeping in mind that I want to be able to access the attributes of both user and race from the struct element?

    Read the article

  • Problem in searching String array [on hold]

    - by user2573607
    I'm working on a bank interface project, where I have to search an array of string when the user types in his username. The array has 10 strings, but only the first string is recognized as a valid username...I'm positive that the syntax of the search technique(Linear Search) is correct, but I cannot seem to find the problem. The code however compiles properly. Any answer will be appreciated, TIA! Aparna

    Read the article

  • Change Wix Merge Module Package GUID?

    - by jenglert
    When is it necessary to change the package GUID of a merge module? <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Module Id="MyMergeModule" Language="1003" Version="1.0.0.0"> <Package Id="SOME_GUID" Manufacturer="Me" InstallerVersion="301" /> </Module> </Wix> Wix3 requires that the package GUID is explicitly specified for a merge module unlike for a product. My merge module will be used with an MSI that is built bi-weekly. These bi-weekly MSIs need to co-exist on the same machine as separate installations (e.g. versions 1, 2, 3, etc...) Do I need to change the package GUID of my merge module for each bi-weekly MSI build?

    Read the article

  • TeamCity and pending Git merge branch commit keeps build with failed tests

    - by Vladimir
    We use TeamCity for continuous integration and Git for source control. Generally it works pretty well - convenient, modern and good us quick feedback when tests fails. There is a strange behavior related to Git merge specifics. Here are steps of the case: First developer pulls from master repo. Second developer pulls from master repo. First developer makes commit A locally. Second developer makes commit B locally; Second developer pushes commit B. First developer want to push commit A but unable because he have to pull commit B first. First developer pull's from remote reposity. First developer pushes commit A and generated merge branch commit. The history of commits in master repo is following: B second developer A first developer merge branch first developer. Now let's assume that Second Developer fixed some failing tests in his commit B. What TeamCity will do is following: Commit B arrives - TeamCity makes build #1 with all tests passed Commit A arrives - TeamCity makes build #2 (without commit B) test bar becomes Red! TeamCity thought that Pending "Merge Branch" commit doesn't contain any changes (any new files) - but it actually does contain the merge of commit B, so the TeamCity don't want to make new build here and make tests green. Here are two problems: 1. In our case we have failed tests returning back in second commit (commit A) 2. TeamCity don't want to make a new build and make tests back green. Does anybody know how to fix both of this problems. I consider some reasonable general approach.

    Read the article

  • How to merge VB.NET WEB Project with C#.NET MVC project

    - by Thushara Perera
    Hi All, I've got an existing asp.net project written in vb.net need to merge into C# ASP.NET MVC 1.0 application. I couldn't find a good article on this. I have successfully created a sample project and merge it. It works successfully. But when merge it into my real project it does not work. I've used C#.csproj project file and deleted VB project file. for the merging i could find a good article this link successful on sample project not with the real project. good one: http://www.packtpub.com/article/mixing-asp.net-webforms-and-asp.net-mvc how it is possible to merge VB Default.aspx, C# Default.aspx and VB Global.asax, C# Global.asax. Can I used VB.vbproj file insted of csproj Thanks Thushara Perera

    Read the article

  • using araxis merge for folder comparison on git branches (OSX)

    - by memo
    I know how to setup araxis merge to be my git diff / merge tool, so if I do git difftool it automatically launches araxis merge. However if I do git difftool upstream/master (to see all the differences between current branch and upstream/master), it launches the app one by one for every single file that is different. Is there a way of setting it up so I can get a folder comparison type view, and then go down and view each file diff as I choose? i.e. similar to this http://www.araxis.com/merge_mac/overview2.html The only way I've found to do this is to clone my repo into a new folder, switch to the branch there, and then do a normal araxis merge folder comparison.

    Read the article

  • SCD2 + Merge Statement + MSSQL

    - by Nev_Rahd
    I am trying work out with MERGE statment to Insert / Update Dimension Table of Type SCD2 My source is a Table var to Merge with Dimension table. My Merget statement is throwing an error as: The target table 'DM.DATA_ERROR.ERROR_DIMENSION' of the INSERT statement cannot be on either side of a (primary key, foreign key) relationship when the FROM clause contains a nested INSERT, UPDATE, DELETE, or MERGE statement. Found reference constraint 'FK_ERROR_DIMENSION_to_AUDIT_CreatedBy'. My Merge Statement: DECLARE @DATAERROROBJECT AS [ERROR_DIMENSION] INSERT INTO DM.DATA_ERROR.ERROR_DIMENSION SELECT ERROR_CODE, DATA_STREAM_ID, [ERROR_SEVERITY], DATA_QUALITY_RATING, ERROR_LONG_DESCRIPTION, ERROR_DESCRIPTION, VALIDATION_RULE, ERROR_TYPE, ERROR_CLASS, VALID_FROM, VALID_TO, CURR_FLAG, CREATED_BY_AUDIT_SK, UPDATED_BY_AUDIT_SK FROM (MERGE DM.DATA_ERROR.ERROR_DIMENSION ED USING @DATAERROROBJECT OBJ ON(ED.ERROR_CODE = OBJ.ERROR_CODE AND ED.DATA_STREAM_ID = OBJ.DATA_STREAM_ID) WHEN NOT MATCHED THEN INSERT VALUES( OBJ.ERROR_CODE ,OBJ.DATA_STREAM_ID ,OBJ.[ERROR_SEVERITY] ,OBJ.DATA_QUALITY_RATING ,OBJ.ERROR_LONG_DESCRIPTION ,OBJ.ERROR_DESCRIPTION ,OBJ.VALIDATION_RULE ,OBJ.ERROR_TYPE ,OBJ.ERROR_CLASS ,GETDATE() ,'9999-12-13' ,'Y' ,1 ,1 ) WHEN MATCHED AND ED.CURR_FLAG = 'Y' AND ( ED.[ERROR_SEVERITY] <> OBJ.[ERROR_SEVERITY] OR ED.[DATA_QUALITY_RATING] <> OBJ.[DATA_QUALITY_RATING] OR ED.[ERROR_LONG_DESCRIPTION] <> OBJ.[ERROR_LONG_DESCRIPTION] OR ED.[ERROR_DESCRIPTION] <> OBJ.[ERROR_DESCRIPTION] OR ED.[VALIDATION_RULE] <> OBJ.[VALIDATION_RULE] OR ED.[ERROR_TYPE] <> OBJ.[ERROR_TYPE] OR ED.[ERROR_CLASS] <> OBJ.[ERROR_CLASS] ) THEN UPDATE SET ED.CURR_FLAG = 'N', ED.VALID_TO = GETDATE() OUTPUT $ACTION ACTION_OUT, OBJ.ERROR_CODE ERROR_CODE, OBJ.DATA_STREAM_ID DATA_STREAM_ID, OBJ.[ERROR_SEVERITY] [ERROR_SEVERITY], OBJ.DATA_QUALITY_RATING DATA_QUALITY_RATING, OBJ.ERROR_LONG_DESCRIPTION ERROR_LONG_DESCRIPTION, OBJ.ERROR_DESCRIPTION ERROR_DESCRIPTION, OBJ.VALIDATION_RULE VALIDATION_RULE, OBJ.ERROR_TYPE ERROR_TYPE, OBJ.ERROR_CLASS ERROR_CLASS, GETDATE() VALID_FROM, '9999-12-31' VALID_TO, 'Y' CURR_FLAG, 555 CREATED_BY_AUDIT_SK, 555 UPDATED_BY_AUDIT_SK ) AS MERGE_OUT WHERE MERGE_OUT.ACTION_OUT = 'UPDATE'; What am i doing wrong ?

    Read the article

  • multi-dimension array value sorting in php

    - by David
    Another potentially interesting (or n00b, whatever comes first) question. I am building up an array with a set of database fields with information about table, actual field name and descriptive field name as a multi-dimensional array. Here is what it currently looks like: $Fields['User']['ID'] = "User ID"; $Fields['User']['FirstName'] = "First Name"; $Fields['Stats']['FavouriteOrder'] = "Favourite Item Ordered"; $Fields['Geographic']['Location'] = "Current Location"; $Fields['Geographic']['LocationCode'] = "Current Location Code"; Okay, this is fine, but I am piping this into a system that allows exporting of selected fields, and in the end I want to foreach() through the different levels, extract the data and then ultimately have all the descriptive fields to be displayed sorted alphabetically using their descriptive name. So ultimately in the order: Current Location, Current Location Code, Favourite Item Ordered, First Name then User ID - obviously keeping index associations. I can't use usort() and I can't use array_multisort()... or maybe I can and I just don't know how. usort() seems to need a key to sort by, but I have variable keys. array_multisort() just seems to do the same as sort() really. Any ideas?

    Read the article

  • SVN Merge returns nothing...

    - by Mike
    Here is the scenario: Windows Vista environment. SVN version 1.6.11. I'm on my branch directory. I want to update my branch with a particular change from my trunk. Using command line (using SlikSVN) I enter the following and it returns nothing (returns a blank line and no merge occurs): svn merge -r 11846:11891 http://trunk//AppConstants.java When I do the equivalent using Tortoise SVN, it says "Completed" but nothing gets merged either. When I do a svn diff I clearly see the differences I want to merge in from the trunk to my branch. The diff command I am using is svn diff -r 11846:11891 http://trunk//AppConstants.java. Can anyone figure why no merge occurs? Thanks!!!

    Read the article

  • Diff/Merge functionality for objects (not files!)

    - by gehho
    I have a collection of objects of the same type, let's call it DataItem. The user can view and edit these items in an editor. It should also be possible to compare and merge different items, i.e. some sort of diff/merge for DataItem instances. The DIFF functionality should compare all (relevant) properties/fields of the items and detect possible differences. The MERGE functionality should then be able to merge two instances by applying selected differences to one of the items. For example (pseudo objects): DataItem1 { DataItem2 { Prop1 = 10 Prop1 = 10 Prop2 = 25 Prop2 = 13 Prop3 = 0 Prop3 = 5 Coll = { 7, 4, 8 } Coll = { 7, 4, 8, 12 } } } Now, the user should be provided with a list of differences (i.e. Prop2, Prop3, and Coll) and he should be able to select which differences he wants to eliminate by assigning the value from one item to the other. He should also be able to choose if he wants to assign the value from DataItem1 to DataItem2 or vice versa. Are there common practices which should be used to implement this functionality? Since the same editor should also provide undo/redo functionality (using the Command pattern), I was thinking about reusing the ICommand implementations because both scenarios basically handle with property assignments, collection changes, and so on... My idea was to create Difference objects with ICommand properties which can be used to perform a merge operation for this specific Difference. Btw: The programming language will be C# with .NET 3.5SP1/4.0. However, I think this is more of a language-independent question. Any design pattern/idea/whatsoever is welcome!

    Read the article

  • how to change type of value in an php array and sorting it..is it possible ?

    - by justjoe
    hi, i got problem with my code and hopefully someone able to figure it out. The main purpose is to sort array based on its value (then reindex its numerical key). i got this sample of filename : $filename = array("index 198.php", "index 192.php", "index 144.php", "index 2.php", "index 1.php", "index 100.php", "index 111.php"); $alloutput = array(); //all of index in array foreach ($filename as $name) { preg_match('#(\d+)#', $name, $output); // take only the numerical from file name array_shift($output); // cleaned. the last code create duplicate numerical in $output, if (is_array($hasilku)) { $alloutput = array_merge($alloutput, $output); } } //try to check the type of every value in array foreach ($alloutput as $output) { if (is_array($hasil)) { echo "array true </br>"; } elseif (is_int($hasil)) { echo "integer true </br>"; } elseif (is_string($hasil)) { //the numerical taken from filename always resuld "string". echo "string true </br>"; } } the output of this code will be : Array ( [0] = 198 [1] = 192 [2] = 144 [3] = 2 [4] = 1 [5] = 100 [6] = 111 ) i have test every output in array. It's all string (and not numerical), So the question is how to change this string to integer, so i can sort it from the lowest into the highest number ? the main purpose of this code is how to output array where it had been sort from lowest to highest ?

    Read the article

  • Efficient alternatives to merge for larger data.frames R

    - by Etienne Low-Décarie
    I am looking for an efficient (both computer resource wise and learning/implementation wise) method to merge two larger (size1 million / 300 KB RData file) data frames. "merge" in base R and "join" in plyr appear to use up all my memory effectively crashing my system. Example load test data frame and try test.merged<-merge(test, test) or test.merged<-join(test, test, type="all") - The following post provides a list of merge and alternatives: How to join data frames in R (inner, outer, left, right)? The following allows object size inspection: https://heuristically.wordpress.com/2010/01/04/r-memory-usage-statistics-variable/ Data produced by anonym

    Read the article

  • merge values from excel file into .html file opened in word 2007

    - by Kelbizzle
    I have this newsletter I've written. I want to be able to use the values in the rows and some how have them merged into this html file I have opened in word. Sort of like a mail merge. In the newsletter I have 3 urls that look like: www.mydomain.com/php?id= I want to be able to replace all of the urls for all 230 records in the excel file. With something like: www.mydomain.com/?id=$id Where $id would get replaced with the id of the record. And the same goes for the rest of the rows like $firstname $lastname $email $phone number Is there a simple way to do this?

    Read the article

  • SVN Merge two reposiories - what about the UUIDs?

    - by grant007
    Hi, This is my scenario: Originally had two seperate repositories, I need to merge these into one repository. I don't care too much about the history in these repositories. I created a new repository and can import the repositories no problem. The issue is with users working copies, I can ask them to switch --relocate them however there is the issue of the UUID which will be different for each original repository: I can only reassign the UUID in the new repository to match one of the original repositories. So what is the best method to resolve this issue? (I suspect/hope I am going about this wrong...) Any ideas appreciated! -Grant.

    Read the article

  • Problems with merge replication

    - by jess
    Hi, We are developing a multi-user desktop application with users located in different countries. The platform is - .net 3.5, SQL Server 2008, WinForms. Now, my client has used the help of a DBA who has implemented merge replication. To facilitate replication, we made all our primary keys as GUID. Now, we are facing these issues with replication - subscribers expiration sometimes stops replication and we have found no clean way to re-add every change to db schema requires to poll the whole data all over again! This seems to be strange, what could be the problem here? Also, sometimes we have duplicate keys, and that too stops replication I am sure these issues can be resolved. Maybe, we have not gone the right way to implement. Can you suggest how to go about implementing. Or, is the above information enough to diagnose the problem?

    Read the article

  • Merge Visio files

    - by David Stratton
    I know I can do this manually by using copy/paste but I'm looking for a simpler way. Does anyone know of a quick and easy way to merge Visio documents? I have several Visio vsd files, all of which are the same internal document type (Flowchart - US Units). Each of these has between 1 and 15 pages. I'd like to combine them all into one Visio file. I'm using Visio for Enterprise Architects (11.4301.8221) so if there's a procedure for doing it in that version, that's what I'm looking for, but a 3rd party tool or a macro would work as well.

    Read the article

  • How to handle key in PhP array if the key contains japanese characters [migrated]

    - by Jim Thio
    I have this array: [ID] => ????????-???????????__35.79_139.72 [Email] => [InBuildingAddress] => [Price] => [Street] => [Title] => ???????? ??????????? [Website] => [Zip] => [Rating Star] => 0 [Rating Weight] => 0 [Latitude] => 35.7865334803033 [Longitude] => 139.716800710514 [Building] => [City] => Unknown_Japan [OpeningHour] => [TimeStamp] => 0000-00-00 00:00:00 [CountViews] => 0 Then I do something like this: $output[$info['ID']]=$info; //mess up here $tes=$info['ID']['Title']; Well guess what it messes up. Basically even though the content of an array in PhP can be Japanese. Is this true? What's wrong. The error I got is: Debug Warning: /sdfdsfdf/api/test2.php line 36 - Cannot find element ????????-???????????__35.79_139.72 in variable Debug Warning: /sdfdsfdf/api/test2.php line 36 - main() [function.main]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Krasnoyarsk' for '7.0/no DST' instead So many question mark Why is this happening. What's really going on inside PhP? Where can I learn more of such things. Most importantly, what would be the best way to handle this situation. Should I tell PhP to internally always use UTF-8? Does PhP array inherenty cannot use non ascii id?

    Read the article

  • Colour table cells in Microsoft Word after mail merge

    - by James
    I have an Excel spreadsheet of student data. For each of 30 topics, students are traffic lighted R, A or G (for red, amber, green) in the spreadsheet. I am mail merging individual result print-outs in Word 2010. However, rather than printing the letter R/A/G next to each topic, I would rather change the background colour of the cell to that colour. How can I do this? Is there an option with merge fields or can it be done with a macro (please provide sample code if so - I don't have experience with macros!)

    Read the article

  • excel - merge cells including a zip code

    - by evanmcd
    Hi all, I have the need to merge a bunch of cells that comprise an address (street, city, state, zip) into a single cell. No problem except with the zip code. The zip cell has only 4 digits for any zip that starts with 0. So, I change it's format to be Special - Zip Code. That makes the cell itself show the beginning 0, but the merged cell still does not show the leading 0. Does anyone know how to get the leading 0 in the merged column? Thanks Evan

    Read the article

  • Merge Publication Data Partition Snapshot generation

    - by David Osborn
    I have a merge publication in SQL 2008 R2 with data partitions and I am wondering when I should generate the snapshots for the data partitions. I get an error sometimes when bringing a new subscribe online related to the partition snapshot being out of date and I am wondering if this has to do with the publication snapshot being scheduled at the same time as the partition snapshots. I'm not really sure how the partition snapshot gets generated, but it appears maybe it is getting generated before the publication snapshot. If this is the case how should I be scheduling the partition snapshots to get generated? Should I set them to run x number of minutes after the publication snapshot? this seems kind of poor to do in case the publication snapshot takes awhile or fails. It seems to me the publication snapshot should just run the data partition snapshot agents when it is done if this is the case.

    Read the article

  • Sorting a 2D array in obj-c?

    - by Debashis
    I have a 2D array as follows: [[@"string value", @"string value", NSInteger], [@"string value", @"string value", NSInteger], [@"string value", @"string value", NSInteger]] How would I sort the second dimension of arrays by the NSInteger?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >