Daily Archives

Articles indexed Monday March 15 2010

Page 6/125 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • NSTextField and hidden property

    - by jasonbogd
    Hi, I have an NSTextField that I hide when the user presses a button. I hide the text field using [textField setHidden:YES]; The problem is that is the user is typing in the text field (i.e. the text field is first responder) and the user presses the return key (which is the key equivalent for the button that hides the text field) the user can keep typing in the text field even though its not visible. How do I correctly remove a text field without actually deallocating it? Thanks.

    Read the article

  • network configuration busted good

    - by jldupont
    On my Linux Ubuntu Karmic machine, when I try to net conf list I get: [2010/03/14 21:25:18, 0] registry/reg_init_basic.c:32(registry_init_common) Failed to initialize the registry: WERR_ACCESS_DENIED I think I may have busted my networking configuration good this time... I can't get Nautilus "networking" functions to work i.e. the "Places - Network" won't show my Windows workgroup anymore... Please help! note1: I have verified my SAMBA configuration and it isn't the problem. note2: I have uninstalled Winbind, Dnsmasq and Squid to get my configuration as simple as possible to debug.

    Read the article

  • How to I get the value of a custom soap header in WCF

    - by Jason Coyne
    I have created a custom soap header, and added it into my message via IClientMessageInspector public object BeforeSendRequest(ref System.ServiceModel.Channels.Message request, System.ServiceModel.IClientChannel channel) { var header = new MessageHeader<AuthHeader>(); header.Content = new AuthHeader(Key); header.Actor = "Anyone"; var header2 = header.GetUntypedHeader("Auth", "xWow"); request.Headers.Add(header2); return null; } [DataContract(Name="Auth")] public class AuthHeader { public AuthHeader(string key) { this.Key = key; } [DataMember] public string Key { get; set; } } I also have an IDispatchMessageInspector, and I can find the correct header in the list. However, there is no value. I know that the value went across the wire correctly, because the message string is correct <s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n <s:Header>\r\n <Auth s:actor=\"Anyone\" xmlns=\"xWow\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n <Key xmlns=\"http://schemas.datacontract.org/2004/07/xWow.Lib\">HERE IS MY KEY VALUE!!!!</Key>\r\n </Auth>\r\n <To s:mustUnderstand=\"1\" xmlns=\"http://schemas.microsoft.com/ws/2005/05/addressing/none\">http://localhost:26443/AuthService.svc</To>\r\n <Action s:mustUnderstand=\"1\" xmlns=\"http://schemas.microsoft.com/ws/2005/05/addressing/none\">http://tempuri.org/IAuthService/GetPayload</Action>\r\n </s:Header>\r\n <s:Body>\r\n <GetPayload xmlns=\"http://tempuri.org/\" />\r\n </s:Body>\r\n</s:Envelope>" But there does not seem to be any property to retrieve this value. The MessageHeaderInfo class has Actor, etc, but nothing else useful I can find. On the client side I had to convert between Header and Untyped header, is there an equivalent operation on the server?

    Read the article

  • Optional parameters with named query in Hibernate?

    - by Ickster
    Is there any way to specify optional parameters (such as when search parameters are provided from a form and not all parameters are required) in a named query when using Hibernate? I'm using a native SQL query, but the question is probably applicable to named HQL queries as well. I'm pretty sure the answer to this is 'no', but I haven't find the definitive answer in the documentation yet.

    Read the article

  • Linux: shortname stuck as "localhost" even though full hostname is correct

    - by DrStalker
    I have a linux (CentOS 5.2) server with the name myserver.mycompnay.com, which is correctly returned when I run 'hostname'. When I run 'hostname -s' however it returns "localhost" which is causing some backup scripts to put stuff in a "localhost" directory instead of a "myserver" directory. All of our other CentOS boxes correctly return the first part of their hostname when 'hostname -s', where do I go on this server to make it behave the same? Other than having "HOSTNAME=myserver.mycompnay.com" in /etc/sysconfig/network what should I be looking at?

    Read the article

  • 5x5 matrix multiplication in C

    - by Rick
    I am stuck on this problem in my homework. I've made it this far and am sure the problem is in my three for loops. The question directly says to use 3 for loops so I know this is probably just a logic error. #include<stdio.h> void matMult(int A[][5],int B[][5],int C[][5]); int printMat_5x5(int A[5][5]); int main() { int A[5][5] = {{1,2,3,4,6}, {6,1,5,3,8}, {2,6,4,9,9}, {1,3,8,3,4}, {5,7,8,2,5}}; int B[5][5] = {{3,5,0,8,7}, {2,2,4,8,3}, {0,2,5,1,2}, {1,4,0,5,1}, {3,4,8,2,3}}; int C[5][5] = {0}; matMult(A,B,C); printMat_5x5(A); printf("\n"); printMat_5x5(B); printf("\n"); printMat_5x5(C); return 0; } void matMult(int A[][5], int B[][5], int C[][5]) { int i; int j; int k; for(i = 0; i <= 2; i++) { for(j = 0; j <= 4; j++) { for(k = 0; k <= 3; k++) { C[i][j] += A[i][k] * B[k][j]; } } } } int printMat_5x5(int A[5][5]){ int i; int j; for (i = 0;i < 5;i++) { for(j = 0;j < 5;j++) { printf("%2d",A[i][j]); } printf("\n"); } } EDIT: Here is the question, sorry for not posting it the first time. (2) Write a C function to multiply two five by five matrices. The prototype should read void matMult(int a[][5],int b[][5],int c[][5]); The resulting matrix product (a times b) is returned in the two dimensional array c (the third parameter of the function). Program your solution using three nested for loops (each generating the counter values 0, 1, 2, 3, 4) That is, DO NOT code specific formulas for the 5 by 5 case in the problem, but make your code general so it can be easily changed to compute the product of larger square matrices. Write a main program to test your function using the arrays a: 1 2 3 4 6 6 1 5 3 8 2 6 4 9 9 1 3 8 3 4 5 7 8 2 5 b: 3 5 0 8 7 2 2 4 8 3 0 2 5 1 2 1 4 0 5 1 3 4 8 2 3 Print your matrices in a neat format using a C function created for printing five by five matrices. Print all three matrices. Generate your test arrays in your main program using the C array initialization feature. enter code here

    Read the article

  • java Database framework comparison

    - by user293655
    Hi, I want to create an application that synchronize a database to multiple databases(various type of databases). I'm looking for a framework that suitable to do this. I was looking for something just get the Object of the data (like a resultset) then copy that object to the destination database. Or comparing between 2 data. Any ideas? Thanks,

    Read the article

  • Which is better practice: complex SQL statements or Recordset manipulation in Access VBA?

    - by mazi
    I'm doing some VBA development and I found creating SQLs quite efficient way of getting everything done (selecting and updating). But I got to this stage where my SQL statements contain complex Switches and WHERE conditions where I have another Selects to update appropriate records. Therefore, I create this SQLs and I simply run it via "CurrentDb.Execute strSQL" and it does everything fine. The question is, why would I declare ADODB.connections etc, set recordsets, loop through it and manipulate the data one by one?

    Read the article

  • Colour instead of color?

    - by Jookia
    I'm working on a game engine in C++ and I have methods like setColour and things that use british grammar. While I was thinking how C++ compilers mostly use the english language (correct me if I'm wrong) and how most APIs use american grammar, should I go with the flow and continue the unofficial standard in the grammar programmer high council or be a rebel? I'm not sure which.

    Read the article

  • Why does this JSON fail only in iPhone?

    - by 4thSpace
    I'm using the JSON framework from http://code.google.com/p/json-framework. The JSON below fails with this error: -JSONValue failed. Error trace is: ( Error Domain=org.brautaset.JSON.ErrorDomain Code=5 UserInfo=0x124a20 "Unescaped control character '0xd'", Error Domain=org.brautaset.JSON.ErrorDomain Code=3 UserInfo=0x11bc20 "Object value expected for key: Phone", Error Domain=org.brautaset.JSON.ErrorDomain Code=3 UserInfo=0x1ac6e0 "Expected value while parsing array" ) JSON being parsed: [{"id" :"2422","name" :"BusinessA","address" :"7100 U.S. 50","lat" :"38.342945","lng" :"-90.390701","CityId" :"11","StateId" :"38","CategoryId" :"1","Phone" :"(200) 200-2000","zip" :"00010"}] I think 0xd represents a carriage. When I put the above JSON in TextWrangler, I don't see any carriage returns. I got the JSON by doing "po myjson" in the debugger. It passes this validator: http://json.parser.online.fr/. Can anyone see what the problem may be?

    Read the article

  • jQuery How do I focus on contents of iframe after clearing

    - by eknown
    I currently have a wysiwyg iframe where the user can submit input to another area on the page. Once the iframe input is submitted, I set it to clear the content. I want to also automatically focus back into the iframe. This is the code I currently have: postContentClr = $("iframe#textarea1IFrame").contents().find("body") postContentClr.html(" ").focus();

    Read the article

  • Do you ever create fake progress bars?

    - by wrongusername
    Do you (and would you) ever create progress bars that are just there to keep the client happy and moves without reflecting the true progress of the program? I remember reading about this somewhere, and am wondering if there are other developers that do it too...

    Read the article

  • Associate mount points with local disks in VBscript / WMI

    - by Mark Unwin
    I have a VBscript that outputs various config items about a system. Both hardware and software. I can output disks and their associated partitions. I can output mount points. I do not seem to be able to associate a mount point with a local disk (where it actually is a local disk). I need to be able to do this using VBscript, so as to fit in with the rest of the ~2000 lines of code. I do NOT want to run some other program graphically. I know the disk manager service can show me (My Computer - Manage - Disk Management), but this is not what I need. I need to be able to do this remotely via VBscript. I am open to running an .exe from the VBscript and piping the output back into VBscript and massaging it from there. Any idea's ? Thanks in advance.

    Read the article

  • Heroku deployment: connection refused

    - by Toby Hede
    I have suddenly run into an issue deploying to Heroku. I created a new app, went to push and now see: ssh: connect to host heroku.com port 22: Connection refused My other previously working Heroku apps no longer work, receiving the same error. Other Heroku commands work (create, info, db:push). I can SSH to other services, so it doesn't look like it's my machine. Any ideas?

    Read the article

  • How well are SVG filter elements defined?

    - by Peter Becker
    We are considering using SVG filters as part of our toolchain, serving the SVG to browsers capable of supporting it, while serving pre-rendered PNGs to other. One problem we noticed is that the rendering of the filter chains seems to be very inconsistent across renderers. When looking at the "filters01" example from the SVG specification, the rendering looks very different across the tools we tried. Chrome (5.0.307.11) failed to render the image, while other tools (Firefox 3.6, Opera 10.10, Inkscape 0.47, GIMP 2.6.7) render something vaguely similar in style to the picture in the specification, but no two are truly the same. Is that an issue of under-specification or are the tools just not there? If we would use SVG with filter effects: is there a reference tool that can give us a rendering the way it is intended by the spec?

    Read the article

  • Can you recommend a .net template engine?

    - by serg10
    I am looking for a .net templating engine - something simple, lightweight, stable with not too many dependencies. All I need it for at the moment is creating templated plain text and html emails. Can anyone give me a good recommendation? If it helps at all - something like Java's Freemarker or Velocity libraries. [UPDATE] Thanks for the answers so far - much appreciated. I am really intested in recommendations or war stories from when you have used these libraries. Seems to be the best way to make a decision without trying each in turn.

    Read the article

  • WinForms Load Event / Static Initialization Strangeness

    - by Eric J.
    Background I'm troubleshooting an WinForms 2.0 program that's already been burned to CD for distribution to an internet-challenged target audience. Some users are experiencing a fatal error that I can reproduce locally. Reproducing the Error I get the fatal error when I log into my Vista box using a standard user that I just created, even if I run the program as administrator. I do not get the fatal error when I log in as local administrator. I'm not sure that being administrator is necessarily the trigger (since runas did not help). I have reproduced this half a dozen times under each account with consistent results. The faulty code Base.cs (base class for several user controls, only one of which is shown on first screen) private void BaseWindow_Load(object sender, EventArgs e) { // This message shown once in both cases MessageBox.Show("BaseWindow_Load for " + this.GetType().FullName); SkinManager.ApplySkin(this); } SkinManager.cs private static Skin skin = null; public static void ApplySkin(UserControl applyTo) { if (skin == null) { skin = new Skin(SkinsDirectory, "Default"); } } Skin.cs internal Skin(string skinPath, string skinName) { config = SkinConfig.Load(path); } SkinConfig.cs public static SkinConfig Load(string path) { // This message shown only once running as Admin but twice running as standard user System.Windows.Forms.MessageBox.Show("@1"); // !!! LOCK path HERE !!! } A user control loads on the first form, which triggers a call to SkinManager.ApplySkin, which checks if skin is null and, if so assigns it (without thread synchronization or recursion protection), which ultimately causes a file to be opened. When logged in as local admin, that sequence completes just fine. When logged in as my test standard user, ApplySkin is always called a second time while skin is still null, causing a second attempt to load, causing the file to be locked on the second attempt. The error handling is draconian at this point and the program terminates. The Question While this code can be easily fixed, I would like to understand why the error is happening only in some cases.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >