search for: my_database

Displaying 9 results from an estimated 9 matches for "my_database".

2010 Jun 08
3
Matrix to "database" -- best practices/efficiency?
...mns relate to the values from m, n, and my_matrix respectively, e.g. a single row follows the form: c(id_m[a],id_n[b],my_matrix[a,b]) I can, of course, for-loop this thing with an if-then, e.g.: *** for (a in 1:length(id_m)) { for (b in 1:length(id_n)) { if ((a==1) && (b==1)) { my_database=c(id_m[a],id_n[b],my_matrix[a,b]) } else { my_database=rbind(my_database,c(id_m[a],id_n[b],my_matrix[a,b])) } } } *** But my gut is telling me this is an incredibly inefficient way of doing this -- is there a faster approach to doing this same process? Thanks! --j
2010 Jan 12
1
FW: Problems connecting with MySQL using odbcDriverConnect (RODBC package) on Linux
...ect to the MySQL server > conn <- odbcDriverConnect(connection="Driver={MySQL};Server=my-server;Database=m y_database;Uid=my_username;Pwd=my_password") This generates following: Warning messages: 1: In odbcDriverConnect(connection = "Driver={MySQL};Server=my-server;Database=my_database;Uid=my_username;Pw d=my_password") : [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data source name not found, and no default driver specified 2: In odbcDriverConnect(connection = "Driver={MySQL};Server=my-server;Database=my_database;Uid=my_username;Pw d=my_passw...
2010 Jan 12
0
Problems connecting with MySQL using odbcDriverConnect (RODBC package) on Linux
...ect to the MySQL server > conn <- odbcDriverConnect(connection="Driver={MySQL};Server=my-server;Database=m y_database;Uid=my_username;Pwd=my_password") This generates following: Warning messages: 1: In odbcDriverConnect(connection = "Driver={MySQL};Server=my-server;Database=my_database;Uid=my_username;Pw d=my_password") : [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data source name not found, and no default driver specified 2: In odbcDriverConnect(connection = "Driver={MySQL};Server=my-server;Database=my_database;Uid=my_username;Pw d=my_passw...
2009 Dec 14
1
AGI with PHP
...111,1,Answer() exten => 111,n,AGI(GoTalk.php) exten => 111,n,NoOp(Result is : ${callnum}) exten => 111,n,HangUp() My php file is: #!/usr/bin/php <?php $start = '5'; $mysql_host = 'localhost'; $mysql_user = 'username'; $mysql_password = 'password'; $my_database = 'asteriskcdr'; $dbtable = 'cdr'; $from_date = '20091205000000'; $to_date = '20100104235959'; $callnum = '0'; $minutes = '0'; $query_duration = "SELECT SUM(billsec) FROM $dbtable WHERE calldate >= $from_date AND calldate <= $to_date AND...
2011 Mar 02
2
Ambiguous columns from related tables
...that joins one table to another - both tables have the same column name I''m searching on, so naturally I get an ambiguous error in sql - it doesnt know which column to apply the search to. One solution would be to append the desired table name to the field being passed on in search, like my_database.foo where foo was the ambiguous field. But this doesn''t seem very Rails-ish to my newbie eyes. Is there a better, AR-based way to handle this issue? Best, Peter D Bethke -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group....
2009 Mar 20
0
rfm working in localhost but not in production enviromen
...a FMP server. As we were deploying the app to the production server, we encountered a small problem in this part of the code: In enviroment.rb: SERVER_CONFIG = { :host => "my.ip.number", :account_name => "user", :password => "pass" } DATABASE = "my_database" In the controller I have this: if(Rfm::Server.new(SERVER_CONFIG)[DATABASE]["template"].find ({"user_id" => current_user.id})[0] != nil) puts "the user do exist" else puts "the user does not exist" end When working in localhost the sync works fine...
2008 Sep 23
3
Association error using find since upgrading to Rails 2.1.1
Hi all, Ruby 1.8.6 Rails 2.1.1 I have a simple association that works fine under 1.2.6 but is failing under 2.1.1. require ''active_record'' ActiveRecord::Base.establish_connection( :adapter => ''postgresql'', :database => ''my_database, :username => ''postgres'' ) class Schedule < ActiveRecord::Base belongs_to :user end class User < ActiveRecord::Base has_many :schedules end # This works with AR 2.1.1 s = Schedule.find(:first) p s.user_id p s.user.cuid # This does not with AR 2.1.1 => PGEr...
2009 Oct 22
10
Help! i want to clone my Centos machine to another box..
Hello all, i've spent the last week trying to find something that will clone my existing Centos server to a more powerful box. i've used clonezilla though that resulted in a complete failure.. can anyone please guide me in the right direction? all i want to do is to clone my entire server and all of it's directories to a more powerful server so i start using it instead.. i dont want
2011 Jan 22
0
how to call BayesX in R to see the graph
...t it was not needed to "register" your database >> with >> ODBC before using it. >> These commands below work for me. >> >> library(RODBC) >> ch<-odbcDriverConnect(connection="SERVER=localhost;DRIVER=MySQL ODBC 5.1 >> Driver;DATABASE=my_database;UID=root;PWD=my_password;case=tolower") >> resultdb<-sqlQuery(ch,"SELECT * from my_table") >> odbcClose(ch) >> >> Try to modify them for your case. >> I hope it will work for you. >> Good luck, >> Ptit Bleu. >> >> >&gt...