Search Results

Search found 2210 results on 89 pages for 'stupid phil'.

Page 60/89 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • how to use same string in two java files

    - by Palike
    Sorry for my bad English and for maybe stupid question but I'm new in Java. I need use same string in 2 java files for example: In first java file I've got code for sending emails, I've got string set to default email: public String mail = new String ("[email protected]"); and I use this string in code for send email: email.addTo(mail); In second java file something like set up where can user set new email address I want to have same string, connected with string in first java file. When user put new email String mail will be change to new email address and in email.addTo(mail); will be use this new address How can I do this?

    Read the article

  • Java vs C# - AddActionListener vs event subscription

    - by S.O.
    Very simple question from one somewhat new to Java: when adding an event handler (or whatever it is called in Java) to a Control, MUST it be an object? I mean, in C# I can do control.event += System.eventHandler(methodThatHandlesEvent) Sure, that's because we have delegate types in C#, but I was wondering if I can choose which method would be called when an event is raised in Java? I mean, in Java I can have something like control.AddActionListener(objectWhichClassImplementsActionListener) And then I have the stupid actionPerformed method in this class, which is the only method that is called. I know, there are more kinds of listeners, but I can't have a "ActionListenerHandler" class in which I implement several actionPerformed methods that can be assigned to different controls?

    Read the article

  • Javascript in CakePHP

    - by user445803
    Hello, I had one page in Views in CakePHP, it have normal javascript block, Just inserted: <script language="JavaScript" type="text/javascript"> ---code--- </script> Inside page, and it was all working okay... But now... It doesn't show... How can I change configuration or something to enable showing javascript blocks without CakePHP commands. Javascript needs data from that page so I can't use outer file, and it's too long to use $javascript-codeBlock Is there any way to reconfigure stupid CakePHP to start showing those blocks? Some files are showing javascript, and it's working all okay, but some of them won't show... Please help...

    Read the article

  • before_filter not inheriting from parent controller correctly?

    - by Scott
    Sorry if this may be a stupid question but I'm unable get my filters to inherit the way the Rails 3 documentation is saying it should. Specifically I have an Admin controller that was generated via: rails generate controller admin I added only a single action to the admin controller, the before filter & the private filter method class AdminController < ApplicationController before_filter require_admin_creds def index end private def require_admin_creds unless current_user && current_user.admin? flash[:error] = ... redirect_to .... end end end I next then created my nested resources under the admin section with: rails generate scaffold admin/model While my admin index is indeed getting the filter, the admin/model index (or any other actions) are not. What is happening under the hood here that I must have excluded? Thanks in advance.

    Read the article

  • Updating .net 4.0 machine.config seems to have no effect

    - by Jon P
    I'm feeling stupid. I've just created my first ASP.net 4.0 site after working my way though over the years from 1.1 upwards. We have several settings at the machine.config level that I need to migrate to the new 4.0 machine.config. I though I had be adding the required connection strings to the connection string section of the following two files: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\machine.config C:\Windows\Microsoft.NET\Framework\v4.0.30319\machine.config When I created a new website in IIS and assigned it to the ASP.net 4.0 Application pool I only get the default LocalSqlServer connection string. I tried editing the name of this in the two files above to indicate which file it was in, but there was no change. Are there machine.config files in other locations I should be looking at?

    Read the article

  • Why Java cannot find my constructor?

    - by Roman
    Well, maybe it is a stupid question, but I cannot resolve this problem. In my ServiceBrowser class I have this line: ServiceResolver serviceResolver = new ServiceResolver(ifIndex, serviceName, regType, domain); And compiler complains about it. It says: cannot find symbol symbol : constructor ServiceResolver(int,java.lang.String,java.lang.String,java.lang.String) This is strange, because I do have a constructor in the ServiceResolver: public void ServiceResolver(int ifIndex, String serviceName, String regType, String domain) { this.ifIndex = ifIndex; this.serviceName = serviceName; this.regType = regType; this.domain = domain; } ADDED: I removed void from the constructor and it works! Why?

    Read the article

  • How to run a .class file in Windows 7 OS?

    - by jNoob
    Hi, This is probably a stupid question, but how do I run a class file on windows 7? I usually create my own .java files and then use a basic IDE (with JDK6) to compile it to a class and run it automatically. My professor gave a .class file that we are supposed to play with extensively but I have no idea how to to run it here. Note that I cannot run it by typing: java classname.class because it contains gui stuff especially buttons and such. If I do the above I get the following error: java.lang.NoClassDefFoundError: Test1/2/class Caused by: java.lang.ClassNotFoundException: Test1.2.class at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) Could not find the main class: Test1.2.class. Program will exit. Exception in thread "main" Any help would be highly appreciated. Thanks.

    Read the article

  • NSTextField is not changing value?

    - by Curnelious
    Migrating from iOS , i might do something stupid ,but after 1 hour i couldn't change the text in a NSTextField. Yes, its connected with an outlet, and i have tried to remove and add a few of them to the costume view, by choosing the xib file,drag a line from the NSTextField to the class than created this: @property (strong) IBOutlet NSTextField *ProgressLabel; I can see on the screen the label ,but it wouldn't change : NSLog(@"starting "); [self.ProgressLabel setStringValue:@"1 2 4"]; I keep seeing a "label" on screen..

    Read the article

  • How to load the whole content of a page into another window?

    - by Cristian Castiblanco
    I'm building a Dashboard and for some stupid reasons my boss wants to load it in a frame on the homepage (yes a frame, he still lives in the 1990s). Anyway, sometimes the dashboard needs some room so that it can show all charts correctly, so I want to add a feature to load the content of the dashboard into a new window. The problem is that, if the user has had some interaction with the dashboard, it will contain modal dialogs, new images, etc... so I want to load all the dashboard content into a new window without reloading its content. Of course, the user should be able to continue browsing the dashboard without problems. How can I do that? I'm using jQuery as my JavaScript framework.

    Read the article

  • Can I have a type that's both, covariant and contravariant, i.e. fully fungible/changeable with sub

    - by Water Cooler v2
    Just a stupid question. I could try it out in 2 minutes, really. It's just that I have 1 GB RAM and have already got 2 instances of VS 2010 open on my desktop, with an instance of VS 2005, too. Opening another instance of VS 2010 would be an over kill. Can I have a type (for now forgetting its semantics) that can be covariant as well as contravariant? For e.g. public interface Foo<in out T> { void DoFooWith(T arg); } Off to Eric Lippert's blog for the meat and potatoes of variance in C# 4.0 as there's little else anywhere that covers adequate ground on the subject.

    Read the article

  • Does it make any sense to develop for iPhone OS 3.0 instead of 3.2?

    - by mystify
    When it comes to backwards-compatibility, I want to stick to iPhone OS 3.0 so also some of the poor iPod Touch users who aren't rich enough for iPhones use my apps. But iPhone OS 3.2 has some pretty cool features that would be nice to have. Problematic thing: Since it's just a minor upgrade, I can imagine most iPod Touch users who decided to upgrade to 3.0 probably never upgraded to 3.2. I'm not sure if Apple actually asked them to pay like 10 bucks for going from 3.0 to 3.2. However, if Apple did ask them for money, I'm sure like 90% of all iPod Touch users didn't upgrade. So the big question is: IF you decide to go with iPhone OS 3.0, is it a stupid idea to stick to 3.2 just because of a few more features? Will this effectively kill half of your iPod Touch userbase?

    Read the article

  • Can someone tell me why my dataset wont save correctly to the database in simple winforms app?

    - by Mike
    I have been struggling with this all day and I know it is probably something stupid. My code is below. If I call save then exit my program and start again I can save images to my events but if I just call save when I try to add an image and call save again I get a foreign key error. From what I know I thought my save method was updating the database from my dataset so the event associated with the image should exist. Anyway here is my save method... Private Sub Save() Me.Validate() EventsBindingSource.EndEdit() ImagesBindingSource.EndEdit() TableAdapterManager.UpdateAll(EventDataSet) EventDataSet.AcceptChanges() End Sub Am I doing this wrong? Is this enough detail?

    Read the article

  • Is there any way to view PHP code (the actual code not the compiled result) from a client machine?

    - by Columbo
    This may be a really stupid question...I started worrying last night that there might be someway to view PHP files on a server via a browser or someother means on a client machine. My worry is, I have an include file that contains the database username and password. If there were a way to put the address of this file in to a browser or some other system and see the code itself then it would be an issue for obvious reasons. Is this a legitimate concern? If so how do people go about preventing this?

    Read the article

  • sqlite COUNT in flex returning [object Object]

    - by Adam
    I'm sure this is an easy questions and I'm just doing something stupid but I'm really new to all this code. I'm trying to run a sqlite query in flex to count the total number of records I believe its working fine but I just can't figure out how to display the results - all I get back is [object Object]. private function overviewOne():void{ var stmt:SQLStatement = new SQLStatement(); stmt.sqlConnection = sqlConn; stmt.text = "SELECT COUNT(user_id) FROM tbl_user WHERE status_status ='Away'"; stmt.execute(); var result:SQLResult = stmt.getResult(); acoverviewOne = new Array(result.data); trace (result.data[0]); }

    Read the article

  • Background subtracting in MATLAB

    - by eiphyomin
    I'm looking to do background subtracting on an image. I'm new to MATLAB and new to image processing/analysis, so sorry if any of this sounds stupid. 1) Other than imsubtract() are there other ways to do background subtracting (besides comparing one image to another)? 2) In the Math Works explanation for imsubtract() why do they make their structuring element a disk? This seems rather difficult so far because every time I try something, I end up not only subtracting the noisy background but also losing the parts of the image I want to look at!

    Read the article

  • Objective-C why doesn't my array of array works?

    - by Quetsche
    This is probably a completely stupid question, but i'm pretty new at objective-C and programing in general. i'm trying to make an array of arrays but can't manage to make it work : @interface ArraysAndDicts : NSObject { NSMutableArray * mySimpleArray; NSMutableArray * myComplicatedArray; } the implementation : -(void)generateValueForArrayOfArrays { [self generateValueForArray]; //this generates an array with 5 elements 'mySimpleArray' [myComplicatedArray addObject:mySimpleArray]; NSMutableArray * mySecondaryArray = [[NSMutableArray alloc] init]; [mySecondaryArray addObject:@"twoone"]; [mySecondaryArray addObject:@"twotwo"]; [myComplicatedArray addObject:mySecondaryArray]; (i edited out all the NSLogs for clarity) When running my app, the console tells me : mySecondaryArray count = 2 mySimpleArray count = 5 myComplicatedArraycount = 0 So, i know there are other ways to make multidimensional arrays, but i'd really like to know why this doesn't work. Thank you.

    Read the article

  • Single logical SQL Server possible from multiple physical servers?

    - by TuffyIsHere
    Hi, With Microsoft SQL Server 2005, is it possible to combine the processing power of multiple physical servers into a single logical sql server? Is it possible on SQL Server 2008? I'm thinking, if the database files were located on a SAN and somehow one of the sql servers acted as a kind of master, then processing could be spread out over multiple physical servers, for instance even allowing simultaneous updates where there was no overlap, and in the case of read-only queries on unlocked tables no limit. We have an application that is limited by the speed of our sql server, and probably stuck with server 2005 for now. Is the only option to get a single more powerful physical server? Sorry I'm not an expert, I'm not sure if the question is a stupid one. TIA

    Read the article

  • Objective-C inheritance; calling overriden method from superclass?

    - by anshuchimala
    Hello, I have an Objective-C class that has a method that is meant to be overridden, which is uses in a different method. Something like this: @interface BaseClass - (id)overrideMe; - (void)doAwesomeThings; @end @implementation BaseClass - (id)overrideMe { [self doesNotRecognizeSelector:_cmd]; return nil; } - (void)doAwesomeThings { id stuff = [self overrideMe]; /* do stuff */ } @end @interface SubClass : BaseClass @end @implementation SubClass - (id)overrideMe { /* Actually do things */ return <something>; } @end However, when I create a SubClass and try to use it, it still calls overrideMe on the BaseClass and crashes due to doesNotRecognizeSelector:. (I'm not doing a [super overrideMe] or anything stupid like that). Is there a way to get BaseClass to call the overridden overrideMe?

    Read the article

  • Easy one? Access an object's property by using a variable in C# [closed]

    - by ozke
    Possible Duplicate: Property Name and need its value Hi, This one should be easy for most people. I'd like to access a normal variable in an object (let's say example) by using a variable value. E.g.: I have a an array with a list of variable names and I want to get the information from the object by using them. Obviously this is wrong: string[] variable_names = new string[] {"name", "surname"}; myObject.variable_names[0] = 1; myObject.variable_names[1] = 1; In other languages (not C#) I use: myObject[variable_names[0]] = 1; I know the example looks stupid but it was just a way of explaining it. Thanks in advance :)

    Read the article

  • Writing an AI for a turn-based board game

    - by Cyril
    Hi, i'm currently programming a board game (8x8) in which I need to develop an AI. I have read a lot of articles about AI in board games, minmax with or without alphabeta pruning, but I don't really know how to implements this, I don't know where to start... About my game, this is a turn-based game, each player has pieces on the board, they have to pick one and choose in moving this piece (1 or 2 cells max) or clone the piece (1 cell max). At the moment, I have a really stupid AI which choose a random piece then choose a random move to play... Could you please give me some clues, on how to implement this functionality ? Best regards

    Read the article

  • C program giving incorrect output for simple math!

    - by DuffDuff
    (all are declared as ints, none are initialized to anything beforehand. I have included math.h and am compiling with -lm) cachesize = atoi(argv[1]); blocksize = atoi(argv[3]); setnumber = (cachesize/blocksize); printf("setnumber: %d\n", setnumber); setbits = (log(setnumber))/(log(2)); printf("sbits: %d\n", setbits); when given cachesize as 1024 and blocksize as 16 the output is as follows: setnumber: 64 sbits: 5 but log(64)/log(2) = 6 ! It works correctly when given cachesize 512 and blocksize 32. I can't seem to win. I'm really hoping that it's a stupid mistake on my part, and I'd be grateful if anyone could point out what it is! Thank you! PS: I posted this in Yahoo Answers first but that was probably silly. Won't be doing that again.

    Read the article

  • IllegalAccessError: cross-loader access from pre-verifed class in MapActivity

    - by flipper83
    I have a big problem. When I lauch my MapActivity this launch the ilegal argument. I think that i check all 1) add map.jar from api 3 to eclipse 2) I obtain a api key 3) In androidmanifest I have putted the uses-library and te internet permision 4) I launch the google api emulator for api 3. 5) I dont know that i can try. Please, any idea? this can't be too dificult, I can't belive. Sure that it is a stupid thing :S

    Read the article

  • How compiling circular dependencies works?

    - by Fabio F.
    I've made the example in Java but I think (not tested) that it works in other (all?) languages. You have 2 files M.java that says public class MType{ XType x; MType(){ x = null;} } and another file XType.java (in the same directory) public class XType{ MType m; public XType(MType m){ this.m=m;} } Ok it's BAD programming , but.. if you run javac XType it compiles: compiles even MTypes because XType needs it. But.. MType needs XType.. how it works? How does the compiler know what is happening? Probably is a stupid question, but I would like to know how the compiler (javac or other compilers if you know.) manages that situation, not how to avoid it. I'm asking because i'm writing a precompiler and I would like to manage that situation.. Thank you

    Read the article

  • Pushing a local clone to remote repository with Mercurial

    - by yang
    Here is what I did: Cloned a remote repository to my local computer. Created a second clone from the first clone. Made changes in the second clone. Never touched anything that resides in the first clone. Now what happens if I directly push to remote repo from the second clone? A new branch is introduced in the remote repo? Maybe a stupid question but I can't test it because there are other developers working on the code and I don't want to mess anything. Thanks.

    Read the article

  • Prism : Add a window in a region

    - by esylvestre
    Hi, I'm new working with Prism with WPF, and I have a question which I can't find answer. Why it is impossible to add a window in a Region ? I can understand there's a good reason, so I will need another solution to my problem. It is quite simple, I got a LoginView (Window) which I want to appear first. For the previous reason, in my Region, I added a MainView (UserControl) where I just show my LoginView on the Loaded event. The problem if the user quit the application or if he cancels his login, the MainView is still showing up. It seems a stupid problem, but I can't find a smart solution. Thanks for your time.

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >