Search Results

Search found 5456 results on 219 pages for 'named pipes'.

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

  • Issues with "There is already an object named 'xxx' in the database'

    - by Hoser
    I'm fairly new to SQL so this may be an easy mistake, but I haven't been able to find a solid solution anywhere else. Problem is whenever I try to use my temp table, it tells me it cannot be used because there is already an object with that name. I frequently try switching up the names, and sometimes it'll let me work with the table for a little while, but it never lasts for long. Am I dropping the table incorrectly? Also, I've had people suggest to just use a permanent table, but this database does not allow me to do that. create table #RandomTableName(NameOfObject varchar(50), NameOfCounter varchar(50), SampledValue decimal) select vPerformanceRule.ObjectName, vPerformanceRule.CounterName, Perf.vPerfRaw.SampleValue into #RandomTableName from vPerformanceRule, vPerformanceRuleInstance, Perf.vPerfRaw where (ObjectName like 'Processor' AND CounterName like '% Processor Time') OR(ObjectName like 'System' AND CounterName like 'Processor Queue Length') OR(ObjectName like 'Memory' AND CounterName like 'Pages/Sec') OR(ObjectName like 'Physical Disk' AND CounterName like 'Avg. Disk Queue Length') OR(ObjectName like 'Physical Disk' AND CounterName like 'Avg. Disk sec/Read') OR(ObjectName like 'Physical Disk' and CounterName like '% Disk Time') OR(ObjectName like 'Logical Disk' and CounterName like '% Free Space' AND SampleValue > 70 AND SampleValue < 100) order by ObjectName, SampleValue drop table #RandomTableName

    Read the article

  • Better Way To Use C++ Named Parameter Idiom?

    - by Head Geek
    I've been developing a GUI library for Windows (as a personal side project, no aspirations of usefulness). For my main window class, I've set up a hierarchy of option classes (using the Named Parameter Idiom), because some options are shared and others are specific to particular types of windows (like dialogs). The way the Named Parameter Idiom works, the functions of the parameter class have to return the object they're called on. The problem is that, in the hierarchy, each one has to be a different class -- the createWindowOpts class for standard windows, the createDialogOpts class for dialogs, and the like. I've dealt with that by making all the option classes templates. Here's an example: template <class T> class _sharedWindowOpts: public detail::_baseCreateWindowOpts { public: /////////////////////////////////////////////////////////////// // No required parameters in this case. _sharedWindowOpts() { }; typedef T optType; // Commonly used options optType& at(int x, int y) { mX=x; mY=y; return static_cast<optType&>(*this); }; // Where to put the upper-left corner of the window; if not specified, the system sets it to a default position optType& at(int x, int y, int width, int height) { mX=x; mY=y; mWidth=width; mHeight=height; return static_cast<optType&>(*this); }; // Sets the position and size of the window in a single call optType& background(HBRUSH b) { mBackground=b; return static_cast<optType&>(*this); }; // Sets the default background to this brush optType& background(INT_PTR b) { mBackground=HBRUSH(b+1); return static_cast<optType&>(*this); }; // Sets the default background to one of the COLOR_* colors; defaults to COLOR_WINDOW optType& cursor(HCURSOR c) { mCursor=c; return static_cast<optType&>(*this); }; // Sets the default mouse cursor for this window; defaults to the standard arrow optType& hidden() { mStyle&=~WS_VISIBLE; return static_cast<optType&>(*this); }; // Windows are visible by default optType& icon(HICON iconLarge, HICON iconSmall=0) { mIcon=iconLarge; mSmallIcon=iconSmall; return static_cast<optType&>(*this); }; // Specifies the icon, and optionally a small icon // ...Many others removed... }; template <class T> class _createWindowOpts: public _sharedWindowOpts<T> { public: /////////////////////////////////////////////////////////////// _createWindowOpts() { }; // These can't be used with child windows, or aren't needed optType& menu(HMENU m) { mMenuOrId=m; return static_cast<optType&>(*this); }; // Gives the window a menu optType& owner(HWND hwnd) { mParentOrOwner=hwnd; return static_cast<optType&>(*this); }; // Sets the optional parent/owner }; class createWindowOpts: public _createWindowOpts<createWindowOpts> { public: /////////////////////////////////////////////////////////////// createWindowOpts() { }; }; It works, but as you can see, it requires a noticeable amount of extra work: a type-cast on the return type for each function, extra template classes, etcetera. My question is, is there an easier way to implement the Named Parameter Idiom in this case, one that doesn't require all the extra stuff?

    Read the article

  • SQL 2008/2005 Hosting :: Error - “Named Pipes Provider, error: 40 – Could not open a connection to SQL Server”

    - by mbridge
    When setting up a Microsoft Windows Server 2008 system, I went through the motions to set up IIS, MS SQL Server 2008, and Visual Studio 2010 to use as a test-bed. One of the immediate benefits of setting up such a system is that most development can be done remotely: MS SQL Server Management Studio, Visual Studio’s Web development suite, as well as file shares, remote desktop, etc, make for a great way to remotely develop in ‘pristine’ conditions. But there are drawbacks, too, such as needing to deal with firewall issues, not being able to penetrate past a router or the requirement of setting up a VPN. One of the problems I encountered when trying to remote into the MS SQL Server 2008 that I’d set up was the following error: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server I followed the below steps, and was able to connect to the server after just a few moments of tinkering: 1. From the server in question, surf to this Microsoft article, and download and install the Firewall rules modification program. Never drop your firewall, even on a development machine, unless you have a really good reason to. 2. Launch SQL Server Configuration Manager. Navigate to SQL Server Network Configuration, then Protocols for your server name. Enable TCP/IP and Named Pipes by right-clicking and choosing Enable for each given Protocol Name. 3. Restart the SQL Server service from Services (or from command line, subsequently run “net stop mssqlserver” then “net start mssqlserver”. 4. Try your remote connection once more, and you should be able to connect. It’s not a terribly difficult concept, but one of the more challenging tasks developers face is dealing with environment setup. And while there is a certain blurred-line overlap between software development and server administration, sometimes the latter is daunting, especially given that you might set up only a handful of servers during your career.

    Read the article

  • No Persistence provider for EntityManager named ...

    - by Robert A Henru
    I have my persistence.xml with the same name, using toplink, under META-INF directory. Then I have my code calling it with... EntityManagerFactory emfdb = Persistence.createEntityManagerFactory("agisdb"); Yet, I got the following error message 2009-07-21 09:22:41,018 [main] ERROR - No Persistence provider for EntityManager named agisdb javax.persistence.PersistenceException: No Persistence provider for EntityManager named agisdb at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60) Here is the persistence.xml... <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"> <persistence-unit name="agisdb"> <class>com.agis.livedb.domain.AddressEntity</class> <class>com.agis.livedb.domain.TrafficCameraEntity</class> <class>com.agis.livedb.domain.TrafficPhotoEntity</class> <class>com.agis.livedb.domain.TrafficReportEntity</class> <properties> <property name="toplink.jdbc.url" value="jdbc:mysql://localhost:3306/agisdb"/> <property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/> <property name="toplink.jdbc.user" value="root"/> <property name="toplink.jdbc.password" value="password"/> </properties> </persistence-unit> </persistence> It should have been in the classpath... Yet, I got the above error... Really appreciate any help... Thanks

    Read the article

  • How to create named pipe (mkfifo) in Android?

    - by Ignas Limanauskas
    I am having trouble in creating named pipe in Android and the example below illustrates my dilemma: res = mkfifo("/sdcard/fifo9000", S_IRWXO); if (res != 0) { LOG("Error while creating a pipe (return:%d, errno:%d)", res, errno); } The code always prints: Error while creating a pipe (return:-1, errno:1) I can't figure out exactly why this fails. The application has android.permission.WRITE_EXTERNAL_STORAGE permissions. I can create normal files with exactly the same name in the same location, but pipe creation fails. The pipe in question should be accessible from multiple applications. I suspect that noone can create pipes in /sdcard. Where would it be the best location to do so? What mode mast should I set (2nd parameter)? Does application need any extra permissions?

    Read the article

  • jQuery capture all changes to named inpt on a form

    - by Brian M. Hunt
    I'm trying to determine when any of a set of named input/select/radio/checked/hidden fields in a form change. In particular, I'd like to capture when any changes are made to fields matching jQuery's selector $("form :input"), and where that input is has a name attribute. However, the form isn't static i.e. some of the fields are dynamically added later. My initial thought is to keep track of when new named elements matching :input are added, and then add an event handler, like this: function on_change() { alert("The form element with name " + $(this).attr("name") + " has changed"); } function reg_new_e_handler(input_element) { input_element.change(on_change); } However, I'm quite hopeful I can avoid this with some jQuery magic. In particular, is there a way to register an event handler in jQuery that would handle input elements that match the following: $("form :input").filter( function () { $(this).attr("name") } ).change(on_change); However, have this event set update whenever new input elements are added. I've thought that it may be possible to capture keyup event on the form node with $("form").keyup(on_change), but I'm not so sure how one could capture change events. I'd also like this to capture keyup events. Thank you for reading. Brian

    Read the article

  • Django error - no module named

    - by Shreyas
    Here is my relevant directory structure (Windows 7, Python 2.7, virtualenv) -userProf - - manage.py - -UserProfile - sampleapp_db - urls.py - views.py - wsgi.py - __init__.py - -libs - - __init__.py - -allauth - - app_settings.py - - models.py - - tests.py - - urls.py - - utils.py - - - -account - - - admin.py - - - context_processors.py - - - models.py - - - urls.py - - - __init__.py - -socialaccount - - - admin.py - - - context_processors.py - - - models.py - - - urls.py - - - views.py - - - __init__.py - - - - -templates - -account - - - base.html - - - email.html -settings - base_settings.py - dev.py - __init__.py - -static -css I get the following error when I try to run this dango app Error: No module named account I have read other posts on SO that refer to the syspath being the issue or that the appname matches the project name Django Shell No module named settings ...as a result of this, I added the following statements in the base_settings.py file import sys base = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) base_parent = os.path.dirname(base) sys.path.append(base) sys.path.append(base_parent) sys.path.append(os.path.join(base,'libs')) sys.path.append(os.path.join(base,'libs','allauth','account')) I verified that the sys.path is correct by putting a break in PyCharm and evaluating sys.path Should I be putting this in manage.py? Some other SO postings referred to not being able to import the module but I can launch the python console and import UserProfile.libs.allauth.account without any exceptions being thrown! My base_setings.py has the following relevant section INSTALLED_APPS = ( 'UserProfile.libs.allauth.account', )

    Read the article

  • Named previously unnamed branch

    - by Jab
    It seems naming a previously unnamed branch doesn't really work out. It creates a nasty multiple heads problem that I can't find a solution for. Here is the workflow... UserA starts working on feature that they expect to be small, so they just start working(off the default branch). The change turns out to be a large project and will need multiple contributors. So UserA issues... hg branch "Feature1" and continues working, committing locally s needed. UserA then pulls down the changes from the central repo so he can push. At this point, why does hg heads return 3 heads? It shows 2 for default and 1 for Feature1. The first head for default is the latest change by another user on the branch(irrelevant). The second default head is the commit prior to the hg branch "Feature1" commit. The central repository has rules enforced so that only 1 head per branch is allowed, so forcing a push isn't an option. The repo doesn't want multiple heads on the default branch. UserA should be able to push these changes so that other users can see the Feature1 branch and help out. I can't seem to find a way to "correct" this. I don't think I can re-write the branch of the initial commits for the feature, before it was a named branch. I know the initial changes before the named branch are technically on the default branch, but does that mean they will be heads until that Feature1 branch is merged?

    Read the article

  • Communicating with a driver over a network in Windows

    - by workinprogress
    How could I communicate with a driver from a usermode application over a network? I can't have the driver communicate with a local usermode application which then communicates with the remote application because that wouldn't work for what I'm doing. I was thinking of using named pipes but I'm not sure if that would work over a network.

    Read the article

  • How to pipe two CORE::system commands in a cross-platform way

    - by Pedro Silva
    I'm writing a System::Wrapper module to abstract away from CORE::system and the qx operator. I have a serial method that attempts to connect command1's output to command2's input. I've made some progress using named pipes, but POSIX::mkfifo is not cross-platform. Here's part of what I have so far (the run method at the bottom basically calls system): package main; my $obj1 = System::Wrapper->new( interpreter => 'perl', arguments => [-pe => q{''}], input => ['input.txt'], description => 'Concatenate input.txt to STDOUT', ); my $obj2 = System::Wrapper->new( interpreter => 'perl', arguments => [-pe => q{'$_ = reverse $_}'}], description => 'Reverse lines of input input', output => { '>' => 'output' }, ); $obj1->serial( $obj2 ); package System::Wrapper; #... sub serial { my ($self, @commands) = @_; eval { require POSIX; POSIX->import(); require threads; }; my $tmp_dir = File::Spec->tmpdir(); my $last = $self; my @threads; push @commands, $self; for my $command (@commands) { croak sprintf "%s::serial: type of args to serial must be '%s', not '%s'", ref $self, ref $self, ref $command || $command unless ref $command eq ref $self; my $named_pipe = File::Spec->catfile( $tmp_dir, int \$command ); POSIX::mkfifo( $named_pipe, 0777 ) or croak sprintf "%s::serial: couldn't create named pipe %s: %s", ref $self, $named_pipe, $!; $last->output( { '>' => $named_pipe } ); $command->input( $named_pipe ); push @threads, threads->new( sub{ $last->run } ); $last = $command; } $_->join for @threads; } #... My specific questions: Is there an alternative to POSIX::mkfifo that is cross-platform? Win32 named pipes don't work, as you can't open those as regular files, neither do sockets, for the same reasons. The above doesn't quite work; the two threads get spawned correctly, but nothing flows across the pipe. I suppose that might have something to do with pipe deadlocking or output buffering. What throws me off is that when I run those two commands in the actual shell, everything works as expected.

    Read the article

  • can't read from stream until child exits?

    - by BobTurbo
    OK I have a program that creates two pipes - forks - the child's stdin and stdout are redirected to one end of each pipe - the parent is connected to the other ends of the pipes and tries to read the stream associated with the child's output and print it to the screen (and I will also make it write to the input of the child eventually). The problem is, when the parent tries to fgets the child's output stream, it just stalls and waits until the child dies to fgets and then print the output. If the child doesn't exit, it just waits forever. What is going on? I thought that maybe fgets would block until SOMETHING was in the stream, but not block all the way until the child gives up its file descriptors. Here is the code: #include <stdlib.h> #include <stdio.h> #include <string.h> #include <sys/types.h> #include <unistd.h> int main(int argc, char *argv[]) { FILE* fpin; FILE* fpout; int input_fd[2]; int output_fd[2]; pid_t pid; int status; char input[100]; char output[100]; char *args[] = {"/somepath/someprogram", NULL}; fgets(input, 100, stdin); // the user inputs the program name to exec pipe(input_fd); pipe(output_fd); pid = fork(); if (pid == 0) { close(input_fd[1]); close(output_fd[0]); dup2(input_fd[0], 0); dup2(output_fd[1], 1); input[strlen(input)-1] = '\0'; execvp(input, args); } else { close(input_fd[0]); close(output_fd[1]); fpin = fdopen(input_fd[1], "w"); fpout = fdopen(output_fd[0], "r"); while(!feof(fpout)) { fgets(output, 100, fpout); printf("output: %s\n", output); } } return 0; }

    Read the article

  • Bind include all zones in a folder

    - by alexcepoi
    I have a webapp that acts as a DNS manager, writing all zones to "/var/named". I would like to be able to configure named to load all zones in that folder, without explicitely having to tell it which zone goes to which file. Is that remotely possible? The reason for this is that i will be having a lot of zones added/deleted and a lot of records for each of them. I was thinking for using a database for that, but the idea of doing 500 record inserts scares me (it needs to be snappy). It's easier to write to a file. Any suggestions?

    Read the article

  • Syncing FFMPEG with a named pipe

    - by blez
    I'm using the ffmpeg.exe for converting with a named pipe for an input. But the problem is that I put too fast data thru the pipe and the result is a small file. How to determine is FFMPEG converted the current chunk?

    Read the article

  • How to setup named instances using StructureMap profiles?

    - by khaledh
    I've done quite a bit of googling and searching here on SO, but couldn't find a similar question or answer. In typical SM configuration you can add multiple named instances for a single PluginType: ForRequestedType<IFoo>() .AddInstances( x => { x.OfConcreteType<FooA>().WithName( "FooA" ); x.OfConcreteType<FooB>().WithName( "FooB" ); } ); No problem there. The problem is that I can't do the same when creating a profile. Most examples explaining how to use profiles use the For<>() method of the passed ProfileExpression: CreateProfile( "Default", p => { p.For<IFoo>().UseConcreteType<FooC>(); } ); I can't seem to find a way to add multiple named instances for the same PluginType as you can do above with regular configuration. The only other method available through ProfileExpression is Type<>(), but I'm not sure if it can be used for this purpose. Edit: I tried to use Type<>() instead of For<>() and it seems to be taking me in the right direction, but I bumped into another problem. To better explain it here's a better example of what I'm trying to do (this is what I posted to the structuremap-users group, no answer yet): ObjectFactory.Initialize( x => { x.CreateProfile( "Nissan", p => { p.Type<ICar>().Is.OfConcreteType<NewNissanCar>().WithName( "New" ); p.Type<ICar>().Is.OfConcreteType<OldNissanCar>().WithName( "Old" ); } ); x.CreateProfile( "Honda", p => { p.Type<ICar>().Is.OfConcreteType<NewHondaCar>().WithName( "New" ); p.Type<ICar>().Is.OfConcreteType<OldHondaCar>().WithName( "Old" ); } ); } ); ObjectFactory.Profile = "Nissan"; ICar newCar = ObjectFactory.GetNamedInstance<ICar>( "New" ); // -> returns NewHondaCar ICar car = ObjectFactory.GetInstance<ICar>(); // -> returns OldNissanCar So even though I set the profile to "Nissan", GetNamedInstance<>("New") returned an instance from the incorrect profile - it should've returned NewNissanCar instead of NewHondaCar. Interestingly, GetInstance<>() uses the correct profile, but because I can't pass an instance name, it returns an arbitrary concrete type from that profile that implements ICar (I guess it just returns the last concrete type added for that interface).

    Read the article

  • c# - can you make a "weak" assembly reference to a strong named assembly

    - by Tim
    hi, for various reasons i would rather not use strong named (signed) assemblies in my project. however, one of the projects is referenced by a sharepoint web part which means it must be signed. is it possible to have this assembly signed but when I reference it from other projects, to do so using a non-strong reference. this would give me the advantages of having a non-signed assembly for the rest of my code but still allow it to be loaded by sharepoint Tim

    Read the article

  • Recenter a named buffer that is not neccessarily the current buffer in emacs Lisp

    - by Yu Shen
    I'd like to recenter a buffer, called "Lense", where I've inserted some text. I wished to make it the current buffer by "(set-buffer "Lense")", then "(recenter 0))". By the following code segments: (save-excursion (set-buffer "Lense") (recenter 0)) However, it seems that the above code would only recenter the buffer which is the current buffer, and "(set-buffer "Lense")" has no effect to make the current buffer to be "Lense". Please help me to figure out the right way to recenter the named buffer "Lense". Thanks, Yu

    Read the article

  • Python: ImportError no module named urllib

    - by Yury Lifshits
    I just rented a VPS from Linode, it has python2.5 and ubuntu 8.04 When I ho to python shell python import urllib I get ImportError: No module named urllib What can be the reason? How can I add this module to python? Isn't it prepackaged with the basic version? Can it be pythonpath problem? How I can test pythonpath?

    Read the article

  • Ironpython - Named parameters to constructor

    - by yodaj007
    When I create an instance of my C# class in IronPython with named parameters to the constructor, it is setting properties corresponding to the names of the parameters. I wish to disable this behavior so I can have better control on the order the properties are evaluated. Is this possible?

    Read the article

  • ImportError: No module named optparse in jython

    - by jeet
    getting Traceback (most recent call last): File "C:\projects\myproject\convert.py", line 139, in import optparse ImportError: No module named optparse. when executing it using jython. Same module works fine when i execute it through python. I am usinng window7 operating system. The same modle works fine on windows XP machine with both python and Jython.

    Read the article

  • ImportError: No Module named simplejson

    - by Tony
    I'm trying to run a command to install bespinclient on my Windows laptop but every time I execute the command python bootstrap.py --no-site-packages, I get an error saying: ImportError: No module named simplejson I'm using Mozilla build tools to run these Linux commands.

    Read the article

  • No Module named django.core

    - by Sirish Kumar
    Hi, I have updated to latest Django version 1.0.2 after uninstalling my old Django version.But now when I run django-admin.py I get the following error. How can I resolve this? Traceback (most recent call last): File "C:\Python25\Lib\site-packages\django\bin\django-admin.py", line 2, in <module> from django.core import management ImportError: No module named django.core

    Read the article

  • Why are Python exceptions named "Error"?

    - by Elena
    Why are Python exceptions named "Error" (e.g. ZeroDivisionError, NameError, TypeError etc) and not "Exception" (e.g. ZeroDivisionException, NameException, TypeException etc). I come from a Java background and started to learn Python recently, as such this is confusing because in java there is a distinction between error and exception. Is there a difference in Python also or not? Can someone explain or point me to some documentation explaining it? Thank you!

    Read the article

  • Why is an oracle sequence named hibernate_sequence being created with JPA using Hibernate with the O

    - by JavaRocky
    All my entities use this type of @Id @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "MYENTITY_SEQ") @SequenceGenerator(name = "MYENTITY_SEQ", sequenceName = "MYENTITY_SEQ") @Column(name = "MYENTITY", nullable = false) private Long id; Or @Id @Column(name = "MYENTITY") I find that an oracle sequence named hibernate_sequence is always created. Why is this so? And how can i avoid this? I am using JPA1 with Hibernate 3 and the Oracle 10g dialect.

    Read the article

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