I don't know how to copy table data from
one server - database - table
TO
other sever - database - table.
If it is with in the same server and different databases, i have used the following
SELECT * INTO DB1..TBL1 FROM DB2..TBL1 (to copy with table structure and data)
INSERT INTO DB1..TBL1(F1, F2) SELECT F1, F2 FROM DB2..TBL1 (copy only data)
Now my question is copy the data from SERVER1 -- DB1-- TBL1 to SERVER2 -- DB2 --TBL2
Our company would like to mirror our Maven 2 Repository inside of the Amazon network.
What software should one use to do this?
We have looked into a Wagon-S3 but that sort of functionality is not desirable... we want the artifacts to already be present when we are ready for a build.
This is just one of those things where you feel like your own design is utterly terrible, and that all of the other apps have a beautiful design. This question is just about how you would go about creating a user interface that a user would actually want to use?
I have dictionary like
d = {'user_id':1, 'user':'user1', 'group_id':3, 'group_name':'ordinary users'}
and "mapping" dictionary like:
m = {'user_id':'uid', 'group_id':'gid', 'group_name':'group'}
All i want to "replace" keys in first dictionary with keys from second (e.g. replace 'user_id' with 'uid', etc.)
I know that keys are immutable and i know how to do it with 'if/else' statement.
But maybe there is way to do it in one line expression?
If you take a look at http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/activedirectoryoperations11132009113015AM/activedirectoryoperations.aspx, there is a huge list of properties for AD in one class.
What is a good way to refactor such a large list of (Related) fields? Would making seperate classes be adequate or is there a better way to make this more manageable?
Thanks
Both the last two test work individually...but when both are set to run (non pending) I get problems.
question: can I create a test that merges the two into one? How would this look?(yes, I am new to rspec)
require_relative '../spec_helper'
# the universe is vast and infinite....and...it is empty
describe "tic tac toe game" do
context "the game class" do
before (:each) do
player_h = Player.new("X")
player_c = Player.new("O")
@game = Game.new(player_h, player_c)
end
it "method drawgrid must return a 3x3 game grid" do
@game.drawgrid.should eq("\na #{$thegrid[:a1]}|#{$thegrid[:a2]}|#{$thegrid[:a3]} \n----------\nb #{$thegrid[:b1]}|#{$thegrid[:b2]}|#{$thegrid[:b3]} \n----------\nc #{$thegrid[:c1]}|#{$thegrid[:c2]}|#{$thegrid[:c3]} \n----------\n 1 2 3 \n")
@game.drawgrid
end
#FIXME - last two test here - how to merge into one?
it "play method must display 3x3 game grid" do
STDOUT.should_receive(:puts).and_return("\na #{$thegrid[:a1]}|#{$thegrid[:a2]}|#{$thegrid[:a3]} \n----------\nb #{$thegrid[:b1]}|#{$thegrid[:b2]}|#{$thegrid[:b3]} \n----------\nc #{$thegrid[:c1]}|#{$thegrid[:c2]}|#{$thegrid[:c3]} \n----------\n 1 2 3 \n").with("computer move")
@game.play
end
it "play method must display 3x3 game grid" do
STDOUT.should_receive(:puts).with("computer move")
@game.play
end
end
end
just for info here is the code containing the play method
require_relative "player"
#
#Just a Tic Tac Toe game class
class Game
#create players
def initialize(player_h, player_c)
#bring into existence the board and the players
@player_h = player_h
@player_c = player_c
#value hash for the grid lives here
$thegrid = {
:a1=>" ", :a2=>" ", :a3=>" ",
:b1=>" ", :b2=>" ", :b3=>" ",
:c1=>" ", :c2=>" ", :c3=>" "
}
#make a global var for drawgrid which is used by external player class
$gamegrid = drawgrid
end
#display grid on console
def drawgrid
board = "\n"
board << "a #{$thegrid[:a1]}|#{$thegrid[:a2]}|#{$thegrid[:a3]} \n"
board << "----------\n"
board << "b #{$thegrid[:b1]}|#{$thegrid[:b2]}|#{$thegrid[:b3]} \n"
board << "----------\n"
board << "c #{$thegrid[:c1]}|#{$thegrid[:c2]}|#{$thegrid[:c3]} \n"
board << "----------\n"
board << " 1 2 3 \n"
return board
end
#start the game
def play
#draw the board
puts drawgrid
#external call to player class
@player = @player_c.move_computer("O")
end
end
player_h = Player.new("X")
player_c = Player.new("O")
game = Game.new(player_h, player_c)
game.play
what is the best way to make my php code working on one domain
and sure i will encode the whole code by ioncube
i want function like
function domain(){
}
if($this_domain <> domain()){
exit('no');
}
or
$allowed_hosts = array('foo.example.com', 'bar.example.com');
if (!isset($_SERVER['HTTP_HOST']) || !in_array($_SERVER['HTTP_HOST'], $allowed_hosts)) {
header($_SERVER['SERVER_PROTOCOL'].' 400 Bad Request');
exit;
}
now i want know the best way to do that
may be will user strpos
i want to create a view in a one-to-many relatiom.
here is my relations:
(a -* b) and
(a -* c).
i want to create a view to have this data :
a1 - (all b's related to a1 + all c's relted to a1)
i don't wnat sth like (a1 ,b1,c1 - a1,b1,c2 ,...)
how can i create this view ?
I realize there's the W3C validator, which works great for one page. There's also the perl install they provide, but it seems to not work on a Mac or it's buggy.
Given that
1) I have an entire set of local files
How do I
a) Validate the entire set
b) do it behind a firewall
c) do it simply without installing anything on my computer? (i.e., is there a web service?)
Or is this just futile?
hi how can i use more than one 'between' clause in mysql query ? like if i want to select students having height between 20 and 25 and weight between 50 and 70..
thanks in advance
tismon
Sometimes normal FTP doesn't quite cut it... When you need to do secure FTP via SSIS packages, what ONE product would you recommend?
Before answering, please see if someone has already suggested the same thing and, if so, vote it up.
NOTE: Ideally, it needs to handle both SSH and SSL FTP connections, but I'd consider two separate components if it makes the most sense....
i save a user like this in doctrine:
$user = User();
$user->name = 'peter';
$user->save();
is there a way to save 20 users in one sql query?
or do i have to loop the above code 20 times hence creating 20 sql queries?
thanks
I want to insert one DefaultStyledDocument into another DefaultStyledDocument. How do I do this? I know of this method:
AbstractDocument.insertString(int offs,
String str,
AttributeSet a)
What I really want is something like this:
DefaultStyledDocument.insertDocument(int offs,
AbstractDocument doc)
Is there a way of doing this?
I'm still at the beginning in learning scala in addition to java and i didn't get it how is one supposed to do DI there? can or should i use an existing DI library, should it be done manually or is there another way?
In ruby, how do I test that one array not only has the elements of another array, but contain them in that particular order?
correct_combination = [1, 2, 3, 4, 5]
[1, 5, 8, 2, 3, 4, 5].function_name(correct_combination) # => false
[8, 10, 1, 2, 3, 4, 5, 9].function_name(correct_combination) # => true
I tried using include, but that is used to test whether [1,2,3].include?(2) is true or not.
Anyone have a suggestion for a good utility class that maps values from one object to another? I want a utility class that uses reflection and takes two objects and copies values from the 1st object to the second if there is a public property with the same name.
I have two entities that are generated from a web service proxy, so I can't change the parent class or impliment an interface or anything like that. But I know that the two objects have the same public properties.
I have multiple master pages in my asp.net mvc web application... Each of the pages add,edit,view and delete functionalities.... What it does is i have to create multiple views for handling add,edit,view and delete functionalities (ie) the user has to navigate to another view to edit/view the details of a record... How to Handle Multiple Form Actions (ie) add,edit,view and delete functionalities on One View?
We have project with a server witch have about 3000 requests at day from client.
30-40 on-line users. And smth about 30-40Gb data increase per year.
And system should be on-line 24x7.
Where can we locate the SQL server better?
On one computer with JavaEE container or on standalone computer?
What pros and cons on this ways?
hi there
when i build my web site it was handling only one interface but now i need to handle many interface
i can detect which site to communicate and isolate it from other sites but i stuck with this :
all the sites have the same views ...
is there are a way so i can rander from the same controller different views .. something like
application
application
controller
model
site_1_view
site_2_view
is this possible ??!!
Hi,
How can i copy multiple char* variables into one char* at single instance operation.
say i have
char* text1 = "Hello";
char* text2 = "World";
i want to copy text1, text2 and '2' and "12345" into char* text3 in single function call.
I have constructed the following -
`$format_$game_$name_$season`
4 variables with underscores between. Should this work, or will it act as one variable?
THankyou
Hi I am trying to merge one single revision using CL in SVN using this command:
svn merge -r 5454 URL
but I am getting the following error
svn: Second revision required
My revision is not the latest revision but buried about 90 revisions from the latest update. Any thoughts on what I am doing wrong?