Search Results

Search found 38 results on 2 pages for 'vadim rybak'.

Page 1/2 | 1 2  | Next Page >

  • Transparently cache files from a network drive in Linux

    - by Vadim
    We have a Linux server that reads files from a network drive and processes them. In a common scenario, a user will log in and access the same files over and over again. The size of the files varies but the larger ones can be around 50+ Mb. The files seldom change. I was wondering if it's somehow possible to transparently cache the files. I don't want (or can) change the program the reads the files, nor do I control the protocol by which the files are accessed. I just want something to detect that I access a certain path, copy the file locally (if needed) and then read the file from the local drive. I've read about Bcache but can't figure out if it's what I need. Do you have any suggestions? Thanks, Vadim.

    Read the article

  • Is there a way to check if a user has specific rights?

    - by Vadim
    In my application I'm using ntrights.exe, that is part of Windows Resource Kit, to grant and revoke a specific user right. For example to grant a user "Log on as a server" right, I execute using shell object following command: ntrights -u User +r SeServiceLogonRight However ntrights doesn't allow you to check if a user has a specific right. Can you tell me how I can check if a user has a specific right?

    Read the article

  • How to create a virtual machine on Windows 7?

    - by Vadim
    I'd like to create a virtual machine running on Windows 7. On Win XP / Vista I have been using either MS Virtual PC or VMWare Workstation. I believe I heard somewhere that virtualization is part of Windows 7. Can someone tell me how I can create a virtual machine or point me in the right direction?

    Read the article

  • What is the difference between Skip and Don't Copy buttons in Copy File dialog?

    - by Vadim
    This is a silly question. In Windows 7/Vista when a user trying to copy multiple file, it looks like he has five options: Copy and Replace Don't Copy Copy, but keep both files Skip Cancel the operation. It looks to me that option 2 (Don't Copy) is the same as 4 (Skip). However, it's kind of strange for Microsoft to put two buttons that perform the same action. I probably miss something. Could you please tell me what I'm missing?

    Read the article

  • empty response body in ajax (or 206 Partial Content)

    - by Nikita Rybak
    Hi guys, I'm feeling completely stupid because I've spent two hours solving task which should be very simple and which I solved many times before. But now I'm not even sure in which direction to dig. I fail to fetch static content using ajax from local servers (Apache and Mongrel). I get responses 200 and 206 (depending on the server), empty response text (although Content-Length header is always correct), firebug shows request in red. Javascript is very generic, I'm getting same results even here: http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_first (just change document location to 'http://localhost:3000/whatever') So, it's probably not the cause. Well, now I'm out of ideas. I can also post http headers, if it'll help. Thanks! Response Headers Connection close Date Sat, 01 May 2010 21:05:23 GMT Last-Modified Sun, 18 Apr 2010 19:33:26 GMT Content-Type text/html Content-Length 7466 Request Headers Host localhost:3000 User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Referer http://www.w3schools.com/ajax/tryit_view.asp Origin http://www.w3schools.com Response Headers Date Sat, 01 May 2010 21:54:59 GMT Server Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8l DAV/2 mod_jk/1.2.28 Etag "3d5cbdb-fb4-4819c460d4a40" Accept-Ranges bytes Content-Length 4020 Cache-Control max-age=7200, public, proxy-revalidate Expires Sat, 01 May 2010 23:54:59 GMT Content-Range bytes 0-4019/4020 Keep-Alive timeout=5, max=100 Connection Keep-Alive Content-Type application/javascript Request Headers Host localhost User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Origin null

    Read the article

  • html widget communicating with server

    - by Nikita Rybak
    I'm making html widget for websites. Let's say, it will display current stock indexes. In short, arbitrary website owner takes code snippet from me and includes it on his webpage http://website.com/index.html. When arbitrary user opens http://website.com/index.html, my code sends request to my server (provider.com), which performs necessary operations and returns information to user's browser. When response has arrived, user will see relevant stock value on http://website.com/index.html. In index.html service could be called like this <script type="text/javascript" src="provider.com/service.js"> </script> <div id="target_area"></div> <script type="text/javascript"> service.show("target_area", options); </script> Now, the problem is in the same origin policy: I can't just send ajax request from website.com to provided.com and return html to embed in client's webpage. I see several solutions, which I list below, but none quite satisfy me. I wonder, if you could suggest something, especially if you had some relevant experience. 1) iframe, plain and simple. Disadvantage: must have fixed dimensions + stupid scroll bars appearing in some browsers. Can be fixed with javascript, but all this browser-specific tinkering doesn't sound good to me. 2) JSONP. Problem: can't return whole chunk of html, must return only data. Then, on browser side, I'll have to use javascript to embed data into html snippet placed statically in index.html. Doesn't sound nice, because data format is not very simple and may even change later. 3) Use hidden iframe to do ajax requests. A bit tricky, but sounds like a way to go. Well, that's my thoughts on the subject. Are there any better ways? BTW, I tried to check some existing widgets too, but didn't find much useful information. All domain names used in this text are fictional and any resemblance is purely coincidental :)

    Read the article

  • Loading a ConfigurationSection with a required child ConfigurationElement with .Net configuration fr

    - by Vadim Rybak
    I have a console application that is trying to load a CustomConfigurationSection from a web.config file. The custom configuration section has a custom configuration element that is required. This means that when I load the config section, I expect to see an exception if that config element is not present in the config. The problem is that the .NET framework seems to be completely ignoring the isRequired attribute. So when I load the config section, I just creates an instance of the custom configuration element and sets it on the config section. My question is, why is this happening? I want the GetSection() method to fire a ConfigurationErrors exception since a required element is missing from the configuration. Here is how my config section looks. public class MyConfigSection : ConfigurationSection { [ConfigurationProperty("MyConfigElement", IsRequired = true)] public MyConfigElement MyElement { get { return (MyConfigElement) this["MyConfigElement"]; } } } public class MyConfigElement : ConfigurationElement { [ConfigurationProperty("MyAttribute", IsRequired = true)] public string MyAttribute { get { return this["MyAttribute"].ToString(); } } } Here is how I load the config section. class Program { public static Configuration OpenConfigFile(string configPath) { var configFile = new FileInfo(configPath); var vdm = new VirtualDirectoryMapping(configFile.DirectoryName, true, configFile.Name); var wcfm = new WebConfigurationFileMap(); wcfm.VirtualDirectories.Add("/", vdm); return WebConfigurationManager.OpenMappedWebConfiguration(wcfm, "/"); } static void Main(string[] args) { try{ string path = @"C:\Users\vrybak\Desktop\Web.config"; var configManager = OpenConfigFile(path); var configSection = configManager.GetSection("MyConfigSection") as MyConfigSection; MyConfigElement elem = configSection.MyElement; } catch (ConfigurationErrorsException ex){ Console.WriteLine(ex.ToString()); } } Here is what my config file looks like. <?xml version="1.0"?> <configuration> <configSections> <section name="MyConfigSection" type="configurationFrameworkTestHarness.MyConfigSection, configurationFrameworkTestHarness" /> </configSections> <MyConfigSection> </MyConfigSection> The wierd part is that if I open the config file and load the section 2 times in a row, I will get the exception that I expect. var configManager = OpenConfigFile(path); var configSection = configManager.GetSection("MyConfigSection") as MyConfigSection; configManager = OpenConfigFile(path); configSection = configManager.GetSection("MyConfigSection") as MyConfigSection; If I use the code above, then the exception will fire and tell me that MyConfigElement is required. The question is Why is it not throwing this exception the first time??

    Read the article

  • JSF command button attribute is transferred incorrectly

    - by Oleg Rybak
    I have following code in jsf page, backed by jsf managed bean <h:dataTable value="#{poolBean.pools}" var="item"> <h:column> <f:facet name="header"> <h:outputLabel value="Id"/> </f:facet> <h:outputText value="#{item.id}"/> </h:column> <h:column> <f:facet name="header"> <h:outputLabel value="Start Range"/> </f:facet> <h:inputText value="#{item.startRange}" required="true"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="End Range"/> </f:facet> <h:inputText value="#{item.endRange}" required="true"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Pool type"/> </f:facet> <h:selectOneMenu value="#{item.poolType}" required="true"> <f:selectItems value="#{poolBean.poolTypesMenu}"/> </h:selectOneMenu> </h:column> <h:column> <f:facet name="header"/> <h:commandButton id="ModifyPool" actionListener="#{poolBean.updatePool}" image="img/update.gif" title="Modify Pool"> <f:attribute name="pool" value="#{item}"/> </h:commandButton> </h:column> </h:dataTable> This code fragment is dedicated to editing come collection of items. Each row of the table contains "edit" button that submits changed values of the row to the server. It has the item itself as an attribute. Submit is performed by calling actionListener method in the backing managed bean. This code runs correctly on Glassfish v 2.1 But when the server was updated to Glassfish v 2.1.1, the attribute stopped to be passed correctly. Instead of passing edited item (when we change the values in table row, we are actually changing the underlying object fields), the source item is submitted to server, i.e. the item that was previously given to the page. All the changes that were made on the page are discarded. I tried to update jsf version from 1.2_02 to 1.2_14 (we are using jsf RI), but it had no effect. Perhaps anyone came across the same problem? Any help and suggestions will be appreciated.

    Read the article

  • telling java to accept self-signed ssl certificate

    - by Nikita Rybak
    It looks like a standard question, but I couldn't find clear directions anywhere. I have java code trying to connect server with probably self-signed (or expired) certificate. It gives something like this [HttpMethodDirector] I/O exception (javax.net.ssl.SSLHandshakeException) caught when processing request: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target As I understand, I have to play around with keytool and tell java that it's ok to allow this connection. But all comments I've found assume I'm fully proficient with keytool, like "generate private key for server and import it into keystore". And I'm not. Is there anybody who could post detailed instructions? I'm running unix, so bash script would be best. Not sure if it's important, but code executed in jboss. Thanks a lot!

    Read the article

  • write html content from javascript

    - by Nikita Rybak
    There's one thing I want to do with javascript, but don't know how. In a perfect world it would look like this: <p>My very cool page!</p> <script type="text/javascript"> document.write('<div>some content</div>'); </script> And this script would insert <div>some content</div> right before (or after, or instead of) script tag. But in the real world, document.write starts writing html anew, removing any static content in the page (<p> tag, in this case). This is simplified example, but should give you the idea. I know that I can statically put <div id="some_id"></div> before script tag and insert html in it from js, but I wanna be able to use multiple instances of this snippet without changing it (generating random id manually) each time. I'm ok to use jquery or any other existing library as well. Is there any way to achieve this? Thanks!

    Read the article

  • (resolved) empty response body in ajax (or 206 Partial Content)

    - by Nikita Rybak
    Hi guys, I'm feeling completely stupid because I've spent two hours solving task which should be very simple and which I solved many times before. But now I'm not even sure in which direction to dig. I fail to fetch static content using ajax from local servers (Apache and Mongrel). I get responses 200 and 206 (depending on the server), empty response text (although Content-Length header is always correct), firebug shows request in red. Javascript is very generic, I'm getting same results even here: http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_first (just change document location to 'http://localhost:3000/whatever') So, it's probably not the cause. Well, now I'm out of ideas. I can also post http headers, if it'll help. Thanks! Response Headers Connection close Date Sat, 01 May 2010 21:05:23 GMT Last-Modified Sun, 18 Apr 2010 19:33:26 GMT Content-Type text/html Content-Length 7466 Request Headers Host localhost:3000 User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Referer http://www.w3schools.com/ajax/tryit_view.asp Origin http://www.w3schools.com Response Headers Date Sat, 01 May 2010 21:54:59 GMT Server Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8l DAV/2 mod_jk/1.2.28 Etag "3d5cbdb-fb4-4819c460d4a40" Accept-Ranges bytes Content-Length 4020 Cache-Control max-age=7200, public, proxy-revalidate Expires Sat, 01 May 2010 23:54:59 GMT Content-Range bytes 0-4019/4020 Keep-Alive timeout=5, max=100 Connection Keep-Alive Content-Type application/javascript Request Headers Host localhost User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Origin null UPDATED: I've found a problem, it was about cross-domain requests. I knew that there are restrictions, but thought they're relaxed for local filesystem and local servers. (and expected more descriptive error message, anyway) Thanks everybody!

    Read the article

  • runModalForWindow throttles http requests

    - by Nikita Rybak
    I have url connection, which normally works fine NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:delegate]; But when I create a modal window, no request ever receives response: [NSApp runModalForWindow:window]; If I comment this line out, thus creating a 'standard' window, everything works. I tried implementing all methods from NSURLConnectionDelegate, not a single of them called. I suspect this is something about 'run loops', but have little experience in this area. Does anybody have experience in this? Thank you

    Read the article

  • How to execute scalar function using Enterprise Library?

    - by Vadim
    I'm having trouble to execute scalar function using Enterprise Library 5.0. The code looks something like that: somedDb.ExecuteScalar(CommandType.Text, "SELECT dbo.MyFunction('param')"); When the code is executed, I get the following error: Cannot find either column "dbo" or the user-defined function or aggregate "dbo.MyFunction", or the name is ambiguous.

    Read the article

  • Is there any gmap's api function to concatenate address string from AddressDetails structure?

    - by Vadim
    Hello! I’am using Google Map’s GClientGeocoder for reversing map coordinates into string address. Exactly as shown in google’s example here http://code.google.com/apis/ajax/playground/?exp=maps#geocoding_reverse But, I would like to extract LocalityName (place.AddressDetails.Country.AdministrativeArea.Locality.LocalityName) from place.address. The straight way will be join all AddressDetails elements, excluding LocalityName. However order of the structure elements in final string representation is depends from geographical location. For example: Order for Australia city: ThoroughfareName + “, ” + LocalityName + “ ” + AdministrativeAreaName + “ ” + PostalCodeNumber + “, ” + CountryName Order for Russian city: CountryName + “, ” + PostalCodeNumber + “, ” + LocalityName + “, ” +ThoroughfareName Moreover PostalCodeNumber was not supplied in AddressDetails for the last example. Please, help!

    Read the article

  • LINQ to XML vs. XmlReader

    - by Vadim
    In my Silverlight application I'm using mostly XmlReader but I'm playing with idea to replace XmlReader implementation with LINQ to XML. What are pros and cons between LINQ to XML and XmlReader in Silverlight?

    Read the article

  • Why do I need an IoC container as opposed to straightforward DI code?

    - by Vadim
    I've been using Dependency Injection (DI) for awhile, injecting either in a constructor, property, or method. I've never felt a need to use an Inversion of Control (IoC) container. However, the more I read, the more pressure I feel from the community to use an IoC container. I played with .NET containers like StructureMap, NInject, Unity, and Funq. I still fail to see how an IoC container is going to benefit / improve my code. I'm also afraid to start using a container at work because many of my co-workers will see code which they don't understand. Many of them may be reluctant to learn new technology. Please, convince me that I need to use an IoC container. I'm going to use these arguments when I talk to my fellow developers at work.

    Read the article

  • How to mock protected virtual members with Rhino.Mocks?

    - by Vadim
    Moq allows developers to mock protected members. I was looking for the same functionality in Rhino.Mocks but fail to find it. Here's an example from Moq Quick Start page how to mock protected method. // at the top of the test fixture using Moq.Protected() // in the test var mock = new Mock<CommandBase>(); mock.Protected() .Setup<int>("Execute") .Returns(5); // if you need argument matching, you MUST use ItExpr rather than It // planning on improving this for vNext mock.Protected() .Setup<string>("Execute", ItExpr.IsAny<string>()) .Returns(true); Let me know if I'm chasing something that doesn't exit.

    Read the article

  • Current Line For Visual Studio Macros

    - by Vadim
    How can I read text of a current line (where cursor is situated) from Macros? I'm going to use such a fucntion: Public Sub AddTextToChangeLogFile() Dim textOnACurrentLine As ??? textOnACurrentLine = ??? If textOnACurrentLine.Text <> String.Empty Then Dim sw As New StreamWriter("C:\###\Changes.txt", True) sw.WriteLine(textOnACurrentLine + ". file: " + DTE.ActiveDocument.Name) sw.Close() End If End Sub

    Read the article

  • When VS 2010 RC is going to be released?

    - by Vadim
    I was looking to install the latest Windows Azure Tools for Microsoft Visual Studio. However, this version doesn't work with Visual Studio 2010 Beta 2. They say that the latest version of Azure Tools & SDK will only work with VS 2008 and VS 2010 RC and that for VS 2010 Beta 2 I still need to install November release. I know that VS 2010 is going to be released on April 12th this year but does anyone knows when VS 2010 RC is coming out? EDIT: The full RTM version of Visual Studio 2010 is released as of April 14, 2010.

    Read the article

  • Simple Enterprise Library console application refuses to compile

    - by Vadim
    I just downloaded and installed Microsoft Enterprise Library 5.0. I fired up VS 2010 to play with EL 5 and created a very simple console application. However, it would not compile. I got the following error: The type or namespace name 'Data' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary' (are you missing an assembly reference?) I added Microsoft.Practices.EnterpriseLibrary.Common, Microsoft.Practices.EnterpriseLibrary.Data, and Microsoft.Practices.Unity references to my project. Here's the simple code that refuses to compile. using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Unity; using Microsoft.Practices.EnterpriseLibrary.Data; using Microsoft.Practices.Unity; namespace EntLib { class Program { static void Main(string[] args) { IUnityContainer container = new UnityContainer(); container.AddNewExtension<EnterpriseLibraryCoreExtension>(); var defaultDatabase = container.Resolve<Database>(); } } } The error above complains about line #2 : using Microsoft.Practices.EnterpriseLibrary.Data; Someone probably will point out to a stupid mistake by me, but at the moment I fail to see it. I tried to remove and add again Microsoft.Practices.EnterpriseLibrary.Data to refences but it didn't help.

    Read the article

1 2  | Next Page >