compare

Is there an open source SQL Server DB compare tool? [closed]

时光总嘲笑我的痴心妄想 提交于 2019-11-28 16:41:25
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm working on an open source project that uses SQL Server 2005 as the data store. We need a DB compare tool to generate diff scripts

Compare binary files in C#

早过忘川 提交于 2019-11-28 16:32:33
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, I'm looking for a nice efficient way of comparing the two streams: one 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. static bool FileEquals(string

How to compare two files not in repo using git

做~自己de王妃 提交于 2019-11-28 16:27:33
I'd like to compare two css files which are not in any git repository. Is there such a functionality in git? Kyle Burton git 's diff is more functional than the standard unix diff . I often want to do this and since this question ranks highly on google, I want this answer to show up. This question: How to use git diff --color-words outside a Git repository? Shows how to use git to diff files where at least one of them is not in the repository by using --no-index : git diff --no-index file1.txt file2.txt It doesn't matter which one is tracked by git and which is not - one or both can be

Libpuzzle Indexing millions of pictures?

可紊 提交于 2019-11-28 15:40:38
its about the libpuzzle libray for php ( http://libpuzzle.pureftpd.org/project/libpuzzle ) from Mr. Frank Denis. I´am trying to understand how to index and store the data in my mysql database. The generation of the vector is absolutly no problem. Example: # Compute signatures for two images $cvec1 = puzzle_fill_cvec_from_file('img1.jpg'); $cvec2 = puzzle_fill_cvec_from_file('img2.jpg'); # Compute the distance between both signatures $d = puzzle_vector_normalized_distance($cvec1, $cvec2); # Are pictures similar? if ($d < PUZZLE_CVEC_SIMILARITY_LOWER_THRESHOLD) { echo "Pictures are looking

How to compare binary files to check if they are the same?

依然范特西╮ 提交于 2019-11-28 15:26:18
What is the easiest way (using a graphical tool or command line on Ubuntu Linux) to know if two binary files are the same or not (except for the time stamps)? I do not need to actually extract the difference. I just need to know whether they are the same or not. Joe The standard unix diff will show if the files are the same or not: [me@host ~]$ diff 1.bin 2.bin Binary files 1.bin and 2.bin differ If there is no output from the command, it means that the files have no differences. bobjandal Use cmp command. This will either exit cleanly if they are binary equal, or it will print out where the

How to compare a variable value to an array

こ雲淡風輕ζ 提交于 2019-11-28 14:51:05
In Python, How can I compare two float variable values to ensure if they are within a certain tolerance of each other? For example: variable = 17.40 array = [14.40, 14.12, 45.50] I need to compare the variable value with the array elements to see which one are close enough. entropy From this question that you also asked. Here's a piece of code that will check if your variable is in the array(unless that's not what you meant by compare the variable value with the array elements): TOLERANCE=10**-6 def are_floats_equal(a,b): return abs(a-b) <= TOLERANCE def float_in_array(number, array): return

Javascript compare two dates to get a difference

六眼飞鱼酱① 提交于 2019-11-28 14:29:10
I am trying to compare two different dates to see if the date inputted is after 7 days of todays date. I have done a bit of googling and come up with this: function val_date(input){ var date = new Date(input); date = date.getTime() / 1000; var timestamp = new Date().getTime() + (7 * 24 * 60 * 60 * 1000) window.alert("Date: "+date + " = N_Date: "+timestamp); if(timestamp > date || timestamp === date){ // The selected time is less than 7 days from now return false; } else if(timestamp < date){ // The selected time is more than 7 days from now return true; } else{ // -Exact- same timestamps.

Bash compare operator always true

拟墨画扇 提交于 2019-11-28 14:12:41
I'm trying to write a small script to compare my external ip (first three bytes) with the one below #!/bin/bash MYFILE=/home/me/.config/i3/pia while true do IP_EX=$(wget http://ipinfo.io/ip -qO - | cut -d"." -f1,2,3) if [[ "$IP_EX"=="173.199.65" ]] then echo file created touch $MYFILE else echo file deleted rm -f $MYFILE fi echo sleeping sleep 4 done This forever returns 'file created', and the else statement is never executed. This is the case EVEN if I replace the $IP_EX with "whatever". Bash commands are sensitive to spaces. You need to add spaces around == . Observe that this gives the

how to compare two strings in java?

天涯浪子 提交于 2019-11-28 13:06:02
I have list of situation like below: string A <-------> string B I should compare A with B with following condition: 1- if number shown in read is different in both side but the rest is the same it means A = B. 2- there is in some situation like the first one in A side after number shown in red there is not white space but in b side there is a white space after number shown in red and also after X. 3- there is also different cases like number 3 Now how can i best compare this two string? private static void controlSimilarity(String memo,String ck,String bc,String id,String product) { if(!id

Adding time in PHP

心不动则不痛 提交于 2019-11-28 12:26:11
问题 I am pulling a datetime from a mysql db and i would like to add X hours to it then compare it to the current time. So far i got $dateNow = strtotime(date('Y-m-d H:i:s')); $dbTime = strtotime($row[0]); then i tried $dbTime + strtotime("4 hours"); but 4 hours seem to add 4hrs to the current time instead of raw 4hours. How do i add X hours to dbTime? NOTE: I am using php 5.1.2 so date_add doesnt work (5.3.0) 回答1: time() and strtotime() result in unix timestamps in seconds, so you can do