Search Results

Search found 50973 results on 2039 pages for 'class names'.

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

  • Initiate a PHP class where class name is a variable

    - by ed209
    I need some help with an error I have not encountered before and can't seem to find anywhere. In a PHP mvc framework (just from a tutorial) I have the following: // Initiate the class $className = 'Controller_' . ucfirst($controller); if (class_exists($className)) { $controller = new $className($this->registry); } $className is showing the correct class name (case is also correct). But when I run it I get this in the apache error log (no php error) [Wed Mar 31 10:34:12 2010] [notice] child pid 987 exit signal Segmentation fault (11) Process id is different on every call. I am running PHP 5.3.0 on os x 10.6. This site seems to work on 5.2.11 on another Mac. Not really sure where to go next to debug it. I guess it could be an apache setting as much as a php bug or a problem with the code... any suggestions on where to look next?

    Read the article

  • A program/command to help translate multiple file names

    - by cipricus
    I have hundreds of files with different names that I want to translate into a different language. Is there an application/CLI action that would allow me to copy all this names as in a list/table and then, after having translated them, to paste them back into the list/table, or that would allow a procedure somewhat similar to "Rename" in Thunar but with a more complex action closer to what I have described? (I am in Lubuntu and I prefer not to use Nautilus due to unwanted interference with LXDE/pcmanfm desktop and LXPanel. If there is a solution in Nautilus please provide it but try to give an alternative if possible.)

    Read the article

  • A program/CLI command to help translate multiple file names

    - by cipricus
    I have hundreds of files with different names that I want to translate into a different language. Is there an application/CLI action that would allow me to copy all this names as in a list/table and then, after having translated them, to paste them back into the list/table, or that would allow a procedure somewhat similar to "Rename" in Thunar but with a more complex action closer to what I have described? (I am in Lubuntu and I prefer not to use Nautilus due to unwanted interference with LXDE/pcmanfm desktop and LXPanel. If there is a solution in Nautilus please provide it but try to give an alternative if possible.)

    Read the article

  • Generate java class and call it's method dynamically

    - by Jacob
    package reflection; import java.io.*; import java.lang.reflect.*; class class0 { public void writeout0() { System.out.println("class0"); } } class class1 { public void writeout1() { System.out.println("class1"); } } class class2 { public void writeout2() { System.out.println("class2"); } } class class3 { public void run() { try { BufferedReader reader= new BufferedReader(new InputStreamReader (System.in)); String line=reader.readLine(); Class cls=Class.forName(line); //define method here } catch(Exception ee) { System.out.println("here "+ee); } } public void writeout3() { System.out.println("class3"); } } class class4 { public void writeout4() { System.out.println("class4"); } } class class5 { public void writeout5() { System.out.println("class5"); } } class class6 { public void writeout6() { System.out.println("class6"); } } class class7 { public void writeout7() { System.out.println("class7"); } } class class8 { public void writeout8() { System.out.println("class8"); } } class class9 { public void writeout9() { System.out.println("class9"); } } class testclass { public static void main(String[] args) { System.out.println("Write class name : "); class3 example=new class3(); example.run(); } } Question is ; third class will read the name of the class as String from console. Upon reading the name of the class, it will automatically and dynamically generate that class and call its writeout method.If that class is not read from input, it will not be initialized. but I can't continue any more ; i need to more something for 3.class, what can i do? Thanks;

    Read the article

  • Accessing variables of an object of a particular class through a different class within the construc

    - by Haxed
    class Student { private String name; public Student(String name){ this.name = name; } public String getName(){ return name; } } class StudentServer { public StudentServer(){ Student[] s = new Student[30]; s[0] = new Student("Nick"); System.out.println(s[0]); // LINE 01:But this compiles, although prints junk System.out.println(s[0].getName()); // LINE 02:I get a error called cannot find symbol } public static void main(){ new StudentServer(); } } Hey, there are two lines, I want the reader to focus on, the first line prints junk as usual, but suprizingly the second one gives me an error. Do you know why ? Many Thanks

    Read the article

  • Jquery binding event on selected class

    - by Andrew
    Is it achievable in jquery to bind an event to a group of control that has certain class? It seems to me, it can't. I google a bit and all that came up are nothing to do with events. Here's how my code looks - $('.numonly').bind('keypress',function(event){ if (event.which > 31 && (event.which < 48 || event.which > 57)) return false; });

    Read the article

  • I want to get the value from one class (SearchTableViewController.m) to another class (HistoryTableV

    - by ahmet732
    #import <UIKit/UIKit.h> @class SearchDetailViewController; @interface SearchTableViewController : UITableViewController <UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource>{ IBOutlet UITableView *myTableView; NSMutableArray *tableData;//will be storing data that will be displayed in table. //Search array den buna aktarma yapcaz ilerde görceksin. NSMutableArray *searchedData;//will be storing data matching with the search string UISearchBar *sBar;//search bar NSMutableArray *searchArray; // It holds the medicines that are shown in tableview SearchDetailViewController * searchDetailViewController; NSMutableArray *deneme; } @property(nonatomic,retain)UISearchBar *sBar; @property(nonatomic,retain)IBOutlet UITableView *myTableView; @property(nonatomic,retain)NSMutableArray *tableData; @property(nonatomic,retain)NSMutableArray *searchedData; @property (nonatomic, retain) NSMutableArray *searchArray; @property (nonatomic, retain) SearchDetailViewController *searchDetailViewController; @property (nonatomic, copy) NSMutableArray *deneme; @end SearchTableViewController.m - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; **deneme= [[NSMutableArray alloc]init]; deneme=[tableData objectAtIndex:indexPath.row];** ****NSLog(@"my row = %@", deneme);**// I holded one of the selected cells here** HistoryTableViewController.m - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; **SearchTableViewController *obj= [[SearchTableViewController alloc]init];** **NSLog(@"my 2nd row= %@", [obj deneme]); //it prints nil** } My project is TabBar. There are two buttons on it- Search and History. I want to display selected items in a table in History tab. But i can not bring the selected item from SearchTableViewController.m to the class (HistoryTableViewController.m) The problem is : I can hold one of the selected items in an array (named deneme)from table in SearchTableViewController.m but i can not take it to HistoryTableViewController.m. It prints nil in console screen.... If I can make it visible in History class, I display those selected items on table. Please help me !!!

    Read the article

  • class not found when running

    - by captfrank
    I'm getting "could not find class" error when I run my app. Understand that copulation and execution path different but I followed the recommendations of another question to create a sub dir under my project of lib and put the jar there but still no luck. using Eclipse and it is when I run on a device from eclipse (unable to get the broadcast events I want to trigger this code from simulator, i.e. wifi and blue-tooth). Any way to look at the apk to see what's in it like this jar file? looking around did not see anything.

    Read the article

  • Will URL encoding the image names

    - by TheGateKeeper
    Just wondering if it makes any difference to Google whether or not I URL encode the image names when linking to them. For example if I have an image named "test-1234-!.jpg", does it make a difference if I name it refer to it as "test-1234-%21.jpg"? The reason I am asking is because I am doing a major shift in the way my website works and while all new image names will not be URL encoded, all of the past ones are. I want to see if it is worth it renaming all of them or if I should just leave it like that.

    Read the article

  • Ideas for card deck names [closed]

    - by Milan Babuškov
    I'm creating a card game, and wish to offer players to choose from different sets of playing cards. The game logic remains the same, only the design and graphics on the cards would be different. It would feature classic French set, German/Hungarian one, and a bunch of other custom designed ones. I'm looking for some cool names to give to those sets. I thought maybe to use names of some world cities like "London set", "Paris set", "Tokyo set", but there might be something better. I know this is really open-ended question, so there might not be a definitive "correct" answer, but I hope this kind of brainstorming would be useful to anyone looking for ideas to name a set of... well, anything. I'll up-vote any good idea, no matter if I don't end up using any of those.

    Read the article

  • PHP How to access constant defined outside class?

    - by Ashley Ward
    I have defined some constants eg: define('DB_HOSTNAME', 'localhost', true); define('DB_USERNAME', 'root', true); define('DB_PASSWORD', 'root', true); define('DB_DATABASE', 'authtest', true); now when I try to do this: class Auth{ function AuthClass() { $this->db_link = mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD) or die(mysql_error()); } } I get an error. Why is this and what do I need to do? See, I've tried using (for example) global DB_HOSTNAME but this fails with an error.

    Read the article

  • How to repaint another Qt class

    - by RR
    Hi all, I'm a new bit in Qt... I have a Qt GUI application (written by me), let's call it QtAPP.exe When QtAPP.exe running, I will use a QThread and QProcess to execute some external file, such as player.exe (written in native C). Here's my question: In QtAPP.exe, there are 2 classes, 1. QMainWindow - Core of QtAPP.exe 2. QThread - A thread class to execute external things For now, if I got a finished() signal in that QThread, how do I to force the QMainWindow to repaint itself ? Hope somebody can show me some tips, maybe sample code :) Any suggestion are welcome~

    Read the article

  • Returning new base class when the parent class shared pointer is the return type

    - by Ben Dol
    Can you have a parent class shared pointer return type of a function and then return a new child class without it being a shared pointer? I'm not sure how shared pointers work in these situations, do they act like a regular pointer? Here is my example: BaseEventPtr Actions::getEvent(const std::string& nodeName) { if(asLowerCaseString(nodeName) == "action") return new ActionEvent(&m_interface); return nullptr; } ActionEvent is the subclass of BaseEvent in this situation. Cheers!

    Read the article

  • php require class call from inside method

    - by jera
    from my understanding, require pastes code into the calling php file. what if you were requiring from inside a method...it would paste the entire code/class inside the method, blocking the next statement in the method. eg. function test() { require 'pathtosomeclasscode'; somestatement; // any code after the require is blocked. } how do i get around this, to be able to require code where-ever, without it being pasted in that exact spot? Thanks in advance for your help.

    Read the article

  • Reducing unnecessary same values in Class member variables ....

    - by Freshblood
    class A { public int a; public int c; } i will create 10 instances from A.Then i will create 15 instances from A again... go on. first 10 instance will have same value for a variable and next 15 instances will have again same value for a.But I don't mean that both group has same values for a .Problem is create same a value 10 times in first group and 15 times in second group on memory unnecessary. What would be Best solution or solutions for reduce unnecessary datas in this situation?

    Read the article

  • php class basic question

    - by Ross
    hi <?php class myClass { var $input; var $output; function myClass($input) { $output = 'You entered: ' . $input; return $output; } } $test = new myClass; echo $test->myClass(123); ?> this works, but returns this warning: Warning: Missing argument 1 for myClass::myClass() I read in to this, and seems that the constructor is expecting a value, so by adding: function myClass($input='') the warning is removed, but this seems so unnecessary? could someone enlighten me as to why it's required to define a value to prevent that warning? thanks for any pointers

    Read the article

  • NULL In a Class Destructor

    - by Hyper-DarkStar
    Simple question; Is it pointless to set a pointer( which allocates heap memory ) to NULL in the destructor? class SampleClass { public: SampleClass( int Init = 0 ) { Value = new int( Init ); } ~SampleClass( void ) { delete Value; Value = NULL; // Is this pointless? } int *Value; }; While on the subject of classes, when should I use the explicit keyword? Thanks.

    Read the article

  • Why can I derived from a templated/generic class based on that type in C# / C++

    - by stusmith
    Title probably doesn't make a lot of sense, so I'll start with some code: class Foo : public std::vector<Foo> { }; ... Foo f; f.push_back( Foo() ); Why is this allowed by the compiler? My brain is melting at this stage, so can anyone explain whether there are any reasons you would want to do this? Unfortunately I've just seen a similar pattern in some production C# code and wondered why anyone would use this pattern.

    Read the article

  • Problem with accessing classes from another class.

    - by srikanth rongali
    I have a classA, classB,classC. I have another class classABC; All are CCLayer inherited. I need to call all the classA, classB, classC from classABC. #import <Foundation/Foundation.h> #import "cocos2d.h" @interface classABC : CCLayer { classA *aClass; } @property(nonatomic, retain)classA *aClass; @end #import "classABC" #import "classA.h" #import "classB.h" #import "classC.h" @implementation classABC -(id)init { if( (self = [super init]) ) { ClassA *aClass = [[ClassA alloc]init]; CCScene *aClassS = [CCScene node]; CCLayer * aClassL = [aClass node]; [aClassS addChild: aClassL]; [[CCDirector sharedDirector] setAnimationInterval:60.0/60]; [[CCDirector sharedDirector] replaceScene: aClass]; } return self; } @end But I am not getting the classA displayed. How should I do it ? Thank You.

    Read the article

  • Will URL encoding the image names affect Google

    - by TheGateKeeper
    Just wondering if it makes any difference to Google whether or not I URL encode the image names when linking to them. For example if I have an image named "test-1234-!.jpg", does it make a difference if I name it refer to it as "test-1234-%21.jpg"? The reason I am asking is because I am doing a major shift in the way my website works and while all new image names will not be URL encoded, all of the past ones are. I want to see if it is worth it renaming all of them or if I should just leave it like that.

    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

  • php class crash course

    - by rabidmachine9
    Hello people, I'm sorry for this question but I'm getting crazy trying to write my first php clash, it is supposed to connect me to server and to a database but I'm always getting this error: Parse error: syntax error, unexpected ',', expecting T_PAAMAYIM_NEKUDOTAYIM in /Applications/XAMPP/xamppfiles/htdocs/classTest/test.php on line 9 thanks in advance, here is the code: <?php // include 'DBConnect.php'; class DBConnect { function connection($hostname = "localhost", $myname = "root", $pass = ''){ mysql_connect(&hostname, &myname, &pass) or die("Could not connect!"); //Connect to mysql } function choose($dbnam){ mysql_select_db(&dbnam) or die("Couldn't find database!"); //fnd specific db } } $a = new DBConnect(); $connect = $a->connection("localhost", "root"); $a->choose('mydb'); ?>

    Read the article

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