Search Results

Search found 49 results on 2 pages for 'konstantin bodnya'.

Page 2/2 | < Previous Page | 1 2 

  • Simple description of worker and I/O threads in .NET

    - by Konstantin
    It's very hard to find detailed but simple description of worker and I/O threads in .NET What's clear to me regarding this topic (but may not be technically precise): Worker threads are threads that should employ CPU for their work; I/O threads (also called "completion port threads") should employ device drivers for their work and essentially "do nothing", only monitor the completion of non-CPU operations. What is not clear: Although method ThreadPool.GetAvailableThreads returns number of available threads of both types, it seems there is no public API to schedule work for I/O thread. You can only manually create worker thread in .NET? It seems that single I/O thread can monitor multiple I/O operations. Is it true? If so, why ThreadPool has so many available I/O threads by default? In some texts I read that callback, triggered after I/O operation completion is performed by I/O thread. Is it true? Isn’t this a job for worker thread, considering that this callback is CPU operation? To be more specific – do ASP.NET asynchronous pages user I/O threads? What exactly is performance benefit in switching I/O work to separate thread instead of increasing maximum number of worker threads? Is it because single I/O thread does monitor multiple operations? Or Windows does more efficient context switching when using I/O threads?

    Read the article

  • Why does ASP.NET web site reference assembly from GAC, when adding local reference?

    - by Konstantin
    When you use ASP.NET web site (instead of web application model) and add reference to an assembly from local folder, Visual Studio, it seems, understands that this local assembly is also in GAC and so does NOT copy this assembly to bin folder (as it does with non-GAC assemblies), but simply adds new record in web.config file. Why such a behaviour? Is it possible to force copy to bin folder (I need this since .dll is not on target environment)? I can add assembly to bin folder as file and it will work, but in this case bin folder contents will be in source control, which is not good.

    Read the article

  • Logical python question - handling directories and files in them

    - by Konstantin
    Hello! I'm using this function to extract files from .zip archive and store it on the server: def unzip_file_into_dir(file, dir): import sys, zipfile, os, os.path os.makedirs(dir, 0777) zfobj = zipfile.ZipFile(file) for name in zfobj.namelist(): if name.endswith('/'): os.mkdir(os.path.join(dir, name)) else: outfile = open(os.path.join(dir, name), 'wb') outfile.write(zfobj.read(name)) outfile.close() And the usage: unzip_file_into_dir('/var/zips/somearchive.zip', '/var/www/extracted_zip') somearchive.zip have this structure: somearchive.zip 1.jpeg 2.jpeg another.jpeg or, somethimes, this one: somearchive.zip somedir/ 1.jpeg 2.jpeg another.jpeg Question is: how do I modify my function, so that my extracted_zip catalog would always contain just images, not images in another subdirectory, even if images are stored in somedir inside an archive.

    Read the article

  • Automatic authentication in PHPMyAdmin

    - by Konstantin
    Hello! I have a local phpMyAdmin (installed via apt-get) adn I'm tired of entering login and password every time I try to open it. Database contains no sensitive info, just test tables, and is visible only from 127.0.0.1 I want phpMyAdmin already be logged in as root user with password 1234 (for example) when I open it. How do I do that? P.S. Saving password in a browser is not what I want.

    Read the article

  • dynamically include zipfilesets into a WAR

    - by Konstantin
    hi all - a bit of clumsy situation but for the moment we cannot migrate to more straight-forward project layout. We have a project called myServices and it has 2 source folders (yes, I know, but that's the way it is for now) - I'm trying to make build process a bit more flexible so we now have a property called artifact.names that will be parsed by generic build.xml and based on name, it will call either jar or war task, eg. myService-war will create a WAR file with the following zipfilesets included there: myService-war-classes, myService-war-web-inf, myService-war-meta-inf. I want to add a bit more flexibility, and allow having additional zipfilesets, eg. myService-war-etc-1,2 etc - so these will be picked up by the package target automatically. I cannot use "if" inside war target, and also ${ant.refid:myService-war-classes} property is not resolved, so I'm kind of stuck at the moment with my options - how do I dynamically include a zipfileset into a WAR? You can refer to fileset by id, but it MUST be defined then, eg. you can't have it optional on project level. Thank you. Some build.xml snippets: <target name="archive"> <for list="${artifact.names}" param="artifact"> <sequential> <echo>Packaging artifact @{artifact} of project ${project.name}</echo> <property name="display.@{artifact}.packaging" refid="@{artifact}.packaging" /> <echo>${display.@{artifact}.packaging}</echo> <propertyregex property="@{artifact}.archive.type" input="@{artifact}" regexp="([a-zA-Z0-9]*)(\-)([ejw]ar)" select="\3" casesensitive="false"/> <propertyregex property="@{artifact}.base.name" input="@{artifact}" regexp="([a-zA-Z0-9]*)(\-)([ejw]ar)" select="\1" casesensitive="false"/> <echo>${@{artifact}.archive.type}</echo> <if> <then> <war destfile="${jar.dir}/${@{artifact}.base.name}.war" compress="true" needxmlfile="false"> <resources refid="@{artifact}.packaging" /> <zipfileset refid="@{artifact}-classes" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-meta-inf" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-web-inf" erroronmissingdir="false" /> <!-- Additional zipfilesets to package --> <zipfileset refid="@{artifact}-etc-2" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-3" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-4" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-5" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-6" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-7" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-8" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-9" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-10" erroronmissingdir="false" /> </war> </then> <!-- Generic JAR packaging --> <else> <jar destfile="${jar.dir}/@{artifact}.jar" compress="true"> <resources refid="@{artifact}.packaging" /> <zipfileset refid="@{artifact}-meta-inf" erroronmissingdir="false" /> </jar> </else> </if> </sequential> </for> </target>

    Read the article

  • How GAE emulator limits list of available Python modules?

    - by Konstantin
    I installed Python Mock module using PIP. When I try to import mock running under 'dev_appserver', GAE says that it can't find module 'mock'. import mock works perfectly in Python interpreter. I understand that dev_appserver behaves absolutely correctly because I can't install modules with PIP on GAE servers. My question is how technically dev_appserver filters list of modules that can be loaded?

    Read the article

  • Cached/offline maps for iPhone?

    - by Konstantin
    I'd like to use use maps in my application, so that there will be as less as possible traffic. Perfect solution would be caching of map slices. I know it's not possible with google maps (license). I took a look on OpenStreetMaps and it seems as good solution. The next: SDK. The only one I've found is from CloudMade. The problem is, I found no related API methods for caching/offline calls. Are there any alternative solutions?

    Read the article

  • How to use NSPredicate with Key-Paths (and ALL)?

    - by Konstantin
    Taking example from Apple docs using predicates with Key-Paths NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY employees.firstName like 'Matthew'"]; Now, assume the employees has a bool field "isGood". The question: how do I select just those entities, having ALL of employees isGood==TRUE? I tried but failed with following predicates: "!(ANY employees.isGood != TRUE)" "(ALL employees.isGood == TRUE)" // Would be perfect, but throws an exception..

    Read the article

  • How to save objects using Multi-Threading in Core Data?

    - by Konstantin
    I'm getting some data from the web service and saving it in the core data. This workflow looks like this: get xml feed go over every item in that feed, create a new ManagedObject for every feed item download some big binary data for every item and save it into ManagedObject call [managedObjectContext save:] Now, the problem is of course the performance - everything runs on the main thread. I'd like to re-factor as much as possible to another thread, but I'm not sure where I should start. Is it OK to put everything (1-4) to the separate thread?

    Read the article

  • Logical python question - handeling directories and files in them

    - by Konstantin
    Hello! I'm using this function to extract files from .zip archive and store it on the server: def unzip_file_into_dir(file, dir): import sys, zipfile, os, os.path os.makedirs(dir, 0777) zfobj = zipfile.ZipFile(file) for name in zfobj.namelist(): if name.endswith('/'): os.mkdir(os.path.join(dir, name)) else: outfile = open(os.path.join(dir, name), 'wb') outfile.write(zfobj.read(name)) outfile.close() And the usage: unzip_file_into_dir('/var/zips/somearchive.zip', '/var/www/extracted_zip') somearchive.zip have this structure: somearchive.zip 1.jpeg 2.jpeg another.jpeg or, somethimes, this one: somearchive.zip somedir/ 1.jpeg 2.jpeg another.jpeg Question is: how do I modify my function, so that my extracted_zip catalog would always contain just images, not images in another subdirectory, even if images are stored in somedir inside an archive.

    Read the article

  • My image does not load on a jQuery fade in effect even though the div loads.

    - by Konstantin
    jQuery(document).ready(function() { if (useMSIE){ pngfixALL(); }; jQuery(div).show(data_fadeInEffect, 500);return false; // jQuery(div).animate({opacity:1}, 500, 'linear'); }); This is what I have for a fade in effect. When using animate(), the image in the div tag fades in fine. However, when I use show(), the div loads because I can click in that area, but the image itself doesn't load. Why is this happening? I have another area of the code where I click on an 'x' in the image and it fades out using hide(). This works fine.

    Read the article

  • How do I react when somebody tries to guess admin directiories on my website?

    - by Konstantin
    Hello! I've been getting these messages in apache error.log for quite a while: [client 217.197.152.228] File does not exist: /var/www/phpmyadmin [client 217.197.152.228] File does not exist: /var/www/pma [client 217.197.152.228] File does not exist: /var/www/admin [client 217.197.152.228] File does not exist: /var/www/dbadmin [client 217.197.152.228] File does not exist: /var/www/myadmin [client 217.197.152.228] File does not exist: /var/www/PHPMYADMIN [client 217.197.152.228] File does not exist: /var/www/phpMyAdmin And many more different addresses. Looks like somebody is trying to guess where my admin applications are located. What should I fear in this situation, and what a knowledge of my admin addresses can give to attacker, if everything is password protected?

    Read the article

  • Boost Serialization Library upgrade

    - by Konstantin
    Hello! How do I know that I can safely upgrade Boost Serialization Library on a production system without breaking compatibility with the existing data ? Is there any test that I should perform in order to be sure that all data stored in the binary format by previous version of the library will be successfully read by the new one ? Does Boost Serialization library itself guarantee some sort of compatibility between versions ?

    Read the article

  • What happens when I instantiate class in Python?

    - by Konstantin
    Could you clarify some ideas behind Python classes and class instances? Consider this: class A(): name = 'A' a = A() a.name = 'B' # point 1 (instance of class A is used here) print a.name print A.name prints: B A if instead in point 1 I use class name, output is different: A.name = 'B' # point 1 (updated, class A itself is used here) prints: B B Even if classes in Python were some kind of prototype for class instances, I'd expect already created instances to remain intact, i.e. output like this: A B Can you explain what is actually going on?

    Read the article

  • How to make link become inactive?

    - by Konstantin Vasilcov
    The idea was simple: change li background color on hover to one color ul#menu li a:hover {...} change it on mouse press to the other color ul#menu li a:active {...} return the color to the original (normal) if the link is neither hover nor pressed The problem appeared to be that, if user rejected his intention and lets the mouse up away from the link, the back color stays as if it was pressed. Then I tried to research and came up with this: ul#menu li a:hover:active {...} It became better, and the link is not marked with special back color in a normal state after user presses the link and rejects. But the "on-hover" back color became equal to the active one. So it looks like the link gets "active" state and stays in it even after user releases mouse button. Hate to write this, but I am very new to html and css. So I may be missing something very basic here. Could you, please, suggest any way, how to achieve my goal? EDIT I've read this source CSS Styling links (thought there could be some other state to use instead of active), but found nothing suitable there...

    Read the article

  • ArchBeat Link-o-Rama for 2012-05-31

    - by Bob Rhubart
    Eclipse DemoCamp - June 2012 - Redwood Shores, CA wiki.eclipse.org Oracle HQ 10 Twin Dolphin Dr. Redwood Shores, CA Presentations: The evolution of Java persistence, Doug Clarke, EclipseLink Project Lead, Oracle Eclipse Project Sapphire, Konstantin Komissarchik, Sapphire Project Lead, Oracle Developing Rich ADF Applications with Java EE, Greg Stachnick, Oracle Leveraging OSGi In The Enterprise, Kamal Muralidharan, Lead Engineer, eBay NVIDIA Nsight Eclipse Edition, Goodwin (Tech lead - Visual tools), Eugene Ostroukhov (Senior engineer – Visual tools)   BI Architecture Master Class for Partners - Oracle Architecture Unplugged blogs.oracle.com June 21, 2012 This workshop will be highly interactive and is aimed at Oracle OPN member partners who are IT Architects and BI+W specialists. This will be a highly interactive session and does not involve slide presentations or product feature details, it addresses IT-Architectural issues and considerations for the IT-Architect Community. 2012 Oracle Fusion Middleware Innovation Awards - Win a FREE Pass to Oracle OpenWorld 2012 in SF www.oracle.com Share your use of Oracle Fusion Middleware solutions and how they help your organization drive business innovation. You just might win a free pass to Oracle Openworld 2012 in San Francisco. Deadline for submissions in July 17, 2012. IT professionals: Very much the time to change our approach | Andy Mulholland www.capgemini.com This final post by retiring Capgemini CTO blogger Andy Mulholland is a must-read for anyone in IT. 10 Great WebCenter Sites Resources (FatWire) | John Brunswick www.johnbrunswick.com John Brunswick shares "some good resources that span the WebCenter Sites and FatWire brands, to get a consolidated list of helpful destinations for ongoing education." Cloning a WebCenter Portal Managed Server | Maiko Rocha blogs.oracle.com WebCenter and ADF A-Team blogger Maiko Rocha shows how to easily add a new managed server to a single-node domain to make it a cluster. Sorting and Filtering By Model-Based LOV Display Value | Steven Davelaar blogs.oracle.com How-to by WebCenter and ADF A-Team blogger Steven Davelaar. Designing and Developing Cross-Cutting Features | Stephen Rylander www.infoq.com Architects are often tasked with a business feature that must span systems. This article by will provide strategies to handle the change and guide your thinking about separating system boundaries and what that means for your technical design. Thought for the Day "A committee is a group of people who individually can do nothing, but who, as a group, can meet and decide that nothing can be done." — Fred Allen (5/31/1894 – 3/17/1956) Source: Brainy Quote

    Read the article

< Previous Page | 1 2