w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Can Azure Worker Process stop itself?
So I think you're referring to Worker Roles, right? A worker process would simply be something you run in your app (like a thread, a method, something). Azure Worker Roles are full VMs. Assuming that's what you meant: The new announcement about stopping VMs does not apply to Web / Worker Role instances; it applies to Virtual Machines. And those can be stopped easily via REST call (or much easier via PowerShell that wraps the REST call). You could make that call from a Virtual Machine, which would effectively shut itself down, but I'm not so sure that's a sound idea. If you take that approach, it will be very hard for you to track the role-stop progress, since you would have just stopped the VM that made the call.

Categories : Azure

How many instances of a web application are running in one worker process?
I'm not sure if this applies to you, but HttpModule Initialize methods are called more than once because even though there is only one Application instance. One HttpApplication can spawn multiple HttpModule instances, so make sure those initializations are thread safe. Application_Start and _End will fire only once per site start and stop with your current settings, so that will not be the issue. If you are using the HttpContext.Cache object, you might have the issue mentioned in this answer: HashTable in HttpContext.Current.Cache If you want, you can try using WinDbg and get a dump of what is going on in your process but that is a really heavy-handed tactic that probably won't shed as much light as just looking through the code. Not until you look at it a little harder, and are still s

Categories : Asp Net

ImportError being generated when trying to run django-celery worker process
I'm pretty sure this line is your problem: File "C:sitescorecrmpeoplemodels.py", line 163, in <module> UserProfile._meta.get_field_by_name('username')[0]._max_length = 75 While you're still busy importing from people.models, this line (in particular get_field_by_name) forces Django to evaluate the model and setup all relationships between that model and it's related models. This, in turn, forces an import of Customer in people.models, while you're still busy importing that exact model. This is what results in an ImportError. For a working solution you'll need to post your models.py. Why does this error only occur with celery? I can't say for sure without some more information, but my best guess is that Celery handles importing everything slightly different (Django probably

Categories : Django

Perl's worker don't process connections, waiting on a futex
According to futex man page: This system call is typically used to implement the contended case of a lock in shared memory, as described in futex(7) So my first question: is your Perl script using "Perl Threads" and are you having contention on a shared memory variable?

Categories : Perl

What is the relationship between Application Pools and worker process threads?
Yes, each application pool is typically a single process1, but can contain multiple threads. You can assign multiple sites to an application pool, and those sites will all run under the same process, however they will run under different "app domains", which are security contexts that separate the code of one site from another, even if they're running on the same app pool. Two users hitting the site at the same time can run on different threads, meaning they can run concurrently. That means any logging can have values interspersed. You might want to add a session value to your logging so you can sort based on session. App pool restarts (recycling) are normal, 20 restarts in a day does not seem unusual. They can happen multiple times per day, and IIS controls when app pools are restar

Categories : Asp Net

PHP process takes a long time to finish, how can I farm it off to a worker
PHP cant multi-thread, it can fork - but only when not going through apache! Look at using a Worker system, like PHP-Resque It makes life so much easier :)

Categories : PHP

Worker process not releasing memory and Oracle connection not closing
Once I ran into the same issue and I bumped into this article and this one. I exchanged a few emails with the author (Paul Wilson) and he helped me to understand the problem with large objects which are allocated in memory in a "Large Object Heap" and it never gets compacted. This is what he told me: Larger objects are indeed allocated separately, where large is something around 60-90 KB or larger (I don't remember exactly, and its not officially documented anyhow). So if your byte arrays, and other objects for that matter, are larger than that threshold then they will be allocated separately. When does the large object heap get collected? You may have ran into statements about there being several generations of normal memory allocation (0, 1, and 2 in the current f

Categories : Vb.Net

Debug worker project run as a process from another project in VS
You don't give much info about the interaction between the gui and the worker, but if attaching to the process is too hard (typically beacuse the worker only runs briefly), a more usable scenario is to add a configuration option to the gui to add an extra argument to the worker command line, on which the worker responds with a DebugBreak. For example the worker's main would be var args = ParseArguments(); //check if string 'WaitForDeugger' is on command line if( args.RequestsDebug ) System.Diagnostics.Debugger.Break(); .... And the gui invokes the worker like this: var args = GetArgumentsForWorker(); if( someSpecialDebugOptionEnabled ) args += " WaitForDeugger"; Process.Start( "worker.exe", args );

Categories : C#

NServiceBus Distributor Worker creates a new worker queue
When you start the endpoint, you'll see a warning logged, which explains the reason. 2013-08-26 18:56:48,473 [1] WARN NServiceBus.ConfigureDistributor [(null)] <(nu ll)> - 'MasterNodeConfig.Node' points to a local host name: [localhost]. Worker input address name is [Orders.Handler.810aa1ea-7eb4-47b3-b639-724c4498a999@SELEN E]. It is randomly and uniquely generated to allow multiple workers working from the same machine as the Distributor. Here's some documentation on the distributors and the explanation of the Scale out sample as well. http://particular.net/articles/load-balancing-with-the-distributor http://particular.net/articles/scale-out-sample. Check out the Hands on Lab (Intermediate lab), which will walk you through the Scale out lab as well. The Scale out lab will sh

Categories : Misc

I do not understand why this worker cannot spawn a sub-worker in IE10 HTML5
I'm in about the same boat. My plan is to load a subworker from another doamin or file:// protocol because you cannot load one directly from a regular js script. I still need to test this, but I know that Workers/SharedWorkers are not subject to the normal Cross-Origin Restriction Policy, except** for when you're trying to load one (and hopefully only when doing this from a window script). Another method is to use window.postMessage to forward messages to a Worker that it has created in the other window. Alternatively, for my specific needs I am considering running a headless browser locally, a CDN, or a localhost "forever-server" with CORS enabled -- but this most likely still requires a window.postMessage(). Hope this helps, Tim! Post back if you find an answer, eh?

Categories : Javascript

Can I get the ID of my sidekiq worker inside the worker?
You can access the job id using the jid accessor method and the thread id using the Thread.current method. Like this: logger.info "JID #{jid} - TID #{Thread.current.object_id.to_s(36)}"

Categories : Ruby On Rails

Connecting an Azure worker role to a dedicated cache worker role
Hello maybe you should try to set the connection between them using Inter Role Communication, you can find an answer for how to make the inter role communication in the following stackoverflow website: How to do inter-role communication with Azure? you can also find more details in the following link: http://blogs.msdn.com/b/avkashchauhan/archive/2011/10/30/communication-between-windows-azure-roles.aspx I hope this helps you solve your problem please let me know if you need anything else.

Categories : Caching

Can a QAction accept drops?
Not sure if this will work, but you can try subclassing and implement a drop/dragenter event. Since QAction is based on QObject i think this won't help. Think about implementing a Widget/Label as MenuItem (Custom Menu) and Drag/Drop there.

Categories : Qt

TCP connection drops first byte
I cannot see anything wrong with the client or server programs. That leaves us grasping at explanations like: a bug in the operating system at one end, a bug in the virtual networking setup, real network errors, or ... a hypothetical JVM bug. None of these explanations can be justified without more information / evidence. The other possibility is that something is interfering with the output going to your console. Try running the client with output redirected to a file ...

Categories : Java

C++ SDL framerate drops when holding key down
SDL_Delay will not work the way you want. It is not precise enough (has 10 millisecond precision), so it will be impossible to get required number of frames per second this way. Us vsync instead. Another thing is that printing to stderr/stdout is slow when console is visible. If you're printing something when key is pressed, or if pressing the key somehow increases amount of text being printed, game will slow down.

Categories : C++

Game unplayable because of FPS drops
The only red flag I can see at the moment is: t1.GetData(0, r1, texture1Pixels, 0, pixelCount); t2.GetData(0, r2, texture2Pixels, 0, pixelCount); These calls have a high overhead. I would recommend, if you are doing per-pixel collision detection, caching or pre-computing the pixel data rather than retrieving the data from the texture every frame. EDIT: here is a toy implementation (NOT TESTED!) of how you may want to retrieve the pixel data. Hopefully this will be enough to get you started. Here are two mini functions for getting the texture data. When initializing your game, use 'PixelMaps' passing in all of your textures (e.g in an array). You will then have a dictionary you can use to perform lookups of the pixel data. You will want to use the information gleamed from the Texture

Categories : C#

Putting pin drops for some areas in map in android
Use the url https://maps.googleapis.com/maps/api/staticmap?center=latitude,longitude&zoom=14&size=800x400&markers=color:red%7Ccolor:red%7Clabel:C%7Clatitude,longitude&sensor=false.The marker is used for pointing the exact position.

Categories : Android

libpcap drops some packets from specific IP
Since you mentioned that you can get all the ip packets on the interface using tcpdump, I would consider the following line in your code is all right as long as you are using the same interface name for the parameter dev as you use for tcpdump. pcap_open_live(dev, BUFSIZ, PROMISCUOUS, -1, errbuf); The issue might be in the line, pcap_compile(pcd, &fp, port, 0, netp); In the above line, port variable is a filter string. Your packet collector will only collect the packets that passes this filter. If you are not using proper filter parameters in your port string to allow also the packets involving ip addresses 200.201.x.x, you will not capture them.

Categories : C

OpenGL-ES iOS DrawText on screen drops FPS dramastically
Allocating 1000 textures takes up a huge amount of memory and will slow down your app, especially if they are at a high enough resolution for readable text. You should generate these textures as they are needed and free them once they are no longer being displayed. Make sure that you aren't generating and freeing textures each frame, but only as needed. If you are drawing all 1000 strings in the same scene, you should combine as many as you can into like textures. This will allow you to leverage Cocos2D's TrueType rendering system to keep text high-quality. On the other hand if this is not an option and all 1000 strings need to be distinct from each other, consider building a font rendering system that renders each character as a glyph image. This will reduce the number of textures used f

Categories : IOS

TFS Build 2010 + Referencing DLLs from drops
I dont know enough about the team foundation service but I hope you have access to the build defintion and you will be able to customize it. Make your client specific code look for the DLL's from a root BIN folder. Then within the build definition, after the "GetWorkspace" activity. Add a new activity (from the toobox either CopyDirectory or InvokeProcess) to copy all the built DLL's from your droplocation to the root bin folder. To identify the latest version, you can create a custom activity (write c# code), which will look at the drop folder and identify the greatest version number. After finding the version number set it to a variable, which will be then used by the CopyDirectory or InvokeProcess activity. CopyDirectory is straight forward, you just add the source and destination l

Categories : Tfs

How to make div tags expand to content when one drops below the other
From your last comment, I think you want to look into @ media queries. You can tell it to change specific properties when the width of the window drops below your specified width. @media (max-width: 600px) { #Welcometext{ Properties specific to to a screen size under 600px; } } CSS Media Queries

Categories : CSS

HTTPS Request to HTTP Drops Headers?
Most likely the "service 2" have code similar to "If incoming request is HTTP ignore authorization headers". It is very reasonable behavior as HTTP traffic can be very easily sniffed and replayed - so honest servers block callers from potentially unsecure behavior.

Categories : C#

Android CalendarView Drops Weeks at Random
As a temporary fix, force a refresh by scrolling down/up a month or two, and then scroll back. You should see that the refresh causes the missing week to appear. Provided this is truly a bug with no workaround, the code involved to compensate for this wouldn't be trivial. I'd imagine it would involve posting a runnable method on your UI thread from the containing activity that would analyze the view after its rendered to check for a missing week, and then forcing a refresh of the view somehow (This would be "easiest" way before getting into sub-classing the CalendarView itself and trying to control its rendering at a finer granularity, say through onMeasure or onLayout). Update: Found a workaround - CalendarView Issues when Used Directly (Outside of a DatePicker)

Categories : Android

Frame-Rate / Performance drops over time
I'm currently working on fixing your issue, but your renderer.readyTexture() just spins wildly out of control, and is essentially leaking memory, and fast, which explains the drop in speed. Edit: I got the memory usage to stabilize. Add public Map<String, Texture> loadedTextures = new HashMap<String, Texture>(); to your renderer class in render.java and change your renderer.readyTexture() method to this: public void readyTexture(String textureDir){ if (!loadedTextures.containsKey(textureDir) || loadedTextures.get(textureDir) == null) { texture = lt.loadTexture(textureDir); loadedTextures.put(textureDir, texture); } else { texture = loadedTextures.get(textureDir); } textureDirString = textureDir;

Categories : Java

MFC: sending a msg from worker thread to the Main thread to stop the worker thread
Actually, the only safe way to do anything to a worker thread is from within the worker thread itself. It should probably be structured as a while(bRun) loop so it runs until the program is shutting down. Whatever you are trying to do (stop and start) should be handled by code in the while loop.

Categories : C++

QListView not accepting drops in QMainWindow with Python PyQt4
See how this example works so you can modify your code: #!/usr/bin/env python #-*- coding:utf-8 -*- #--------- # IMPORT #--------- import sys, os from PyQt4 import QtGui, QtCore #--------- # DEFINE #--------- class MyListWidget(QtGui.QListWidget): dropped = QtCore.pyqtSignal(list) def __init__(self, type, parent=None): super(MyListWidget, self).__init__(parent) self.setAcceptDrops(True) def dragEnterEvent(self, event): if event.mimeData().hasUrls: event.accept() else: event.ignore() def dragMoveEvent(self, event): if event.mimeData().hasUrls: event.setDropAction(QtCore.Qt.CopyAction) event.accept() else: event.ignore() def dropEvent(self, event):

Categories : Python

Selenium sendkeys drops character with Chrome Driver
Investigating you are from Czech Republic also, I am going to make wild assumption, that your keyboard is set up to Czech as default. I also had some strange issues with sendKeys when my system had Czech keyboard as default one. Since I changed default to English, the problems dissapeared. If this does not help, please provide info what is going to happen if you try this: name.sendKeys("2"); name.sendKeys("22222222"); name.sendKeys("4"); name.sendKeys("44444444"); name.sendKeys("424242");

Categories : Java

How do I create a DIV that drops down another DIV on :hover (for desktop) and on tap (for touch devices) using CSS?
I am a newbie myself. But I think you might be able to just use screen sizes, and assume that small screens means a touch screen device. This shows you how to use CSS with different screen sizes: http://css-tricks.com/resolution-specific-stylesheets/ This is just an idea, but could you use conditional CSS stylesheets, which you could activate in PHP on certain conditions? P.S.- This might help you out as well: Best way to detect touchscreens (ipad, iphone, etc)?

Categories : HTML

python's selenium "send_keys" with chrome driver drops characters
Use selenium Ide and export test case in python from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException import unittest, time, re class Test1(unittest.TestCase): def setUp(self): self.driver = webdriver.Firefox() self.driver.implicitly_wait(30) self.base_url = "https://www.facebook.com/" self.verificationErrors = [] self.accept_next_alert = True def test_1(self): driver = self.driver driver.get(self.base_url + "/") driver.find_element_by_id("email").clear() driver.find_element_by_id("email").send_keys("username") driver.find_element_by_id("pass").clear() driver.fin

Categories : Python

Upload fails when user drags and drops attachement from email client
All browsers are only expecting the actual file drag/drop format (CF_HDROP), but when dragging from Outlook, there is no file on the filesystem. What you get is the CF_FILEDESCRIPTOR and CF_FILECONTENTS formats. No browser that I know of (not even IE), knows how to handle that.

Categories : Jquery

In PHP, I have a table with repeating dropdowns but while multiple drops down lists are showing only the first is populated
You have an error in your markup, make sure you close the <select> tag before the <td> <td> <select> <?php while ($row = mysqli_fetch_assoc($type_result_set)) {?> <option value="<?php echo $row["type_name"];?>"><?php echo $row["type_name"];?></option> <?php}?> </select> </td>

Categories : PHP

Why vendor folder's size drops from 100MB to 15MB after pushing it to bitbucket git repository?
Essentially you are correct, bitbucket knows they are git repositories in your vendor folder so simply links them to the respective repositories so it does not duplicate. To really get to understand the annotations look into Git Submodules No, the 5MB version is so small because it does not contain the actual code, things will break if you try to use it ;) try running git submodule init then git submodule update to see it inflate! You should not be doing composer update on your production server, instead do it on your staging server (or even beforehand on your local env if your testing doesn't have ssh either [which really it shouldn't since it's meant to mock your prod env]) and if that works fine then you push the code up to the production server. Doing a composer update on the producti

Categories : GIT

Azure-hosted ASP.NET MVC site drops client cache-related HTTP headers
X-Powered-By: ARR/2.5, ASP.NET ARR stands for Application Request Routing. Go to inetmgr UI and click on the server name and you will find the option 'Application Request Routing Cache'. You'll see 'Cache configuration', check options there. Also, check 'Cache control rules' there. Click 'Add rule...' and try play around with it.

Categories : Asp Net Mvc

Instantiating a worker role from a worker role
If your worker roles are different applications, you could make use of Service Management API to create a new deployment for WR-2 from WR-1. What you would do is put the package and configuration files of WR-2 in blob storage and when WR-1 has done putting all the messages in the queue, you create a new deployment of WR-2. To create a deployment programmatically using Service Management API, please see here: http://msdn.microsoft.com/en-us/library/windowsazure/ee460813.aspx. However you would need to ensure that once WR-2 has done all the data, it is destroyed by WR-1 so that you don't keep on incurring charges. Other possibility is to run your worker role instances to run in Master/Slave configuration. Let's say there are 2 instances of your worker role running. One of the instance would

Categories : C#

Using the ion_auth login process and using a templated process to render the login process
There is no need to use ion_auth views or controllers. they are just for reference. we have to use their function as they have define in model for login/logout/register etc... just simply put his model,library and config file to the respective folder of codeigniter in your project and just use their function as they have shown in demo

Categories : Codeigniter

Flask-Login & Flask-Principle authenticated user drops to flask_login.AnonymousUserMixin
You need to instantiate principle after login. This is a repeat question, see here Flask Login and Principal - current_user is Anonymous even though I'm logged in

Categories : Python

How do I deal with cases when Process.Kill() yields "access denied" because the process is terminating?
Use the command line C# to kill the task, for example Taskkill /F /IM ExeName.exe. If you do not have a persmission to kill the task than also force kill will not help. More info Please check http://www.c-sharpcorner.com/UploadFile/8ea152/kill-process-from-the-command-prompt-in-windows-8/ here an example how to run command line in C# Run Command Prompt Commands Greetings

Categories : C#

cross memory attach. How do I get the remote address from a child process to a parent process
The system calls process_vm_readv and process_vm_writev are meant for fast data transfer between processes. They are supposed to be used in addition to some traditional way of interprocess communication. For example, you may use a regular pipe or fifo to transfer the required addresses between your processes. Then you may use those addresses to establish faster process_vm_ communication. The simpliest way to transfer something between forked processes should be the pipe() function (man 2 pipe has a good example of its usage). There are many other ways to do so of course, like using sockets or messages. You can even write an address to a file and let the other process read it.

Categories : C

How to get process (external program) time, cpu usage for process run from java application?
Run this program in a separate thread, then run tasklist /v process (if Windows), intercept output, split lines into columns, find my-simple-app.exe and get necessary info. If tasklist info is not enough, then read process ID column form tasklist output and run some other util to get more info.

Categories : Java

In Java What is the exit value of a process which is killed in the background through Linux shell using process id
This is not a Java specific question. The return code will be the same for all Unix systems here (at least I have never seen a Unix system not behaving this way): 128 + the number of the signal which caused the process to terminate. No idea for Windows... Therefore, 130 in your case. In C, you'd check (after a call to waitpid() for instance) whether a process has been terminated by a signal using WIFSIGNALED(status).

Categories : Java



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