FAQ Database Discussion Community


Room availability between two dates (beginner)

c#,sql,service
I'm using Visual Studio Community 2013 and working on a project for my class in which I am making a very very simple hotel booking system to be used for staff to create new customers and book them into a room. When the user tries to book the same room...

ServieConnection Not Working At All Android

android,service,connection
Good Day.I have the simplest scenario which could ever be!I have simple service connection which taken from google in app purchases example and this is my own code public class MainActivity extends Activity { IInAppBillingService mService; ServiceConnection mServiceConn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mServiceConn = new ServiceConnection()...

Background service stops working randomly in android in onCreate() and onResume()

java,android,service,background-service
I am working on android application in which i need to start the location service. All i need to make it sure that the service should work, whether it will be on any activity, if i press the back button/home button or even if i sweep the application by pressing...

Are there drawbacks to leaving a SqlConnection open long-term?

windows,service,ado.net,sqlconnection
I am creating a MS Windows service, which listens for TCP connections. When connected, it gets data from a SQL db and returns it via the TCP socket. What are the drawbacks, if any, of opening a SqlConnection to the SQL Server at service start time, and just re-using that,...

AngularJS centralized data with restful services

javascript,angularjs,rest,service,controller
I need help with the design of my AngularJS application. I have a factory, which provides a resource object for me, to a restful web service. product.factory("productResource", function ($resource) { var resource = $resource("/fooo/rest/products/:id", {}, { query: { method: "GET", isArray: true } }); return resource; }); I have a...

Cannot get the getLastLocation method to work in Android Studio

android,service,location
I am testing with the location services in Android and I was following strictly the developer instructions (here :Google dev. link) on how to do this, but no luck what so ever. In my layout fine I have just two TextViews to display the latitude and longitude of the Location...

Relationship among Service, Alarm Manager and Broadcast Receiver

android,service,broadcastreceiver,alarmmanager
I am new to Android Development and would highly appreciate if someone could please explain me the relationship among the Service, Alarm Manager and Broadcast Receiver with some sample code. I am working on an Android App where I need to execute certain part of a code every 10 minute....

What is a good/best way to implement a long living service apart from main thread

android,multithreading,service
I'm implementing a payment terminal in a POS (point of sale) application for Android. I have gotten an SDK for communicating with the payment terminal through Bluetooth. Application startup: Initialize the payment terminal, check connection. Then i need to keep it alive througout the application lifecycle, to be able to...

Change fuse location setting while service is running

android,service,android-location,location-services,android-fusedlocation
Hi I am integrating location service in my application. And for that I am using Google's fuse location service. My implementation is as follows : public class LocationNotifyService extends Service implements LocationListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { protected void createLocationRequest() { mLocationRequest = new LocationRequest(); mLocationRequest.setInterval(INTERVAL); mLocationRequest.setFastestInterval(FASTEST_INTERVAL);...

How to pass params into Services that I get from the gsp and I have in my Controller in Grails

grails,service,gsp
I've got the params that a user enter in a g:textField in my controller when I call method save(), and I need to use this value in my services. How can I pass the params that I have in my controller to my services or is possible pass this data...

Best practice for scehduled background task Android

android,service,timer,background,scheduled-tasks
I am creating a notification app, which will alert user after they set a reminder notification. My current implementation logic is: Create a Service, which starts running in background when user opens their app. In onCreate() method of service, I am implementing a Timer task which will repeat after 5000ms...

Service Oriented Architecture and the UI

api,user-interface,service,soa
So, I am building a new system and thinking I need to get with the times and use SoA. I have my website, and then there are services and systems around that that help the website work, lets take a localization service as an example. This has it's services and...

executor.shutdown() in service onDestroy()

android,service,threadpoolexecutor
I want my executor to run up until my service is not running anymore. The logical solution I think of is to do executor.shutdown() on the service's onDestroy() What would be the consequences of that action? I know when I kill an app it's services doesn't guarantee to go through...

OSGi: service binding without lifecycle management

service,osgi,components,declarative-services
I am building a Java application on the Equinox OSGi framework and I have been using DS (declarative services) to declare referenced and provided services. So far all the service consumers I have implemented happened to be service providers as well, so it was natural for me to make them...

update textview title in an Activity from a service

android,service,android-textview
i have an homeActivity which contains a webview with an actionbar, the title of the actionbar is an textview public static TextView mTitleTextView; and also has an class which do receive gcm message public class GCMNotificationIntentService extends IntentService { after the app received a message i want to put the...

Send data to activity from already running sticky service

java,android,multithreading,service,messenger
I created sticky backround service, that should be started on boot: public class AutostartReceiver extends BroadcastReceiver { public AutostartReceiver() { } @Override public void onReceive(Context context, Intent intent) { context.startService(new Intent(context, MyService.class)); } } My service is intended to do some work in background, it's implemented by creating thread for...

Receive event and intent while screen is off on Android

android,service
I need a service to handle event while the screen is off, like receiving delayed messages (with the Handler) and internet connection state change. Is it possible for a service to get those signal without permanently using the PARTIAL_WAKE_LOCK, since I don't need the service to run all the time?...

Can I show Toast from none-UI Service in android?

android,service,toast
I have a service which is working in background. How can I show Toast text message from Service that does not have UI? No Activity,This is none-UI service. Is it possible?...

Windows service: Get username when user log on

c#,windows,visual-studio-2010,service
my windows service should save the name of the user, which logon/logoff at the moment. The following code works for me but didn't save the username: protected override void OnSessionChange(SessionChangeDescription changeDescription) { try { string user = ""; foreach (ManagementObject currentObject in _wmiComputerSystem.GetInstances()) { user += currentObject.Properties["UserName"].Value.ToString().Trim(); } switch (changeDescription.Reason)...

Critical section in service, multithreaded service

multithreading,delphi,service
I developed a service application which is collecting JPEG data from some equipment. Number of remote devices varies from 1 up to 20. After service start it creates a number of threads=current number of remote devices. Every thread is writing into global array of records. Record: type TDevice=record devName:string; ms:TMemoryStream;...

How to send data to server in android for every 12 hours in android?

android,service,calllog
Hi I'm developing an android application in which it will retrieve all the call log from the user mobile and store the data in SQLite database.Till here I have achieved but now I'm trying to send the data to my remote server for every 12 hours.I have created a service...

Get open outlook email as MailItem in Windows service

c#,service,outlook
In case of a desktop application, if I execute the following code lines to open an email and then get the related MailItem everything works fine: string file = @"C:\TestEML\EmlMail.eml"; System.Diagnostics.Process.Start(file); Outlook.Application oApp = (Outlook.Application)Marshal.GetActiveObject("Outlook.Application"); Outlook.MailItem oItem = (Outlook.MailItem)oApp.ActiveInspector().CurrentItem; // now oItem is the COM object that represents our .eml...

service not started on BOOT COMPLETE

android,service,broadcastreceiver
I have a service that I would like to start on BOOT COMPLETE when it is started , I have a toast message displayed. my problem is that when the device boots up , the toast is displayed and is stuck on screen, and the service is not starting correctly....

Build failure due to Sonar plugin

service,jenkins,sonarqube,sonarqube5.1
My build keeps failing on Jenkins because of this error: ERROR: Error during Sonar runner execution org.sonar.runner.impl.RunnerException: Unable to execute Sonar at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91) at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) at java.security.AccessController.doPrivileged(Native Method) at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) at...

StopService onDestroy being called but service not ending

android,service,timer,handler,timertask
I try using TimerTask to download data from the server api, the task loops in background app. I have a service class: public class RequestNewInvoice extends Service { private Timer timer; private CheckTask checkTask; private Handler handler; private JSONParser jsonParser; private JSONObject jsonObject; private boolean startService = true; private void...

How to start service on device boot and on application start

android,service,boot
I need service, which will be started on device boot, also I need to start that service if user start application manually. This service have to be alive on background, even if user kill application with Task Killer, etc. Any answer is apprecitiated....

Unable to create service

android,service,android-service
I'm new to android and creating a service in one of my reminder application. but I my service is triggering when i call the startService() in my onCreate() method of my activity I am unable to see the toasts which are used in different methods of my service class.As new...

Android Step Counter — Count does not match either fitbit / Samsung Step Counter. (Off by thousands)

android,service
The problem I'm having is that my count is totally off, from any pedometers, fitbit, or the Samsung Step Counter. It appears to shut down, and not add any steps after awhile. If I enter that I'm starting at 3000 for example, it calculates an offset and it stores as...

MongoDB CountAsync and Cursors not working in a Windows Service with the new driver

c#,windows,mongodb,service
I have a Windows Service that reads data from a SQL Server and write them on MongoDB. I'm trying to adapt this service to the new MongoDB driver (using 2.0.1 version), but I'm facing some problems. I have this: protected void OnStart(string[] args) { threadExternalPage = new Thread(new ThreadStart(FacadeFactory.GetLivePrice.UpdateExternalPage)); This...

BeanCreationException from Spring with annotation [email protected] and [email protected]

java,spring,service,cxf,spring-annotations
I have web application using Spring, Apache CXF and Jetty. Spring doesn't like the addition of an annotation called @Loggable to methods in one of my classes. First, the annotation @Loggable links to the class LogAspect, which logs request and response messages: @Aspect @Component public class LogAspect { ... ......

communicate with c# service from LAN through web browser

c#,browser,service,lan
I have created a C# project thats consists from a backend service running under LocalSystem account and a GUI running under current logged-in user account. These two parts communicate through named pipe, implemented as: SERVICE: PipeHost = new ServiceHost(this, new Uri[] { new Uri("net.pipe://localhost") }); PipeHost.AddServiceEndpoint(typeof(IPipeComm), new NetNamedPipeBinding(), "MyProgComm"); PipeHost.Open();...

Background programming in C

c,bash,service,daemon
I'm trying to create a background program that has main config file which contains another config file locations and execute each of them. For example: if main_config.conf: /home/conf1 /home/conf2 i want to execute ./background_pro /home/conf1 and ./background_pro /home/conf2 in background. How do i do that ? I'm using below structure.Thank...

Symfony2 global function in entity

entity-framework,symfony2,service
I have a global function sanitizeName: function sanitizeName($s) { return preg_replace('/somethingCrazy/', 'notSoCrazy', $s); } I need to use it in entity (e.g. for RSS generation), in Twig's template and in controller. If I write it as service or add as Twig function/filter I will not be able to access it...

Named Pipes Binding Working in Windows Service, but BasicHttp Binding Failing

c#,wcf,service
I am trying to build a windows service hosted WCF service with http and named pipes endpoints. When I have configured it to use named pipes, it is working fine, but when I try to configure it to use http binding it all compiles and installs, but when I try...

Setting ContentView when updating a notification eventually freezes up the app? (Android)

java,android,mobile,service,notifications
I have a service that updates a notification every millisecond (stopwatch). It works fine initially, the problem is, the app eventually slows down and stopwatch updates look really laggy. I've pinpointed this issue to the fact that I'm resetting the notification's contentview. If i comment out that code, the timer...

Android - Camera App passed null surface

android,service,camera,surfaceview
I have tried every possible solutions given on stackoverflow and still haven't reach what I want. I want to take a picture with the Camera API with a service. The picture should be taken when user light the screen, but the screen is still lock. I saw different post about...

How to run a dll as a service?

c++,c,winapi,dll,service
I know how to write a dll and how to write a service and how to run a dll with rundll32, but now I want to write a dll that install as a service in windows I don't know if that's possible or which function in dll should be exported?...

Android Process and Resource managment

android,service
As Per My Knowledge, In Android when Application is start , Os assign new process to app and app will running in that UIThread (mainthead) of that process. so operation which is define under Activity Class will run on UiThread ( if we will not create separate class for any...

Turning on screen from receiver/service

android,service,android-wake-lock
I would like my app to be able to turn the screen on and display my app. Let's say I'm setting an alarm and every hour I want my app to be displayed for 2 mins before the device naturally sleeps. I see that WakeLock (FULL_LOCK) and KeyguardManager are deprecated....

Angularjs $http.get service not returning data to calling controller function

angularjs,service,controller
Hi Everyone I'm sure there is a simple solution to this problem but I can't seem to find it myself... I have a controller that assigns data to the $scope.items variable by calling a service defined as GetDataService $scope.items = GetDataService.getData('/getBroadcastSourceList/1'); The service is set up as follows: angular.module('appName') .service('GetDataService',...

AltBeacon: BeaconConsumer in Service Not Working

android,service
in this thread Beacons not detected in Android service but when i put the code in manifest <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.ubiquitous.beaconone.tablet" android:versionCode="3" android:versionName="2.0" > <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" /> <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <application android:icon="@drawable/logo"...

Android service's method called in different thread. Does it still run on the main thread?

java,android,multithreading,service
If I am understanding correctly, Android Services, by default, run on the main UI thread. Thus, for any off-the-main-thread operation to work, I found people suggesting that one starts a separate thread in the Service. However, my question is if a Service's method is called in another thread, i.e. AsyncTask...

Can't create handler inside thread that has not called Looper.prepare() android service

java,android,multithreading,service
Hi i have a problem and i did not solve problem Problem defination şs Can't create handler inside thread that has not called Looper.prepare(). i write the service in android but i getting throw exception My Logcat is that 05-24 01:37:37.069 26269-26292/ramazan.com.dovizfiyarlari E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1 Process: ramazan.com.dovizfiyarlari, PID:...

AngularJS - controller doesn't get data from service when using $http

angularjs,http,service,controller,is-empty
I have simple web app where I like to load some data from json. At the moment the data is hardcoded within my service and everything is working. When I change my service to load the same data from an external json file the controller renders the view before it...

Displaying a table's row in a div element using AngularJS

javascript,angularjs,service,view,controller
I have a database table with many rows, each with 5 fields each. I then have a <div> element that I'd like to display one row's fields in. What is the best way to retrieve a row from my table and have a div display the row's fields? Currently I...

Undefined service in controller

javascript,angularjs,service
I have a service and a controller declared like this: angular .module('purchaseApp') .service('sharedProperties', function() { var stringValue = 'test string value'; return { getString: function() { return stringValue; } } }) .controller('purchaseOrderCtrl', ['$scope', '$rootScope', '$location', '$http', function ($scope, $rootScope, $location, $http, sharedProperties) { console.log(sharedProperties.getString()); }); When I try to access...

Sending a simple message from Service to Activity

java,android,service,handler
I am trying to find a way to send an integer value from my Service to my MainActivity, yet I can't figure it out with the tutorials on the internet. I am using a Handler to receive my messages which I'm sending from a Thread in my Service. My code...

Getting the Foreground Activity of any application in a Service written in other application

android,android-intent,android-activity,service,intentservice
What I want is that I need the reference to the current Activity of ANY application that is on the foreground. Basically I have written a service and I want to get the reference to the "current" foreground activity in that service. With "current" I mean any application activity other...

Service Causes SCM Error “reported an invalid current state 0”

c#,.net,service
I wrote a small service, which acts as a local network server. To write the service, I followed a tutorial on MSDN, how to write a service using the ServiceBase class. But when I register and start the service, I get error messages as shown below. I get exactly two...

How do I create a log entry for the systemd Journal?

service,systemd
I have a service, and I would like to have it create logs for the journald daemon in certain cases. So far, I have not been able to find any instructions on how to do so. Am I misunderstanding the intended use of the journal? Or is it something really...

Unbind external service android Paho MQTT ServiceConnectionLeaked error

java,android,service,paho
What's the proper way to unbind an external service (located in another jar) file in Android? I declare the service (located in org.eclipse.paho.android.service-1.0.2.jar) in the manifest file as: <service android:name="org.eclipse.paho.android.service.MqttService" > </service> Service source here And the service runs properly. However, on exiting the app I get a ServiceConnectionLeaked error...

Pass value to a Service, intentService or bindService?

java,android,service
I need to pass 3 float numbers to a service and at the end the service need to send me back 'true' or 'false' boolean value. I read about the two but do not know what I need to use, an example will be appreciated....

What is the purpose of disabling an Android service in the manifest?

android,service,manifest.xml
In Android it is possible to create a Service to do background tasks, etc by creating a subclass of Service. It order to use the Service it must be specified in the manifest for the app: All services must be represented by elements in the manifest file. Any that are...

Updating a singleton from daemon thread

android,multithreading,service,singleton
I have a singleton where I store shared information used from different fragments. On the other hand, I have a service that spawns a daemon thread. This thread connects to an event bus and is resposible to receive events from a external server. When it receives a new event, updates...

AngularJS, Factory, Provider or Services

angularjs,variables,service,provider
I'm trying to save a variable in my application containing the username, I have a login page (a directive) where I get the username. I tried: Provider: it save my variable but I can only change before the app load and I need to change the variable after inside a...

How to detect whether screen is touched in a background service in Android Studio?

android,service,touch,screen,detect
I am working on a project on android studio. I need to detect whether the screen is touched or not in a background service (and pop up a message for that). But, I have problem detecting whether the screen is touched or not in a background service without affecting user...

Unable to check if alarm has been set by AlarmManager

android,android-intent,service,alarmmanager
I am checking if the alarm has already been set by the AlarmManager using this answer. Following is my code snippet. boolean alarmUp = (PendingIntent.getBroadcast(MainActivity.this, 0, new Intent(MainActivity.this, AlarmReceiver.class), PendingIntent.FLAG_NO_CREATE) != null); if (alarmUp) { // alarm is set; do some stuff } Intent alarmIntent = new Intent(MainActivity.this, AlarmReceiver.class); final...

Angularjs for-loop counter in $http service

angularjs,http,for-loop,service
I am using the below for loop in angular. My problem is that the forItr counter is reflected as being increased after using the $http Service. Code: var app = angular.module('noviceApp', []); app.controller('noviceAppController', ['$scope', '$http', function ($scope, $http) { var iterations = 1; $scope.myFunction = function() { for(var forItr =...

WebResourceResponse cause ClassNotFoundException ignoring @TargetApi clause

java,android,caching,service,webview
I have a simple piece of code: @TargetApi(Build.VERSION_CODES.HONEYCOMB) @Override public WebResourceResponse shouldInterceptRequest(WebView view, String url) { if ( Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB ) return null; ... try { File input = new File(fullPathToCachedFile); if ( input.exists() == false ) return null; final BufferedInputStream stream = new BufferedInputStream(new FileInputStream(input)); return new WebResourceResponse(mimeType,...

Pass parameter from controller to service in Angular

angularjs,service,controller
I'm trying to pass a parameter from a controller to service in Angular. Here is the controller: angular.module('CityCtrl', []).controller('CityController',['$scope', '$http', function($scope,$http,CityService){ $scope.data = "unknown"; $http.jsonp('http://api.openweathermap.org/data/2.5/weather?lat=35&lon=139&callback=JSON_CALLBACK').success(function(data){ $scope.data=data; }); console.log($scope.name); if($scope.name){ $scope.weather = CityService.get($scope.name); } $scope.update = function (zip) { $scope.zip = zip;...

Multiple instances of the same service in Delphi

delphi,service,delphi-xe
I have have an old windows service made in delphi that now has to be installed multiple times in the same server, I am trying to change the code so I am able to change the service name as I am instaling the service but I cannot make it work....

Can't set AlarmManager to repeting one

android,service,alarmmanager,android-5.0-lollipop
I'm trying to set an Alarm to wakes up every 30s but it doesn't work. It does just 1 time at the beggining. I'm not sure if i've to use setInexactRepeating or setRepeating or setExact(and recall the method); and if i should use ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP. public void onClick(View view)...

How to send data from BroadcastReceiver to Fragment in android

android,service,broadcastreceiver,fragment,android-gcm
I am trying to make an chatting app.I have a SlidingDrawer Activity and it has many fragments and among which ChatFragment is one.Now when i am sending message to my friend , i have a Chatting Window and if any message comes from GCM service and i am in ChatFragment...

What means /V key when Windows Installer service starts?

windows,service,key,msiexec
Windows Installer service starts as C:\Windows\system32\msiexec.exe /V I read standard help to msiexec but not found this key description. What it means?...

How to check processes and services consuming lots of battery

android,service,gps,battery,android-fusedlocation
I have created an app which consuming 48 percent of battery in some device which is highest in power management task, but in some device its 5-6 %, i am running a service in background all the time which fetches the latitude and longitude and send it on server if...

Glassfish service throws an error

java-ee,netbeans,service,glassfish
I have successfully installed a Glassfish service that runs on my server. When I try to access the application, I get an HTTP 500 error : org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required When I launch NetBeans and Glassfish, it...

Is this the a situation for using a service?

android,multithreading,service,background-process
I try to implement a mechanism in my progress wich checks in a defined period of time if a collection of sql statements return a specific value (e.g.: SQL: SELECT Count(Columns_A) AS Counted FROM TABLE B If the return Value is greater than 1 => write Flag into Row =>...

How check the restSecureServicesPort is available?

windows,service,server
I've installed a application with a service on a Windows Server 2012 R2. The status of the service is paused. When I start the service, he runs for two seconds and he's again paused. In the instructions from the manufacturer is written: Note: If the service shows as paused, check...

AngularJS: Passing variables between controllers

angularjs,service,controllers
I am new to angular and I'm trying to find a method of passing variables between controllers. I saw the best method of achieving this was by using a service, as shown here - How can I pass variables between controllers? However, this doesn't seem to be working with my...

Running toast in at certain interval in a service

java,android,multithreading,service,handler
I am trying to show a toast at 2 seconds interval from a service. This normal code works fine. This one is just a test to show toast. public int onStartCommand(Intent intent, int flags, int startId) { // Let it continue running until it is stopped. new Thread(new ToastRunner(this)).start(); return...

How to get data from two services with an ID and display the content

javascript,php,angularjs,service,controller
In PHP you could say SELECT "message" FROM "users" WHERE id = $id But how do can I select in AngularJS (JavaScript) like the PHP way. Here are my services at the moment: app.service("users", function() { this.userList = [ { userId: 1, username: "John", password: "Doe" }, { userId: 2,...

Unable to run user service. Exception: Failed to start Java, ServiceStart returned 4

java,windows,service,windows-services
I have created a service using tutorial http://web.archive.org/web/20090228071059/http://blog.platinumsolutions.com/node/234 I have created files as below: C:\MyService1 \bin \myService1.exe \myService1w.exe \classes \com\services\MyService1.class \HelloWorld.jar \logs Now when I execute myService1.exe, service is not getting started. I am getting below message in my log [2015-06-02 15:23:29] [info] [ 3968] Commons Daemon procrun (1.0.15.0 32-bit)...

Starting Windows service with OpenCover throws System.ServiceProcess.TimeoutException

service,timeout,timeoutexception,opencover
I'm using OpenCover to start and cover a Windows service. I didn't write the service, but I've spoken to the developers and they said that on a good system, it can take up to 45 seconds for the service to complete all of its startup tasks. I'm able to start...

passing angular service data to gaugechart controller

jquery,angularjs,http,service,promise
I have a gauge-chart controller in my project which has to show data from an angular service. But it won't accept the data from service when I call the service function . Here is what I am trying : Controller.js angular.module("app.controllers", []) .controller("gaugeCtrl", ["$scope","config","myService", function ($scope,config,myService) { $scope.gaugeHome = {...

Symfony2 get public services in controller

service,dependency-injection
Much ink has flowed about Sf2 controller/container. I face with follow situation: app/console container:debug security ... > 4 [container] Information for service security.token_storage Service Id security.token_interface Class Symfony\Component\Security\Core\Authentication\Token ... ... Public yes LoginBundle\DefaultController.php use Symfony\Bundle\FrameworkBundle\Controller\Controller; class DefaultController extends Controller { public function indexAction() { dump(Controller::get('security.token_storage')); ... works OK, obviously....

Google Play Services revision 24

android,service,google-play,playback
My question is very simple. I don't found any documentation for this revision. Perhaps someone knows what changes in this revision. Thanks by advance for helping me....

AngularJS - Use Service with Controller

javascript,angularjs,service,controller
I have written a service in AngularJS, but I don't use the service in my controller. Service.js var appService = angular.module("appService", []); appService.service("bddService", function() { var bdds = bdd; this.getBdds = function(){ return bdds; }; var bdd = [{ id : 1, nom : "Activité commercial", desc : "Information de...

Get the PID of a Windows service by the name of the service

windows,batch-file,service,cmd,pid
Is there a way of getting the PID of a windows service with a command in a batch script by just knowing the name of the service?

What does the dot mean in Symfony service names?

symfony2,service,configuration,yaml
Look at this documentation page, for instance. Several service names are dotted, and I wanted to know if it means we are searching an object's method or if it is nothing. Note I am talking about service names in YAML format....

Check network connectivity android

android,service,broadcastreceiver,intentservice,android-networking
I am new using Service in Android and I am quite confused. I have and Activity and I want to check for all the time that the network connection is up (wifi or 3g). I implemented a simple Service and a BroadcastReveiver. here the code of the Service public class...

Does anyone know how to get Edittext value in service?

android,service
I want to access EditText value in service but I don't no exact way of doing that. I have done this code. Context context = getApplicationContext; Edittext et = (EditText)context.findViewById; But it doesn't give me findViewById method. Can anyone give me some hint that how can I access EditText value...

Program not gathering directory information

c#,service,system,directoryinfo
I am working on a program that gathers information about the machine for troubleshooting purposes. After some work on the program running as admin, I couldn't get it to output all the files in the %windir%\drivers properly. I also ran into issues with the current users appdata where it throws...

Upgrade SonarQube issues

service,jenkins,webserver,sonarqube,sonarqube-5.0
I'm having issues installing my instance of SonarQube 4.4 to 5.1. The instructions say to stop the SonarQube server, match up a couple files (back up DB, copy plugins, etc.), and then restart the sonar server for the updated version. My problem is I'm not sure how to start/stop the...

Is it possible to disable the “Application has stopped.” dialog that pops up on Android?

android,opencv,service,process,kill
I am trying to kill a service that is running on a separate process that is taking too long to run. It does get killed but the dialog "Unfortunately, Application has stopped" pops up. Since it's a separate process, it doesn't kill the main process and the application does keep...

Android is killing my service?

android,service,broadcastreceiver,android-service,android-background
with a BroadCastReceiver, I execute a service at the smartphone boot: public class BootReceiver extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { Intent startServiceIntent = new Intent(context, MyService.class); context.startService(startServiceIntent); } } MyService: private Runnable myRunnable = new Runnable() { public void run() { parsing.cancel(true); parsing = new Parsing();...

Angular Filter Service inside Controller

javascript,angularjs,service,filter,locale
first post ever so be gentle!! Got an issue inside Angular 1.3 and using a Stateful Filter within a controller. In short when you use the $filter('custom')(data) method as a pose to the {{ data | custom }} method - and the cutom filter updates (say a service updates), only...

Handle window messages in a c# service

c#,service
I would like to capture workstation lock and unlock and user logon and logoff events. I already wrote a program which overrides the WndProc function, but this does not capture logon and logoff events (as the application is quit or not yet started when this event occurs). So I thought...

Wrap parameters in AngularJS service for update API request

ruby-on-rails,ruby,angularjs,api,service
I'm trying to do update with AngularJS and API Service: expense.js angular .module('timeTrackerApp.services',[]) .service('Expense', ['$resource', function ($resource) { return $resource('/api/v1/expenses/:id', {id:[email protected]'}, { 'update': { method: 'PUT' }, 'destroy': { method: 'DELETE' } }) }]) Controller: expenses_controller.rb def permitted_params params.require(:expense).permit(:name, :price) end So expected JSON format is { expense: { name:...

SmtpClient - What is proper lifetime?

c#,.net,email,service
I'm creating Windows Service that sends batches of emails every 5 minutes. I want to send batches of 10-100 emails every 5 minutes. This is extreme edge case. Batches are sent every 5 minutes and normally consist of up to 10 emails. I'm using SmtpClient from System.Net.Mail namespace. What is...

Broadcast receiver not registered

android,service,broadcastreceiver
I am having an error where I register a broadcast receiver in the constructor. However, when I unregister it in onPause it throws an exception about not being registered. How can this be and can you help me solve the problem. The main problem is that I am bound to...

Passing params to an angular service from a controller?

javascript,angularjs,service,controller,params
I'm an angular newby. I'm hoping to pass params to a service that fetches data form a server depending on those params. for example, if I want to pass a book name string and then use it in the service to concatenate with the request url. The documentation does not...

Android auto refresh data from server

android,node.js,service,server-side
TLDR: I am wondering what is the best practice in android to do the following - when new data is stored in server side database inform and transfer data to android application ? LONG STORY: I currently have server side application based on Node.js and MongoDB where I store my...

File operations in Android service

android,file,service
Android services might get killed by the operating system at any possible time. There are no guaranteed lifecycle calls like onDestroy() you can rely on. I have to implement a service doing a lot of long running tasks and a bunch of file operations in the background. So my questions...

angularjs .then() doesn't work (then is not a function)

javascript,angularjs,service,factory
I have a little problem developing a simple GUI for a game idea using AngularJS (v1.3.15) and Angular-Route. Anyway, for the registration, i want to pre-check the availability for the username while being typed. I set up a $watch, call the factory service to get an $http.post answer, but in...

Hosting ApiControllers on windows service

c#,.net,wcf,rest,service
I have a REST API project with controllers and services behind them, and it works well on IIS. Now I'm trying to find a way to host it on a non-IIS computer as a windows service. No luck this far, TopShelf seemed to be what I wanted but I have...

Checking the equality of two NTAccount objects

c#,.net,windows,service,permissions
I am trying to check that a service has access rights to a particular local directory: public static bool HasDirectoryPermissions(String path, FileSystemRights rights, String serviceName) { try { var directoryAccessControl = Directory.GetAccessControl(path); ManagementObjectSearcher query = new ManagementObjectSearcher("SELECT * FROM Win32_Service where Name='" + serviceName + "'"); var queryResults = (from...

Why to use Service if it runs in the same thread in android

android,service,binding
I was going through Bound Service in android developer website. I thought I understood the service enough but I just found the another way of connecting service through Using a Messenger class especially for local service. There I got confused. Maybe I got the concept wrong. Here is my understanding...

Accessing repository pattern through one more layer called service in Laravel

laravel,service,laravel-5,repository-pattern
I have created one repository layer in my project which is perfectly accessible through controller method using interface. Now What I want to add, is a service layer. that means I want all controller method operations will be done through the service. So I created one file inside the service...

Is it possible to start / stop apache service from PHP?

php,apache,service
I have created a simple website that will help me in my many projects by creating a sub domain for each new website project that I take on. I keep going back to the older websites I've created so I have decided to keep all of them as a sub...

Interrupting an unknown long-running function after a certain time period

java,android,multithreading,service,process
I am using an OpenCV function in a compiled library on Android. It regularly runs for more than 10 seconds until it fails. A success will take approximately 2 seconds. I want to be able to interrupt the function if it takes more than 2 seconds. At first, I tried...