Redgate SQL Data Compare – Command LIne Output File

I am comparing 2 databases via command line. When I execute the following command:

SQLDataCompare /project:"C:\CompareFiles\compare_AW1_AW2.sdc" /Include:table:[Users] /Out:"C:\Users\mthurman\Documents\outputlog.txt" /verbose 

I get the following in my output log.txt:

Redgate Client capability version: 2 SQL Data Compare: trial, edition standard Loading synchronization parameters from project file: C:\CompareFiles\compare_AW1_AW2.sdc OK Comparing database (local)\SQLEXPRESS.AW1 with database (local)\SQLEXPRESS.AW2… Registering databases Mapping Comparing databases Finished

Summary Information ================================================================================================================================================================================================================================================================================================================================================== DB1 = (local)\SQLEXPRESS.AW1 DB2 = (local)\SQLEXPRESS.AW2  Object type     Name                                                                                                                                                                                                                                                                                                         Records      DB1 DB2  -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Table           [dbo].[Users]                                                                                                                                                                                                                                                                                                          2  <>  <>   -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- OK 

The databases have differences and running the compare through the GUI will show what they are. This output log does not show that detail. What am I missing?

Thanks, Matt

How do cloning drives, system recovery points and virtual machines compare for system state recovery?

I want to setup a dedicated test computer that can be restored to a specific system state. The reason for that is that the software tests to be executed on that machine include the installation process. Software can certainly be uninstalled, but that often does not revert the whole system back to its original state.

I often run into problems like software failing when being installed on a freshly setup operating system or reinstalling software giving different results than newly installing it.

In short, I want to test the software deployment.


I don’t always want to start from scratch by formatting the drive and installing the operating system. The used operating systems are Windows. I want to be able to easily restore the state of just having installed the operating system, for example.

I found 3 ways of achieving that:

  1. Use some cloning/mirroring software to “capture” the state of the hard drive.
  2. Use the system restore point.
  3. Use virtual machines.

How do these compare in terms of reproducibility and convenience for software tests?

  1. Cloning drives seems to be the most straight forward approach.
  2. With the system restore points, I am not sure if they revert the entire system. Will this also remove windows updates etc? It seems to be a rather convenient option to be able to restore the system this way from within the system itself.
  3. Virtual machines seem to give the best out of both worlds. However, the tests involve connected hardware and adding the virtualisation as another layer might be another source for change of behaviour of the software.

Efficiently compare 2 lists to replace and order

I have 2 list containing some Objects (Fruit class). I am using a 3rd list to add these elements based on following 2 criteria.

  1. I want every object in the 1st list added to 3rd list. But if I have a matching object in the 2nd list (matching based on id and isChecked), I want to add the object from the 2nd list to the 3rd list and ignore the one in 1st list.

  2. If I did the switch mentioned on point one, I want to move that object up to the first element of the 3rd list.

I have it working with following code. But I find it very inefficient. Is there a better way around it?

Bear in mind I have no control over the second list, but the first list is coming from a Rest endpoint and I am currently capturing it as a list. Unsure if I should have opted for a Map. Please advice.

Example:

In the following example, expected list output is [f2, f5, f1, f3, f4] (based on name).

It is cos I have all the elements from the first list. f2 and f5 went in front of the order as they came from second list (they matched elements in first list and had isChecked set to true).

import lombok.*;  import java.util.ArrayList; import java.util.Arrays; import java.util.List;  public class App {     public static void main(String[] args) {          Fruit fruit1 = new Fruit("1", "f1", false);         Fruit fruit2 = new Fruit("2", "f2", false);         Fruit fruit3 = new Fruit("3", "f3", false);         Fruit fruit4 = new Fruit("4", "f4", false);         Fruit fruit5 = new Fruit("5", "f5", false);          List<Fruit> firstList = Arrays.asList(fruit1, fruit2, fruit3, fruit4, fruit5);          Fruit fruit6 = new Fruit("2", "f2", true);         Fruit fruit7 = new Fruit("7", "f7", false);         Fruit fruit8 = new Fruit("5", "f5", true);         Fruit fruit9 = new Fruit("9", "f9", false);         Fruit fruit10 = new Fruit("10", "f10", false);          List<Fruit> secondList = Arrays.asList(fruit6, fruit7, fruit8, fruit9, fruit10);          List<Fruit> finalList = new ArrayList<>();          // expected list = [f2, f5, f1, f3, f4]          // this loop is checking and adding objects to finalList.         // must match the first list and isChecked.         // in this case, only f6 and f8 matches the first list (id match) and is also 'checked'.         for (Fruit first : firstList){             for (Fruit second : secondList){                 if(first.getId().equals(second.getId()) && second.isChecked()){                     finalList.add(second);                     break;                 }             }         }          // not done yet. Still need to loop and add back the elements from the first list         // which were not added in the above loop         boolean addedFirst = false;         outer:         for(Fruit first : firstList){             for(Fruit finalFruit : finalList){                 if(first.getId().equals(finalFruit.getId())){                    continue outer;                 }             }             finalList.add(first);         }          for(Fruit fruit : finalList){             System.out.println(fruit);         }     } }  @Getter @Setter @ToString class Fruit{     private String id;     private String name;     private boolean isChecked;      Fruit(String id, String name, boolean isChecked) {         this.id = id;         this.name = name;         this.isChecked = isChecked;     } } 

Using Openpyxl to compare data values in two excel files when one isn’t ordered

I am comparing the income values in two different excel files to evaluate if their is a discrepancy the income for each employee between the files. My issue is that the names in the second file are alphabetized but in the first file they are ordered randomly.

I am very new to python, what search function can I use that creates a list telling me what the corresponding row values in the unordered list are to the alphabetized list.

Here is my code so far.

import openpyxl wb = openpyxl.load_workbook('Gehaltabrechnung_v02.xlsx') sheet= wb['Tabelle1'] wb2 = openpyxl.load_workbook('BonusCalculation.xlsx') sheet2= wb2['Tabelle1'] //imports files and names the workbooks  column_income1 = sheet['G'] income1_length = len(column_income1) column_name1 = sheet['B'] name1_length = len(column_name1) column_income2 = sheet2['I'] income2_length = len(column_income2) column_name2 = sheet2['B'] name2_length = len(column_name2) //specifies collumn and their lengths for the two sheets 

How does Exploiter Wizard compare with an Arcanist in Pathfinder Society Organized Play?


Preamble: min-maxing is OK

I have asked my PFS gamemaster if I am allowed to min-max, and they basically said that it’s OK, so for the purposes of this question I am seeking as much power as possible and allowed to use any PFS-legal sources.

My options

I usually play Sorcerers and don’t optimize too much, but this time I am not limited by anything, so I want to cheese as much power as possible, and I also want to try something new, too.

I am looking at two classes: the Arcanist and the Exploiter Wizard. They both have something from what I’m used to (spell list, spontaneous spellcasting, choosing the spells on the fly) and something I’d like to try (prepared spellcasting, choosing spells each day), but in different proportions.

The Exploiter Wizard

The Exploiter Wizard seems very nice due to faster spell progression. Character advancement isn’t going to be fast, so it’s going to be really nice to have Haste or Glitterdust a level earlier than a level later. Playing around once a week with that character, I will only reach level 6 in about five months.

Bonus feats are also nice.

An answer that prefers the Arcanist should say how that class can overcome the spell level delay and somehow comment on the following quote from Dawar’s Arcanist guide:

“But, Dawar” you may ask “What about the Exploiter Wizard?” to which I say …well

…I mean

…I guess

sh….SHUT UP! (no really, that Archetype makes a wizard better at what you do than you. But, you know, oh well)

The Arcanist

The Arcanist, on the other hand, gets more exploits, and some of them are really nice. I am not going to get a lot of those on my Wizard. What’s more, the Arcanist has Consume Spells, so Arcane Reservoir points are going to be less scarce.

The exploits

Some good exploits that I know of are:

  1. Quick Study: the point of being an Exploiter Wizard or Arcanist, ability to replace spells on the fly.
  2. Potent Magic: inrease caster level or save DCs of my spells better.
  3. Dimensional Slide: teleport as a part of your move action.

All can be got as Exploiter Wizard at level 9 (again, in a long time). In fact, I can even get them in this exact order. I was told that the Arcanist needs more exploits than those three.

Some other exploits that I consider:

  1. Metamagic exploits are mentioned as being cool ones in this guide, but they are not likely to kick in because I am not really going to play at high levels, and abusing metamagic is hence not a good option. Please correct me if I am wrong.

    Anyway, as far as I know, Wizards are also good metamagic users. Are Arcanists any better? If yes, are they significantly better?

  2. Force Strike — basically, a better magic missile. Same expected damage as usually per level (1d6 and 1d4+1 both yield 3.5 on average), but no touch attack or saving throw.
  3. Counterspell
  4. Familiar — since we lose one when becoming an Exploiter Wizard or don’t get in the first place if Arcanist.

It should be noted that I am going to play in a group of friends, often attending sessions more often than them, so I might have to choose slow XP progression, if it’s of any importance.

All in all, would I like to know?

  1. What are the benefits and disadvantages of each of the classes (compared to each other) that I missed?
  2. How important are the pros and cons that I mentioned?
  3. Who is better at metamagic and how significantly? This is not a very important question, but still.
  4. How many exploits does each of them need?
  5. Which of the exploits that I mentioned are good and worth it?

Important notes

  • When speaking about the Arcanist, you can refer to archetypes too, as they are a part of the class. When speaking about the Exploiter Wizard, you can refer to archetypes that give similar spontaneous abilities or PFS-legal archetypes that stack.
  • I am going to play this character this weekend. I will be able to make some changes before I reach level 2, though.

TypeError: Cannot compare type ‘Timestamp’ with type ‘str’

import pandas as pd  import quandl  df = quandl.get('WIKI/GOOGL')  df = df[['Adj. Open','Adj. Open','Adj. High','Adj. Low','Adj. Close','Adj. Volume']]  df['HL_PCT'] = (df['Adj. High'] - df['Adj. Low']) / df['Adj. Low'] * 100.0 df['PCT_change'] = (df['Adj. Close'] - df['Adj. Open']) / df['Adj. Open'] * 100.0  df = df[['Adj. Close','PCT_Change','HL_PCT','Adj. Volume']]' 

I have this code and when i try to add df[PCT_change] column this error pops up i have no clue what i am doing wrong

TypeError: Cannot compare type 'Timestamp' with type 'str' 

map, filter, reduce is taking time compare with for loop is that true?

In Javascript ES6 we have map, filter,reduce function. I read one article in medium he mentioned those method taking little time for running comparing with for loop is that true? and he gave examples also.

const numbers = [2, 4, 8, 10]; const halves = numbers.map(x => x / 2);  for(var i=0;i<numbers.length;i++){ x = numbers[i]/2 } 

Powershell, how to compare user input

I’m making a “shortcut” PS1 script to update a domain user’s password. I’d like to prompt the user for the new password twice without showing the password on screen. When I use $ Text1=Read-Host ; $ Text2=Read-Host ; $ Text1 -eq $ Text2 with the same input – ‘1’ for example – the output of that one-liner is “True”. However,

$  Text1=Read-Host -AsSecureString ; $  Text2=Read-Host -AsSecureString ; $  Text1 -eq $  Text2 

and

$  Text1=Read-Host -AsSecureString ; $  Text2=Read-Host -AsSecureString ; (ConvertFrom-SecureString $  Text1) -eq (ConvertFrom-SecureString $  Text2) 

return False.

The script as it is now, without prompting twice and comparing user inputs, is below and it works to reset a user’s password.

$  UserName = Read-Host "User name " $  NewPass = Read-Host -AsSecureString Set-ADAccountPassword `     -NewPassword $  NewPass `     -Verbose `     -Identity ( (Get-ADUser -Filter "SamAccountName -like '$  UserName'").DistinguishedName ) $  NewPass.Dispose() 

Working PS1 script to reset domain user's password

Beyond Compare resync lines

I’m using Beyond Compare 4 Trial Mode to compare to .csv files. Many years ago I recall there was a command to resync the file comparison. One of my csv files has more lines to the other and I need to be able to manually pick match this line to that line in few places. I’m pretty sure this used to be available.

Thanks

Compare two datatables and delete duplicates (without join) C#

I need to compare two datatables, to delete the duplicates and then to fill a gridview.

This is what I have try so far

DataTable cols = new DataTable(); DataTable cols2 = new DataTable(); DataTable cols3 = cols.Copy();   foreach (DataRow row1 in cols2.Rows)             {                 bool isRecordExist = false;                 foreach (DataRow row2 in cols.Rows)            {      if (row1 == row2)             {                 isRecordExist = true;             }          if (!isRecordExist)         {             cols3.ImportRow(row1);         }     }   }    dgvfcolumns.DataSource = cols3; 

but instead of removing the duplicate it just adds the rows from 2nd datatable (cols2) to the the 1st(cols).

any idea? I also like to ask if I have to convert my datatables to arrays? thank you