Search Results

Search found 1494 results on 60 pages for 'automation'.

Page 28/60 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • Passing a paramter/object to a ruby unit/test before running it using TestRunner

    - by Nahir Khan
    I'm building a tool that automates a process then runs some tests on it's own results then goes to do some other stuff. In trying to clean up my code I have created a separate file that just has the test cases class. Now before I can run these tests, I have to pass the class a couple of parameters/objects before they can be run. Now the problem is that I can't seem to find a way to pass a parameter/object to the test class. Right now I am thinking to generate a Yaml file and read it in the test class but it feels "wrong" to use a temporary file for this. If anyone has a nicer solution that would be great! *********Edit******* Example Code of what I am doing right now: #!/usr/bin/ruby require 'test/unit/ui/console/testrunner' require 'yaml' require 'TS_SampleTestSuite' automatingSomething() importantInfo = getImportantInfo() File.open('filename.yml', 'w') do |f| f.puts importantInfo.to_yaml end Test::Unit::UI::Console::TestRunner.run(TS_SampleTestSuite) Now in the example above TS_SampleTestSuite needs importantInfo, so the first "test case" is a method that just reads in the information from the Yaml file filname.yml. I hope that clears up some confusion.

    Read the article

  • Save Xml in an Excel cell value causes ComException

    - by mas_oz2k1
    I am trying to save an object (Class1) as string in a cell value. My issue is that from time to time I have a ComException: HRESULT: 0x8007000E (E_OUTOFMEMORY) (It is kind of random but I have not identified any particular pattern yet) when I write the value into a cell. Any ideas will be welcome For illustration purposes: Let Class1 be the class to be converted to an Xml string. (Notice that I removed the xml declaration at the start of the string to avoid having the preamble present- non printable character) <Class1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" <ElementID HL690375</ElementID </Class1" Class1 myClass = new Class1(); this class is converted to a string s. s= ConvertObjectToXmlString(myClass); then s is assigned to a cell Range r = Application.ActiveCell; r.Value2 = s; Note: (1) If the string is too big, I limit it to 32000 chars and split the string in chunks of 32000 chars and save the chunks in multiple cells. (2) I do not to quote the string before adding to a cell. Do I need to? If so how it can be done? (3) All object contents are English. (4) C# code sample will be great but VB.net code is OK.

    Read the article

  • How to control Chrome browser from an NUnit test?

    - by Lucas Meijer
    What is the easiest way to control Chrome (pc/mac) from an NUnit test? Things I want it to do: Use a proxy server I specify not bring up any dialog boxes that need to be clicked. open a url I specify close With firefox I can do all these things by writing out a temp firefox profile, and telling firefox to use it. If someone knows an answer to this question for IE, I'd also love to hear about it.

    Read the article

  • python django automated data addition

    - by zubin71
    I have a script which reads data from a csv file. I need to store the data into a database which has already been created as $ python manage.py syncdb so, that automated data entry is possible in an easier manner, as available in the django shell.

    Read the article

  • VS 2008 Open Word Document - Memory Error

    - by Lord Darkside
    I am executing the following code that worked fine in a vs2003(1.1) but seems to have decided otherwise now that I'm using vs2008(2.0/3.5): Dim wordApp As Microsoft.Office.Interop.Word.Application Dim wordDoc As Microsoft.Office.Interop.Word.Document missing = System.Reflection.Missing.Value wordApp = New Microsoft.Office.Interop.Word.Application() Dim wordfile As Object wordfile = "" ' path and file name goes here wordDoc = wordApp.Documents.Open(wordfile, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing) The error thrown when the Open is attempted is : "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Does anyone have any idea how to correct this?

    Read the article

  • how to get current date and time in command line

    - by Ieyasu Sawada
    I am using mysqldump to backup mysql database. Now I just need to use the current date and time as file name for the generated sql file. How do I do that if my current code looks like this: mysqldump -u root -p --add-drop-table --create-options --password= onstor >c:\sql.sql I also found this code from this site, but I do not know how to incorporate it in my current code: @echo off For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b) echo %mydate%_%mytime% Please help, thanks:)

    Read the article

  • How do you fix "Too many open files" problem in Hudson?

    - by Randyaa
    We use Hudson as a continuous integration system to execute automated builds (nightly and based on CVS polling) of a lot of our projects. Some projects poll CVS every 15 minutes, some others poll every 5 minutes and some poll every hour. Every few weeks we'll get a build that fails with the following output: FATAL: java.io.IOException: Too many open files java.io.IOException: java.io.IOException: Too many open files at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) The next build always worked (with 0 changes) so we always chalked it up to 2 build jobs being run at the same time and happening to have too many files open during the process. This weekend we had a build fail Friday night (automatic nightly build) with the message and every other nightly build also failed. Somehow this triggered Hudson to continuously build every project which failed until the issue was resolved. This resulted in a build every 30 minutes or so of every project until sometime Saturday night when the issue magically disappeared.

    Read the article

  • How to make System command calls in Java/Groovy?

    - by Zombies
    What I want to do is invoke maven from a groovy script. The groovy script in question is used as a maven wrapper to build J2EE projects by downloading a tag and invoking maven on what was downloaded. How should I accomplish invoking maven to build/package the EAR (the groovy script is already capable of downloading the tag from SCM).

    Read the article

  • To be a lazy developer or not to be a lazy developer?

    - by JamesStuddart
    Am I a lazy developer? Is it being lazy to use automated tools, such as code generators and such? Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities. I also use Resharper and I would say it fights with MSDeploy as to which gets installed first after Visual Studio. Again if I had to, I could code without it, but prefer not to. Both these tools from my point of view are no brainers as they improve output massively. But is this lazy? I'm sure there are purists out there that would say everything should be wirtten by you so you know what everything is doing, but if you can read through the code and see what is happening is that ok? So am I being lazy or am I just using all the cards in my hand?

    Read the article

  • Propel automatic form

    - by martin.malek
    Hi, I'm just starting with Propel and for more rapid development I'm curious if there is anything like automatic forms. Something like default administration in Django. I want to be able to output a form or to get all information I'll need. Even in the objects I didn't find all information which should be necessary to have everything for the form (name, type, length, related object, etc).

    Read the article

  • Is there a browser-agnostic way to detect client-side script errors with Watin?

    - by Michael
    We're using WatiN to test our web portals. During the course of an E2E test, we'll occasionally see client-side script errors on the IE status bar. I'd like to chain a handler onto the script error event and record the error for later analysis and bug filing. Problem is, I don't know that there's a global script error event or how to chain into it. And if there's not a browser-agnostic way to accomplish this, I can create MyIE and MyFF subclasses but then this becomes two browser-specific questions. In essence, I'm thinking of something like this entirely made-up call: browser.ScriptEngine.SetCustomErrorHandler(LogScriptingError); ... where LogScriptErrors is my code that does the obvious. Many of our client-side scripting errors don't necessarily prevent the test from continuing (a pretty UI element didn't animate, for example, but the underlying form is still submittable), so I'd like to log the error and forge ahead in most cases.

    Read the article

  • Tool to convert inline C' into a code behind

    - by Jon Jones
    Hi I have a number of legacy web controls (ascx) that contains huge amounts of inline C#. The forms contain a number of repeated and duplicate code. Our first plan is to move the code into code behinds per file, then refactor etc... were doing this to upgrade the client to the latest version of their cms At the moment we are going to have to manually copy and paste hundreds files, convert the namespace client-side imports into usings, etc... does anybody PLEASE know of a tool that can do the majority of this work for us ? Thanks

    Read the article

  • How to auto-deploy web-app

    - by Frankie
    Hello, I'm trying to make sense on the best way to do automatize a series of things in a row in order to deploy a web-app and haven't yet came up with a suitable solution. I would like to: use google's compiler.jar to minify my JS use yahoo's yui-compressor.jar to minify my CSS access a file and change a string so that header files like "global.css?v=21" get served the correct version deploy the app (sftp, mercurial or rsync?) omitting certain directories like "/userfiles" Can you guys put me on the right track to solve this? Thank you!

    Read the article

  • How to programmatically deactivate the AirPort?

    - by mystify
    I want to make a small utility to programmatically deactivate the AirPort of my mac. I have networking problems which couldnt be resolved by expensive experts. I need to deactivate and reactivate the mac AirPort once every half hour. So a little utility which does that automatically would be great. I think I wouldn't need an UI for this either. Just the most simple possible kind of application to automatically stop and start the AirPort. Maybe even apple automator code?

    Read the article

  • Changing keyboard layout on application focus

    - by Anonymous Coward
    Hi Everyone As everybody knows the en-US Keyboard-layout is the best one for programming. So I'd like to use it in my IDEs. But since I live in a non-en-US country I need the de-CH layout for all other applications. Now I wonder if it is possible to set the layout depending to which application currently has the focus. If that is possible, can a human brain adapt to such a behaviour or is it just confusing? cheers, AC

    Read the article

  • How can I execute a bunch of editor commands stored in a file in VIM?

    - by LES2
    I have read the other posts, e.g., http://stackoverflow.com/questions/1830886/vim-executing-a-list-of-editor-commands and others. The answer isn't clear to me for my case. I have some editor commands that I generated from an SQL query. It uses :s/foo/bar to change country codes (from FIPS to a non-standard code set). Here's a sample of the file: :s/CB/CAMBO :s/CQ/NMARI :s/KV/KOSOV :s/PP/PAPUA ... I have saved that in a file called fipsToNonStd.vim (unsure about the correct extension). I want to run those commands one after another. What's the easiest way to do so? Thanks a bunch! SO Rocks!

    Read the article

  • How to create a zip file in the same format as the Finder's "Compress" menu item?

    - by benzado
    On Mac OS X, you can create a zip archive from the Finder by selecting some files and selecting "Compress" from the contextual menu or the File menu. Unfortunately, the resulting file is not identical to the archive created by the zip command (with the default options). This distinction matters to at least one service operated by Apple, which fails to accept archives created with the zip command. Having to create archives manually is preventing me from fully automating my release build process. How can I create a zip archive in the correct format within a shell script?

    Read the article

  • Getting a CFG form the CFL

    - by Kristian
    Can Any One explain this Language how we converted to CFG Give a CFG for the CFL: {ai bj ck | i ? j or j ? k } //ai mean a^i I have the answer but I need an explaination (Step By Step) The answer : S --> S1|S2 S1 --> A Eab|Eab B|S1 c A --> a|aA B--> b|bB Eab --> Q|a Eab b S2 --> Eac C|A Eac C --> c|cC Eac --> Q|B|a Eac c

    Read the article

  • ASP.NET URL Re-writing; Is this possible?

    - by James Evans
    My app is currently written to accept vendor and product information like this. http://www.mydomain.com/foo.aspx?v=1&p=100 could this be re-written like this? http://www.mydomain.com/1/100/foo Since the values in the original query string are database IDs, how would I express newly created IDs as segments of the "path" in the re-written version of the URL? My goal would be to create more of an automated solution that would accomplish this. EDIT: The app is written using ASP.NET webforms, .NET 4.0 and IIS 7

    Read the article

  • Copying MYSQL backup to another server

    - by Yeti
    I'm new to SSH. How to copy a .gz file from one server to another using SSH? I'm using cron to backup mysql databases and want to also automate the process of copying the .gz files a different web host. Any information on the limit of file size that can be copied would also be great. The backup file size range from 100 MB to few GB.

    Read the article

  • How do I create and send appointments to Microsoft Outlook calender?

    - by Shyju
    I am trying to create an appointment in the Microsoft Outlook (2003) calender of another person using the below code.While running this program, The Appointment is getting saved in my calender.But not being sent to the recipient. try { Microsoft.Office.Interop.Outlook.Application app = null; Microsoft.Office.Interop.Outlook.AppointmentItem appt = null; app = new Microsoft.Office.Interop.Outlook.Application(); appt = (Microsoft.Office.Interop.Outlook.AppointmentItem)app .CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem); appt.Subject = "Meeting "; appt.Body = "Test Appointment body"; appt.Location = "TBD"; appt.Start = Convert.ToDateTime("12/23/2009 05:00:00 PM"); appt.Recipients.Add("[email protected]"); appt.End = Convert.ToDateTime("12/23/2009 6:00:00 PM"); appt.ReminderSet = true; appt.ReminderMinutesBeforeStart = 15; appt.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh; appt.BusyStatus = Microsoft.Office.Interop.Outlook.OlBusyStatus.olBusy; appt.Save(); appt.Send(); } catch (COMException ex) { Response.Write(ex.ToString()); } Am i missing anything? Can any one help me out to solve this issue?

    Read the article

  • .Net/C# Build Tool - Is NAnt a preferred tool?

    - by Olle
    I'm about to set up an automatic build of a .net/C# project. I've searched the net quite a bit, and there are a lot of references to this tool called 'NAnt'. My questions are: Is NAnt considered a good tool for this, is it still used? Are there other toos that are the de facto standard for such a task? From the information on the projects's sourceforge page, it doesn't seem to have been much development going on the lates years. The same applies to the NAntContrib project. Thanks!

    Read the article

  • reading from HTML nad inserting in form

    - by purushottam
    I have to read the content from HTML file and then the parameters for different heading should be entered into the form in php and then i need to save the page and submit it so that it will be saved in the databse. I need to automate this whole process since i have approx 2000 HTML files which should be read and should be entered in a form in PHP. Do you have any idea about any tool which can help in this process. small idea will be also helpful. Note : i can not enter the contents from HTML directly into the databse from back end since there are many fields which are getting auto generated when i am saving and submitting the form. thanks in advance.

    Read the article

  • jQuery - How to animate click function without clicking (Slide-show like) - Is this possible?

    - by iamtheratio
    Hello, I have created a jQuery script (with help) that works great however I need it to automate/animate itself without using the click function, I just want to know is this possible and if so, how? Similar to a slide-show. Basically the code allows me to click on an image and hide/show a DIV, while changing a list of elements such as class/id name. Here's my code: JQUERY: jQuery(document).ready(function(){ //if this is not the first tab, hide it jQuery(".imgs:not(:first)").hide(); //to fix u know who jQuery(".imgs:first").show(); //when we click one of the tabs jQuery(".img_selection a").click(function(){ //get the ID of the element we need to show stringref = jQuery(this).attr("href").split('#')[1]; // adjust css on tabs to show active tab $('.img_selection a').removeAttr('id'); // remove all ids $(this).attr('id', this.className + "_on") // create class+_on as this id. //hide the tabs that doesn't match the ID jQuery('.imgs:not(#'+stringref+')').hide(); //fix if (jQuery.browser.msie && jQuery.browser.version.substr(0,3) == "6.0") { jQuery('.imgs#' + stringref).show(); } else //display our tab fading it in jQuery('.imgs#' + stringref).show(); //stay with me return false; }); });

    Read the article

  • Incremental build with continuous integration server

    - by altern
    Does any of the continuous integration servers support incremental builds or filtering mechanism? For example, I want to configure some kind of filtering (as I call it) so that committing file to the specific folder will not cause full (clean) build triggering, but will cause only incremental build. By 'incremental build' I mean process that will put only committed files to the required place and all application would not need to be rebuilt from scratch. Working with images is good example of the case when we need such filtering and thus incremental builds: why do we need to rebuild whole application if only images have been changed? What we need to do is just place images to the dedicated place on server.

    Read the article

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