Search Results

Search found 5469 results on 219 pages for 'compare and swap'.

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

  • PHP compare two dimension array

    - by Jerry
    Hello guys I would like to know how to compare two two-dimension arrays value. First array Array 1 ( [0] => Array ( [0] => a ) [1] => Array ( [0] => b ) [2] => Array ( [0] => c ) } Second one Array 2 ( [0] => Array ( [0] => a ) [1] => Array ( [0] => d ) [2] => Array ( [0] => e ) } I need to know if my loop could compare the arrays to check the matched value. In my case, array1[0][0]=a matches array2[0][0]=a. If it matches, php will output some html. My foreach loop foreach ($array1 as $arrays){ foreach($arrays as $array){ //need to compare array2 here not sure how to do it. } } I would appreciate any helps. Thanks!

    Read the article

  • Oracle SQL Developer: Single Object Compare

    - by thatjeffsmith
    There’s a nasty rumor going around that you can’t compare database objects and/or code in Oracle SQL Developer. So let’s put that to bed right now. First, here’s how to compare: PL/SQL to PL/SQL or a SQL statement to another SQL statement So now that that’s settled, why don’t we take a look at how to compare a single table, to another table – whether it’s in the same database or a different database. Database Diff There’s no additional licensing requirement here. If you have SQL Developer, you can use this feature. if you’re going to compare 1 table to another, make sure you ONLY have ‘tables’ checked And then, use this dialog to select your table(s): Move over the object(s) you want to compare over to the right hand side. And now we can move onto the results. The differences, side-by-side, and the script to make B look like A Common lines with differences are highlighted in blue, new lines are highlighted in red. So that’s why they are different, but here’s the script to synch up the differences: Read the script, TEST the script, apply the script. And that’s it. Well, that’s mostly it. If you have questions about how to compare a database object in a schema you don’t have the login information for, read this post next.

    Read the article

  • SSAS Compare version 1.0 released

    - by Red Gate Software BI Tools Team
    We’re pleased to announce that SSAS Compare version 1.0 has been released as a free tool. Version 1.0 includes: Comparisons of live databases and XMLA or Analysis Services Project files MDX syntax diffs and highlighting Server comparisons Deployment wizard with summaries of scripted actions Bug fixes and engine and UI refinements We’ve tested it on as many cube configurations as we could find (not just good old AdventureWorks!), but we can’t provide support for free tools — so if you’re reliant on SSAS Compare for your cube deployment, use it at your own risk. See the user license agreement in the installer for more details. SSAS Compare’s come a long way from its humble beginnings as an internal tool first developed for Red Gate’s own BI developers. Today’s SSAS Compare is now much more stable — not to mention much easier to use — and something the team is proud to have released with Red Gate’s name on. Next: Deployment Manager We’re working on integrating SSAS Compare cube deployment with our new Deployment Manager tool, so you’ll be able to create cube deployment scripts and automate the deployment process, too.  We’re documenting the process in a white paper we’ll publish online in the next week. Thank you! Thanks to all the SSAS Compare users out there. Without your feedback, we could never have produced such a stable product so quickly. We hope you continue to find useful. See you in Deployment Manager!  

    Read the article

  • Crash and Centos

    - by Jackob
    Hello guys and girls, I've a big problem it's the second time that my server crashed. I tried to check every thing and seems correct except this /var/log/messages: May 25 20:16:11 srv1 kernel: swap_free: Bad swap offset entry 00300000 May 25 20:16:33 srv1 kernel: swap_free: Unused swap offset entry 00080000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00340000 May 25 20:16:33 srv1 kernel: swap_free: Unused swap offset entry 000c0000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00a00000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00200000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00890000 May 25 20:16:33 srv1 kernel: swap_free: Unused swap offset entry 00080000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00f00000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00f90000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00980000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00980000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00820000 May 25 20:16:33 srv1 kernel: swap_free: Unused swap offset entry 000d0000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00a60000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00a20000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 009a0000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00170000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00f20000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00b60000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00a30000 May 25 20:16:33 srv1 kernel: swap_free: Bad swap offset entry 00320000 May 25 20:16:47 srv1 kernel: swap_free: Bad swap offset entry 002c0000 May 25 20:16:47 srv1 kernel: Eeek! page_mapcount(page) went negative! (-1) What can be my problem? Thanks so much!

    Read the article

  • How to Compare and fetch date in Cakephp ?

    - by delete me
    I am trying to make an availability calender and need to know how can I compare date when fetching it. My DB is id start_date end_date status Now suppose I want to fetch booking in next month, i.e. from 2010-03-01 to 2010-04-01. How should I fetch this data ? I did try comparing directly using an and condition but it didnt help. The format in DB is yyyy-mm-dd and I used the same to compare. But direct comparison does not work.

    Read the article

  • Compare images to find differences

    - by _simon_
    Task: I have a camera mounted on the end of our assembly line, which captures images of produced items. Let's for example say, that we produce tickets (with some text and pictures on them). So every produced ticket is photographed and saved to disk as image. Now I would like to check these saved images for anomalies (i.e. compare them to an image (a template), which is OK). So if there is a problem with a ticket on our assembly line (missing picture, a stain,...), my application should find it (because its image differs too much from my template). Question: What is the easiest way to compare pictures and find differences between them? Do I need to write my own methods, or can I use existing ones? It would be great if I just set a tolerance value (i.e. images can differ for 1%), put both images in a function and get a return value of true or false :) Tools: C# or VB.NET, Emgu.CV (.NET wrapper for OpenCV) or something similar

    Read the article

  • How to compare 2 pdf files using command line or any tool

    - by Darzen
    I have to compare 2 pdf files and check if they are same or different. I have tried my luck with WinMerge and Beyond compare. however they dont solve my issue. The issue is that there are 2 files which are exactly same except for the time in which they were saved. I have a piece of code that embeds the time of saving into the file. but i am not supposed to do any modifications to the code I have. Hence the above mentioned tools will say that the files dont match and There is just one difference, that is timestamp. Can anyone suggest me a way to handle this. Please. Thanks

    Read the article

  • Swap button for image (Jquery)

    - by Skoder
    Hi I have a button and when it's clicked, I want to replace the button with an image. How can I do this in JQuery? Is it possible to replace the background of the image as well? The button itself is within a large div, and I don't want to add another div around the button because it messes up a previous layout. Thanks

    Read the article

  • Automating deployments with the SQL Compare command line

    - by Jonathan Hickford
    In my previous article, “Five Tips to Get Your Organisation Releasing Software Frequently” I looked at how teams can automate processes to speed up release frequency. In this post, I’m looking specifically at automating deployments using the SQL Compare command line. SQL Compare compares SQL Server schemas and deploys the differences. It works very effectively in scenarios where only one deployment target is required – source and target databases are specified, compared, and a change script is automatically generated and applied. But if multiple targets exist, and pressure to increase the frequency of releases builds, this solution quickly becomes unwieldy.   This is where SQL Compare’s command line comes into its own. I’ve put together a PowerShell script that loops through the Servers table and pulls out the server and database, these are then passed to sqlcompare.exe to be used as target parameters. In the example the source database is a scripts folder, a folder structure of scripted-out database objects used by both SQL Source Control and SQL Compare. The script can easily be adapted to use schema snapshots.     -- Create a DeploymentTargets database and a Servers table CREATE DATABASE DeploymentTargets GO USE DeploymentTargets GO CREATE TABLE [dbo].[Servers]( [id] [int] IDENTITY(1,1) NOT NULL, [serverName] [nvarchar](50) NULL, [environment] [nvarchar](50) NULL, [databaseName] [nvarchar](50) NULL, CONSTRAINT [PK_Servers] PRIMARY KEY CLUSTERED ([id] ASC) ) GO -- Now insert your target server and database details INSERT INTO dbo.Servers ( serverName , environment , databaseName) VALUES ( N'myserverinstance' , N'myenvironment1' , N'mydb1') INSERT INTO dbo.Servers ( serverName , environment , databaseName) VALUES ( N'myserverinstance' , N'myenvironment2' , N'mydb2') Here’s the PowerShell script you can adapt for yourself as well. # We're holding the server names and database names that we want to deploy to in a database table. # We need to connect to that server to read these details $serverName = "" $databaseName = "DeploymentTargets" $authentication = "Integrated Security=SSPI" #$authentication = "User Id=xxx;PWD=xxx" # If you are using database authentication instead of Windows authentication. # Path to the scripts folder we want to deploy to the databases $scriptsPath = "SimpleTalk" # Path to SQLCompare.exe $SQLComparePath = "C:\Program Files (x86)\Red Gate\SQL Compare 10\sqlcompare.exe" # Create SQL connection string, and connection $ServerConnectionString = "Data Source=$serverName;Initial Catalog=$databaseName;$authentication" $ServerConnection = new-object system.data.SqlClient.SqlConnection($ServerConnectionString); # Create a Dataset to hold the DataTable $dataSet = new-object "System.Data.DataSet" "ServerList" # Create a query $query = "SET NOCOUNT ON;" $query += "SELECT serverName, environment, databaseName " $query += "FROM dbo.Servers; " # Create a DataAdapter to populate the DataSet with the results $dataAdapter = new-object "System.Data.SqlClient.SqlDataAdapter" ($query, $ServerConnection) $dataAdapter.Fill($dataSet) | Out-Null # Close the connection $ServerConnection.Close() # Populate the DataTable $dataTable = new-object "System.Data.DataTable" "Servers" $dataTable = $dataSet.Tables[0] #For every row in the DataTable $dataTable | FOREACH-OBJECT { "Server Name: $($_.serverName)" "Database Name: $($_.databaseName)" "Environment: $($_.environment)" # Compare the scripts folder to the database and synchronize the database to match # NB. Have set SQL Compare to abort on medium level warnings. $arguments = @("/scripts1:$($scriptsPath)", "/server2:$($_.serverName)", "/database2:$($_.databaseName)", "/AbortOnWarnings:Medium") # + @("/sync" ) # Commented out the 'sync' parameter for safety, write-host $arguments & $SQLComparePath $arguments "Exit Code: $LASTEXITCODE" # Some interesting variations # Check that every database matches a folder. # For example this might be a pre-deployment step to validate everything is at the same baseline state. # Or a post deployment script to validate the deployment worked. # An exit code of 0 means the databases are identical. # # $arguments = @("/scripts1:$($scriptsPath)", "/server2:$($_.serverName)", "/database2:$($_.databaseName)", "/Assertidentical") # Generate a report of the difference between the folder and each database. Generate a SQL update script for each database. # For example use this after the above to generate upgrade scripts for each database # Examine the warnings and the HTML diff report to understand how the script will change objects # #$arguments = @("/scripts1:$($scriptsPath)", "/server2:$($_.serverName)", "/database2:$($_.databaseName)", "/ScriptFile:update_$($_.environment+"_"+$_.databaseName).sql", "/report:update_$($_.environment+"_"+$_.databaseName).html" , "/reportType:Interactive", "/showWarnings", "/include:Identical") } It’s worth noting that the above example generates the deployment scripts dynamically. This approach should be problem-free for the vast majority of changes, but it is still good practice to review and test a pre-generated deployment script prior to deployment. An alternative approach would be to pre-generate a single deployment script using SQL Compare, and run this en masse to multiple targets programmatically using sqlcmd, or using a tool like SQL Multi Script.  You can use the /ScriptFile, /report, and /showWarnings flags to generate change scripts, difference reports and any warnings.  See the commented out example in the PowerShell: #$arguments = @("/scripts1:$($scriptsPath)", "/server2:$($_.serverName)", "/database2:$($_.databaseName)", "/ScriptFile:update_$($_.environment+"_"+$_.databaseName).sql", "/report:update_$($_.environment+"_"+$_.databaseName).html" , "/reportType:Interactive", "/showWarnings", "/include:Identical") There is a drawback of running a pre-generated deployment script; it assumes that a given database target hasn’t drifted from its expected state. Often there are (rightly or wrongly) many individuals within an organization who have permissions to alter the production database, and changes can therefore be made outside of the prescribed development processes. The consequence is that at deployment time, the applied script has been validated against a target that no longer represents reality. The solution here would be to add a check for drift prior to running the deployment script. This is achieved by using sqlcompare.exe to compare the target against the expected schema snapshot using the /Assertidentical flag. Should this return any differences (sqlcompare.exe Exit Code 79), a drift report is outputted instead of executing the deployment script.  See the commented out example. # $arguments = @("/scripts1:$($scriptsPath)", "/server2:$($_.serverName)", "/database2:$($_.databaseName)", "/Assertidentical") Any checks and processes that should be undertaken prior to a manual deployment, should also be happen during an automated deployment. You might think about triggering backups prior to deployment – even better, automate the verification of the backup too.   You can use SQL Compare’s command line interface along with PowerShell to automate multiple actions and checks that you need in your deployment process. Automation is a practical solution where multiple targets and a higher release cadence come into play. As we know, with great power comes great responsibility – responsibility to ensure that the necessary checks are made so deployments remain trouble-free.  (The code sample supplied in this post automates the simple dynamic deployment case – if you are considering more advanced automation, e.g. the drift checks, script generation, deploying to large numbers of targets and backup/verification, please email me at [email protected] for further script samples or if you have further questions)

    Read the article

  • Should I keep my swap file on an SSD drive?

    - by Steve Rowe
    I'm considering getting an SSD drive to run as the primary OS partition. As I understand, this should provide a substantial improvement in performance. My question is this: Should I leave the swap file on that drive? The swap partition will be largely random seeks and so should benefit from the speed. On the other hand, it will be constantly written to which will wear out the drive faster.

    Read the article

  • Compare NSArray with NSMutableArray adding delta objects to NSMutableArray

    - by Hooligancat
    I have an NSMutableArray that is populated with objects of strings. For simplicity sake we'll say that the objects are a person and each person object contains information about that person. Thus I would have an NSMutableArray that is populated with person objects: person.firstName person.lastName person.age person.height And so on. The initial source of data comes from a web server and is populated when my application loads and completes it's initialization with the server. Periodically my application polls the server for the latest list of names. Currently I am creating an NSArray of the result set, emptying the NSMutableArray and then re-populating the NSMutableArray with NSArray results before destroying the NSArray object. This seems inefficient to me on a few levels and also presents me with a problem losing table row references which I can work around, but might be creating more work for myself in doing so. The inefficiency seems to be that I should be able to compare the two arrays and end up with a filtered NSArray. I could then add the filtered set to the NSMutableArray. This would mean that I can simply append new data to the NSMutableArray instead of throwing everything out and re-populating. Conversely I would need to do the same filter in reverse to see if there are records that need removing from the NSMutableArray. Is there any method to do this in a more efficient manner? Have I overlooked something in the docs some place that refers to a simpler technique? I have a problem when I empty the NSMutableArray and re-populate in that any referencing tables lose their selected row state. I can track it and re-select it, but my theory is that using some form of compare and adding objects and removing objects instead of dealing with the whole array in one block might mean I keep my row reference (assuming the item isn't deleted of course). Any suggestions or help much appreciated. Update Would it be just as fast to do a fast enumeration over each comparing each line item as I go? It seems like an expensive operation, but with the last fast enumeration code it might be pretty efficient...

    Read the article

  • How would you compare jQuery objects?

    - by Kyle
    So I'm trying to figure out how to compare two jQuery objects, to see if the parent element is the body of a page. here's what I got: if ( $(this).parent() === $('body') ) ... I know this is wrong, but if anybody understands what I'm getting at, could they point me towards the correct way of doing this?

    Read the article

  • Compare 2 lists in MbUnit 3.1

    - by Longball27
    Hi I am trying to compare 2 Dictionary objects for equality in MbUnit 3.1 like so Assert.AreEqual<FieldList>(expectedOutputFieldList, actualOutputFieldList); Where FieldList is = Dictionary<string, object> However this throws up the following "error": Both values look the same when formatted but they are distinct instances. Is there any method for comparing object data rather than instances? Thanks in advance...

    Read the article

  • Compare Tables in different databases with ADO.Net 3.5

    - by MicMit
    I need to compare tables with the same names in different databases ( Sql Server 2008 ). How using C# code and ADO.Net to identify additions, deletions, updates. Is DataReader going to work in this scenario without stored procedures ? DataReader seems to be suitable for single database connection, or am I missing something ?

    Read the article

  • Compare DateTime ticks on two machines

    - by vani
    Is it a viable option to compare two FileInfo.CreationTimeUtc.Ticks of two files on two different computers to see which version is newer - or is there a better way? Do Ticks depend on OS time or are they really physical ticks from some fixed date in the past?

    Read the article

  • Java Compare Addresses

    - by Tom
    Hi, Does anyone know a library to compare addresses in Java ? Something that would give equality on addresses, written in different ways. For example, it should recognize that "22 Acacia Avenue" and "22 acacia av." is the same address. Of course, this can escalate a lot, that's why i'm asking. Thanks in advance.

    Read the article

  • How to compare strings ignoring case (C++)?

    - by zebraman
    I am aware there is a function strcasecmp() that compares cstrings ignoring case, but I was wondering if there is a function that does the same thing except with strings? I am working with a bunch of strings, and feel like it would be terribly inefficient to have to use c_str() each time I want to compare them with strcasecmp(). Should I just use cstrings instead of strings...?

    Read the article

  • Visual Studio 2010 Data Compare Automation

    - by MicMit
    I noticed in premium edition Data menu with Data Compare option which does everything I need. Just wondering whether there is a way to automate what's done in GUI from my application. Ideally I'd like to get collections of different/left/right rows

    Read the article

  • C# Binary File Compare

    - by Simon Farrow
    I'm in a situation where I want to compare two binary files. One of them is already stored on the server with a pre-calculated Crc32 in the database from when I stored it originally. I know that if the Crc is different then the files are definitely different. However, if the Crc is the same I don't know that the files are. So what I'm looking for is a nice efficient way of comparing the two streams on from the posted file and one from the file system. I'm not an expert on streams but I'm well aware that I could easily shoot myself in the foot here as far as memory usage is concerned. Any help is greatly appreciated.

    Read the article

  • SIM card number swap

    - by DaGhostman Dimitrov
    Is it possible to swap two numbers between two sim cards (I am just got an new phone and it is using a micro sim) And I have a old number that I want to use but it is on standart sim card. Is it possible to swap the numbers between the cards using a SIM Card reader. What software and hardware should I use? Note: I have talked with my provider but I have to cancel my old numbers contract but I like it and do not want to pay the remaining period of the contract to turn it in to PayAsYouGo and then swap ..

    Read the article

  • The Birth of SSAS Compare

    - by Red Gate Software BI Tools Team
    Noemi Moreno, Red Gate Business Intelligence Specialist Software vendors – even Microsoft – tend to forget about the needs of business intelligence developers. We are a rare and rather invisible species. For example, BIDS remained in VS 2008 until SQL Server 2012. It took until this release before we got something as simple as an “undo” function. Before I joined Red Gate as a BI specialist, I worked on SQL Development. I’ll never forget the time I discovered Red Gate’s SQL Compare tool and how it reduced the task of preparing a database release from a couple of days to ten minutes. When I moved to SSAS, MDX and cubes, I became frustrated with the deployment process because I couldn’t find a tool that made Cube releases as easy as they are with SQL Compare. This became my quest. I pitched the idea to a few people in Red Gate’s regular Down Tools Week, when everyone puts down their day-to-day tasks and works on their own projects. My task was to reason with a roomful of cynical developers, hardened to the blandishments of project managers, for help to develop a tool that would compare two different SSAS databases and create the script to process only the objects that needed processing, thereby reducing release time to only a few minutes. I walked to the podium and gave them the full story of the distressed BI specialists, doomed to spend tedious hours preparing deployment scripts. A few developers recovered from their torpor to cast a languid eye at my presentation. It wasn’t enough. In a sudden impulse, I blurted out a promise to perform a flamenco dance for just the team if the tool was able to successfully compare two SSAS databases and generate a script by the end of the week. I was lucky enough that some of them believed me and jumped in: David Pond (Dev), Matt Burton (Dev), Tilman Bregler (Dev), Shobana Sekar (Test), Ruchija Raj (Test), Nick Sutherland (Product Manager) and Irma Tanovic (BI). They didn’t know that Irma and I would be away on a conference in Amsterdam and would leave them without our support. But to my surprise, they had a working tool by the time we came back – basic, and with a few bugs, but a working tool nonetheless! Seeing it compare a very basic SSAS database, detect the changes and generate the scripts was amazing! Something that normally takes half a day was done in under a minute. Since then, a few months have passed and a BI Tools team has been created at Red Gate to work full time on BI tools for BI developers, starting with SSAS Compare. How cool is that? So download the free beta and give us your feedback. And the flamenco? I still need to deliver that. Tilman reminds me every day! I need to get the full flamenco costume.

    Read the article

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