Search Results

Search found 951 results on 39 pages for 'restricted'.

Page 25/39 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Relative paths in spring classpath resource

    - by Mike Q
    Hi all, I have a bunch of spring config files, all of which live under the META-INF directory in various subpackages. I have been using import like the following... <import resource="../database/schema.xml"/> So a relative path from the source file. This works fine when I am working with a local build outside of a jar file. But when I package everything up in a jar then I get an error that it cannot resolve the URL resource. If I change the above to an absolute path (with classpath:) then it works fine. Is there any way to use relative paths with ".." in when the configs are packaged in a jar or am I restricted to descending relative paths and absolute paths only? Thanks.

    Read the article

  • Is there a utility that will let me write to an Excel 2007 .xlsm file with macros enabled?

    - by Mike Webb
    I am writing a program that writes to Excel files. I am restricted to writing to Excel 2007, which is fine, and I'm using EPPlus, which is a great utility. The thing is that I need to have macros and VBA enabled for an update function in the sheet, but EPPlus will only write to .xlsx files, not macro-enabled .xlsm files. If I try to write to .xlsm files it won't open. Is there another code library that lets me accomplish what I need (again that's writing to Excell 2007 Macro-enabled workbooks)?

    Read the article

  • http_post_data basic authentication?

    - by kristian nissen
    I have a remote service that I need to access, according to the documentation it's restricted using basic authentication and all requests have to be posted (HTTP POST). The documentation contains this code example - VB script: Private Function SendRequest(ByVal Url, ByVal Username, ByVal Password, ByVal Request) Dim XmlHttp Set XmlHttp = CreateObject("MSXML2.XmlHttp") XmlHttp.Open "POST", Url, False, Username, Password XmlHttp.SetRequestHeader "Content-Type", "text/xml" XmlHttp.Send Request Set SendRequest = XmlHttp End Function how can I accomplish this in PHP? When I post data to the remote server it replies: 401 Unauthorized Access which is fine because I'm not posting my user/pass just the data. Bu when I add my user/pass as it's describe here: http://dk.php.net/manual/en/http.request.options.php like this: $res = http_post_data('https://example.com', $data, array( 'Content-Type: "text/xml"', 'httpauth' => base64_encode('user:pass'), 'httpauthtype' => HTTP_AUTH_BASIC ) ); the protocol is https - I get a runtime error in return (it's a .Net service). I have tried it without the base64_encode but with the same result.

    Read the article

  • serving files using django - is this a security vulnerability

    - by Tom Tom
    I'm using the following code to serve uploaded files from a login secured view in a django app. Do you think that there is a security vulnerability in this code? I'm a bit concerned about that the user could place arbitrary strings in the url after the upload/ and this is directly mapped to the local filesystem. Actually I don't think that it is a vulnerability issue, since the access to the filesystem is restricted to the files in the folder defined with the UPLOAD_LOCATION setting. UPLOAD_LOCATION = is set to a not publicly available folder on the webserver url(r'^upload/(?P<file_url>[/,.,\s,_,\-,\w]+)', 'aeon_infrastructure.views.serve_upload_files', name='project_detail'), @login_required def serve_upload_files(request, file_url): import os.path import mimetypes mimetypes.init() try: file_path = settings.UPLOAD_LOCATION + '/' + file_url fsock = open(file_path,"r") file_name = os.path.basename(file_path) file_size = os.path.getsize(file_path) print "file size is: " + str(file_size) mime_type_guess = mimetypes.guess_type(file_name) if mime_type_guess is not None: response = HttpResponse(fsock, mimetype=mime_type_guess[0]) response['Content-Disposition'] = 'attachment; filename=' + file_name #response.write(file) except IOError: response = HttpResponseNotFound() return response

    Read the article

  • how to remove a few lines from a Unicode registry file using batch commands in Windows?

    - by Cosmin
    Hi. I have a program who's generating some data in registry. I save it with "reg export HKCU\Software\ProgramName\Data data.reg" (Unicode format). I need to take it to other computer and import it there so the program from that computer could use the data. But I have to remove some text lines from data.reg. The text lines are easy to find because they contain some strings. Now I'm doing this manually (using Wordpad) every few days but maybe there is another way... Oh and I can't install other programs on these computers (the access is restricted) so I have to use batch/cmd files. What I tried so far: - redirecting the export to "con" but is visual only not in a variable; - using "for /F ..." but this works only with ANSI and removes blank lines. Can somebody please help me...? Thank you.

    Read the article

  • ASP.NET AJAX or jQuery (UpdatePanel/ScriptManager or UFrame/jQuery.ajax)

    - by Mark Redman
    Hi, We use the asp.net UpdatePanel and the ScriptManager/ScriptManagerProxy for ajax related functionality; reducing full page refreshes and calling WCF Services respectively. we also use jQuery and plugins for some parts of the UI. We have had some issues with javascript library related conflicts, but have come across some posts indicating that there is a lot more overhead using the UpdatePanel. I have found some limited reference to UFrame: http://www.codeproject.com/KB/aspnet/uframe.aspx www.codeplex.com/uframe Is this a commercially viable replacement for the asp.net UpdatePanel? We use a ScriptManagerProxy to reference WCF services and easily create and use a proxy to call the various WCF service methods. Would using jQuery ajax be a more efficient solution here? We have got this working well on various browsers but now seem to be getting some security related issues (as seen in FF Firebug: Access to restricted URI denied" code: "1012) which seem to have started since using jQuery a lot more. Is it possible/viable to not use ASP.NET Ajax at all?

    Read the article

  • Google app engine or Amazin ec2 for Restful services and direct access to datastore

    - by imran
    I'm thinking of building a Restful app on either App engine or ec2 devloped in Java. I'm interested in opinions/experience of using the two options for this. The primary purpose is to create web services to write and retrieve data through a mobile device...basically creating an API for the service I want to create. It seems to me it would be quicker and cheaper in the beginning to go with google app engine using either restlet or grails.But I also think that I could run into problems in the future when I want to so somthing more advanced and might be restricted by app engines environment. I also want to be able to do data analysis on the data in the datastore as well. It seems that with app engine this would be hard as I don't have direct access to the datastore ( in Amazon I could still have access to the underlying db if I go with MySQL ) .

    Read the article

  • mod,prime -> inverse possible

    - by Piet
    Hi all. I was wondering if one can do the following: We have: X is a product of N-primes, thus I assume unique. C is a constant. We can assure that C is a number that is part of the N-primes or not. Whichever will work best. Thus: X mod C = Z We have Z and C and we know that X was a product of N-primes, where N is restricted lets say first 100 primes. Is there anyway we can get back X?

    Read the article

  • Is selling a "website screen scraper" illegal?

    - by Yatendra Goel
    I have coded a "website screen scraper" and want to sell it commercially. I know that webpages scraped by the screen scraper are restricted to be scraped by the webmaser of that website. The robots.txt file of the website says that its webpages must not be scraped. So my question is whether selling that screen scraper is a crime or using that screen scraper is a crime in legal terms. I know that this question is related to law but I thought the software experts on SO must also have answer to this question.

    Read the article

  • TypeError: Python thinks that I passed a function 2 arguments but I only passed it 1

    - by slhck
    I work on something in Seattle Repy which is a restricted subset of Python. Anyway, I wanted to implement my own Queue that derives from a list: class Queue(list): job_count = 0 def __init__(self): list.__init__(self) def appendleft(item): item.creation_time = getruntime() item.current_count = self.job_count self.insert(0, item) def pop(): item = self.pop() item.pop_time = getruntime() return item Now I call this in my main server, where I use my own Job class to pass Jobs to the Queue: mycontext['queue'] = Queue() # ... job = Job(str(ip), message) mycontext['queue'].appendleft(job) The last line raises the following exception: Exception (with type 'exceptions.TypeError'): appendleft() takes exactly 1 argument (2 given) I'm relatively new to Python, so could anyone explain to me why it would think that I gave appendleft() two arguments when there obviously was only one?

    Read the article

  • How to handle security constraints using GWT 2.1's RequestFactory?

    - by Marc
    I am currently developing a GWT 2.1 application that is to be deployed on Google App Engine. I would like to realise the server communication using the new RequestFactory. Now my question is how to handle fine-grained security issues in this context? Some server actions (of those declared in the RequestContext stubs) shall be restricted to certain users (possibly depending on the parameters of the remote call). If a call is unauthorised, I would like the client to show a login page (so that one may log in as a different user, for example). From the Expenses example, I know how to implement an automatic redirection to a login page, but in this example, the security model is quite simple: A client is allowed to access the servlet if and only if a user is logged in. Shall I raise a custom UnAuthorizedException in my server-side service? Where should I intercept this exception? (Can I do this in a servlet filter like the GaeAuthFilter of the Expenses example?)

    Read the article

  • Sign in as different user when using Integrated Windows Authentication

    - by Sam
    I have restricted access to a site by using Integrated Windows Authentication and turning off anonymous access. This way I can then show them their real name (from looking up on Active Directory and using the server variable LOGON_USER) and do other related Active Directory tasks. How can I then prompt again for their user credentials, through a 'sign in as other user' link , showing the browser prompt (like you would get on a browser like Chrome or Firefox, or if the site was not in the 'Intranet' zone in IE) rather than a Web Form? Since SharePoint offers this functionality, I assume there is a way to do this through code, but I don't know what code can do this (using C#). I can send a 401 header which makes the prompt appear, but how do you then confirm if they are logged in?

    Read the article

  • How to decide which colors to use that look most similar across most screens/monitors?

    - by Lyon
    Hi, I'm baffled. I'm trying to find suitable colors for a logo that would look similar across most monitors/screens. I know it's near impossible, but how does one end up with the color palette that new Google logo and Facebook "blue" uses for example? I've a monitor that has been calibrated, and a few laptop screens that have default settings. Yet both the Google logo and facebook's look similar (although they aren't using colors restricted to the web safe 216 palette. Any ideas? thoughts? Thanks

    Read the article

  • C++/CLI com-Interop: Exposing a reference type property to VBA

    - by Adam
    After long hours of investigation on exposing C# property that accepts a reference type to VBA, I concluded that it was not possible. In brief, a C# property that is of type double[] or even an object cannot be consumed in VBA like this: ' Compile Error: Function or interface marked as restricted, ' or the function uses an Automation type not supported in Visual Basic oComExposedEarlyBinding.ObjectArray = VBArray ' Run-time error 424: Object required oComExposedEarlyBinding.PlainObject = VBArray Or for more details: C# property exposed to VBA (COM) : Run-time error '424': Object required I would like to know if C++/CLI would support such an option? i.e. Allowing a reference-type property to be exposed to VBA so that a syntax like the above is valid. N.B. You can achieve this by using late binding, but losing the intellisense is not an option.

    Read the article

  • Joomla Development - Allow Direct File Access AND use Joomla-intern Framework

    - by Email
    Hi As usual you write in Joomla Development defined('_JEXEC') or die('Restricted access'); I make a plugin which needs access from Paypal/IPN, so i exclude that in that specific file. BUT I also need to use the Joomla-intern Variables to access the Database, so i tried this: require("../filewithaccesstoframework.php"); OR even $baseurl = $_SERVER['HTTP_HOST']; $baseurl ="http://".$baseurl."/configuration.php"; require($baseurl); By using the first code it displays "Restircted Access" since it seems to take this from the included file which i can't skip to put-in-there. The second code does not seem to recognize the Variables used in configuration.php like $host, $db, $password. the file configuration.php is chmod 444 Why this happens and is there a workarround to allow direct access to a file AND using the Joomla intern Framework (Variables, Functions)?

    Read the article

  • Catching Oracle Errors in Django

    - by Dashdrum
    My Django app runs on an Oracle database. A few times a year, the database is unavailable because of a scheduled process or unplanned downtime. However, I can't see how to catch the error a give a useful message back to the requester. Instead, a 500 error is triggered, and I get an email (or hundreds) showing the exception. One example is: File "/opt/UDO/env/events/lib/python2.6/site-packages/django/db/backends/oracle/base.py", line 447, in _cursor self.connection = Database.connect(conn_string, **conn_params) DatabaseError: ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege I see a similar error with a different ORA number when the DB is down. Because the exception is thrown deep within the Django libraries, and can be triggered by any of my views or the built in admin views, I don't know where any exception trapping code would go. Any suggestions?

    Read the article

  • https://www.googleapis.com/drive/v2/files/<fileid>/comments?alt=json returned "Not Found" on a file that can't be opened

    - by Kartik Ayyar
    More details as below: https://www.googleapis.com/drive/v2/files/1iNMGIAFXuhS_CO_hnEO0_EJ9PAgT-hXYqWYv0MPGUTI/comments?alt=json returned "Not Found The file is present in drive and shows in drive.changes.list, but can't be opened in Google Drive either. There are two problems here a) the file is somehow corrupt ( it was a document imported into drive, so that failed, but that isn't something I care about for the purposes of this question ) b) The file shows up as existing in some API calls, but calls to read comments with the Drive SDK comments API fail. Here are results from an API call showing how the file does indeed exist: "file": { "kind": "drive#file", "id": "1iNMGIAFXuhS_CO_hnEO0_EJ9PAgT-hXYqWYv0MPGUTI", "etag": "\"o35FABD0TC3H-Up3OL3UA9kEB2w/MTM3MTc2NzU5NzEyNA\"", .... .... "iconLink": "https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png", "title": "<removed>", "mimeType": "application/vnd.google-apps.document", "labels": { "starred": false, "hidden": false, "trashed": true, "restricted": false, "viewed": true },

    Read the article

  • What is the best PHP framework for building a website around a heavily relational PostgreSQL databas

    - by Kenaniah
    First of all, the framework of choice needs to have excellent support for PostgreSQL. I don't care about MySQL because it doesn't have half of the features the application I will be porting requires. (And when I say excellent support, I mean that their approach to database drivers has not been solely trained in MySQL). The ideal framework: Should take full advantage of PHP 5.3 and PostgreSQL 8.4 features Should support new technologies such as OpenID and social networking Should support complex relationships between database relations Should have an intelligent validation system Should have a basic library of helpful views (such as pagination, navigation, etc) Should probably be MVC based Should have excellent documentation and an active development community Should namespace classes intelligently What I'm looking for might be more of a library of utilities, as I really don't want to be restricted by the framework in what I can and can not do. I have my own small library of core classes that take care of business logic, and I will most likely want to integrate those with the new framework as well. Thanks!

    Read the article

  • How to check If a Tel: area code is correct using jquery?

    - by streetparade
    Hy I need to check if the given phone area code is correct. i created a input field, user can insert a tel area code like 0044 oder 0090 and so on. I restricted the input field to 4 chars. I need to check after the 4 chars are entered if the area code is correct. What it should do. After entering 4 number, the script should check the following things. Does the entered number equals something like "00{number 2 digit only}" if it doesnt alert("please enter correct tel areacode"); I hope i could explain my problem clear. How can i do it with javascript or jquery?

    Read the article

  • How can I expose a service bus by a wcf service to be consumed by a silverlight client

    - by illdev
    In a Silverlight application, instead of consuming and writing (wcf) wrappers around messages that finally get sent to the bus, I want to send use my message bus as directly as possible. My idea was to expose the service bus directly as a wcf service, or, in other terms, I want to bidirectionally pub/sub over the wire. Has this been done already? Is bi-directionality doable at all? After all, we are (are we restricted to that?) in the http domain? Lots of questions. Some head start would be greatly appreciated! I am in .NET land, with using Rhino Service Bus, but the pattern should apply to different platforms.

    Read the article

  • apache: basic authentication before rewrite

    - by pyro
    I have an apache in frontend that redirect a request via a rewrite rule. I have to put a basic authentication before redirect a request, so I put this in the config file: <VirtualHost *:443> ServerAdmin xxxxxx DocumentRoot /var/www/html/ ServerName xxxxxxx RewriteEngine on ErrorLog logs/error.log CustomLog logs/access_log common <Directory /var/www/html/> AuthType Basic AuthName "Restricted Files" AuthUserFile /etc/httpd/conf/tag.pwd Require valid-user RewriteRule ^/(.*) http://xxxxxx:xxx/$1 [P,L] </Directory> </VirtualHost> But doesn't work. Any suggestions?

    Read the article

  • python - checking if a user has admin privileges

    - by Matt
    Hi, I'm writing a little program as a self-learning project in Python 3.x. my idea is for the program to allow two fields of text entry to the user, and then plug the user's input into the value of two specific registry keys. What I was wondering, and something my books don't seem to cover, is if there is a simple way to make it check if the current user can access the registry. I'd rather it cleanly tell the user that he needs admin privileges than for the program to go nuts and crash because it's trying to access a restricted area. I'd like it to make this check as soon as the program launches, before the user is given any input options. What code is needed for this? thanks for the help

    Read the article

  • Should my internal API classes be all in one package?

    - by Chris
    I'm hard at work packaging up an API for public consumption. As such I'm trying to limit the methods that are exposed to only those that I wish to be public and supportable. Underneath this of course there are a multitude of limited access methods. The trouble is that I have a lot of internal code that needs to access these restricted methods without making those methods public. This creates two issues: I can't create interfaces to communicate between classes as this would make these my internal methods public. I can't access protected or default methods unless I put the majority of my internal classes in the same package. So, I have around 70 or 80 internal classes in cleanly segregated packages BUT with overly permissive access modifiers. Would you say that a single package is the lesser of two evils or is there a better way to be able to mask my internal methods whilst keeping more granular packages? I'd be interested to find out the best practice here. I'm already aware of This

    Read the article

  • Restricting Directory access from web application context

    - by Yogi
    i have a web application which stores users file in directory which is under webroot directory.. Suppose web application is under 'fileupload' and all files are getting stored in 'xyz' folder under 'fileupload' so now if user points to url say like www.xyzpqr.com/fileupload/xyz/abc.doc, he gets that file. How do i restirct this from happening.. i have thought of putting xyz folder in WeB-inf folder but as my application is very big i have to made changes at too many places.. so is there any way so that without moving the folder to web-inf (restricted folders) i can achieve wat i want..

    Read the article

  • NHibernate - get List<long> representing primary keys?

    - by Nathan
    I have a situation where I definitely don't want to get the whole domain object. Basically, the entity has a primary key of long (.NET)/bigint(sql server 2005). I simply need to pass the primary key to an external system which will access the database directly - and since the list of ids could be large, I don't want to rehydrate the entire domain object just to get the Id. In linq2sql, I could accomplish this with a projection, but I am restricted to NHibernate 1.2.1.4000, which doesn't support Linq. Is there a way to accomplish this using NHibernate 1.2.1.4000? (I am open to using a named-query if that will work)

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >