Search Results

Search found 6135 results on 246 pages for 'init d'.

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

  • [super init] and loading NIB / XIB files?

    - by fuzzygoat
    I am a little curious, I have a view controller class and an NIB/XIB (both are named "MapViewController") If I do the following it loads the NIB with the matching name. -(id)init { self = [super initWithNibName:@"MapViewController" bundle:nil]; if(self) { do things ... } return self; } if on the other hand I just specify [super init] does Xcode just look for a NIB that matches the name of the controller, is that how this is working? -(id)init { self = [super init]; if(self) { do things ... } return self; } cheers Gary.

    Read the article

  • How to call a method in init method ?

    - by srikanth rongali
    My program looks like this: -(id)init { if ( (self = [super init]) ) { //TargetWithActions *targetActions= [[TargetWithActions alloc] init]; [self countDownSpeed123]; } return self; } -(void)countDownSpeed123 { countDownSpeed = 5.0f; } @end warning: 'TargetWithActions' may not respond to '-countDownSpeed123' I am getting the warning in this way. Where I am wrong in my program. Please explain ? Thank You.

    Read the article

  • Objective-C: alloc of object within init of another object (memory management)

    - by Stefan Klumpp
    In my .h file I have: NSMutableArray *myArray; @property (nonatomic, retain) NSMutableArray *myArray; My .m file looks basically like this: @synthesize myArray; - (id) init { self = [super init]; if (self != nil) { self.myArray = .... ? // here I want to create an empty array } return self; } - (void) dealloc { [self.myArray release]; [super dealloc]; } What I'm not sure about is what do to in the init. 1) self.myArray = [[NSMutableArray alloc] init]; 2) NSMutableArray *tmp = [[NSMutableArray alloc] init]; self.myArray = tmp; [tmp release]; Solution 1 doesn't seem right to me, because of my @property (retain) setting I automatically increase the retain counter when setting self.myArray, but additionally I have already a "+1 retain" due to the [NSMutableArray alloc]. Thus the second solution seems more correct to me, even though it is cumbersome. Also am I wondering if self.myArray = ... is actually the same as [self setMyArray:...] and thus does increase the retain count.

    Read the article

  • Best way to test class methods without running __init__

    - by KenFar
    I've got a simple class that gets most of its arguments via init, which also runs a variety of private methods that do most of the work. Output is available either through access to object variables or public methods. Here's the problem - I'd like my unittest framework to directly call the private methods called by init with different data - without going through init. What's the best way to do this? So far, I've been refactoring these classes so that init does less and data is passed in separately. This makes testing easy, but I think the usability of the class suffers a little.

    Read the article

  • StackOverflow Error at java.util.AbstractColllection.<init>(Unknown Source)

    - by thebulge
    I fixed my prior problem yesterday by just separating all the classes into separate files. Nevertheless, I wrote all the code down and seeing no errors was able to compile the program. Or so I thought. Here's the error code: Exception in thread "main" java.lang.StackOverflowError at java.util.AbstractCollection.<init>(Unknown Source) at java.util.AbstractList.<init>(Unknown Source) at java.util.Vector.<init>(Unknown Source) at java.util.Vector.<init>(Unknown Source) at java.util.Vector.<init>(Unknown Source Here are the spots where my I get the errors(marked with problem?) public class GameWorld implements IObservable, IGameWorld { // create collections class public Vector<GameObject> GameObjectList = new Vector<GameObject>(); // PROBLEM private Vector<IObserver> ObserverList = new Vector<IObserver>(); // declare objects Tank pTank = new Tank(10, 10); // other objects and variables to declare public GameWorld() { // add objects to GameObjectList } // accessors/mutators } I get another error here public class Tank extends Movable implements ISteerable { private int armorStrength; private int missileCount; public Tank() {} public Tank(int armStr, int misslCt) // problem? { armorStrength = armStr; // default armorStrength missileCount = misslCt; // default missileCount } public void setDirection(int direction) { this.setDirection(direction); // get input from left turn or right turn // updateValues(); } // access/mutators here I'm stumped on what to do here.

    Read the article

  • Error when starting qpidd as a service

    - by Sparks
    I have recently swapped from CENTOS 5 to FEDORA 17. Previously I have created my own init.d scripts successfully (albeit not for qpidd) however, in FEDORA I cannot get it to work. I have created the following script (called qpidd) in the init.d directory: #!/bin/bash # # /etc/rc.d/init.d/qpidd # # QPID/AMQP Broker scripts # # # chkconfig: 2345 20 80 # description: QPID/AMQP Broker service # processname: qpidd # pidfile: /var/lock/subsys/qpidd # Source function library. . /etc/init.d/functions SERVICENAME=qpidd start() { echo -n "Starting $SERVICENAME: " daemon qpidd -d & retval=$? touch /var/lock/subsys/$SERVICENAME return $retval } stop() { echo -n "Shutting down $SERVICENAME: " qpidd -q & retval=$? rm -f /var/lock/subsys/$SERVICENAME return $retval } case "$1" in start) start ;; stop) stop ;; status) status qpidd ;; restart) stop start ;; condrestart) [ -f /var/lock/subsys/<service> ] && restart || : ;; *) echo "Usage: $SERVICENAME {start|stop|status|restart" exit 1 ;; esac exit $? After this, I ran chkconfig --add qpidd, however, now when I run sudo service qpidd start I get the following message: Starting qpidd (via systemctl): Job failed. See system journal and 'systemctl status' for details. If I then run systemctl status qpidd I get the following message: Failed to issue method call: Unit name qpidd is not valid. I am now lost, I have search the web and Stack Overflow but cannot find anybody with similar problem, any help or direction to a website that can help would be much appreciated Sparks :)

    Read the article

  • How to properly create a startup script for tracd on Synology DS209+II?

    - by Daren Thomas
    I'm running tracd on a Synology DS209+II NAS. For that purpose, I have created a script in /opt/etc/init.d called S81trac: myserver> ls -l /opt/etc/init.d -rwxr-xr-x 1 root root 127 May 19 09:56 S80apache -rwxr-xr-x 1 root root 122 Jun 10 10:17 S81trac This file has following contents: #!/bin/sh # run tracd /opt/bin/tracd -p 8888 -auth=*,/volume1/svn/svn-auth-file,mydomain -e /volume1/trac-env And this actually works, except, the NAS never really finishes booting: The blue light keeps flashing. Also, reboot doesn't work anymore (it hangs) and I have to use killall init to reboot the machine. I have tried running tracd in the background, by appending & to the last line of S81trac. After rebooting, the blue light stops flashing. But ps | grep tracd is empty and I can't connect to the trac instance from my PC. I guess I'm doing something wrong here, but what?

    Read the article

  • 14.04 missing "/etc/init.d/ufw"? my firewall never auto starts

    - by Aquarius Power
    I need to know how to fix the missing "/etc/init.d/ufw" file, is it some package or some command? I used the gufw to enable it, but on reboot my firewall was still off... I created a symlink /etc/init.d/ufw -> /lib/init/upstart-job but I could not make it work like start ufw. I found this file /lib/ufw/ufw-init, it looks like a init.d file! can I copy or symlink it there? Additional (optional) questions: How to find what package has that file? apt-cache search didnt work.. Can we safely create such a script? Any idea why is it missing? Obs.: my /etc/ufw/ufw.conf has ENABLED=yes (but seems useless..)

    Read the article

  • Likewise DomainJoin hangs on Finishing krb5.conf configuration

    - by dreay
    Hello, I have a problem when joining a CentOS release 5.4 (Final) x64 machine to the domain after running domainjoin-cli --loglevel info --log . join domain.local password I obtain the following, which seems to hang on "20100428112821:INFO:Finishing krb5.conf configuration" 20100428112817:INFO:Domainjoin invoked with the join command (remaining arguments will be printed later): 20100428112817:INFO: [/opt/likewise/bin/domainjoin-cli] 20100428112817:INFO: [--loglevel] 20100428112817:INFO: [info] 20100428112817:INFO: [--log] 20100428112817:INFO: [/tmp/join_1.log] 20100428112817:INFO: [join] 20100428112817:INFO:Checking status of daemon [/etc/init.d/lwsmd] 20100428112817:INFO:Daemon [/etc/init.d/lwsmd]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/lwsmd] 20100428112817:INFO:Daemon [/etc/init.d/lwsmd]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/lwregd] 20100428112817:INFO:Daemon [/etc/init.d/lwregd]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/lwregd] 20100428112817:INFO:Daemon [/etc/init.d/lwregd]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/netlogond] 20100428112817:INFO:Daemon [/etc/init.d/netlogond]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/netlogond] 20100428112817:INFO:Daemon [/etc/init.d/netlogond]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/lwiod] 20100428112817:INFO:Daemon [/etc/init.d/lwiod]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/lwiod] 20100428112817:INFO:Daemon [/etc/init.d/lwiod]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/dcerpcd] 20100428112817:INFO:Daemon [/etc/init.d/dcerpcd]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/dcerpcd] 20100428112817:INFO:Daemon [/etc/init.d/dcerpcd]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/eventlogd] 20100428112817:INFO:Daemon [/etc/init.d/eventlogd]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/eventlogd] 20100428112817:INFO:Daemon [/etc/init.d/eventlogd]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/lsassd] 20100428112817:INFO:Daemon [/etc/init.d/lsassd]: status [0] 20100428112817:INFO:Checking status of daemon [/etc/init.d/lsassd] 20100428112817:INFO:Daemon [/etc/init.d/lsassd]: status [0] 20100428112817:INFO:Domainjoin invoked with 2 arg(s) to the join command: 20100428112817:INFO: [domain.local] 20100428112817:INFO: [default.user] 20100428112817:INFO:Adding ops (fqdn ops.domain.local) to /etc/hosts ip 192.168.246.5, removing ops, ops.domain.local, ops, ops.domain.local 20100428112817:INFO:Reading krb5 file /tmp/likewisetmpPkpAn5/etc/krb5.conf 20100428112817:INFO:Reading krb5 file /tmp/likewisetmpb6dkNX/etc/krb5.conf 20100428112817:INFO:Reading nsswitch file /etc/nsswitch.conf 20100428112817:INFO:Reading pam configuration 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/config-util.rpmnew 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/config-util 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/runuser-l 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/sshd 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/other 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/smtp.postfix 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/su-l 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/system-switch-mail-nox 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/kshell 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/authconfig 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/ekshell 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/run_init 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/screen 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/eject 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/system-auth.rpmnew 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/system-config-network-cmd 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/system-auth-ac 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/kbdrate 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/smtp.sendmail 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/chsh 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/setup 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/system-switch-mail 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/ksu 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/login 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/sudo-i 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/smtp 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/runuser 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/chfn 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/ppp 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/gssftp 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/remote 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/reboot 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/newrole 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/pm-powersave 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/system-auth 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/halt 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/other.rpmnew 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/atd 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/passwd 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/authconfig-tui 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/pm-hibernate 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/su 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/system-config-network 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/neat 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/pm-suspend-hybrid 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/crond 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/sudo 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/pm-suspend 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.d/poweroff 20100428112817:INFO:Reading pam file /tmp/likewisetmptrO2dQ/etc/pam.conf 20100428112817:INFO:File /tmp/likewisetmptrO2dQ/etc/pam.conf does not exist 20100428112817:INFO:Found config file /etc/ssh/sshd_config 20100428112817:INFO:Found binary /usr/sbin/sshd 20100428112817:INFO:Reading ssh file /etc/ssh/sshd_config 20100428112817:INFO:Found open sshd version 4.3.-1p2 20100428112817:INFO:Testing option ChallengeResponseAuthentication 20100428112817:INFO:Option ChallengeResponseAuthentication supported 20100428112817:INFO:Testing option UsePAM 20100428112817:INFO:Option UsePAM supported 20100428112817:INFO:Testing option PAMAuthenticationViaKBDInt 20100428112817:INFO:Option PAMAuthenticationViaKBDInt not supported 20100428112817:INFO:Testing option KbdInteractiveAuthentication 20100428112817:INFO:Option KbdInteractiveAuthentication supported 20100428112817:INFO:Testing option GSSAPIAuthentication 20100428112817:INFO:Option GSSAPIAuthentication supported 20100428112817:INFO:Testing option GSSAPICleanupCredentials 20100428112817:INFO:Option GSSAPICleanupCredentials supported 20100428112817:INFO:Found config file /etc/ssh/ssh_config 20100428112817:INFO:Found binary /usr/bin/ssh 20100428112817:INFO:Reading ssh file /etc/ssh/ssh_config 20100428112817:INFO:Testing option GSSAPIAuthentication 20100428112817:INFO:Option GSSAPIAuthentication supported 20100428112817:INFO:Testing option GSSAPIDelegateCredentials 20100428112817:INFO:Option GSSAPIDelegateCredentials supported 20100428112821:INFO:Running module join 20100428112821:INFO:Starting krb5.conf configuration (enabling) 20100428112821:INFO:Reading krb5 file /tmp/likewisetmpvgqQmT/etc/krb5.conf 20100428112821:WARNING:Short domain name not specified. Defaulting to 'betgenius' 20100428112821:INFO:Failed to run lwinet ads trusts. This is expected if not yet joined to the domain 20100428112821:INFO:Failed to run lwiinfo --details -m. This is expected if the auth daemon is not running 20100428112821:INFO:Writing krb5 file /tmp/likewisetmpvgqQmT/etc/krb5.conf 20100428112821:INFO:File /tmp/likewisetmpvgqQmT/etc/krb5.conf modified 20100428112821:INFO:Finishing krb5.conf configuration Has anyone seen this error before? and know of the fix?

    Read the article

  • Pgagent startup script (under the postgres user)

    - by Dominique Guardiola
    Hello, I'm trying to make a clean startup script for pgagent I found one here but I don't see how I can change this : if start-stop-daemon --start --quiet --pidfile /var/run/pgagent.pid \ --exec /usr/bin/pgagent "hostaddr=127.0.0.1 dbname=postgres user=postgres \ password=XXXXXXX";then to launch something like this : su - postgres -c /usr/bin/pgagent "hostaddr=127.0.0.1 dbname=postgres user=postgres" in order to avoid to hard-code the PG password in the script. This is possible using the .pgpass file feature. It works when I'm logged under the postgres user. So my only problem left is how to launch this command under the postgres user tried to add --user=postgres in the call, like mentioned here but it does not work.

    Read the article

  • Server and GUI?

    - by Kiara
    I have installed an Ubuntu Server. It obviously comes with no graphical interface. I tried to install it with: apt-get install xserver-xorg xfonts* gnome gdm Then I got an error message trying to login with Gnome and eventually I uninstalled everything: apt-get remove xserver-xorg xfonts* gnome gdm However, it seems Ubuntu still has some scripts trying to launch Gnome since when starting I get: Starting GNOME Display Manager fail ... Stopping system v run level compatibility And the system stops forever (I know I can use ALT+F1) What should I modify to have this completely uninstalled? I cannit find anything on the rc2.d...

    Read the article

  • Can't repeatedly reload uwsgi

    - by Connorhd
    In Ubuntu 12.04 I can only reload my uwsgi app once, after this reload and force-reload fail. This appears to be because after the first reload the process names change from uwsgi to uwsgi-core, and the reload script looks for uwsgi processes with specific pids. I'm not sure if this is just a bug, and if so is there somewhere sensible for me to report it? Otherwise is there something I could be doing wrong to cause this?

    Read the article

  • (SYSLINUX QUESTION) How to launch command prompt once syslinux boots up

    - by user1294023
    I have created a bootable USB drive using SYSLINUX I am booting my x86 system correctly. Once system boots I want to stop at console (command prompt) where I can type linux commands (cd etc) and run my executable file manually. Does that mean I have to have busy box installed (for basic commands). What makes system stop at command prompt? I do have /dev/console. My serial console is tty1. Any help is appreciated. #syslinux.cfg serial 0 9600 default MyProgram prompt 1 label Linux display message.msg timeout 100 kernel bzImage append console=tty1,9600 vga=773 initrd initrd.img

    Read the article

  • objective-c default init method for class?

    - by Alex
    Hello, I have two differing methods for initializing my objective-c class. One is the default, and one takes a configuration parameter. Now, I'm pretty green when it comes to objective-c, but I've implemented these methods and I'm wondering if there's a better (more correct/in good style) way to handle initialization than the way I have done it. Meaning, did I write these initialization functions in accordance with standards and good style? It just doesn't feel right to check for the existence of selfPtr and then return based on that. Below are my class header and implementation files. Also, if you spot anything else that is wrong or evil, please let me know. I am a C++/Javascript developer who is learning objective-c as hobby and would appreciate any tips that you could offer. #import <Cocoa/Cocoa.h> // class for raising events and parsing returned directives @interface awesome : NSObject { // silence is golden. Actually properties are golden. Hence this emptiness. } // properties @property (retain) SBJsonParser* parser; @property (retain) NSString* eventDomain; @property (retain) NSString* appid // constructors -(id) init; -(id) initWithAppId:(id) input; // destructor -(void) dealloc; @end #import "awesome.h" #import "JSON.h" @implementation awesome - (id) init { if (self = [super init]) { // if init is called directly, just pass nil to AppId contructor variant id selfPtr = [self initWithAppId:nil]; } if (selfPtr) { return selfPtr; } else { return self; } } - (id) initWithAppId:(id) input { if (self = [super init]) { if (input = nil) { input = [[NSString alloc] initWithString:@"a369x123"]; } [self setAppid:input]; [self setEventDomain:[[NSString alloc] initWithString:@"desktop"]]; } return self; } // property synthesis @synthesize parser; @synthesize appid; @synthesize eventDomain; // destructor - (void) dealloc { self.parser = nil; self.appid = nil; self.eventDomain = nil; [super dealloc]; } @end Thanks!

    Read the article

  • Is there an equivalent command for 'init.d/networking restart' in OS X

    - by l0c0b0x
    From time to time, I've encountered issues with OS X clients' network connections (Wired and Wireless, Leopard/Snow Leopard) where nothing will fix the issue, until you reboot. Is there a particular 'network service/process' I should be watching out for? I was thinking it would be useful to know of a command that will reset a 'network connection' type service/process (same as running a sudo /etc/init.d/networking restart). Thanks!

    Read the article

  • Extracting init script from bult-in intrfs into Linux bzImage

    - by Maciej Piechotka
    I have following problem - I damaged my system (Gentoo - by rebuilding using gcc 4.5) beyond repair. I unmounted /home, copied /etc + other important files and I've started reinstalling system. However I forgot to copy init script. It is still present in kernel image that I have. How to extract it? Please note that initrd is not a separate file but is in the kernel image.

    Read the article

  • Git init - .git: Permission Denied

    - by Gcoop
    Hi All, I am trying to initiate git on my remote server using ssh. When I run git init On the server in a folder I have write permissions to I get the following error. .git: Permission denied Do I need to assign any other permissions on that folder to be able to create the repository? Thanks

    Read the article

  • /etc/init.d/rc: 317: sed: Permission Denied Ubuntu 9.04

    - by sxanness
    I recently added NFS to my Ubuntu server and edited /etc/fstab to mount the network file system. After a reboot I am not getting the following error several times on the console and it will not boot /etc/init.d/rc: 317: sed: Permission Denied Any advice? I have commented out the lines that I added to /etc/fstab and the issue still persists. Thank You,

    Read the article

  • iOS5: Confusion with loadview and init and instance variables

    - by user743550
    I'm new to iOS5 and storyboarding. I noticed that if I declare an instance variables inside my viewcontroller .h file and set the values inside my init of .m file of my viewcontroller, whe the view of the viewcontroller is displayed, my instance variables show null inside viewDidLoad. In order for me to get myvariables, I'd need to do [self init] inside viewDidLoad. My questions are: @interface tableViewController : UITableViewController { NSMutableArray *myvariable; } @end @implementation tableViewController -(id)init { myvariable = [[NSMutableArray alloc]initWithObjects:@"Hi2",@"Yo2",@"whatsup2", nil]; } - (void)viewDidLoad { NSLog(@"%@",myvariable); // DISPLAYS NULL [super viewDidLoad]; } Why isn't my variables available in viewdidLoad when I declared and implemented in my .h and .m files? If that's the case, is viewDidLoad or viewWillAppear the common places to load the data for the viewcontroller? It looks like even if you instantiate a viewcontroller, the init function gets called but the viewDidLoad doesn't necessarily have the variables to be displayed. Where's the right place/methods to load the model(data) for my viewcontroller? Thanks in advance

    Read the article

  • call FB.login() after FB.init() automatically

    - by Tobi Projectx
    i`m developing an app for Facebook. My Code: function init() { window.fbAsyncInit = function() { var appID = 'xxxxxxxxxxxxxxxxxxxxxxxxxx'; FB.init({ appId: appID, status: true, cookie: true, xfbml: true}); login(); }; (function() { var e = document.createElement("script"); e.async = true; e.src = "https://connect.facebook.net/en_US/all.js?xfbml=1"; document.getElementById("fb-root").appendChild(e); }()); }; function login() { FB.login(function(response) { if (response.session) { if (response.perms) { // user is logged in and granted some permissions. // perms is a comma separated list of granted permissions } else { // user is logged in, but did not grant any permissions } } else { // user is not logged in } }, {perms:'read_stream,publish_stream,offline_access'}); }; I want to call the "init" function and after "init" should call the "login" function (open up the Facebook Login Window) automatically. But i always get "b is null" FB.provide('',{ui:function(f,b){if(!f....onent(FB.UIServer._resultToken));}}); Error in Firebug. Can anybody help me? Does anybody have the same problem? Thanks

    Read the article

  • #pragma init and #pragma fini using gcc compiler on linux

    - by Josh
    I would like to build some code which calls some code on loadup of the shared library. I thought i would do it like this: #pragma init(my_init) static void my_init () { //do-something } int add (int a,int b) { return a+b; } So when i build that code with gcc -fPIC -g -c -Wall tt.c It returns gcc -fPIC -g -c -Wall tt.c tt.c:2: warning: ignoring #pragma init tt.c:4: warning: ‘my_init’ defined but not used So its warning my #pragmas. I tried this in real code and my code aborted because a function hadn't been called in the pragma section because it was ignored. How do i get gcc to use these #pragma init and fini statemets?

    Read the article

  • User Control's Page Init Event Not Firing After Another User Control Using

    - by Murat
    I have an user control. I add dynamicly control to this control on its Page Init. This user control's parent Page's every postback, its page init works fine. After I added an different user control to Page. In Second User control, user select photos and uploads them with asyncfileupload control(AJAX). And I save all of them with a button at the end of Page. In EveryPostBack Parent Page Load event works. If I dont select any photo from Second User Control, First User Control's Page Init event works fine when I click Save Button. But if I select a photo, first User Control dont work. What is the problem?

    Read the article

  • django form creation on init

    - by John
    Hi, How can I add a field in the form init function? e.g. in the code below I want to add a profile field. class StaffForm(forms.ModelForm): def __init__(self, user, *args, **kwargs): if user.pk == 1: self.fields['profile'] = forms.CharField(max_length=200) super(StaffForm, self).__init__(*args, **kwargs) class Meta: model = Staff I know I can add it just below the class StaffForm.... line but I want this to be dynamic depending on what user is passed in so can't do it this way. Thanks

    Read the article

  • reinitialize an object with self.__init__(...)

    - by Kara Jevo
    Could anybody explain whether it is safe to reinitialize an object by calling "self.init(". as shown in the following simplified example? The reason i'm asking is that i couldn't find this method neither in several python books nor in internet. There are some who suggest to list all attributes and set them to initial value one by one. Basically i want to set my object to initial state after it has finished some tasks. class Book(object): def __init__(self,name,author): self.name = name self.author = author self.copies = 5 def reset(self): self.__init__(self.name,self.author) def incrementCopy(self): self.copies += 1 Kite = Book('kite runner','khaled hosseini') print 'initial number of copies:', Kite.copies Kite.incrementCopy() Kite.incrementCopy() Kite.incrementCopy() print '3 copies are added:', Kite.copies Kite.reset() print 'number of copies are reinitialized', Kite.copies initial number of copies: 5 3 copies are added: 8 number of copies are reinitialized 5

    Read the article

  • Statically Init a derived class

    - by AC
    With c++, Is there a way to get a derived class to inherit its own static initializer? I am trying to do something like the following: class Base { public: class StaticInit { public: virtual StaticInit() =0; }; }; class Derived: public Base { public: virtual StaticInit::StaticInit() { //do something with the derived class } static StaticInit init; } static Derived::StaticInit init; it would also be nice if I didn't have to define the init var in each derived class. I am currently redefining the StaticInit internal class in each derived class but it seems redundant. Each derived class is a singleton, and I need the instance to be stored in a lookup table at program startup.

    Read the article

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