Search Results

Search found 18845 results on 754 pages for 'the machine charmer'.

Page 178/754 | < Previous Page | 174 175 176 177 178 179 180 181 182 183 184 185  | Next Page >

  • Winforms connection strings from App.config

    - by Geo Ego
    I have a Winforms app that I am developing in C# that will serve as a frontend for a SQL Server 2005 database. I rolled the executable out to a test machine and ran it. It worked perfectly fine on the test machine up until the last round of changes that I made. However, now on the test machine, it throws the following exception immediately upon opening: System.NullReferenceException: Object reference not set to an instance of an object. at PSRD_Specs_Database_Administrat.mainMenu.mainMenu_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) The only thing that I changed in this version that pertains to mainMenu_Load is the way that the connection string to the database is called. Previously, I had set a string with the connection string on every form that I needed to call it from, like: string conString = "Data Source = SHAREPOINT;Trusted_Connection = yes;" + "database = CustomerDatabase;connection timeout = 15"; As my app grew and I added forms to it, I decided to add an App.config to the project. I defined the connection string in it: <connectionStrings> <add name="conString" providerName="System.Data.SqlClient" connectionString="Data Source = SHAREPOINT;Trusted_Connection = yes;database = CustomerDatabase;connection timeout = 15" /> </connectionStrings> I then created a static string that would return the conString: public static string GetConnectionString(string conName) { string strReturn = string.Empty; if (!(string.IsNullOrEmpty(conName))) { strReturn = ConfigurationManager.ConnectionStrings[conName].ConnectionString; } else { strReturn = ConfigurationManager.ConnectionStrings["conString"].ConnectionString; } return strReturn; } I removed the conString variable and now call the connection string like so: PublicMethods.GetConnectionString("conString").ToString() It appears that this is giving me the error. I changed these instances to directly call the connection string from App.config without using GetConnectionString. For instance, in a SQLConnection: using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["conString"].ConnectionString)) This also threw the exception. However, when I went back to using the conString variable on each form, I had no issues. What I don't understand is why all three methods work fine on my development machine, while using the App.config directly or via the static string I created throw exceptions.

    Read the article

  • How to access GMT time using VC

    - by sijith
    In my project i am using GetLocalTime() and GetSystemTime and set the current time into registry. But my problem is when i am changing the time of my machine the changed time only saving to registry. Is there any chance to access the GMT time so that its independent of machine and nobody can change the time.. Please give some help

    Read the article

  • install svn on redhat

    - by Adi
    how do I install svn on a Redhat machine? tried to do it with yum install svn - but it didn't find svn. my machine details is Red Hat Enterprise Linux Server release 5.2 (Tikanga) found it with this command /etc/redhat-release thanks

    Read the article

  • Deploying XBAP as an ActiveX

    - by Kaveh Shahbazian
    How can I deploy a XBAP to a client machine as an ActiveX (Which I can instantiate and use from JavaScript, passing parameters to it, getting parameters from it, etc)? This is part of an ASP.NET site, and will be in full trusted mode (I have solved that part, actually I have implemented a test XBAP that can edit a text file on local hard drive of a client machine). Thanks

    Read the article

  • Visual C++/Studio: Application configuration incorrect?

    - by Thomas
    My C(++) program, written and compiled using Visual C(++)/Visual Studio, runs fine on my own machine, but refuses to run on another machine. The error message I get is "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

    Read the article

  • Instantiating ServiceController takes sometimes too much time

    - by mrbamboo
    Hi, i am creating an instance of ServiceController using a remote/local machine name and the name of the service. When I type sth. like stackoverflow.com as machine name the contructor blocks for a long time and returns an exception. Example: string MachineName = "stackoverflow.com" ServiceController("RemoteRegistry", MachineName ); How can I set here a kind of timeout to cancel this process?

    Read the article

  • Just to not to be ingnorant.

    - by atch
    Could anyone explain to me why is it that producers of processors claim that their processor can perform so many thousands (or millions) operations per second and yet typical program (Word, VS etc.) on my machine with 4GB, 3500hz starts with no less than 10sek. Have to mention that I've just formatted disk and tick any necessarry boxes to optimize my machine. So if for example outlook starts in 10 sek I wonder how many millions of operations have to be performed to run such program? Thanks

    Read the article

  • Fiddler - Daily stop start

    - by weismat
    What is the best way to stop/start Fiddler as a daily task? I am usin Fiddler to monitor/logs https trafficon machine which runs fully automated and runs software which is not controlled by me, but uses https. My machine stopped yesterday because Fiddler went out of memory after running over 3 days and now I want to have a clean way to start/stop it. I guess I could just specify a process duration in the task manager, but I would prefer something cleaner, especially to avoid issues when things are started manually.

    Read the article

  • user creating/saving

    - by Xaver
    i want to write 2 program: 1) programm saves all local users to the file. 2) loads file find that users not found on local machine and create user. for searching all users which create on local machine i use next code: foreach (ManagementObject user in userSearcher.Get()) { if ((bool)user["LocalAccount"]) { string UserName = (string)user["FullName"]; } } How can i save the settings of user by name and create user?

    Read the article

  • Calculating CPU frequency in C with RDTSC always returns 0

    - by Nazgulled
    Hi, The following piece of code was given to us from our instructor so we could measure some algorithms performance: #include <stdio.h> #include <unistd.h> static unsigned cyc_hi = 0, cyc_lo = 0; static void access_counter(unsigned *hi, unsigned *lo) { asm("rdtsc; movl %%edx,%0; movl %%eax,%1" : "=r" (*hi), "=r" (*lo) : /* No input */ : "%edx", "%eax"); } void start_counter() { access_counter(&cyc_hi, &cyc_lo); } double get_counter() { unsigned ncyc_hi, ncyc_lo, hi, lo, borrow; double result; access_counter(&ncyc_hi, &ncyc_lo); lo = ncyc_lo - cyc_lo; borrow = lo > ncyc_lo; hi = ncyc_hi - cyc_hi - borrow; result = (double) hi * (1 << 30) * 4 + lo; return result; } However, I need this code to be portable to machines with different CPU frequencies. For that, I'm trying to calculate the CPU frequency of the machine where the code is being run like this: int main(void) { double c1, c2; start_counter(); c1 = get_counter(); sleep(1); c2 = get_counter(); printf("CPU Frequency: %.1f MHz\n", (c2-c1)/1E6); printf("CPU Frequency: %.1f GHz\n", (c2-c1)/1E9); return 0; } The problem is that the result is always 0 and I can't understand why. I'm running Linux (Arch) as guest on VMware. On a friend's machine (MacBook) it is working to some extent; I mean, the result is bigger than 0 but it's variable because the CPU frequency is not fixed (we tried to fix it but for some reason we are not able to do it). He has a different machine which is running Linux (Ubuntu) as host and it also reports 0. This rules out the problem being on the virtual machine, which I thought it was the issue at first. Any ideas why this is happening and how can I fix it?

    Read the article

  • Can't browse svn repo using TortoiseSVN on Windows Server 2008

    - by afsharm
    Hi, Environment is: Windows Server 2008 R2 x64 Slik-Subversion-1.6.11-x64 TortoiseSVN-1.6.8.19260-x64-svn-1.6.11 I have setted up svn srvice based on Jeff Atwood guidlines and can connect work with host via svn command lines like svn list svn://localhost, but TortoiseSVN can't connect to it even on server machine itself. All firewall types are off. TortoiseSVN error message is: Can't connect to host 'localhost': No connection could be made because the target machine actively refused it. How can I solve this problem? Thanks in Advance,

    Read the article

  • Pygame Font not consistent

    - by Smashery
    I'm working on a program in python+pygame with some other developers, and we're seeing the same font rendered differently. It's a free font that we're distributing with the game. On my machine, this particular font is rendering 10px lower than on another developer's machine. Any thoughts on why this is?

    Read the article

  • Pygame Font not consistent

    - by Smashery
    I'm working on a program in python+pygame with some other developers, and we're seeing the same font rendered differently. It's a free font that we're distributing with the game. On my machine, this particular font is rendering 10px lower than on another developer's machine. Any thoughts on why this is?

    Read the article

  • Windows Server 2008 on VPC (Host: Win 7)?

    - by Dan
    Is it possible to test Windows 2008 server via VPC when my host of a Windows 7 machine? I don't see anywhere where it says this is possible? The only VPC images (Windows 2008 R2) that I download from Microsoft state that the host machine must be Windows 2008. Is there an alternative?

    Read the article

  • Why does 'localhost' in web references cause SocketExceptions?

    - by Sam
    I have two .net web services deployed to the same IIS server using SSL, one that references the other. If I set that web reference to 'localhost', some calls fail with this exception: System.Web.Services.Protocols.SoapException: Server was unable to process request. --- System.Net.WebException: Unable to connect to the remote server --- System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it If I set it to the actual machine name, it works. Why?

    Read the article

  • github like workflow on private server over ssh

    - by Jesse
    I have an server (available via ssh) on the internet that my friend and I use for working on projects together. We have started using git for source control. Our setup currently is as follows: Friend created repository on server with git init named project.friend.git I cloned project.friend.git on server to project.jesse.git I then cloned project.jesse.git on server to my local machine using git clone jesse@server:/git_repos/project.jesse.git I work on my local machine and commit to the local machine. When I want to push my changes to the project.jesse.git on server I use git push origin master. My friend is working on project.friend.git. When I want to get his changes I do pull jesse@server:/git_repos/project.friend.git. Everything seems to be working fine, however, I am now getting the following error when I do git push origin master: localpc:project.jesse jesse$ git push origin master Counting objects: 100, done. Delta compression using up to 2 threads. Compressing objects: 100% (76/76), done. Writing objects: 100% (76/76), 15.98 KiB, done. Total 76 (delta 50), reused 0 (delta 0) warning: updating the current branch warning: Updating the currently checked out branch may cause confusion, warning: as the index and work tree do not reflect changes that are in HEAD. warning: As a result, you may see the changes you just pushed into it warning: reverted when you run 'git diff' over there, and you may want warning: to run 'git reset --hard' before starting to work to recover. warning: warning: You can set 'receive.denyCurrentBranch' configuration variable to warning: 'refuse' in the remote repository to forbid pushing into its warning: current branch. warning: To allow pushing into the current branch, you can set it to 'ignore'; warning: but this is not recommended unless you arranged to update its work warning: tree to match what you pushed in some other way. warning: warning: To squelch this message, you can set it to 'warn'. warning: warning: Note that the default will change in a future version of git warning: to refuse updating the current branch unless you have the warning: configuration variable set to either 'ignore' or 'warn'. To jesse@server:/git_repos/project.jesse.git c455cb7..e9ec677 master -> master Is this warning anything I need to be worried about? Like I said, everything seems to be working. My friend is able to pull my changes in from my branch. I have the clone on the server so he can access it since he does not have access to my local machine. Is there something that could be done better? Thanks!

    Read the article

  • Is IE Collection reliable tool for testing with various versions of Internet Explorer?

    - by rsturim
    On my Windows machine -- I typically test different versions of Internet Explorer using an array of Virtual Machine instances (which obviously requires a fair amount of investment in time and money). In a pinch I have also used IETester -- which at times can be a little unreliable. However, I just discovered IE Collection and was wondering if people have used it -- and can I rely on it for web page testing purposes? Would love to know what you think.

    Read the article

  • Silverlight file download for COM Interop

    - by rip
    Is the following possible in Silverlight when a button is clicked? An Excel template is downloaded from a remote server and saved to the local machine An instance of the template is then opened on the client A macro is then executed within the new Excel document I can do everything apart from saving the template to the local machine. I can save this in isolated storage but then I don’t know where this is when trying to open it from the Excel COM interop code. Has anyone any ideas or is this not possible?

    Read the article

  • Fortran bus error on mac

    - by SteveJ
    The following Fortran code is giving me a bus error on my Mac but no errors when I run it on my Linux machine: PROGRAM TINY WRITE(UNIT=*, FMT=*) 'Hello, world!' END My understanding is that a bus error occurs when the program attempts to access impossible memory but I do not understand where such an attempt has been made in this program. My MacBook has GCC 4.4.0 and my Linux machine has GCC 4.3.2. Any ideas as to why this error occurs?

    Read the article

  • Sphinx search distributed index tuning

    - by Andriy Bohdan
    I'm deciding how to split 3 large sphinx indexes between 3 servers. Each of the 3 indexes is searched separately. What's more effective: to host each index on separate machine Example machine1 - index1 machine2 - index2 machine3 - index3 or to split each index into 3 parts and host each part of the same index on separate machine. Example machine1 - index1_chunk1, index2_chunk1, index3_chunk1 machine2 - index1_chunk2, index2_chunk2, index3_chunk2 machine3 - index1_chunk3, index2_chunk3, index3_chunk3 ?

    Read the article

< Previous Page | 174 175 176 177 178 179 180 181 182 183 184 185  | Next Page >