w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
grails.serverURL with Nginx doesn't work properly
grails.serverURL does not have anything to do with the outside url (except for absolute links generated from grails). You can configure your nginx to handle any domain and internally do the proper redirects. The caching you have described is probably due to the browser cache.

Categories : Tomcat

Consuming Web Service doesn't work
Your code looks correct, have you implemented your delegate methods, for example: NSURL *url = [NSURL URLWithString:@"http://google.co.uk"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; (void) [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES]; Delegate function: -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { NSLog(@"got response back"); } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { NSLog(@"http data: %@", [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); } Check your Web services HTTP header response, it various depending on the way its implemented but a successful request should return 201. see here for other codes NSError

Categories : PHP

Google backup service doesn't work
It's an old question but maybe you still need an answer. In your AppsBackupAgent implementation remove onRestore() and onBackup() methods. Inherited BackupAgentHelper implementations use dispatcher for delivering restore/backup events to registered helper. Your implementation simply disable this work.

Categories : Android

Spring Autowiring Service doesn't work in my Controller
You need to change the way you have autowired the service in the controller. Change the following code @Autowired private UserService userService; with following @Resource(name="userService") private UserService userService; Because in the UserServiceImpl you have defined the @Service annotation with alias "userService". I hope this would resolve your problem. :)

Categories : Java

Service start at boot that doesn't work correctly
Is BootService called? For BootService to be triggered when boot completes you need to add in your manifest: 1) <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> 2) <receiver android:name="BootService" > <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver>

Categories : Java

Angular filters doesn't work if $compile service
The problem is that you're not using the element returned by the linker funciton. The API for $compile works like this: var newScope = $scope.$new() newScope.whatever = Math.random(); var linker = $compile("<div>{{5 + 5}} - {{whatever}}</div>"); var element = linker(newScope); So, have FlexiColumn return the JQLite/JQuery object returned by the linker, and put that element into the DOM. Only compiling and linking something that is already in the DOM doesn't work, you have to put the linked element in the DOM yourself.

Categories : Jquery

XmlDocument returned by web service as XmlNode, then XPath doesn't work?
One alternative to creating my own XmlDocument would be to use Linq, as per: Dim results As XDocument = XDocument.Parse(xmlResults.OuterXml) If (results.Descendants("Success").Count(Function(node) node.Value.ToLower() = "false") > 0) Then Throw New ApplicationException("Results returned indicate a problem:- " + xmlResults.OuterXml) End If

Categories : Web Services

Why doesn't validating my SMTP server domain name and port work when running as a service under the local system account?
Have you tried running it from a console app vs. service at the same time? Also, could you test both approaches by making a series of requests to gather some statistics? The point is that it could help isolate the issue from different factors other than different OS users like various network issues etc. Feel free to give new details after doing that, if you'll be able to find out something new or intresting.

Categories : C#

Where is my nginx being configured? Changing nginx.conf still brings me to the 'Welcome to nginx' page
when you rewrited the nginx.conf in the folder of source code of nginx and installed it firstly, it will be copied to /usr/local/nginx/conf/nginx.conf (without specially modification of the configure in the folder of source code). But when you do this secondly, the nginx.conf in the folder of source code will be copied to /usr/local/nginx/conf/nginx.conf.defualt,and it usually don't work unless you use nginx -c /usr/local/nginx/conf/nginx.conf.defualt to assign its configure file evertime. There is a line NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf" in your script above,which indicates the configure file clearly. To handle this, I suggest rewrite /usr/local/nginx/conf/nginx.conf (not the one in the folder of source code) instead.

Categories : Nginx

Adding service reference for WF4 workflow service doesn't create client (ClientBase)
For anyone caught in this one, here's the issue. I had generated the web references for a console service app. By default, these are implemented as workflow activities, not as part of a client wrapper. Once I realized my misunderstanding, instantiating was simple.

Categories : Visual Studio 2012

Nginx - Rewriting url to $url.php, and if doesn't exist, rewrite to $url/
Try using try_files: http://wiki.nginx.org/HttpCoreModule#try_files For example (untested): try_files $uri $uri/ /test.php

Categories : Nginx

expose_php not work (nginx)
finally I got it . the reason is about the configure options below is the original configure options ./configure --prefix=/usr/local/php-5.3.26 --with-config-file-path=/usr/local/php-5.3.26/etc/ --enable-fpm --enable-debug --with-openssl --with-pcre-regex --with-zlib --with-bz2 --with-curl=/usr/lib/ --with-readline=/lib --with-libxml-dir=/usr/lib --with-mysql=/usr/local/mysql and I changed to the fowlloing ./configure --prefix=/usr/local/php-5.3.26 --sysconfdir=/usr/local/php-5.3.26/etc/ --with-config-file-path=/usr/local/php-5.3.26/etc/ --with-config-file-scan-dir=/usr/local/php-5.3.26/etc

Categories : PHP

Nginx no longer starts and doesn't give output
You seem to have a problem here: #server { listen 80 default; server_name anything; # Everything is a 404 location / { return 404; } } server is commented out, but the other lines in that set are not. If you intended on commenting out the entire server block, you'll need to use: #server { # listen 80 default; # server_name anything; # # Everything is a 404 # location / { # return 404; # } #}

Categories : Ruby On Rails

Why doesn't Nginx load balancing balance bandwidth?
It sounds like the configuration is doing exactly what you asked it to do. You configured a proxy on the first server IP, right? So data has to go from the user to the proxy, then to the server, then the reply from the server back to the proxy and then to the user. It's triple because the first server sees three flows (both servers' output from the proxy and the second server's input to the proxy) while the second server sees one (its output to the proxy). It is perfectly balancing the traffic into equal flows, the first server just sees three flows and the second just one. As for how you fix it, it depends what's wrong with it and what you're trying to accomplish, which you haven't told us.

Categories : Nginx

Nginx auth_basic and rewrite in subdirectory does not work
Use: error_page 404 =200 /my-project/index.php; instead of ugly rewrites: if (-f $request_filename) { break; } rewrite ^(.*)$ /my-project/index.php last; Reference: http://nginx.org/r/error_page http://wiki.nginx.org/IfIsEvil http://wiki.nginx.org/Pitfalls P.S. try_files doesn't work with alias because of bug: http://trac.nginx.org/nginx/ticket/97, but you can replace alias with root directive: http://nginx.org/r/root

Categories : Nginx

nginx: error_page dont work with rewrite
Please take a look at the directive recursive_error_pages, and it works for me. And kudos to Jim D.

Categories : Nginx

Mongodb replica set auto reconect don't work after down and up for nginx + uwsgi with several processes
After a change in your replica set (no primary, new primary, etc.), the next operation will throw an AutoReconnect exception. After that one failed operation, the underlying PyMongo MongoReplicaSetClient will reconnect to the replica set, and future operations may succeed. If there is a new primary, MongoReplicaSetClient will find it and future operations will succeed. If there is no primary, no operations can succeed unless you set your ReadPreference to PRIMARY_PREFERRED. See the docs here: http://mongoengine-odm.readthedocs.org/en/latest/guide/connecting.html#replicasets The reconnection process must happen once per uwsgi process. So if there is a change to your replica set, you can expect one AutoReconnect exception per uwsgi process.

Categories : Python

Have you managed to make your node nginx proxy setup on Heroku work?
This article contains instructions on setting up nginx as a proxy on Heroku, in conjunction with OpenResty, Lua, and LuaRocks. node.js isn't mentioned. It uses this buildpack. Haven't tried it myself but seems someone has got it working.

Categories : Node Js

RESTORE DATABASE doesn't work, and doesn't report any error
I think restore sometimes doesn't happen because the database being replaced is in use at that time. Try adding this before RESTORE DATABASE command: ALTER DATABASE [TestMLS] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

Categories : Sql Server

main program work good , but when put it into a function doesn't work pyQt
You aren't seeing any windows in the class based version because the function calls finalise and your PyQt objects are being garbage collected. In the simple first case you have, the variables containing your PyQt objects remain in scope for the duration. In this simple case, the easiest way to see this in action is store your PyQt objects in instance variables, ie. self.Frame and self.MainWindow to retain references to the object so that Python doesn't garbage collect them. Generally you would not work with PyQt in this fashion. You subclass the relevant object and do setup in the initialiser.

Categories : Python

Why shellcodes with jmp instruction work, and why doesn't the labels work inside a C wrapper?
The address of mesg can vary depending on how your program is laid out in memory. The following will hard-code a specific address and will not work reliably (or at all): mov ecx, mesg For reference, the first approach hard-codes the following address: mov ecx, 0x804807d The second approach does work because it figures out the address of mesg at runtime, using the return address of a call instruction. Put another way, the first version only works if loaded at a specific address whereas the second is position-independent. It is worth noting that the jmp and the call instructions that appear in the second version use relative addressing, meaning that the opcodes specify the distance to the target rather than the address of the target. This makes these instructions work regard

Categories : Assembly

Why doesn't a DOM2"click" event work, when it does work for "mouseover"?
As far as i can tell the link <a id="workID" href="#">WORK</a> is not bound to a click event handler. In the screenshot you can see that you have set several events, but on click is not set. In your main.js you are calling the function showWorkPane() but in this function you define no event handler for onClick: function showWorkPane() { var workID = document.getElementById("workID"); workID.addEventListener("mouseover", showWorkPaneHandler, false); // add an event handler for click } To address your question: Why doesn't a DOM2“click” event work, when it does work for “mouseover”? Well you have to bind both events (click and mouseover). And currently i am looking into your code and it looks like that the eventhandler onmouseout which fires hideWorkP

Categories : Javascript

.htaccess redirect doesn't work on first load, but does work on refresh
Your rule is fine. It redirects for me in every browser. What's probably happening is that when you click on the link, your browser brings up a cached copy of the PDF. But when you explicitly reload the page, it sends the request to the server instead of pulling up a cached copy of the page and you see the redirect. If you want to test it again, clear your chrome cache and hit the link again.

Categories : Htaccess

Same url, work like reference to style, but doesn't work like AJAX call
The simplest answer will be to use a local web server like WAMP(or IIS) if you are not already. the second answer is Chrome and Safari has a restriction on using ajax with local resources. That's why it's throwing an error like Origin null is not allowed by Access-Control-Allow-Origin. Solution: Use firefox or upload your data to a temporary server. If you still want to use Chrome, start it with the below option; --allow-file-access-from-files More info how to add the above parameter to your Chrome: Right click the Chrome icon on your task bar, right click the Google Chrome on the pop-up window and click properties and add the above parameter inside the Target textbox under Shortcut tab. It will like as below; C:UsersXXX_USERAppDataLocalGoogleChromeApplicationchrome.exe --al

Categories : CSS

Why does "except" work in filtering out IDs/rows, but "not in" doesn't work?
Would this be what you are trying to accomplish Select pm.patient_id from PatientMedication pm Where (pm.medicine_id = 11 or pm.medicine_id = 29) AND pm.start_date >= '2009-03-17'

Categories : Sql Server

Why doesn't CGContextShowGlyphsAtPositions() work, when CGContextShowGlyphsAtPoint() does work?
One possibility is this, from the CGContextShowGlyphsAtPositions document: The position of each glyph is specified in text space, and, as a consequence, is transformed through the text matrix to user space. The text matrix is a separate property of the context, distinct from the graphics state's current transformation matrix. It doesn't say that about CGContextShowGlyphsAtPoint: This function displays an array of glyphs at the specified position in the user space. (Emphasis added to both quotes.) So, your text matrix is not actually used when you show glyphs from a single point. But then, when you show glyphs at an array of positions, it is used, and you see the symptom of a wrong matrix. Specifically, your matrix to try to flip the text back the other way is wrong: it flips

Categories : Osx

Restarting nginx: nginx: [alert] Unable to start the Phusion Passenger watchdog because its executable
Passenger takes what you set in the file nginx.conf by passenger_ruby, for example: passenger_root /home/dev/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.5; passenger_ruby /home/dev/.rvm/wrappers/ruby-1.9.3-p448/ruby;

Categories : Ruby

Can a server run Nginx for some sites and Apache Nginx Reverse Proxy for others?
server { server_name example.com; location / { # assuming apache is on port 81 for example proxy_pass http://127.0.0.1:81; # to make apache detect the host header proxy_set_header Host $host; } # if you have assets folders, you can let nginx serve them directly, # instead of passing them to apache location /images { # or /css or /js .. etc try_files $uri =404; } } Note: in the case of assets, sometimes some sites serve assets through rewrites, or even handled by the application it self, you can pass it to apache by adding that in the assets location as a fallback like this location /images { try_files $uri @apache; } location @apache { proxy_pass http://127.0.0.1:81; } In apache you create a virtual host <Virtua

Categories : Apache

LiveWallpaper service doesn't stop
Do you have other LWPs of your own making that do not have this problem? If so, try creating a copy of one, then paste in the functionality of the problem LWP into it and see if it still occurs. If you don't have another of your own, you could get one from the web probably.

Categories : Android

The service doesn't start in my application
From the android documentation regarding the ACTION_BATTERY_CHANGED intent: You can not receive this through components declared in manifests, only by explicitly registering for it with Context.registerReceiver(). See ACTION_BATTERY_LOW, ACTION_BATTERY_OKAY, ACTION_POWER_CONNECTED, and ACTION_POWER_DISCONNECTED for distinct battery-related broadcasts that are sent and can be received through manifest receivers. So, if you wish to receive broadcasts from this intent you will need to create a receiver programmatically: IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); Intent batteryStatus = context.registerReceiver(null, ifilter);

Categories : Android

Sql connetion doesn't open in windows service
It looks like you may have a logical error in this code. You are using sc for the SqlConnection, but when you create the command object you use sqlConnection, which is never actually opened. This line is the problem: SqlCommand command = new SqlCommand(commanda, sqlConnection); Try the following instead: SqlCommand command = new SqlCommand(commanda, sc); EDIT at 10:22 following user comment Just to confirm that you have made the change as indicated, I've re-jigged your code. Could you try the following: using (SqlConnection sc = new SqlConnection()) { sc.ConnectionString = _sqlConnectionString; sc.Open(); string commanda = "SELECT Moneda, SimbolMoneda FROM NomMoneda WHERE Moneda != '' AND SimbolMoneda != ''"; SqlCommand command = new SqlCommand(commanda, sc);

Categories : C#

Location Service doesn't send the response
So that this question has an answer, and to provide more information for anyone finding this... check this Stackoverflow question. The solution in this case was needing to send a location to the emulator.

Categories : Android

Unable to get MEX to work with my WCF service
Solved - the mex example above that I copied and pasted in is http, not https. I changed it mexHttpsBinding and it worked great. I think http didn't work due to some configuration of running http locally but I am not sure.

Categories : Wcf

Web service throwing exception and doesn't return a response
Exception is clearly stating your issue. You trying to assign an array of String to a String. Please check your code where you are doing this assignment. Most probably the function call is returning an String array so firstly check for return type of that function. Check what you are assigning to response. I don't exactly know in which language you are coding but telling you the simplest approach which you can refer. I will be more than happy if you resolve this issue b checking only this simplest thing.

Categories : Wcf

AngularJS, why doesn't $http.get fire in my data service?
Starting from angular 1.1.4 you need to call $http from the context of angular. Solution call $apply : // root controller function RootCtrl($scope, $location, dataServices) { navigator.geolocation.getCurrentPosition(function (p) { dataServices.getBases(p.coords.latitude, p.coords.longitude).success(function (data) { $scope.model.baseList = data; }); $scope.$apply(); // ADD this line }); };

Categories : Javascript

WCF REST service doesn't return anything because I have a circular reference (I think)
You have to enable proxy creation in order to support the lazy loading. What you can do is to use Include in your query to load the navigation property . var users = from u in context.Users.Include(u=>u.Friends) where u.UserId == userId select u; Or else the other solution is using separate object model as the WCF contracts(DTO). Then you can enable lazy loading and then copy all the required values form the EF entity object(proxy) to your new Data Transfer Object. You can use something like Automaper to map the object easily.

Categories : C#

Thrift service doesn't show any method to invoke
I'm a bit puzzled since SOAP/WSDL on one hand and Thrift on the other hand do not have that much in common, except they're both technologies that can be used to create web services. Typically you want to use Thrift's own http server. I'm not sure how to do that in your scenario, but SOAP/WSDL is for sure the wrong way using Thrift. However, if you are absolutely forced to provide a SOAP service, you either can't use Thrift at all, or you have to implement a dual interface which supports both options and where the clients can pick their preferred kind of interface. But be warned, I would not recommend the latter if you don't have at least some clues what you are doing. A dual interface will require some interesting architectural decisions and a lot more work, especially when more comple

Categories : Java

Apache CXF web service doesn't return string array
Whatever I remember it won't work because you can't parse an array as plain text in a HTTP response. Try these two approaches - 1 ) Change the return type of your method to String and then return a string like this return Arrays.toString(new String[] {"item 1","item 2","item 3"}); 2 ) You can change the return type of list and return a list like this - return Arrays.asList(new String[] {"item 1","item 2","item 3"}); Thanks

Categories : Java

how do I make an android service that runs when the application doesn't?
If you are trying to implement a long running task that is performed in a (background) service, you have to start one or more threads within your service. So the service just gives you the opportunity to have an application context without having to have a user interface ;) you can consider it as a kind of container. This page give you a nice overview about different thread approaches in Android. As you can see a service has not its own thread. Anyway, in your case it seems that an AlarmManager is probably the better option. Running services for polling information all the time can be quite CPU and battery consuming (see this post for instance). So try to avoid having threads that run all the time. If you can push information about updates from a server it's just fine. Check out Googl

Categories : Android

AngularJS service does not work correctly
From my first impression I would suggest to try this: app.factory('PageTitleService', function() { this.title = "home"; var self = this; return { setTitle : function(t) { self.title = t; }, getTitle : function() { self.title + ' - ' + app.name; } } });

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.