Questions tagged [init]

May refer to Linux init, an abbreviation of initialization - giving variables a "starting" value, or Python's __init__ class initiation method.

May refer to :

  • Linux Init - the parent of all processes, which primary role is to create processes from a script stored in the file /etc/inittab.
  • variable init (abbreviation of initialization) - giving variables a "starting" value.
  • python magic __init__ - magic function that initializes an object.
1905 questions
0
votes
1 answer

How do you initialize the Git repository?

I created "my-git-repo" on my desktop and executed "~/Desktop/my-git-repo". But when I try to run "git init" to turn the directory into a Git repository, I get this: dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk Referenced…
0
votes
1 answer

access to Realm instance in overriding init

i am overriding init() using Realm framework , and i can get access to Realm instance example: import Foundation import CoreData import RealmSwift class Order: Object { dynamic var address = "" convenience init(content: String) { …
0
votes
3 answers

How to do early initializations of variables in Scala?

I have an architectural problem, more precisely, a suboptimal situation. For an adaptable test environment, there is a context that is updated by a range of definition methods, which each define different entities, i.e. alter the context. For…
Majakovskij
  • 565
  • 4
  • 10
0
votes
1 answer

Class has no initializers?

I have been working at this for about an hour now. I've looked at other questions n this sight with the exact same error and I tried there solutions. I am still getting the error though. Here is my code: class Links: UIViewController { let…
Bigfoot11
  • 911
  • 2
  • 11
  • 25
0
votes
1 answer

Get context path in init method in Servlet 2.3 (so no ServletContext#getContextPath() available)

I'm using servlet 2.3 for my project development due to some legacy code we have. Is there a way to get the context path in the init method or any other way of the servlet? I know it's possible on higher versions of Servlet and can get it in hacky…
Nikhil L
  • 175
  • 1
  • 3
  • 16
0
votes
0 answers

Running Applet as Application main() instead of init()

Okay, so I'm creating a loader inside my jPanel for a .jar. The jar I'm loading has special code inside the main() so when I run the applet with init(), things get messed up. My current code looks like this public Applet getApplet() { try { …
0
votes
1 answer

init.d scripts works perfectly in console, bad poorly in systemd's service call

i have following init.d script. #!/bin/sh ### BEGIN INIT INFO # Provides: teamcity # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO start_cmd="start-stop-daemon…
jakub.josef
  • 530
  • 4
  • 12
0
votes
1 answer

How to set order in init scripts?

I create some /etc/init scripts, but one script (script B) depend on other (script A). How to order execution of those scripts? I want to system first execute script A, and then script B. Process that start script B will be killed and execute again…
0
votes
1 answer

Core data managed var seems to be initialised instead of nil

I have a core data class with this var: @NSManaged var tags: NSSet? The issue is that when the class is fetched from the data store, the tags variable instead of being nil, is initialised with an empty NSSet object. Does this behaviour normal? I…
Shay
  • 2,595
  • 3
  • 25
  • 35
0
votes
1 answer

How to recreate script beanstalkd in /etc/init.d

I made a mistake and removed the init script beanstalkd from /etc/init.d. Does somebody know how it can be recreated ? When I type sudo apt-get autoremove beanstalkd and then re-install it. The script is still not there. I hope someone can…
user3097712
  • 1,565
  • 6
  • 27
  • 49
0
votes
1 answer

opam not working on Ubuntu VM

I tried running sudo opam init on an Ubuntu virtual box. On pressing y after being prompted, the following error occurs: global-config does not define the variable lib
0
votes
0 answers

Access server.xml content during servlet startup

I have an existing servlet and want to write some instructions to my log file on how to construct the URL needed to access my service . The basic logging service in J2EE is just fine for my purposes. The items I need are: the canonical host name…
BigTFromAZ
  • 684
  • 7
  • 22
0
votes
1 answer

Python init default values create linked instances of class

This code is meant to create a graph implementation. However, all of the nodes "self.children" link to the same list in memory, so adding children to any of them adds it to all of them. I can not for the life of me think of why this would happen, I…
Ryan
  • 451
  • 4
  • 11
0
votes
1 answer

JNA Structure as an other Structure field

I want to use SYSTEMTIME struct as field of WFSRESULT struct. But when I try to init new object of WFSRESULT based on Pointer, then I got exception. There are my structures: public class WFSRESULT extends Structure { public WFSRESULT() { …
Barq Last
  • 1
  • 1
0
votes
2 answers

curl_init is enabled but not working

I am trying to open a url using curl_init, but didn't get success to get the right responce. I am not able to share the exact url with all of you because of security reasons. Below is my code $ch = curl_init("Site URL");…