Search Results

Search found 3399 results on 136 pages for 'direct'.

Page 83/136 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • RewriteRule and php download counter

    - by rcourtna
    (1) I have a site that serves up MP3 files: http://domain/files/1234567890.mp3 (2) I have a php script that tracks file download counts: http://domain/modules/download_counter.php?file=/files/1234567890.mp3 After download_counter.php records the download, it redirects to the original file: Header("Location: $FQDN_url"); (3) I'd like all my public links to be presented as the direct file urls from (1). I'm trying to use Apache to redirect the requests to download_counter.php: RewriteRule ^files/(.+\.mp3)$ /modules/download_counter.php?file=/files/$1 [L] I'm currently stuck on (3), as it results in a redirect loop, since download_counter.php simply redirects the request back to the original file (rather than streaming the file contents). I'm also motivated to use download_counter.php as is (without modifying it's redirect behaviour). This is because the script is part of a larger CMS module, and I'd like to avoid complicating my upgrade path. Perhaps there is no solution to my problem (other than modifying the download_counter script). WDYT?

    Read the article

  • IF I have multiple candidate keys which one is a primary key and justify your choice ??

    - by zahrani
    Given R = { Account , Analyst , Assets, Broker, Client, Commission, Company, Dividend, Exchange, Investment, Office, Profile, Return, Risk_profile, Stock, Volume} and a set of functional dependencies F{fd1, fd2,fd3, fd4, fd5,fd6, fd7, fd8, fd9, fd10, fd11} where: fd1: Client - Office fd2: Stock - Exchange, Dividend fd3: Broker - Profile fd4: Company - Stock fd5: Client - Risk_profile, Analyst fd6: Analyst - Broker fd7: Stock, Broker - Invenstment, Volume fd8: Stock - Company fd9: Investment,Commission - Return fd10: Stock, Broker - Client fd11: Account - Assests these are candidate key(s) : (Account, Commission,Analyst ,Company) (Account, Commission,Analyst ,Stock) (Account ,Commission,Broker ,Company) (Account ,Commission,Broker ,Stock) (Account ,Commission,Client, Company) (Account ,Commission,Client ,Stock) (Q) Select a primary key and justify your choice ? I was select (Account ,Commission,Broker ,Stock) as a primary key ??? I chose that because it has the most direct dependencies compared to other ones. e.g. more attributes are functionally dependent on this primary key. please check if my answer is it true ? or Not I'm waiting your answer asap thank you

    Read the article

  • MS WebBrowser + Embedded HTML Resource + res:// Protocol

    - by letthewookiewin
    Hi, I have an embedded HTML resource (helloworld.htm) inside my Visual Studio project. (Ie, I've added an HTML file to the project and set its properties to "Embedded Resource". Within the same application I have a WebBrowser control. I'd like to direct the WebBrowser control to display the HTML resource using the res:// protocol. But I can't figure out the exact format needed to address an embedded resource using this style of URL. Any ideas? Thanks!

    Read the article

  • Access sql server without directly permission in domain from ASP.NET

    - by Yongwei Xing
    Hi all Here is the situation. All the machines and users are in the same domain.We are in a domain enviroment. There are some sql server 2005/2008 storing data. There is a ASP.NET site in the domain using the Window Authentication. Now, we need read the data from the sql server and display them using SqlDataSource and GridView. But most of users do not have the direct permission to access the database. Is there any solution to get the data from database and display them on the site without granting users permission? Best Regards,

    Read the article

  • Is there a convention for organizing the include/exports in a large C++ project ?

    - by BlueTrin
    Hello, In a large C++ solution, is there a best/standard way to separate the include files necessary to build an intermediary DLL and the include files which will be used by the DLL clients ? We have grouped all the include files in a folder called Interface (for DLL interface), but there the customers have to either include the Interface folder as a default include folder or type the full name as: #include "ProjectName/Interface/myinterface.h" Wouldn't it be better to create a separate folder called exports where I would create a folder called ProjectName and put the include files there ? So that the customers would be typing: #include "ProjectName/myinterface.h" If I do the thing right above, then should I keep the files within the solution and produce a post build event (I use Visual Studio 2k5) to copy the files into the "export" folder (/ProjectName/) ? Or is it better to just include directly the files from this folder within my project (this is more direct and has less chances to cause maintenance issues ? I am more looking for advice than for a definite solution. Thank you for reading this ! Anthony

    Read the article

  • Giving proper credit to a projects contributors

    - by Greg B
    I've recently been working with an opensource library for a commercial product. The opensource code is distributed from the website of the company who sells the proprietary product as a zip file. The library is a (direct) port to C# of the original library which is in Java. As such, it uses methods instead of getter/setter properties. The code contains copyright notices to the supplier of the product. The C# port was originally provided to the company by a 3rd party individual. I have modified the source to be more C# like and added a couple of small features. I want to put my version of the code out there (Google code or where ever) so that C# users of the software can benefit from a more native feeling library. How can I and/or how should I amend the copyright notice to give proper credit to The comercial owner of the original source The guy who provided the original C# port Myself and anyone else who contributes to the project in the future The source is provided under the LGPL V2.1,

    Read the article

  • Multiple Table Joins to Improve Performance?

    - by EdenMachine
    If I have a table structure like this: Transaction [TransID, ...] Document [DocID, TransID, ...] Signer [SignerID, ...] Signature [SigID, DocID, SignerID, ...] And the business logic is like this: Transactions can have multiple documents Documents can have multiple signatures And the same signer can have multiple signatures in multiple documents within the same transaction So, now to my actual question: If I wanted to find all the documents in a particular transaction, would it be better, performance-wise, if I also stored the TransID and the DocID in the Signer table as well so I have smaller joins. Otherwise, I'd have to join through the Signature Document Transaction Documents to get all the documents in the transaction for that signer. I think it's really messy to have that many relationships in the Signer table though and it doesn't seem "correct" to do it that way (also seems like an update nightmare) but I can see that it might be better performance for direct joins. Thoughts? TIA!

    Read the article

  • desktop module for existing web application

    - by maxxxee
    My client has a running web application which has been online for more than a year. Recently the client has introduced smart cards for his employees. Because of the difficulty in integrating smart card with its api on a web interface(i will post another detailed question on this later) we are planning to have desktop interface for this. There are 10-20 terminals which will use the desktop interface. 3 approaches for doing this that I have considered : Direct connection and operations on DB-Not using this because of data integrity and consistency issues. Build web service end points and use it from desktop interface Build a dll with common functions and use from both web and desktop Questions: 1. What are your opinions based on 2 and 3 approach? 2. Any other approach that I should consider? Note: I am using .Net framework, web application in asp.net

    Read the article

  • MySQL: 4 Table "has-many-through" Join?

    - by Nebs
    Let's say I have the following 4 tables (for examples' sake): Owners, Trucks, Boxes, Apples. An owner can have many trucks, a truck can have many boxes and a box can have many apples. Owners have an id. Trucks have an id and owner_id. Boxes have an id and truck_id. Apples have an id and box_id. Let's say I want to get all the apples "owned" by an owner with id = 34. So I want to get all the boxes that are in boxes that are in trucks that owner 34 owns. There is a "hierarchy" if you will of 4 tables that each only has reference to its direct "parent". How can I quickly filter boxes while satisfying conditions across the other 3 tables? I hope that made sense somewhat. Thanks.

    Read the article

  • Invalid ADTS sampling_frequency_index and channel_configuration why?

    - by Moto
    Hello all, I hope someone can direct me on the right path before I put a lot of time and effort on this. I'm currently trying to parse an AAC+ frame to get information such as number of channels and sample frequency. So it seems that we can simply get this information from the ADTS header but most of the time this information is inaccurate. So the question is: -Why is this data inaccurate? What is the meaning of the ADTS header channel and sample freq? Should I rely on it? -Should I parse further down the frame to get this information? FYI, the AAC+ raw data is coming from streaming servers... Thanks for the help! -Moto

    Read the article

  • How can I provide links to intranet files through ASP.net?

    - by PhoenixWright
    Conditions: The files must be opened outside of the window that the link to them is in. I have tried href, but when I give it an intranet link it only opens correctly if I leave out target="_blank"; if I put that in, the new window that opens doesn't receive the full link if there is a pound sign in the filepath... a direct link to the intranet address \a\b\c#c.txt would be fine with me; there is no concern about security, but I can't seem to get that to happen in a new window. It seems like this is happening when I don't create a new window, but I can't utilize the same window to open the links. Any ideas?

    Read the article

  • Using Remote Web Server to Initialize iPhone App

    - by Chris_K
    My iPhone app relies on a vendor's XML feed to provide data. But that feed is not locked down. The vendor could change the format of the XML at any time, although so far they've promised not to. Since I might want to tell my app to use a different URL for its data source, I'd like to set up a single "Command Central" Web page, on my own server, to direct the app to the correct data source. In other words, each time my app starts, in the background and unseen by the user, it would visit "http://www.myserver.com/iphoneapp_data_sources.xml" to retrieve the URL for retrieving data from my vendor. That way, if my vendor suddenly changes the exact URL or the XML feed that the app needs, I can update that Web page and ensure that all installations of the app are using the correct XML feed. Does anyone have any advice or examples showing this kind of approach? It seems as if this must be a common problem, but so far I haven't found a well-established design pattern that fits it.

    Read the article

  • Problem in serializing

    - by Harun
    Hello Guyz, Presently I need to serialize one of my object which contains more my own classes object. But the problem is I dont want to save it in a file and then retrieve it into memory stream. Is there any way to directly serialize my object into stream. I used BinaryFormatter for seializing. First I used a MemoryStream directly to take serialize output but it is giving error at time of deserialization. But later when I serialize it with a file then close it and again reopen it , it works perfectly. But I want to take it direct into stream because in my program I need to do it frequently to pass it into network client. And using file repeatedly might slow down my software. Hope I clear my problem. Any Sugetion ?

    Read the article

  • Image display permissions in PHP/Apache

    - by Randy
    I have a PHP site with a login system, and am trying to make a feature where only specific usernames can view particular images. I think what I'm trying to do is more involved than merely changing the .htaccess file, because a) this won't help discern between users that are/aren't allowed to view the image, and b) if someone enters the exact URL of the image ("directory/images/photos/230ru0q0238rn230nd_asdi0nqn8.jpg") they can still view the image (since it's a physical file in the directory, and not text in a DB, etc.). Again, restricting via .htaccess would restrict the directory as a whole, or all files in it, so I can't figure out how it would work. Ideally, all images would be blocked by trying to access them directly through their direct URL, and the image would only appear between <img> tags if the user's session/username is valid, else they get an error message. I've heard the term ACL but I'm not sure this is related to what I'm trying to do.

    Read the article

  • Access to a single pixel in C#

    - by Malki
    Hello, I'm working on a school project right now. It's meant to be a 3D editing software, (like a very minimized version of Maya). I have to write it in C#, using the 'Windows Application Project'. I intend to implement all the 3D stuff myself, from projections to shading. My question is, how can I get direct access to a single pixel in the C# windows application? I know I'm going to have a main view port in the window. But I haven't decided yet how it will be made. Is there a built in object that I can use, that will let me define the boundaries of the view port, and then paint each pixel individually? (I'm just shooting in the dark here, I don't know much about C#. I mostly program in C) Thanks, Malki.

    Read the article

  • How to suppress javascript errors for sites I'm not developing?

    - by Simon_Weaver
    I like to keep javascript debugging enabled in my browser so when I'm developing my own code I can instantly see when I've made an error. Of course this means I see errors on apple.com, microsoft.com, stackoverflow.com, cnn.com, facebook.com. Its quite fun sometimes to see just how much awful code there is out there being run by major sites but sometimes it gets really annoyed. I've wondered for YEARS how to change this but never really got around to it. Its particularly annoying today and I'd really like to know of any solutions. The only solution I have is : use a different browser for everyday browsing. I'm hopin theres some quick and easy plugin someone can direct me to where I can toggle it on and off based upon the domain i'm on. Edit: I generally use IE7 for everyday browsing

    Read the article

  • Ruby on Rails: How can I authenticate different user types from one place?

    - by sscirrus
    Hi everyone! This is my first post on Stack Overflow. I am trying to build a system that authenticates three types of user with completely different site experiences: Customers, Employers, and Vendors. I'm thinking of using a polymorphic 'User' table (using AuthLogic) with username, password, and user_type (+ AuthLogic's other required fields). If this is a good way to go, how do I set this up so after authenticating an user_id with a user_type the standard way, I can direct the user to the page that's right for them? Thanks.

    Read the article

  • C# Keeping DLLs with the associated library

    - by SimonN
    We have a library built on the back of eldos' Secure Black Box. We use copy local to ensure that the appropriate runtime DLLs are included. If we now reference our library in another project with a copy local our library is copied into the bin folder of our main project but the Eldos SBB libraries aren't. We could reference SBB in the main project but there are no direct calls to SBB so any time the code is refactored the references may be removed as unused. What is the best way of handling this issue? Simon

    Read the article

  • is it better to use a "natural" language to write code?

    - by M.H
    I recently saw a programming language called supernova and they said in the web page : The Supernova Programming language is a modern scripting language and the First one presents the concept of programming with direct Fiction Description using Clear subset of pure Human Language. and you can write code like: i want window and the window title is Hello World. i want button and button caption is Close. and button name is btn1. btn1 mouse click. instructions are you close window end of instructions my question is not about the language itself but it is that are we need such languages and did they make writing code easier or not?

    Read the article

  • Receive input over TCP/IP and use it to update HTML

    - by mawg
    This has got to be a FAQ, so can someone please just direct me to a "network programming for dummies" URL? The server wants to push information to a client or broadcast to all, when an event happens - as opposed to the clients constantly polling the server "just in case". The client then updates a browser page display. How do I do that? (toldya it was a n00b question) Should I have a thread which receives info on a socket and then writes it to a database which the browser display (PHP) can process with an HTML refresh tag, or what? Sorry to sound so dumb.

    Read the article

  • How to host your own http-like server using ServiceHost?

    - by Ole Jak
    I use ServiceHost for hosting WCF cervices. I want to host near to my WCF services my own tcp programm (like WCF service but with out WCF) for direct sockets operations (like lien to some sort of broadcasting TCP stream) I want to use ServiceHost for somehow simplyfiing proces of creating my TCP sender\listener, to somehow control namespaces (so I would be able to let my clients to send TCP streams directly into my service using some nice URLs like www.example.com:34123/myserver/stream?id=1 or www.example.com:34123/myserver/stream?id=222 and so that I will not be bothered with Idea of 1 client for 1 socket at one time moment, BTW I realy want to keep my WCF services on the same port as my own server or what it is...) Can any body please hrlp me with this?

    Read the article

  • JPA in distributed Java EE configuration

    - by sof
    Hello, I'm developing a JEE application to run on Glassfish: Database (javaDB, MS SQL, MySQL or Oracle) EJB layer with JPA (Toplink essentials - from Glassfish) for database access JSF/Icefaces based web UI accessing the EJB layer The application will have a lot of concurrent web client, so I want to run it on different physical servers and use a load-balancer. My problem is now how to keep the applications synchronized. I intend to set up multiple servers, each running Glassfish with my EAR app installed. Whenever on one of the servers data is added to or removed from the database (via JPA, no direct SQL queries), this change should be reflected in the JPA layer on the other servers. I've been looking around for solutions to this, but couldn't find anything I really like (the full Toplink from Oracle claims to have a solution, but don't know). Doing a refresh before every access to a JPA entity could work, but is far from efficient. Are there any patterns, libraries, ... that could help here? Thanks a lot!

    Read the article

  • Case insensitive expectations in Rhino Mocks

    - by user313886
    I'm using Rhino Mocks to expect a call. There is a single parameter which is a string. But I'm not bothered about the case of the string. I want the test to pass even if the case is wrong. So I'm doing the following: //expect log message to be called with a string parameter. //We want to ignore case when verifiyig so we use a constraint instead of a direct parameter Expect.Call(delegate { logger.LogMessage(null); }).Constraints(Is.Matching<string>(x => x.ToLower()=="f2")); It seems a bit log winded. Is there a more sensible way of doing this?

    Read the article

  • Check if a MediaWiki page exists (Python)

    - by compie
    I'm working on a Python script that transforms this: foo bar Into this: [[Component foo]] [[bar]] The script checks (per input line) if the page "Component foo" exists. If it exists then a link to that page is created, if it doesn't exist then a direct link is created. The problem is that I need a quick & cheap way to check if a lot of wiki pages exist.I don't want to (try to) download all the 'Component' pages. I already figured out a fast way to do this by hand: Edit a new wiki page. paste all the 'component' links into the page, press preview, and then save the resulting preview HTML page. The resulting HTML file contains a different link for existing pages than for non-existing pages. So to rephrase my question: How can I save a mediawiki preview page in Python?

    Read the article

  • Windows equivalent of inb(), outb(), low level i/o

    - by Sebastian Dwornik
    I have some Linux code that monitors our hardware by collecting temperatures, voltages, and fan speeds, from the motherboard using inb(), outb(), inl(), etc. low level i/o functions. My challenge is to port that code over to run under Windows as a simple console app. But am puzzled in what functions Win32 (or .NET) provide that allow me permission to access direct memory mapped ports. I don't want to code a system driver either. My Windows tool preference is VS2008. (fyi) Is this possible?

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >