Search Results

Search found 360 results on 15 pages for 'donald campbell'.

Page 11/15 | < Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >

  • Sax parsing from web service

    - by donald
    Hey, I am trying to parse xml file using Sax parser. let's say xml is like this.. I want to count the number of times b element is present (its variable) And i want this count before parsing, so that I can declare an array of appropriate size. One way is to run count then separately and other way is dynamic array (List Array) Is there any other better way to do this? Also, Is it possible to make an ArrayList of my class..? because I want an array of type myClass.

    Read the article

  • Strange Java Socket Behavior (Connects, but Doesn't Send)

    - by Donald Campbell
    I have a fairly complex project that boils down to a simple Client / Server communicating through object streams. Everything works flawlessly for two consecutive connections (I connect once, work, disconnect, then connect again, work, and disconnect). The client connects, does its business, and then closes. The server successfully closes both the object output stream and the socket, with no IO errors. When I try to connect a third time, the connection appears to go through (the ServerSocket.accept() method goes through and an ObjectOutputStream is successfully created). No data is passed, however. The inputStream.readUnshared() method simply blocks. I have taken the following memory precautions: When it comes time to close the sockets, all running threads are stopped, and all objects are nulled out. After every writeUnshared() method call, the ObjectOutputBuffer is flushed and reset. Has anyone encountered a similar problem, or does anyone have any suggestions? I'm afraid my project is rather large, and so copying code is problematic. The project boils down to this: SERVER MAIN ServerSocket serverSocket = new ServerSocket(port); while (true) { new WorkThread(serverSocket.accept()).start(); } WORK THREAD (SERVER) public void run() { ObjectInputBuffer inputBuffer = new ObjectInputBuffer(new BufferedInputStream(socket.getInputStream())); while (running) { try { Object myObject = inputBuffer.readUnshared(); // do work is not specified in this sample doWork(myObject); } catch (IOException e) { running = false; } } try { inputBuffer.close(); socket.close(); } catch (Exception e) { System.out.println("Could not close."); } } CLIENT public Client() { Object myObject; Socket mySocket = new Socket(address, port); try { ObjectOutputBuffer output = new ObjectOutputBuffer(new BufferedOutputStream(mySocket.getOutputStream())); output.reset(); output.flush(); } catch (Exception e) { System.out.println("Could not get an input."); mySocket.close(); return; } // get object data is not specified in this sample. it simply returns a serializable object myObject = getObjectData(); while (myObject != null) { try { output.writeUnshared(myObject); output.reset(); output.flush(); } catch (Exception e) { e.printStackTrace(); break; } // catch } // while try { output.close(); socket.close(); } catch (Exception e) { System.out.println("Could not close."); } } Thank you to everyone who may be able to help!

    Read the article

  • Hiding an error message div with setTimeout not working using Smarty

    - by Donald
    Hi guys, I'm trying to hide an error message div using a javascript function setTimeout after a specified time but it gives me errors that its a wrong smarty syntax, i've never used smarty before so i would really appreciate it if anyone can help me get up to speed with this syntax My code is as follows {if $error_message != ""} <script type="text/javascript"> setTimeout(function(){$('error').hide(); }, 1000); </script> <div id="error" class='error_message'> {$error_message} </div> {/if} Thanks in advance

    Read the article

  • Rails 3: jQuery form not working.

    - by donald
    Hi, I have jquery working on my Rails app using the gem 'jquery-rails'. I also have a search form working correctly. However, when I add :remote => true the form stops working. <%= form_tag services_path, :method => :get, :remote => true do %> <%= text_field_tag :search, params[:search] %> <%= submit_tag "Search", :name => nil %> </div> <% end %> I have also added a index.js.erb but it has no effect on it. For some reason the :remote = true makes the form to stop working. Any reason why? Thanks

    Read the article

  • Rails 3: Create an instance with 3 foreign keys.

    - by donald
    Hello, Having a reviews table: # Table name: reviews # # id :integer not null, primary key # wsp_id :integer # service_id :integer # user_id :integer # description :text # rating :integer # created_at :datetime # updated_at :datetime # belongs_to :wsp belongs_to :service belongs_to :user How can I create a review for a service and pass the wsp_id and user_id? Do I need to use nested routes? I am able to do @user.reviews.new(params[:review]) but I'm not being able of passing the wsp_id and the service_id. Here's my Reviews create controller. def create @review = current_user.reviews.new(params[:review]) if @review.save #Saved else #Error, not saved end end What am I doing wrong? Thank you!

    Read the article

  • SCORM and the Learning Management System (LMS)

    What actually is SCORM? SCORM, Shareable Content Object Reference Model, is a standard for web-based e-learning that has been developed to define communication between client-side content and a runti... [Author: Stuart Campbell - Computers and Internet - October 05, 2009]

    Read the article

  • How to tell if Microsoft Works is 32 or 64 bit? Please Help!

    - by Bill Campbell
    Hi, I am trying to convert one of our apps to run on Win7 64 bit from XP 32 bit. One of the things that it uses is Excel to import files. It's a little complicated since it was using Microsoft.Jet.OLEDB.4.0 (Excel). I found Office 14 (2010) has a 64bit version I can download. I downloaded Office 2010 Beta but it didn't seem to install Microsoft.ACE.OLEDB.14.0. I found that I could download 2010 Office System Driver Beta: Data Connectivity Components which has the ACE.OLEDB.14 in it but when I try to install it, the installed tells me "You cannot install the 64-bit version of Access Database engine for Microsoft Office 2010 because you currently have 32-bit Office products installed". How do I determine what 32bit office products this is reffering to? My Dell came with Microsoft Works installed. I don't know if this is 32 or 64 bit. Is there anyway to tell? I don't want to uninstall this if it's not the problem and I'm not sure what else might be the problem. Any help would be appreciated! thanks, Bill

    Read the article

  • Persistent Issues on small business network using Cisco 871W and Catalyst Express 500

    - by Ben Campbell
    Being the most qualified (read: still not qualified) to solve our persistant network issues, I've turned to serverfault for guidance. I've done some searching, reading related documentation on cisco.com and tried a bit of troubleshooting. Here is the config: 100mb synchronous connection from a business internet provider (tested multiple times at 100meg at the source) Cisco 871W wireless point & router is where the WAN connection starts (this serves all our wireless). The only wired connection in the 871W is the Catalyst switch listed below. Cisco Catalyst Express 500 (24TT) is where all the wired connections terminate. About 20 Windows workstations and servers (AD/Webservers only). Some services in EC2 including mail and other web servers/apps. I've been TOLD cabling internally should be gigabit-ready. Here are the problems: generally slow download rates from the internet to the desktop/laptop frequent "page cannot be displayed" errors in browsers-sometimes 3 or 4 reloads are necessary... often times CSS wont load or other content requiring the browser to connect to a different server. slow speed within the LAN from workstation to workstation copying files. I would expect extremely fast data transfer workstation to workstation / server to workstation in this simple network. Several things I need to admit: I'm not primarily a network guy. Funding is relatively low, I need to be the guy that finds the solution. I understand most of the terminology and most of the technology. Implementation is where I fail due to lack of experience. Getting to the point: I'm wondering whether experienced network admins think that our small network should be sufficiently served with our current hardware if configured properly... or if we should purchase new equipment and start fresh? If starting fresh is the plan, whatever that new equipment may be is a likely different question entirely. If I haven't provided enough information, I will happily do some troubleshooting and update with the results. I have experience using wireshark and some other tools. Please let me know what you think would be most helpful and thanks in advance. EDIT: I forgot to add that the Cisco applicance will not finish loading the SDM Express console. It hangs every time at the "populating modules... DHCP". It eventually crashes and closes. I've rebooted the hardware and this still happens.

    Read the article

  • How to set a key combination as a browser toolbar shortcut?

    - by Ian Campbell
    For example, I so often clear my browser history with CTRL+SHIFT+DEL. While this is easy enough, I'd like to take it a step further and have a shortcut in my browser's toolbar that when clicked executes the above-mentioned key combination, something like this: Is this directly possible, or would it require creating a plugin? If it would require creating a plugin, how might that be done? p.s. — I'm using Firefox, but it would be awesome if there was a browser-independent solution.

    Read the article

  • IIS 7.5 on Windows Server 2008 R2 refusing to create PASSIVE MODE FTP connections

    - by Campbell
    I'm attempting to get an FTP client written in perl to transfer files from an IIS 7.5 FTP server using passive mode. I've configured the FTP server as per instructions and have also configured Windows Firewall to allow this type of traffic. I have validated that the firewall is behaviong correctly by checking to ensure there are no blocked packets in the logs. I have verified the that FTP control channel is being opened on Port 21. I believe the client is being told by IIS which port to connect on for passive mode and IIS is refusing to allow this connection. The perl log looks like: C:\cygwin\Perl\lib\FMT>perl FTPTest.pl Net::FTP>>> Net::FTP(2.77) Net::FTP>>> Exporter(5.64_01) Net::FTP>>> Net::Cmd(2.29) Net::FTP>>> IO::Socket::INET(1.31) Net::FTP>>> IO::Socket(1.31) Net::FTP>>> IO::Handle(1.28) Net::FTP=GLOB(0x20abac0)<<< 220 Microsoft FTP Service Net::FTP=GLOB(0x20abac0)>>> USER ftpuser Net::FTP=GLOB(0x20abac0)<<< 331 Password required for ftpuser. Net::FTP=GLOB(0x20abac0)>>> PASS .... Net::FTP=GLOB(0x20abac0)<<< 230 User logged in. Net::FTP=GLOB(0x20abac0)>>> CWD /Logs Net::FTP=GLOB(0x20abac0)<<< 250 CWD command successful. Net::FTP=GLOB(0x20abac0)>>> PASV Net::FTP=GLOB(0x20abac0)<<< 227 Entering Passive Mode (xx,xxx,xxx,xxx,160,41). Net::FTP=GLOB(0x20abac0)>>> RETR filename.txt Can't use an undefined value as a symbol reference at C:/Utilities/strawberryper l/perl/lib/Net/FTP/dataconn.pm line 54. IIS logs look as follows: 2010-10-02 17:40:06 xx.xxx.xx.xx - yy.y.yy.yy ControlChannelOpened - - 0 0 27a48c9b-9dce-4770-8bcf-fc89f2569b1a - - 2010-10-02 17:40:06 xx.xxx.xx.xx - yy.y.yy.yy USER ftpuser 331 0 0 27a48c9b-9dce-4770-8bcf-fc89f2569b1a - - 2010-10-02 17:40:06 xx.xxx.xx.xx MACHINENAME\ftpuser yy.y.yy.yy PASS *** 230 0 0 27a48c9b-9dce-4770-8bcf-fc89f2569b1a / - 2010-10-02 17:40:06 xx.xxx.xx.xx MACHINENAME\ftpuser yy.y.yy.yy CWD /Logs 250 0 0 27a48c9b-9dce-4770-8bcf-fc89f2569b1a /Logs - 2010-10-02 17:40:06 xx.xxx.xx.xx MACHINENAME\ftpuser yy.y.yy.yy PASV - 227 0 0 27a48c9b-9dce-4770-8bcf-fc89f2569b1a - - 2010-10-02 17:40:27 - MACHINENAME\ftpuser zz.z.zz.zzz 41001 DataChannelClosed - - 64 0 27a48c9b-9dce-4770-8bcf-fc89f2569b1a - - 2010-10-02 17:40:27 xx.xxx.xx.xx MACHINENAME\ftpuser yy.y.yy.yy ControlChannelClosed - - 64 0 27a48c9b-9dce-4770-8bcf-fc89f2569b1a - - 2010-10-02 17:40:27 xx.xxx.xx.xx MACHINENAME\ftpuser yy.y.yy.yy RETR filename.txt 550 1236 0 27a48c9b-9dce-4770-8bcf-fc89f2569b1a filename.txt - We've managed to see this issue with other FTP clients also, I don't think its something funny in Perl. I've been informed that this works fine in the IIS 6 FTP server. I'm wondering if there is something we're missing here.

    Read the article

  • Font for Wine that supports the entire character set of the Win32 Console?

    - by Brian Campbell
    I would like to be able to display in the Wine console all characters that the Win32 console can display. I've written a small test program to print out all 8-bit characters: #include <stdio.h> int main(int argc, char *argv[]) { int i, j; for (i = 0; i <= 0xF0; i+=0x10) { for (j = i; j <= i + 0x0F; ++j) printf("%2x:%c", j, (char)j); printf("\n"); } getchar(); return 0; } Under Wine, the best I can do so far is using Andale Mono: While this is what I see on Windows Server 2008: Is there anywhere I can legally download a font that will allow me to view all of those characters under Wine? edit I've found a set of DOS fonts that includes a CP437 font, which should cover the character set I'm interested in. However, even if I install this font, wineconsole doesn't seem to recognize it. Is there any way I can get wineconsole to use this font, or convert this font to a format that wineconsole can use? Or is there any way I can extract fonts from DOSEMU for use in Wine? Oh, and I should probably mention that I'm on Mac OS X 10.6.2, installing Wine via MacPorts, using the wine-devel package. more information I have tried installing some console fonts that should cover the full character set as Mac OS X fonts (such as the NewDOS font listed above, and a font I tried converting from the fonts supplied by DOSEMU). Wine does not seem to pick up on new fonts installed in Mac OS X. Is there a way to register new fonts I've installed with Wine? Would manually editing the system.reg file that seems to contain font mappings work, or is there something else I'd need to do? bump Bounty ends soon, I'm still looking for an answer for this. Does anyone use the Wine console for complex text user interfaces?

    Read the article

  • What does the arxiv.org anti-bot "search and destroy" actually do?

    - by Brian Campbell
    The lanl.arxiv.org math and scientific preprint service (formerly known as xxx.lanl.gov) has a strict policy against bots that ignore its robots.txt, Robots Beware. On that page, the have a link labelled with "Click here to initiate automated 'seek-and-destroy' against your site", which is forbidden by their robots.txt but presumably badly behaved robots will follow it, and reap the consequences. The question, what are the actual consequences? I have never had the guts to actually click on that link to see what it does. What can they be doing that is both effective and legal?

    Read the article

  • How can I install a Windows 8 application for another user and pin it on their Start screen?

    - by Simon Campbell
    I am trying to create a locked down Windows 8 account using Group Policies with no tiles on the start screen except for one for the purposes of a Kiosk PC. How can I (as an administrator account) install a custom application (side-loading) for another user and pin it to their start menu? This application is still in development so will need to be updated frequently on the locked account for testing.

    Read the article

  • Root cause for high CPU usage; which measurement to trust more: Windows Task Manager or Process Explorer?

    - by p.campbell
    Consider this Windows 8.1 machine (in-place upgrade from Windows 8) with differing reports on its CPU usage. The machine is idle, and has been for 3 days. There are no CPU intensive tasks running currently nor over the 3 day idle period. Windows Task Manager is reporting CPU usage constantly at an incredibly high value (and increasing over time!) at around 75%. Process Explorer from SysInternals reports that the CPU usage is much different at around 42% How does Process Explorer report 42.14% usage, but its columns report Idle at 57%, with the sum of the other processes not even approaching 10%? Which of these two values should I trust more, and why should it be trusted over the other measurement? How can I actually determine which process is causing Task Manager to report its values? These Proc Exp metrics were taken with Administrator privileges, and with option 'Show Details for All Processes' Click for larger view:

    Read the article

  • New Book! SQL Server 2012 Integration Services Design Patterns!

    - by andyleonard
    SQL Server 2012 Integration Services Design Patterns has been released! The book is done and available thanks to the hard work and dedication of a great crew: Michelle Ufford ( Blog | @sqlfool ) – co-author Jessica M. Moss ( Blog | @jessicammoss ) – co-author Tim Mitchell ( Blog | @tim_mitchell ) – co-author Matt Masson ( Blog | @mattmasson ) – co-author Donald Farmer ( Blog | @donalddotfarmer ) – foreword David Stein ( Blog | @made2mentor ) – technical editing Mark Powers – editing Jonathan Gennick...(read more)

    Read the article

  • Best way to implement an AI for Dominion? [on hold]

    - by j will
    I'm creating a desktop client and server backend for the game, Dominion, by Donald X. Vaccarino. I've been reading up on AI techniques and algorithms and I just wanted to what is the best way to implement an AI for such a game? Would it better to look at neural networks, genetic algorithms, decision trees, fuzzy logic, or any other methodology? For those who do not know how Dominion works, check out this part of the wikipedia article: http://en.wikipedia.org/wiki/Dominion_(card_game)#Gameplay

    Read the article

  • MVC Partial View to Call Display Pop-up window using jquery

    - by Gavin campbell
    Hi I have a index page the renders objects from my database as a treeview, each item has a link href="/MessageGroupType/Edit/1002 that makes an Ajax call to display a partial view in a DIV. Within the partial view there is a delete button which calls my controller to delete the item. However, i do a check to make sure the item can be deleted, if the item cant be deleted then i wish a pop-up to appear back on the edit form telling the user they cant delete this record. In my Edit partial view i have the following code " type="text/javascript" $(function() { $("#dialog").dialog(); }); <% if (Boolean.Parse(ViewData["DisplayWindow"].ToString())){% This Mesage group Type Cannot be deleted as is linked to other message group Types <% }% So my main questions are Can i make a reference to a javascript script within my Partial View (i dont want my master page to be called on the partial view) When i dynamically load the partial view data into my DIV - can i then after calling my controller insert another DIV into the first DIV. I am i doing this the wrong way - so any pointers is appreciated Cheers

    Read the article

  • How do I correctly Re-render a Recaptcha in ASP.NET MVC 2 after an AJAX POST

    - by Eoin Campbell
    Ok... I've downloaded and implemented this Recaptcha implementation for MVC which uses the ModelState to confirm the validity of the captcha control. It works brilliantly... except when I start to use it in an AJAX Form. In a nutshell, when a div is re-rendered with AJAX, the ReCaptcha that it should contain does not appear, even though the relevant <scripts> are in the source after the partial render. Code Below. using (Ajax.BeginForm("CreateComment", "Blog", new AjaxOptions() { HttpMethod = "POST", UpdateTargetId = "CommentAdd", OnComplete="ReloadRecaptcha", OnSuccess = "ShowComment", OnFailure = "ShowComment", OnBegin = "HideComment" })) {%> <fieldset class="comment"> <legend>Add New Comment</legend> <%= Html.ValidationSummary()%> <table class="postdetails"> <tbody> <tr> <td rowspan="3" id="blahCaptcha"> <%= Html.CreateRecaptcha("recaptcha", "blackglass") %> </td> .... Remainder of Form Omitted for Brevity I've confirmed the Form is perfectly functional when the Recaptcha Control is not present and the Javascript calls in the AjaxOptions are all working fine. The problem is that if the ModelState is Invalid as a result of the Recaptcha or some other validation, then the ActionResult returns the View to reshow the form. [RecaptchaFilter(IgnoreOnMobile = true)] [HttpPost] public ActionResult CreateComment(Comment c) { if (ModelState.IsValid) { try { //Code to insert Comment To DB return Content("Thank You"); } catch { ModelState.AddRuleViolations(c.GetRuleViolations()); } } else { ModelState.AddRuleViolations(c.GetRuleViolations()); } return View("CreateComment", c); } When it's InValid and the form posts back, for some reason the ReCaptcha Control does not re-render. I've checked the source and the <script> & <noscript> blocks are present in the HTML so the HTML Helper function below is obviously working <%= Html.CreateRecaptcha("recaptcha", "blackglass") %> I assume this has something to do with scripts injected into the DOM by AJAX are not re-executed. As you can see from the HTML snippet above, I've tried to add an OnComplete= javascript function to re-create the Captcha on the client side, but although the script executes with no errors, it doesn't work. OnComplete Function is. function ReloadRecaptcha() { Recaptcha.create("my-pub-key", 'blahCaptcha', { //blahCaptcha is the ID of the <td> where the ReCaptcha should go. theme: 'blackglass' }); } Can anyone shed any light on this ? Thanks, Eoin C

    Read the article

  • VS2010 MSTest CruiseControl.NET .NET 3.5

    - by Bill Campbell
    Hi, We're in the process of upgrading from VS2008 to VS2010 since it's now released. We are using CC.NET along with MSTest and want to use MS coverage tool instead of NCover. Interestingly, as I've seen others talking about as well, when you upgrade your project from VS2008 to VS2010 your Test Projects get converted to .NET 4. Nice move!! So WTF does one do with their CI environment in order to build this stuff (some projects in .net 3.5, some in .net 4 - these are different FRAMEWORKS!) LOL!!! It seems that I might need to have my CC.NET build two separate projects? - not sure about how to run the units tests from cruise with .net 4. Has anyone done this and have a snippet of their config they might share? And I thought this was going to be a simple thing. :( thanks! Bill44077

    Read the article

  • MySQL Interview Questions

    - by Campbell
    Hi, I've been asked to screen some candidates for a MySQL DBA / Developer position for a role that requires an enterprise level skill set. I myself am a SQL Server person so I know what I would be looking for from that point of view with regards to scalability / design etc but is there anything specific I should be asking with regards to MySQL? I would ideally like to ask them about enterprise level features of MySQL that they would typically only use when working on a big database. Need to separate out the enterprise developers from the home / small website kind of guys. Thanks.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >