Search Results

Search found 1296 results on 52 pages for 'sam abraham'.

Page 26/52 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Using MOA to classify new examples?

    - by Sam Zetoloth
    I'm trying to use the java machine learning library MOA to train on a training data stream, then predict classes for a test data stream. The first part works fine, using (for example) java -cp .:moa.jar:weka.jar -javaagent:sizeofag.jar moa.DoTask "LearnModel -l MajorityClass -s (ArffFileStream -f atrain.arff -c -1) -O amodel.moa" But then I cannot figure out how to use the trained model (amodel.moa) on another stream (atest.arff) to predict the classes. Has anyone done this before?

    Read the article

  • screen scraping

    - by sam
    hello folks., i am screen scraping a website which is in danish language.. i am unable to scrape certain characters as like må .. any idea to solve this? thanks

    Read the article

  • How to include a PHP generated XML file into flash vars, while ALSO passing through the current php functions into it?

    - by Sam
    Hello Given situation: In webpage.php the flashscript is calling a flash script with a flashvar: the playlist file which is a PHP generated XML file: playlist.php, it does that well so long as there are no extra functions in there. Now, in that XML-format playlistfile there needs to be a special function, besides the usual echo("");, namely the very special echo __(""); function that is already declared in webpage.php which needs to do something with the paragraphs residing within that xml file. However, currently the retrieved file misses the function echo __();and says "no such function declared in that xml-format [playlist.php] file". The php functions that are currently included at the very top of webpage.php somehow do not pass-through-the necessary functions into the playlist file for it to recognise how to handle it, in order for that playlist to get those necessary functions working. Apparently these are not passed through automatically/properly when residing in the flashvars?? Cause the echo __(""); works fine when called within webpage.php or via a normal php include(""); if those functions are in a different php file. But not working from the playlist.php file. Any ideas why/what is going on here? I appreciate your clues for this prob +1. Thanks very much. WEBPAGE.PHP the webpage, has at the top an include with functions: <?php include (functions.php); ?> // function that know what to do with echo __("paragraph") <script language="JavaScript" type="text/javascript"> run( 'play', 'true', 'loop', 'true', 'flashvars', 'xmlFile=/incl/playlist.php', // <<<< !! 'wmode', 'transparent', 'allowScriptAccess','sameDomain', ); </script> <noscript> <object classid="blabla"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="/movies/movie.swf" /> <param name="flashvars" value="xmlFile=/incl/playlist.php" /> // <<< !! <embed src="/movies/movies.swf" type="application/x-shockwave-flash"/> </object> </noscript> PLAYLIST.PHP The PHP generated XML file which is retrieved into the webpage as flash variable (see above) <?php echo ('<?xml version="1.0" encoding="UTF-8"?>'); echo ('<songs>'); echo ('<song version="1. "') . __("boom blue blow bell bowl") . ('/>'); echo ('<song version="2. "') . __("ball bail beam bike base") . ('/>'); echo ('</songs>'); ?>

    Read the article

  • [IOS SDK] retrieving scores from game center

    - by Sam
    I got this code from apple's developer site. How do i process the score information to be viewed in a like a UITableView or something? (void) retrieveTopTenScores { GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init]; if (leaderboardRequest != nil) { leaderboardRequest.playerScope = GKLeaderboardPlayerScopeGlobal; leaderboardRequest.timeScope = GKLeaderboardTimeScopeAllTime; leaderboardRequest.range = NSMakeRange(1,10); [leaderboardRequest loadScoresWithCompletionHandler: ^(NSArray *scores, NSError *error) { if (error != nil) { // handle the error. } if (scores != nil) { // process the score information. } }]; } }

    Read the article

  • failed to connect to any given host:port - RoR Error?

    - by Sam Hursey
    Hi all I'm very new to Ruby on Rails so please go easy! I've uploaded the whole application to the server (Dreamhost) and gone through the steps. But when I try to run it I get the following error: failed to connect to any given host:port (Mongo::ConnectionFailure) I have installed the Mongo gem; but maybe I haven't got it configured correctly? I know you can't use localhost for describing where a Dreamhost mysql database is; might it be something like that? These are the first five lines of the backtrace if that helps?: /home/user/.gem/ruby/1.8/gems/mongo-0.19.1/lib/../lib/mongo/connection.rb 440 in `connect_to_master' 1 /home/user/.gem/ruby/1.8/gems/mongo-0.19.1/lib/../lib/mongo/connection.rb 131 in `initialize' 2 /home/user/.gem/ruby/1.8/gems/magent-0.3/lib/magent.rb 19 in `new' 3 /home/user/.gem/ruby/1.8/gems/magent-0.3/lib/magent.rb 19 in `connection' 4 /home/user/.gem/ruby/1.8/gems/magent-0.3/lib/magent.rb 27 in `database=' 5 /home/user/.gem/ruby/1.8/gems/magent-0.3/lib/magent.rb 35 Any help much appreciated and apologies for my n00bishness! Thanks.

    Read the article

  • How to get a Magento product collection as a comma separated list of SKU's

    - by Sam
    Hi All I have a custom module I made for Magento. From the admin, there is a multi-select list of store products. The selected products from this are output in the form of a comma separated list of SKU's - for example: // Get Featured Products from list $configData = Mage::getStoreConfig('featured_products'); $featuredlist = $configData['settings']['featuredlist']; This gives the output in the following format if I < ?php echo $featuredlist ?: cn,asc,ken,steve,nine,ecco,ana Is it possible to output a collection from a category in the same way, as a comma separated list of SKU's? I currently use the following to get a collection: $_productCollection = Mage::getResourceModel('reports/product_collection') ->addAttributeToSelect('*') ->addAttributeToFilter('visibility', $visibility) ->addCategoryFilter($_category); $_productCollection->load()

    Read the article

  • Site to Site VPN with Rails

    - by Sam
    First of I'm very sorry but this questions is not so so specific. All I am looking for is a tutorial or a resource for creating a site-to-site VPN. Actually, I not even sure if that is what I should call it. I live in China and I want to access youtube and stuff. And I don't want to buy a proxy service so I'm trying to make my own VPN or proxy with Ruby on Rails. So again, my question is where is a resource for creating site-to-site VPN with Ruby on Rails.

    Read the article

  • Update last child id in parent table using mysql

    - by Sam Saffron
    Given the following tables: Topic id, last_updated_child_id Response id, topic_id, updated_at How do I update the Topic table so the last_updated_child_id is equal to the latest response id (based on date). So for example given: Topic id last_updated_child_id -- ----------------------- 1 null 2 null 3 null Response id topic_id updated_at -- ---- ---- 1 1 2010 2 1 2012 3 1 2011 4 2 2000 I would like to execute an UPDATE statement that would result in the Topic table being: id last_updated_child_id -- ----------------------- 1 2 2 4 3 null Note: I would like to avoid temp tables if possible and am happy for a MySQL specific solution.

    Read the article

  • Database Instance

    - by Sam
    I read a statement from an exercise: construct a database instance which conforms to diagram 1 but not to diagram 2. The diagrams are different n-ary relationships that have different relationships. Diagram 1 has a many to one to many to one relationship. Diagram 2 has many to many to many to one relationship. So, to really understand this problem, what does a database instance mean? Is it to make an example or abstract entities like a1, a2, or a3. Thanks for your time.

    Read the article

  • Paypal sandbox account in dotnet: "IPN Response invalid"

    - by Sam
    I am integrating Paypal with my website. I use a sandbox account, one buyer account and one seller account. I downloaded the code below from Paypal: string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr"; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox); //Set values for the request back req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; byte[] param = Request.BinaryRead(HttpContext.Current.Request.ContentLength); string strRequest = Encoding.ASCII.GetString(param); strRequest += "&cmd=_notify-validate"; req.ContentLength = strRequest.Length; //for proxy //WebProxy proxy = new WebProxy(new Uri("http://url:port#")); //req.Proxy = proxy; //Send the request to PayPal and get the response StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII); streamOut.Write(strRequest); streamOut.Close(); StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream()); string strResponse = streamIn.ReadToEnd(); streamIn.Close(); if (strResponse == "VERIFIED") { //check the payment_status is Completed //check that txn_id has not been previously processed //check that receiver_email is your Primary PayPal email //check that payment_amount/payment_currency are correct //process payment } else if (strResponse == "INVALID") { //log for manual investigation } else { //log response/ipn data for manual investigation } When I add this snippet in my pageload event of my success page, I show the IPN response as INVALID, but amount is paid successfully. Why is this? Paypal's docs are not clear.

    Read the article

  • Calling a wsdl in php over https using Zend Soap Client

    - by Sam Segers
    When I'm trying to connect to a webservice I always get the next fault SoapFault exception: [s:Sender] An error occurred when verifying security for the message I have to use a security header like: <o:Security env:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsu:Timestamp env:mustUnderstand="1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsu:Created>2010-06-10T08:22:59Z</wsu:Created> <wsu:Expires>2010-06-12T10:22:59Z</wsu:Expires> </wsu:Timestamp> <o:UsernameToken> <o:Username>myUsername</o:Username> <o:Password>myPassword</o:Password> </o:UsernameToken> </o:Security> My username and password are correct, I have allready tried to change the expiration date later but that doesn't solve it. What else could be the reason for this fault?

    Read the article

  • Change binding value, not binding itself

    - by Sam
    I've got a WPF UserControl containing a DependencyProperty (MyProperty). The DependencyProperty is bound to a Property in the DataContext. Now in the UserControl I want to change the value of the bound property. But if I assign MyProperty = NewValue the Binding is lost and replaced by NewValue. What I want to achieve is change the DataContext-property the DependencyProperty is bound to. How do I achieve this instead of changing the binding? To clarify: using something like MyTextBox.Text = "0"; I'll release the binding. How would I set Text, leave the binding intact so the property Text is bound to will change, too.

    Read the article

  • Prepared statement help, Number of variables doesn't match number of parameters in prepared statement

    - by Sam Gabriel
    I'm getting this error : Number of variables doesn't match number of parameters in prepared statement every time I run this code: $dbh = new mysqli("localhost", "***", "***", "pics"); $stmt = $dbh->prepare("INSERT INTO comments (username, picture, comment) VALUES (?, ?, ?)"); $stmt->bind_Param('s', $username); $stmt->bind_Param('d', $picture); $stmt->bind_Param('s', $comment); $username=$_SESSION['username']; $picture=$_GET['id']; $comment=$_POST['comment']; $stmt->execute(); What's the problem?

    Read the article

  • Dynamics AX 2009 Report: LabelPosition above does not work?

    - by Sam
    I'm just in the process of changing the SalesInvoice Report. One thing I'm trying to do is show the label of some items not left of the item value but above it instead. Seems easy enough: just change the LabelPosition (for example from CustInvoiceJour_InvoiceId) setting from "left" to "above" and voila: the label has vanished. It is just shown nowhere at all. Strange. I would have expected the label to show up, well, above the content. Not to vanish. Am I missing something (there is no label height to set), or is this functionality broken?

    Read the article

  • Sunspot / Solr full text search - how to index Rails associations

    - by Sam
    Is it possible to index through an association with Sunspot? For example, if a Customer has_many Contacts, I want a 'searchable' block on my Customer model that indexes the Contact#first_name and Contact#last_name columns for use in searches on Customer. acts_as_solr has an :include option for this. I've simply been combining the associated column names into a text field on Customer like shown below, but this doesn't seem very flexible. searchable do text :organization_name, :default_boost => 2 text :billing_address1, :default_boost => 2 text :contact_names do contacts.map { |contact| contact.to_s } end Any suggestions?

    Read the article

  • A good design pattern for almost similar objects

    - by Sam
    Hello, I have two websites that have an almost identical database schema. the only difference is that some tables in one website have 1 or 2 extra fields that the other and vice versa. I wanted to the same Database Access layer classes to will manipulate both websites. What can be a good design pattern that can be used to handle that little difference. for example, I have a method createAccount(Account account) in my DAO class but the implementation will be slightly different between website A and website B. I know design patterns don't depend on the language but FYI i m working with Perl. Thanks

    Read the article

  • How do I impersonate a user with AuthLogic

    - by Sam Saffron
    I need to be able to create a UserSession without having the decrypted password. How do I go about doing this? My current workaround is: In user.rb def valid_crypted_or_non_crypted_password?(password) valid_password?(password) || password == crypted_password end In user_session.rb verify_password_method :valid_crypted_or_non_crypted_password? To login UserSession.create(:login => u.login, :password => u.crypted_password) Is there a nicer way to do this?

    Read the article

  • Replicate UISegmentedControl with UIButtons - iPhone

    - by Sam
    Hi guys, I didnt like the style of UISegmentedControl, hence i tried to change the way it looked, but I couldnt attach images to its buttons. I just didnt change at all. Now i'm looking at how to replicate that function with 4 UIButtons. I've setup 4 UIButtons in interface builder, added different tag numbers to them. What i cannot accomplish is when a button is tapped, it should be "selected" and the other buttons should be Unselected. How can i connect all of them? And if there was a way to change the UISegmented control looks, i would need all this effort. thanks for the help guys this is for iPhone OS

    Read the article

  • How to check if IIS is in 32bit or 64bit mode

    - by Sam
    I'm trying to deploy a site to a 64bit OS. I'm deploying to IIS. The site was developed on a 32bit server. The site deployed correctly however it's trying to access a COM component and that is failing. I believe the error is occurring because the COM component is a 64bit version on the 64bit OS. And IIS is running in 32bit mode on the 64bit server. I'd like to confirm this but I can't seem to find a definitive way to check if IIS is in 32bit mode or 64bit mode. Would someone know the best way to check if IIS is in 64bit or 32bit mode?

    Read the article

  • Get selected Value from dropdownlist after submit?

    - by sam
    Hi guys, I populate dropdownlist in ASP.NET webforms: <asp:DropDownList runat="server" ID="salesman"></asp:DropDownList> users= Buslayer.GetSalesRep(); foreach (userentity user in users) { salesman.Items.Add(new ListItem(user.FirstName + " " + user.LastName, user.UserID.ToString())); } after submission, I am still getting selected index = 0, I tried all of this: Response.Write("" + salesman.SelectedValue); Response.Write("" + salesman.SelectedItem.Value); Response.Write("" + salesman.SelectedIndex); none works, ????????????????????????????? thanks

    Read the article

  • Locating memory leak in Apache httpd process, PHP/Doctrine-based application

    - by Sam
    I have a PHP application using these components: Apache 2.2.3-31 on Centos 5.4 PHP 5.2.10 Xdebug 2.0.5 with Remote Debugging enabled APC 3.0.19 Doctrine ORM for PHP 1.2.1 using Query Caching and Results Caching via APC MySQL 5.0.77 using Query Caching I've noticed that when I start up Apache, I eventually end up 10 child processes. As time goes on, each process will grow in memory until each one approaches 10% of available memory, which begins to slow the server to a crawl since together they grow to take up 100% of memory. Here is a snapshot of my top output: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1471 apache 16 0 626m 201m 18m S 0.0 10.2 1:11.02 httpd 1470 apache 16 0 622m 198m 18m S 0.0 10.1 1:14.49 httpd 1469 apache 16 0 619m 197m 18m S 0.0 10.0 1:11.98 httpd 1462 apache 18 0 622m 197m 18m S 0.0 10.0 1:11.27 httpd 1460 apache 15 0 622m 195m 18m S 0.0 10.0 1:12.73 httpd 1459 apache 16 0 618m 191m 18m S 0.0 9.7 1:13.00 httpd 1461 apache 18 0 616m 190m 18m S 0.0 9.7 1:14.09 httpd 1468 apache 18 0 613m 190m 18m S 0.0 9.7 1:12.67 httpd 7919 apache 18 0 116m 75m 15m S 0.0 3.8 0:19.86 httpd 9486 apache 16 0 97.7m 56m 14m S 0.0 2.9 0:13.51 httpd I have no long-running scripts (they all terminate eventually, the longest being maybe 2 minutes long), and I am working under the assumption that once each script terminates, the memory it uses gets deallocated. (Maybe someone can correct me on that). My hunch is that it could be APC, since it stores data between requests, but at the same time, it seems weird that it would store data inside the httpd process. How can I track down which part of my app is causing the memory leak? What tools can I use to see how the memory usage is growing inside the httpd process and what is contributing to it?

    Read the article

  • Compilation errors for a c api

    - by sam
    What would be the reason for the following errors though the syntax was right and I have included the coreservices framework in which some data type and constants are declared. " c.c:22: error: syntax error before ‘CFFileDescriptorRef’ c.c:22: warning: no semicolon at end of struct or union c.c:24: error: syntax error before ‘}’ token c.c:24: warning: data definition has no type or storage class lipo: can't figure out the architecture type of: /var/folders/fF/fFgga6+-E48RL+iXKLFmAE+++TI/-Tmp-//ccFzQIAj.out "

    Read the article

  • Is there any way to use getaddrinfo() and freeaddrinfo() and still be the program compatible with le

    - by Sam C.
    Hi, in the Winsock2 library getaddrinfo() and freeaddrinfo() was only added in Windows XP and on. I know how to replace them in legacy systems, but a conditional use depending on the Windows version won't help. The application won't start in 9x with a message saying that it was linked to a missing export in WS2_32.dll. I'm using MinGW to compile and link the code and would like to keep using it. Maybe writing those functions by myself? Thank you very much for everything.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >