Daily Archives

Articles indexed Thursday June 3 2010

Page 31/111 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • How to handle UIPickerView with two data sources?

    - by devb0yax
    Hi, is it possible to handle two data sources in the UIPickerView? I have here a segmented control that would control the display of the picker view. So, for example, when first segment is clicked, the picker will display person's name. Then, when second segment is clicked, picker will display place's name. Thanks

    Read the article

  • Subview position issue after UIOrientation (rotation) change

    - by asadqamber
    I have a viewController and have added a subview in it programatically. secondView.autoresizingMask = UIViewAutoresizingFlexibleWidth; [self.view addSubview:secondView]; I guess when the device rotates, my mainViewController knows that orientation changed, but the subview (secondView) inside the mainViewController does not know this, so I change its frame to landscape size in willRotateToInterfaceOrientation. secondView.frame = CGRectMake(0, 0, 480 , 260); This does not set in the correct position, it's 11 px below the NavigationBar. Why does it start from 11 px below the navigation bar? The navigation bar shrinks when we move from portrait to landscape mode and its because of this that my subview is 11px below.

    Read the article

  • wpf mvvm client server application

    - by jim
    First of all i must say i am new to wpf and mvvm. I want to develop a client-server application(clients send info to the server and the serer notifies one or more of them..consider something like yahoo messenger(some user changes his status..sends info to the server and the sever notifies his friends and changes to their UI are made) My question is: does mvvm suits well with this kind of application?

    Read the article

  • Error 18456. State 6 "Attempting to use an NT account name with SQL Server Authentication."

    - by Aragorn
    2010-05-06 17:21:22.30 Logon Error: 18456, Severity: 14, State: 6. 2010-05-06 17:21:22.30 Logon Login failed for user . Reason: Attempting to use an NT account name with SQL Server Authentication. [CLIENT: ] The authentication mode is "Mixed". And its MS SQL Server 2008. What might be the issue? Do you think the user name was not configured properly? Is there any link available for giving the right privileges and configuring the user account? So that I can check the rights and privileges for the acc I am using... thanks

    Read the article

  • How should I name my SQL query files? Should I use some methodology?

    - by Mehper C. Palavuzlar
    We have an Oracle 10g database (a huge one) in our company, and I provide employees with data upon their requests. My problem is, I save almost every SQL query I wrote, and now my list has grown too much. I want to organize and rename these .sql files so that I can find the one I want easily. At the moment, I'm using some folders named as Sales Dept, Field Team, Planning Dept, Special etc. and under those folders there are .sql files like Delivery_sales_1, Delivery_sales_2, ... Sent_sold_lostsales_endpoints, ... Sales_provinces_period, Returnrates_regions_bymonths, ... Jack_1, Steve_1, Steve_2, ... I try to name the files regarding their content but this makes file names longer and does not completely meet my needs. Sometimes someone comes and demands a special report, and I give the file his name, but this is also not so good. I know duplicates or very similar files are growing in time but I don't have control over them. Can you show me the right direction to rename all these files and folders and organize my queries for easy and better control? TIA.

    Read the article

  • Normal check interval and re try check interval doesnot work in nagios

    - by chandra
    Hi Guys, I have configured nagios in my environment and i have used the following setting for a service which monitors the disk space for every 10 min , Normal check interval =10 min retry check interval = 1 min Maximum attempts =2 But accoring to this values i should recieve my first alert after 10 min and then from there for every 1 min. But in my case i am recieving my first alert and then next alert comes to me after 20 min. Can some one help me in fixing this.

    Read the article

  • Change User's password in Subversion

    - by Derek
    We use Collabnet Subversion here in our office. We can change user passwords via console (remote access to the server), but the console is only accessible by a root password. Is there an existing web interface which users can use to change their passwords?

    Read the article

  • Call an anonymous function defined in a setInterval

    - by Tominator
    Hi, I've made this code: window.setInterval(function(){ var a = doStuff(); var b = a + 5; }, 60000) The actual contents of the anonymous function is of course just for this small example as it doesn't matter. What really happens is a bunch of variables get created in the scope of the function itself, because I don't need/want to pollute the global space. But as you all know, the doStuff() function won't be called until 60 seconds in the page. I would also like to call the function right now, as soon as the page is loaded, and from then on every 60 seconds too. Is it somehow possible to call the function without copy/pasting the inside code to right after the setInterval() line? As I said, I don't want to pollute the global space with useless variables that aren't needed outside the function.

    Read the article

  • Adding an annotation to a runtime generated method/class using Javassist

    - by Idan K
    I'm using Javassist to generate a class foo, with method bar, but I can't seem to find a way to add an annotation (the annotation itself isn't runtime generated) to the method. The code I tried looks like this: ClassPool pool = ClassPool.getDefault(); // create the class CtClass cc = pool.makeClass("foo"); // create the method CtMethod mthd = CtNewMethod.make("public Integer getInteger() { return null; }", cc); cc.addMethod(mthd); ClassFile ccFile = cc.getClassFile(); ConstPool constpool = ccFile.getConstPool(); // create the annotation AnnotationsAttribute attr = new AnnotationsAttribute(constpool, AnnotationsAttribute.visibleTag); Annotation annot = new Annotation("MyAnnotation", constpool); annot.addMemberValue("value", new IntegerMemberValue(ccFile.getConstPool(), 0)); attr.addAnnotation(annot); ccFile.addAttribute(attr); // generate the class clazz = cc.toClass(); // length is zero java.lang.annotation.Annotation[] annots = clazz.getAnnotations(); And obviously I'm doing something wrong since annots is an empty array. This is how the annotation looks like: @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface MyAnnotation { int value(); }

    Read the article

  • For business people to manage, keep binary images in MySQL or just the urls?

    - by Michael Mao
    Hello everyone: I am working on a task to enable image uploading and auto-scaling(from full sized to thumbnail) by jQuery & PHP. I can naturally come up with two approaches : First, store both images as binary objects directly into MySQL; Second, store only urls to the images and keep the images somewhere on server. The images are for everyone to view, so there are no security restrictions, as far as I know. Personally I don't have any preference, however, at the end of the day, it is the business people that are going to manage the images as part of the system(CRUD). So I am wondering which seems to be a bit better for them? Of course I am building a easy-to-use, visualize web interface for the staff to control the process, but I am not sure if that is enough. Lessons told me that if I don't think for the future and seek the most flexible approach, the I will probably screw myself sooner or later. PS. The following link is what I've found so far, which is pretty cool, no flash involved :) Andrew Valum's ajax image upload jQuery plugin

    Read the article

  • Accessing Instance Variables from NSTimer selector

    - by Timbo
    Firstly newbie question: What's the difference between a selector and a method? Secondly newbie question (who would have thought): I need to loop some code based on instance variables and pause between loops until some condition (of course based on instance variables) is met. I've looked at sleep, I've looked at NSThread. In both discussions working through those options many asked why don't I use NSTimer, so here I am. Ok so it's simple enough to get a method (selector? ) to fire on a schedule. Problem I have is that I don't know how to see instance variables I've set up outside the timer from within the code NSTimer fires. I need to see those variables from the NSTimer selector code as I 1) will be updating their values and 2) will set labels based on those values. Here's some code that shows the concept… eventually I'd invalidate the timers based on myVariable too, however I've excluded that for code clarity. MyClass *aMyClassInstance = [MyClass new]; [aMyClassInstance setMyVariable:0]; [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(doStuff) userInfo:nil repeats:YES]; [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(doSomeOtherStuff) userInfo:nil repeats:YES]; - (void) doStuff { [aMyClassInstance setMyVariable:11]; // don't actually have access to set aMyClassInstance.myVariable [self updateSomeUILabel:[NSNumber numberWithInt:aMyClassInstance.myVariable]]; // don't actually have access to aMyClassInstance.myVariable } - (void) doSomeOtherStuff { [aMyClassInstance setMyVariable:22]; // don't actually have access to set aMyClassInstance.myVariable [self updateSomeUILabel:[NSNumber numberWithInt:aMyClassInstance.myVariable]]; // don't actually have access to aMyClassInstance.myVariable } - (void) updateSomeUILabel:(NSNumber *)arg{ int value = [arg intValue]; someUILabel.text = [NSString stringWithFormat:@"myVariable = %d", value]; // Updates the UI with new instance variable values }

    Read the article

  • How do I pass a reference type to Control.Invoke / display a form centered on the main form

    - by Rubio
    I'm on a thread other than the UI thread and need to display a modal form that's centered on the application's main form. What I usually do is use the width and height of the main form and the modal form to calculate the location, then use the PointToScreen method of the main form to get the location of the modal form. Since I'm on another thread I need to use Control.Invoke to call this method. I just can't figure out how to pass a parameter of type Point to Control.Invoke (params object[]). Value types and String works fine. Or, if someone can find a better way to display a form centered on the main form regardless of thread, that would be great. MessageBox seems to be able to do this (although not modally).

    Read the article

  • Bazaar offline + branches

    - by cheez
    I have a Bazaar repository on Host A with multiple branches. This is my main repository. Until now, I have been doing checkouts on my other machines and committing directly to the main repository. However, now I am consolidating all my work to my laptop and multiple VMs. I need to be working offline regularly. In particular, I need to create/delete/merge branches all while offline. I was thinking of continuing to have the master on Host A with a clone of the repository on the laptop with each vms doing checkouts of the clone. Then, when I go offline, I could do bzr unbind on the clone and bzr bind when I am back online. This failed as soon as I tried to bzr clone since bzr clone only clones a branch(!!!!) I need some serious help. If Hg would handle this better please let me know (I need Windows support.) However, at this moment I cannot switch from Bazaar as it is too close to some important deadlines. Thanks in advance!

    Read the article

  • SMO some times doesn't display the instances in sql2008 cluster

    - by Cute
    Hi I have used SMO API.in that i have used SmoApplication.EnumAvailableServers(FALSE) and from that i have filtered local instances i have used this approch insted of true to make this as convinent for remote sqldiscovery also.using that api created a dll and use that dll in c++. Now this is working in all combinations but some times it is failed to retrieve the instannces in win2008 sql2008 cluster combination. if i run the exe for 5 times it got succeed for 3 times and failed for two times... What is wromg with win-sql2008 cluster .is there any additional changes needed to make it work properrly.My firewall is off and also added exception for tcp port 1433. Anyy help is greately Appreciated... Thanks in Advance.

    Read the article

  • GCC, functions, and pointer arguments, warning behaviour

    - by James Morris
    I've recently updated to a testing distribution, which is now using GCC 4.4.3. Now I've set everything up, I've returned to coding and have built my project and I get one of these horrible messages: *** glibc detected *** ./boxyseq: free(): invalid pointer: 0x0000000001d873e8 *** I absolutely know what is wrong here, but was rather confused as to when I saw my C code where I call a function which frees a dynamically allocated data structure - I had passed it an incompatible pointer type - a pointer to a completely different data structure. warning: passing argument 1 of 'data_A_free' from incompatible pointer type note: expected 'struct data_A *' but argument is of type 'struct data_B *' I'm confused because I'm sure this would have been an error before and compilation would never have completed. Is this not just going to make life more difficult for C programmers? Can I change it back to an error without making a whole bunch of other warnings errors too? Or am I loosing the plot and it's always been a warning?

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >