startup

LaunchDaemons and Environment Variables

感情迁移 提交于 2019-12-20 03:42:28
问题 For a while now, I've been noticing that my MacPorts-installed Apache2 instance hasn't been starting when I start up (MacPorts Apache2 Stopped Launching on Boot). The LaunchDaemon is loaded. Today I bumped into something in a log file that may point to an answer, but I can't find any confirmation. I use environment variables in my httpd.conf file. Specifically, the ${HOME} variable. Is it possible (or probable, etc.) that environmental variables are fully loaded when LaunchDaemons are

What is the correct place to add a database driven scheduler in ASP.NET Core?

Deadly 提交于 2019-12-20 01:58:26
问题 I have added a Timer to Startup class of an ASP.Net Core application. It fires on some time period and do operations like logging a sample text. I need it to be able to do database driven operations like adding a record to a table. So I try to get AppDbContext from DI but it is always null. Please see the code: public class Scheduler { static Timer _timer; static bool _isStarted; static ILogger<Scheduler> _logger; const int dueTimeMin = 1; const int periodMin = 1; public static void Start

OSX: PHP Error localhost and unable to load dynamic library

六眼飞鱼酱① 提交于 2019-12-19 17:38:56
问题 How can i fix this php error? PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/php_pdo_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/php_pdo_mysql.dll, 9): image not found in Unknown on line 0 I am on a mac/mavericks and I have made a mistake and did a sudo cp /private/etc/php.ini.default /private/etc/php.ini so now I get the error stated above when I run php -v 回答1: Follow this as it worked for me... The error

java 1.6 SystemTray icon does not appear on windows startup

流过昼夜 提交于 2019-12-19 04:57:08
问题 I have a Java 1.6 desktop application, started with javaw from a batch file on Windows XP. There is a .lnk link to this batch file, which is placed to windows Startup folder in order to start this application on every system boot. The application uses SystemTray class to display an icon on the system tray in case it is running. Starting this application manually there is no problem. If it is started by windows startup process, there is no icon displayed (not even a blank icon), however the

How to set winform start position at top right?

删除回忆录丶 提交于 2019-12-18 17:26:12
问题 How to set winform start position at top right? I mean when user click (start) my winform application the winform will appear at the top right of the screen? 回答1: Use the Load event to change the position, the earliest you'll know the actual size of the window after user preferences and automatic scaling are applied: Public Class Form1 Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) Dim scr = Screen.FromPoint(Me.Location) Me.Location = New Point(scr.WorkingArea.Right - Me.Width,

How to force WPF startup window to specific screen?

假如想象 提交于 2019-12-18 16:34:08
问题 I have a WPF application that will show information on a projector through a dedicated window. I would like to configure what screen to be used for projector display and what to be used for main application window. This code will generate projector output on specified screen: var screen = GetProjectorScreen(); _projectorWindow = new ProjectorWindow(); _projectorWindow.Left = screen.WorkingArea.Left; _projectorWindow.Top = screen.WorkingArea.Top; _projectorWindow.Owner = _parentWindow;

How to change StartupUri of WPF Application?

最后都变了- 提交于 2019-12-18 14:16:44
问题 I am trying to modify App.cs and load the WPF XAML files from code behind but its not working as it should. No matter whatever I try to set as StartupUri it doesnt start, the program quits after this. public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); LoginDialog dlg = new LoginDialog(); if (dlg.ShowDialog() != true) return; switch (dlg.ChoiceApp) { case ChoiceApp.CustomerEntry: StartupUri = new Uri("/MyApp;component/Forms

Rails initializes extremely slow on ruby 1.9.1

一个人想着一个人 提交于 2019-12-18 14:10:10
问题 I just got my rails 2.3.8 app running on ruby 1.9.1. To get into the console, start the webserver, anything that initializes rails, takes 3 - 4 times longer in ruby 1.9 than in ruby 1.8.7. I'm using ruby version managers so I can easily switch between ruby 1.9 and ruby 1.8.7. The speed difference happens in both production and development. I want to use 1.9 because its must faster once everything is running, but the startup time is so bad the app is timing out on Heroku on the first request.

Myeclipse学习总结(1)——Myeclipse优化配置

大兔子大兔子 提交于 2019-12-18 13:40:07
作为企业级开发最流行的工具,用Myeclipse开发java web程序无疑是最合适的,java web前端采用jsp来显示,myeclipse默认打开jsp的视图有卡顿的现象,那么如何更改jsp默认的打开方式,让我们可以进行更快速的jsp开发呢? 简单介绍下Myeclipse吧!MyEclipse企业级工作平台(MyEclipse Enterprise Workbench ,简称MyEclipse)是对EclipseIDE的扩展,利用它我们可以在数据库和JavaEE的开发、发布以及应用程序服务器的整合方面极大的提高工作效率。它是功能丰富的JavaEE集成开发环境,包括了完备的编码、调试、测试和发布功能,完整支持HTML,Struts,JSP,CSS,Javascript,Spring,SQL,Hibernate. 随着版本的更新,myeclipse的功能越来越强大,体积也越来越大,大家应该可以感觉到每次打开myeclipse都会有卡的感觉,那么如何设置最佳的myeclipse呢,(eclipse也一样设置哦),myEclipse8.0以上的最佳设置,让你的myEclipse不再卡。 工具/原料 Myeclipse集成开发环境(这里以Myeclipse8.5说明) 步骤/方法 myeclipse文本编辑器如何字体设置 windows-preferences-general

android classcastexception on activity startup

大城市里の小女人 提交于 2019-12-18 13:03:26
问题 i have a simple activity program in android. basically the class just extends Activity. But when i start it i get a ClassCastException in the constructor of my class. i dont even have a constructor defined, so it must be in the constructor of the superclass which is Activity. unfortunately the debugger doesnt give any detailed information on what class it is trying to cast. here is the stacktrace: Thread [<1> main] (Suspended (exception RuntimeException)) ActivityThread$PackageInfo