Search Results

Search found 4300 results on 172 pages for 'mark virtue'.

Page 71/172 | < Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >

  • In Symfony how can you instantely cache the routing.yml?

    - by Mark
    I have a file located at [application]/config/routing.yml, when I change something in there, the changes aren't active. This probably has to do with the cache as when I go into that directory [cache]/[application]/prod/config the currently active file can be seen config_routing.yml.php. The lifetime of the cache is generally 86400 seconds, is there a way that I can immediately view/activate the changes?

    Read the article

  • iPhone: How can you draw a piece of an image

    - by Mark
    Code sample - (void)drawRect:(CGRect)rect { [super drawRect:rect]; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); CGContextTranslateCTM(context, 0, self.frame.size.height); CGContextScaleCTM(context, 1.0, -1.0); CGContextDrawImage(context, CGRectMake(0.0, 0.0, self.frame.size.width, self.frame.size.height), [UIImage imageNamed:@"sample.png"].CGImage); CGContextRestoreGState(context); } ================ I would like to copy a certain rect within an image to the context, so not the entire image is drawn but just a piece of the image. Does anyone have a solution for this? I can't find anything on google nor the documentation. I know there are alternatives like: 1. Create a UIView with clipping and then just position the UIImageView within it. 2. Create the UIImageView within the UIScrollView and use content offset. But I think those are lame...

    Read the article

  • Are PDO prepared statements sufficient to prevent SQL injection?

    - by Mark Biek
    Let's say I have code like this: $dbh = new PDO("blahblah"); $stmt = $dbh->prepare('SELECT * FROM users where username = :username'); $stmt->execute( array(':username' => $_REQUEST['username']) ); The PDO documentation says The parameters to prepared statements don't need to be quoted; the driver handles it for you. Is that truly all I need to do to avoid SQL injections? Is it really that easy? You can assume MySQL if it makes a difference. Also, I'm really only curious about the use of prepared statements against SQL injection. In this context, I don't care about XSS or other possible vulnerabilities.

    Read the article

  • Default for generic type?

    - by Mark
    Is it possible to do something like public class PriorityQueue<TValue, TPriority=int> where TPriority : IComparable (note the =int) ? Before you suggest it, yes, I know I can just add another line: public class PriorityQueue<TValue> : PriorityQueue<TValue, int> { } But I'm wondering if it's possible to do it as a param.

    Read the article

  • Missing System.Core.dll and others on Visual Studio 2010 Project targeting 3.5 Framework

    - by Mark Struzinski
    I just got Visual Studio 2010 installed and running on my development machine (alongside VS 2008). The first thing I did was make a copy of an existing project and convert it up to the VS 2010 project. I told the conversion wizard to leave the project targeting the 3.5 framework. The project compiles and runs just fine in VS 2008. When I go to build it, several of my references are marked as missing (System.Core, System.Xml.Linq, System.Data.DataSetExtensions). When I go to the Add Reference dialog, they are not present. Yet if I view the GAC at C:\Windows\Assembly, I can see the entries there. I have tried converting the projects to 4.0, then back down to 3.5, and also unloading/reloading the projects. Nothing works. Has anyone else ran across this problem?

    Read the article

  • After a period of time, nslookup still works, but pinging, and an auto-refeshed website, fails.

    - by Mark Hurd
    Contrary to this question this is for a dotted name (gw.localnet.au), and it doesn't happen straight away. Only after some period of time (quite a long time, possibly days). In fact this is for my ADSL router and its internal IP address which I have named within the router itself and in my Windows Server 2003 Domain Controller DNS Service. Specifically, localnet.au is a Active-Directory-backed primary domain. In fact, an ipconfig /flushdns may fix the problem, but only after a while (about the time it took me to type in this question :-) ). That doesn't explain the root cause though...

    Read the article

  • Is memory allocation in linux non-blocking?

    - by Mark
    I am curious to know if the allocating memory using a default new operator is a non-blocking operation. e.g. struct Node { int a,b; }; ... Node foo = new Node(); If multiple threads tried to create a new Node and if one of them was suspended by the OS in the middle of allocation, would it block other threads from making progress? The reason why I ask is because I had a concurrent data structure that created new nodes. I then modified the algorithm to recycle the nodes. The throughput performance of the two algorithms was virtually identical on a 24 core machine. However, I then created an interference program that ran on all the system cores in order to create as much OS pre-emption as possible. The throughput performance of the algorithm that created new nodes decreased by a factor of 5 relative the the algorithm that recycled nodes. I'm curious to know why this would occur. Thanks. *Edit : pointing me to the code for the c++ memory allocator for linux would be helpful as well. I tried looking before posting this question, but had trouble finding it.

    Read the article

  • Use alternative browser with Subversion URLs

    - by Mark Howard
    We have subversion setup with http access through apache at http ://svn.local/ This provides access through svn clients and the standard svn repository browser. We also have a separate repository browser installed at http ://svn-browser.local/ (fisheye in this case). Is it possible to change the subversion/apache server so that browser requests are redirected to the subversion browser, but requests from svn clients go to the subversion server? Essentially, I'd like to use a single URL to identify a resource in both svn clients and the svn browser and be able to copy the url from a svn client into a web browser to have the enhanced functionality provided by the browser.

    Read the article

  • How to find WindowRef of Apple Help Viewer application?

    - by Mark
    Hi, In my Carbon application upon display of Preference Panes, I have a link which when clicked opens up Apple Help Viewer. The problem I am facing is the Help Viewer Window is behind my preference pane window. I would like to keep the Help Viewer window on top of the Preference Pane. Is there any way to get the WindowRef of the Help Viewer app so that I can use SendBehind API to send the help viewer behind the current window. Thanks a lot Regards, Marc

    Read the article

  • asp.net and Visual studio root directory question

    - by Mark Kadlec
    I am seeing something very odd and thought I would ask the Stackoverflow community if they knew the answer. I have an asp.net project that runs fine in one environment, but couldn't figure out what happened to the styles in another environment. In the first environment (Windows 2008 Server), the following link worked fine: <link href="/Styles/09/style.css" rel="stylesheet" type="text/css" /> but in the other environment (it's a Windows 7), I had to change it to work: <link href="../Styles/09/style.css" rel="stylesheet" type="text/css" /> Notice that the directories seemed to shift ahead one directory in the Win7, what's going on? It's like the "running" directory seems now be the \bin directory instead of the home! Which environment is configured correctly? How do I determine execution directory level? My concern going forward is pushing to a prod environment and guessing which configuration is correct. Any insight would be appreciated!

    Read the article

  • IIS hosting vs Built In Web server that ships with VS 2010

    - by mark smith
    Hi there, I am looking to host a wcf service while i am developing. Is this best with IIS or can i just use the default BUILT IN web server that ships with Visual Studio? I can change the Assign automatic port to specific port so in my client i always ahave a fixed address. I was hoping somebody could advise the best way to go?

    Read the article

  • Asynchronous database update in Django?

    - by Mark
    I have a big form on my site. When the users fill it out and submit it, most of the data just gets dumped to the database, and then they get redirected to a new page. However, I'd also like to use the data to query another site, and then parse the results. That might take a bit longer. It's not essential that the user sees these results right away, so I was wondering if it's possible to asynchronously call a function that will handle this, and then return an HttpResponse from my view like usual without making them wait? If so... how? Any particular libraries I should look at?

    Read the article

  • ASP.NET MVC: trying out a script injection hangs Visual Studio 2010 completely?

    - by Mark Redman
    Wondering if anyone has an idea of whats going on: I am new to ASP.NET MVC and am trying out a few things with jquery/ajax. The basic scenario is a dropdownlist with an add button next to it. Clicking the add button launches a jquery ui dialog with a textbox form, entering a value saves the item to the database and refreshes the drop-downlist. The dropdownlist is re-populated using a JSON result. This all works ok. I thought I would try a script injetion attack, ie add the text: alert("oh dear") to seee what would happen and to check if I need to encode anything. When I try and save this item (similar to the same process of adding a plain text entry) Visual Studio 2010 Beta 2 hangs completely. Any ideas? UPDATE: It happens when posting: "</"

    Read the article

  • Restoring web reference in Visual Studio 2008

    - by Mark Cheeseborough
    I had a web reference set in my VS2008 ASP.NET project, but due to some source control weirdness it is no longer listed in the project. I have the set of files in the Web References folder under my project. There's a .wsdl, .disco and several .datasource files. Is there any way to re-add this web reference through the existing files rather than using the "Add Web Reference" dialog?

    Read the article

  • Is there a way to simplify this Django query?

    - by Mark
    accepted_bids = Bid.objects.filter(shipment__user=u, status='acc').select_related('shipment') completed_shipments = [] for b in accepted_bids: completed_shipments.append(b.shipment) vehicles_shipped = [] for s in completed_shipments: vehicles_shipped.extend(s.items.all()) In the end, I want a list of shipped vehicles. A vehicle is shipped if it's part of a shipment that's completed. A shipment is completed if it has an accepted bid. I'd prefer not to iterate over the querysets thereby forcing a hit to the DB before its necessary... isn't there a way to get all the associated shipments from a list of bids, for example?

    Read the article

  • Is there any way to group edit buttons in MediaWiki?

    - by Mark Robinson
    Is there any way to group the edit buttons displayed above the edit dialog in MediaWiki? By grouping, I mean like Word does (and even this editor) - you can add dividing lines to group them so that e.g. Bold and Italic are in one group, numbered list and bullet points in another. We've added lots of new buttons (in EditPage.php) and they are in a logical order, but at 30 buttons it is a bit overwhelming for some users.

    Read the article

  • Creating an enum/class from a Database Table

    - by Mark
    I have a database table that essentially contains different types of things. I'll use animals as an example. I have a table called AnimalTypes: AnimalTypes { ID:int, Name:string } I then populate it with: 1:Dog, 2:Cat, 3:Fish I would like to then have some sort of C# object created that functions similar to this enum be entirely read from the database: enum AnimalTypes { Dog = 1, Cat = 2, Fish = 3 } Is there a way to create an enum/class from a database table as described? I basically want to be able to reference things in the AnimalTypes table using intellisense and AnimalTypes.Dog as an example; I don't actually need an enum, just something that kind of functions like one. Is this possible? Edit: I'm not really that thrilled about generating a DLL as I've seen in other related problems. I feel like this should be possible with reflection.

    Read the article

  • Using StructureMap, when a default concrete type is defined in one registry, can it be redefined in

    - by Mark Rogers
    In the project I'm working on I have a StructureMap registry for the main web project and another registry for my integration tests. During some of the tests I wire up the web project's registry, so that I can get objects out of the container for testing. In one case I want to be able to replace a default concrete type from the web registry with one in the test registry. Is this possible? How do you do it?

    Read the article

  • How can I quickly sum all numbers in a file?

    - by Mark Roberts
    I have a file which contains several thousand numbers, each on it's own line: 34 42 11 6 2 99 ... I'm looking to write a script which will print the sum of all numbers in the file. I've got a solution, but it's not very efficient. (It takes several minutes to run.) I'm looking for a more efficient solution. Any suggestions?

    Read the article

  • When using Dependency Injection with StructureMap how do I chooose among multiple constructors?

    - by Mark Rogers
    I'm trying to get structuremap to build Fluent Nhibernate's SessionSource object for some of my intregration tests. The only problem is that Fluent's concrete implementation of ISessionSource (SessionSource) has 3 constructors: public SessionSource(PersistenceModel model) { Initialize(new Configuration().Configure(), model); } public SessionSource(IDictionary<string, string> properties, PersistenceModel model) { Initialize(new Configuration().AddProperties(properties), model); } public SessionSource(FluentConfiguration config) { configuration = config.Configuration; sessionFactory = config.BuildSessionFactory(); dialect = Dialect.GetDialect(configuration.Properties); } I've tried configuring my ObjectFactory supplying an argument for the first constructor but it seems like it wants to try the second one. How do I configure my ObjectFactory so that I can choose the first constructor or perhaps even another one if I decide to use that?

    Read the article

  • How to display data into datagridview using multi thread?

    - by Mark
    Hi, I have application where I read/receive data all the time (text) and I need to display this data into datagridview, what is the best way to do that in real time, so the data will be changed all the time. I thought about multi threading, if this is a good idea can you guide me with link to explain how to implement it. Thanks

    Read the article

  • jquery expanding menu+show/hide+multiple instances

    - by mark
    Hi, I have 2 scripts working ok separately but can't get them working together - What I'm after is expanding menus where if the items exceed 10 a 'more' link appears that expands the list, which can also then be hidden. http://www.brianfitzer.ie/test2/ expanding menu is file test12.html toggle+limit: toggle is file test13.html (I have these working separately) And then I need this to be able to be applied in multiple instances as I'll have multiple categories. Any code help greatly appreciated! (i'm a jquery newbie so if you have full code that would be xtra handy)

    Read the article

< Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >