Search Results

Search found 7104 results on 285 pages for 'dynamic usercontrols'.

Page 53/285 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • Creating a project, from Makefile to static/dynamic libraries in UNIX

    - by Sasha
    Guys, would you describe a few things about c++ building blocks, on unix. I want to create an application that links against static libs and dynamic libs (.so). Question 1: How do I create static library using gcc/g++ ?How do I make my app link against it. Question 2: How to specify it in the makefile, linking against static and dynamic libs, assuming that both libraries have header files Summary: I have been using makefiles and libraries for years, written by someone else. Thus every time I modified it, I simply cut-and-pasted things around, without really understanding it. Now I want to get down to the ground and understand the building/linking/Creating Makfile process in-depth. What is a good book describing these concepts in intimate details? Thanks

    Read the article

  • How to modify PropertyGrid at runtime (add/remove property and dynamic types/enums)

    - by salle55
    How do you modify a propertygrid at runtime in every way? I want to be able to add and remove properties and add "dynamic types", what I mean with that is a type that result in a runtime generated dropdown in the propertygrid using a TypeConverter. I have actually been able to do both those things (add/remove properties and add dynamic type) but only separately not at the same time. To implement the support to add and remove properties at runtime I used this codeproject article and modified the code a bit to support different types (not just strings). private System.Windows.Forms.PropertyGrid propertyGrid1; private CustomClass myProperties = new CustomClass(); public Form1() { InitializeComponent(); myProperties.Add(new CustomProperty("Name", "Sven", typeof(string), false, true)); myProperties.Add(new CustomProperty("MyBool", "True", typeof(bool), false, true)); myProperties.Add(new CustomProperty("CaptionPosition", "Top", typeof(CaptionPosition), false, true)); myProperties.Add(new CustomProperty("Custom", "", typeof(StatesList), false, true)); //<-- doesn't work } /// <summary> /// CustomClass (Which is binding to property grid) /// </summary> public class CustomClass: CollectionBase,ICustomTypeDescriptor { /// <summary> /// Add CustomProperty to Collectionbase List /// </summary> /// <param name="Value"></param> public void Add(CustomProperty Value) { base.List.Add(Value); } /// <summary> /// Remove item from List /// </summary> /// <param name="Name"></param> public void Remove(string Name) { foreach(CustomProperty prop in base.List) { if(prop.Name == Name) { base.List.Remove(prop); return; } } } etc... public enum CaptionPosition { Top, Left } My complete solution can be downloaded here. It works fine when I add strings, bools or enums, but when I try to add a "dynamic type" like StatesList it doesn't work. Does anyone know why and can help me to solve it? public class StatesList : System.ComponentModel.StringConverter { private string[] _States = { "Alabama", "Alaska", "Arizona", "Arkansas" }; public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { return new StandardValuesCollection(_States); } public override bool GetStandardValuesSupported(ITypeDescriptorContext context) { return true; } public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) { return true; } } The method of using a TypeConverter works fine when you don't try to add the property at runtime, for example this code works without any problem, but I want to be able to do both. Please take a look at my project. Thanks!

    Read the article

  • Parsing a dynamic value with Lift-JSON

    - by Surya Suravarapu
    Let me explain this question with an example. If I have a JSON like the following: {"person1":{"name": "Name One", "address": {"street": "Some Street","city": "Some City"}}, "person2":{"name": "Name Two", "address": {"street": "Some Other Street","city": "Some Other City"}}} [There is no restriction on the number of persons, the input JSON can have many more persons] I could extract this JSON to Persons object by doing var persons = parse(res).extract[T] Here are the related case classes: case class Address(street: String, city: String) case class Person(name: String, address: Address, children: List[Child]) case class Persons(person1: Person, person2: Person) Question: The above scenario works perfectly fine. However the need is that the keys are dynamic in the key/value pairs. So in the example JSON provided, person1 and person2 could be anything, I need to read them dynamically. What's the best possible structure for Persons class to account for that dynamic nature.

    Read the article

  • Advantages of using a Dynamic Client with JAX-WS

    - by jconlin
    What are the advantages of using a dynamic client with JAX-WS services as opposed to just using generated client classes? What are the disadvantages? **For my particular case I am using Apache CXF, I'm not sure what other libraries allow "dynamic" clients. -I thought I didn't need to add this, but... I'm looking for non-obvious(I know...subjective) advantages. I don't need someone else to tell me that an advantage of not using generated classes is that I don't need to generate classes.

    Read the article

  • Apply dynamic list of templates to an argument

    - by Diego Martinez
    I need apply a variable sequence of templates to an argument. example 1: arg:tpl1():tpl2():...:tplN() Suppose that i have other multi valued argument, and each value is the name for a dynamic template invocation. ¿What is the better form of apply all the templates from the list to my argument? tplNames : {name | <(name)(arg)>} not works, just apply a template ever to the same innitial value of my argument, i need the same result of example 1 but in a dynamic way. Thank you!!

    Read the article

  • Creating a Dynamic Image using Friends pictures

    - by Narendra Rajput
    I am working on a Facebook for which I need to get all the Profile Pictures of Friends of the users. Which I did using FQL query. I need these images for creating a poster of all the Friends Profile pics along tags in them. For that I need to create a Dynamic poster for every user with their Friends tagged in them. I tried using the GD Library for PHP. I tried with the imagecreatefromjpeg() function of php for which I can use one image and pass it to the main image. But here I have more than 1 images (average about 100 images) depending on the number of friends the user has. What function do I need to create this dynamic poster ? Please any help would be appreciated !!

    Read the article

  • Is it possible with dynamic TSQL query ?

    - by eugeneK
    I have very long select query which i need to filter based on some params, i'm trying to avoid having different stored procedures or if statements inside of single stored procedure by using partly dynamic TSQL... I will avoid long select just for example sake select a from b where c=@c or d=@d @c and @d are filter params, only one can filter at the same time but also both filters could be disabled. 0 for each of these means param is disables so i can create nvarchar with where statement in it... How do i integrate in here dynamic query so 'where' can be added to normal query. I cannot add all the query as big nvarchar because there is too many things in it which will require changes ( ie. when's, subqueries, joins)

    Read the article

  • How to make form validation in Django dynamic?

    - by Oli
    I'm trying to make a form that handles the checking of a domain: the form should fail based on a variable that was set earlier in another form. Basically, when a user wants to create a new domain, this form should fail if the entered domain exists. When a user wants to move a domain, this form should fail if the entered domain doesn't exist. I've tried making it dynamic overload the initbut couldn't see a way to get my passed variabele to the clean function. I've read that this dynamic validation can be accomplished using a factory method, but maybe someone can help me on my way with this? Here's a simplified version of the form so far: #OrderFormStep1 presents the user with a choice: create or move domain class OrderFormStep2(forms.Form): domain = forms.CharField() extension = forms.CharField() def clean(self): cleaned_data = self.cleaned_data domain = cleaned_data.get("domain") extension = cleaned_data.get("extension") if domain and extension: code = whoislookup(domain+extension); #Raise error based on result from OrderFormStep1 #raise forms.ValidationError('error, domain already exists') #raise forms.ValidationError('error, domain does not exist') return cleaned_data

    Read the article

  • Dynamic View Creation in Iphone?

    - by adusum
    Hi can any one please tell me how to create Dynamic views in iphone. And I want to know like what is difference between custom views and dynamic views in iphone. Acutally i went throught google but i didn't find any proper answer. And I have one more question is like can we create all the views manually in the coding iteslf like the one we create using a Interface bulder and save it as a .nib. how can it be done?can any one please explain me this. Thanks,

    Read the article

  • dojo dynamic right click context menu

    - by levy
    There are tons of different dojo right click context menus in a page slowing down the browser. Some divs have context menus while some others don't. So I just can't have a dynamic global context menu and still be able to fallback to the browser's built in menu in some cases, do I? The non lazy instantiation of the dojo context menus just take too much time. How can I make those context menus dynamic? Preferably being created on demand when the user actually right clicks on them.

    Read the article

  • Help with implementing a function to change size of dynamic array

    - by iRobot
    I'm trying to write a function that will change the size of a dynamic array to a new size. In my header file, I have: Image **images; //pointer to a dynamic array of image pointers int maximum; //size I want to do this by allocating a new array and copying the values over without changing their indices. If there are non-null pointers outside the range newmax, then we cant do this. So heres what I have: There are no compilation or runtime errors. However, I find that the new array isnt getting sized right. When I run the following test case: I should get an index out of bounds error, but instead the system lets it slide. Can anyone see the mistake? I've looked for hours but cant find anything.

    Read the article

  • proftpd, dynamic IP, and filezilla: port troubles

    - by Yami
    The basic setup: Two computers, one running proftpd, one attempting to connect via filezilla. Both linux (xubuntu on the server, kubuntu on the client). Both are at the moment behind a router on a residential (read: dynamic IP) connection; the client is a laptop I plan to take away from the home network, so I'll need this to work externally. I have my router set up to allow specific ports forwarded to each machine and, where possible, have plugged in those numbers into proftpd (via gadmin, double-checking the config file) and filezilla. Attempting to connect via active mode using the internal IP works: Status: Connecting to 192.168.1.139:8085... Status: Connection established, waiting for welcome message... Response: 220 Crossroads FTP Command: USER <redacted> Response: 331 Password required for <redacted> Command: PASS ******* Response: 230 Anonymous access granted, restrictions apply Command: OPTS UTF8 ON Response: 200 UTF8 set to on Status: Connected Status: Retrieving directory listing... Command: PWD Response: 257 "/" is the current directory Command: TYPE I Response: 200 Type set to I Command: PORT 192,168,1,52,153,140 Response: 200 PORT command successful Command: LIST Response: 150 Opening ASCII mode data connection for file list Response: 226 Transfer complete Status: Directory listing successful Attempting to connect via the domain name, however, leads to issues; in active mode, the PORT is the last command to be received according to the server's logs, and in passive mode, it's the PASV command. This leads me to believe I'm being redirected to a bad port? Active Sample: Status: Resolving address of <url> Status: Connecting to <ip:port> Status: Connection established, waiting for welcome message... Response: 220 Crossroads FTP Command: USER <redacted> Response: 331 Password required for <redacted> Command: PASS ******* Response: 230 Anonymous access granted, restrictions apply Command: OPTS UTF8 ON Response: 200 UTF8 set to on Status: Connected Status: Retrieving directory listing... Command: PWD Response: 257 "/" is the current directory Command: TYPE I Response: 200 Type set to I Command: PORT 174,111,127,27,153,139 Response: 200 PORT command successful Command: LIST Error: Connection timed out Error: Failed to retrieve directory listing Passive sample: Status: Resolving address of ftp.bonsaiwebdesigns.com Status: Connecting to 174.111.127.27:8085... Status: Connection established, waiting for welcome message... Response: 220 Crossroads FTP Command: USER yamikuronue Response: 331 Password required for yamikuronue Command: PASS ******* Response: 230 Anonymous access granted, restrictions apply Command: OPTS UTF8 ON Response: 200 UTF8 set to on Status: Connected Status: Retrieving directory listing... Command: PWD Response: 257 "/" is the current directory Command: TYPE I Response: 200 Type set to I Command: PASV Response: 227 Entering Passive Mode (64,95,64,197,101,88). Command: LIST Error: Connection timed out Error: Failed to retrieve directory listing In both cases, the log file ends at "PORT" or "PASV" - there's no record of ever receiving a "LIST" command. Just above that I can see the attempt to connect actively via the internal IP, which does indeed include a LIST command. My config file includes "PassivePorts 20001-26999", which are the port forwards I set up for the ftp server, and "Port 8085", which is also forwarded to the same machine. I also have a MasqueradeAddress set up to prevent it from reporting its internal IP, which was an earlier issue I had. I think what I'm asking is, is there another setting someplace I have to change to get this setup to work?

    Read the article

  • Appending facts into an existing prolog file.

    - by vuj
    Hi, I'm having trouble inserting facts into an existing prolog file, without overwriting the original contents. Suppose I have a file test.pl: :- dynamic born/2. born(john,london). born(tim,manchester). If I load this in prolog, and I assert more facts: | ?- assert(born(laura,kent)). yes I'm aware I can save this by doing: |?- tell('test.pl'),listing(born/2),told. Which works but test.pl now only contains the facts, not the ":- dynamic born/2": born(john,london). born(tim,manchester). born(laura,kent). This is problematic because if I reload this file, I won't be able to insert anymore facts into test.pl because ":- dynamic born/2." doesn't exist anymore. I read somewhere that, I could do: append('test.pl'),listing(born/2),told. which should just append to the end of the file, however, I get the following error: ! Existence error in user:append/1 ! procedure user:append/1 does not exist ! goal: user:append('test.pl') Btw, I'm using Sicstus prolog. Does this make a difference? Thanks!

    Read the article

  • Call a dynamically generated method on a ILGenerator on the same type

    - by Thiado de Arruda
    Normally, when I want to call a dynamic method in another ILGenerator object that is writing a method on the same type I do the following : generator.Emit(OpCodes.Ldarg_0); // reference to the current object generator.Emit(OpCodes.Ldstr, "someArgument"); generator.Emit(OpCodes.Call, methodBuilder); //this methodbuilder is also defined on this dynamic type. However, I faced the following problem: I cant have a reference to the methodbuilder of the method I want to call, because it is generated by another framework(I only get a reference to the current TypeBuilder). This method is defined as protected virtual(and overriden on the methodbuilder I cant get a reference to) in the base class of the current dynamic type and I can get a reference to it by doing this : generator.Emit(OpCodes.Ldarg_0); // reference to the current object generator.Emit(OpCodes.Ldstr, "someArgument"); generator.Emit(OpCodes.Call, baseType.GetMethod("SomeMethodDefinedInBaseClassThatWasOverridenInThisDynamicType")); The problem is that this calls the method on the base type and not the overriden method. Is there any way I can get a reference to a methodbuilder only having a reference to the typebuilder that defined it? Or is there a way to call a method using ILGenerator without having to pass the 'MethodInfo' object to it?

    Read the article

  • Custom/personal dyndns solution?

    - by Eddie Parker
    Hey: I can't think of how to make this work, but it seems like something that should be doable.. I currently own my own domain, and have been using dyndns.com's "custom DNS" to allow me to redirect 'example.com' to my website at home, which is on a dynamic IP. I've now switched over to a VPS solution which hosts my website and allows me root access to a box (me likey), which will now host "example.com" on a static IP. My question is, is it possible for me to somehow make "home.example.com" route to my box at home? Is there any software available that could automate updates to the DNS for this? Ideally I'd like not to pay a service if possible, but if that's the only way then I suppose I'll have to go that way. Thanks!

    Read the article

  • Slow draw on some apps and dynamic clocks not working properly with ATI/AMD proprietary drivers

    - by Rakeka
    I've recently purchased a new computer (around July 2010) and I've been having some problems with proprietary video drivers on Linux. The hardware is: Video: ATI/AMD Radeon HD 5870 (XFX HD-587X-ZNFC); Motherboard: Asus P7P55D-E Deluxe; Processor: Intel i5 750; Memory: Kingston Hyperx KHX1600C8D3K2/4GX (2x - 8GB Total); Power Supply: XFX P1-750B-CAG9; There are no overclocks, not even the memories (they are at 1333mhz due processor memory controller limitation). The operational system is a homebrew Linux distribution with the following software: Architecture: x86_64 (multilib) Kernel: 2.6.35.10 Xorg: 7.5 Window Manager: wmii-3.9.2 Video Driver: ATI/AMD Catalyst 10.12 There are no desktop effects programs like compiz fusion or beryl. The problems: With ATI/AMD proprietary driver, some applications are with slow draw/redraw, and, the same applications make the driver to increase the card clocks to maximum (0% gpu activity, only the clocks are increased). I dunno exactly how to describe the slow draw but I'll list some applications and symptoms. xterm Flickers a lot when drawing continuous output; When I'm in a workspace with fullscreen xterm, The gpu load stays at 12% in idle, and, with smaller xterm, smaller GPU load. "aticonfig --odgc" output: Default Adapter - ATI Radeon HD 5800 Series Core (MHz) Memory (MHz) Current Clocks : 157 300 Current Peak : 850 1200 Configurable Peak Range : [600-900] [900-1300] GPU load : 12% "aticonfig --pplib-cmd 'get activity'" output: Current Activity is Core Clock: 157MHZ Memory Clock: 300MHZ VDDC: 950 Activity: 12 percent Performance Level: 0 Bus Speed: 5000 Bus Lanes: 16 Maximum Bus Lanes: 16 More examples: mplayer time info flickers on terminal; "find /" flickers a lot (It takes some time to stop with control-c. But, If I change the workspace or put some window upon it, just after the control-c, it stops instantly); "cat somefile" if the file is big (Xorg.0.log for example) it takes some time to display; vim and less (ex: find / | less) don't have much problems, just a little flicker when scrolling; mplayer (no gui) Slow reproduction and seek with -vo x11; Tearing with -vo xv; Time info flickers on terminal (xterm consequence); gvim A little slow draw when scrolling with page up/page down; Firefox Slow draw/redraw on some pages like www.boadica.com.br and sometimes on www.youtube.com with flash enable (never noticed on many pages); Corruptions when informative yellow boxes are showing and scroll the page (an gray box appears at the same place of the informative box); "Wallpaper" After minimizing a fullscreen window or changing to an empty workspace it takes some time to redraw wallpaper. "Video Card" The core and memory clocks are increased with the events described above and on other situations like change workspace (even without wallpaper), minimize, maximize or move a window; Idle clocks: Core: 157mhz, Memory: 300mhz Full clocks: Core: 850mhz, Memory: 1200mhz xpdf Painful slow scrolling; display (from ImageMagick) Slow menus and sometimes slow image redraw; Programs that I use and are apparently without problems: gimp; pidgin; mplayer (-vo gl, gl2); blender; unigine heaven (better fps than on Windows); doom3; tibia; penumbra overture; amnesia the dark descent (wine); diablo 2 (wine); No problems on Windows (Windows 7 Ultimate 64bit). And special note to this: Full desktop effects from Debian and Ubuntu gnome appearance cpanel don't cause ANY problems, even the core and memory clocks don't increase when change workspace, minimize, maximize or move a window. What I've tested: Unsuccessful tests: Tested all drivers versions since 10.6 (released approximately when I've installed the first slackware in this PC); Tested other video card - ATI/AMD Radeon HD 5570 (XFX HD-557X-ZHF2); Tested some options on xorg.conf and that I've found googling (some of these options are commented on my xorg.conf. I'll send the links at the end of post); Tested some patches like 107_fedora_dont_fill_bg_none.patch and xserver-xorg-backclear.patch from Arch Linux Catalyst page (https://wiki.archlinux.org/index.php/ATI_Catalyst); Tested other distros and software versions: Tested XORG-7.6 on my own distribution; Tested Debian Squeeze (testing - from 2010-12-20); Tested Ubuntu Marverick (10.10); Tested Slackware 13.1; Distros info: Architecture: i386 Debian and Ubuntu with all default software (kernel, gnome, xorg, drivers); Slackware with Catalyst from AMD page and default window managers like: fvwm, xfce, and my own build of wmii; Successful tests: Tested other video card (only on my homebrew distro) - NVIDIA Geforce 7300GS with driver 260.19.29; That didn't shown the slow draw problems, but that card is a bit obsolete, so, dunno if that lacks features like the dynamic clocks. I don't dispose of other video cards like nvidia g/gt/gts/gtx 200~400~500 or Radeon HD 3000/4000/6000 to make more tests. Tested other hardware: Video: ATI/AMD Radeon HD 5570 (XFX HD-557X-ZHF2); Motherboard: Intel DG31PR; Processor: Core 2 Duo E6750; Software for that hardware: Fresh install of same distros (except for the mine) with same program versions; That video card (HD 5570) were full time at the maximum clocks (something like 500/750, don't remember) in all the operational systems (Windows XP and Windows 7 too), but it didn't shown the same problems that I have here. I've googled a lot about common problems with ATI/AMD proprietary drivers for Linux and didn't find similar problems, except by the Firefox corruptions, that the solutions were to disable ATI Direct2DAccel and use XAA. With XAA the problems persists and the other applications like pidgin and rest of Firefox showed the same problems of slow draw/redraw. Open source Drivers: With open source drivers (xf86-video-ati-6.13.2) I hadn't the same slow draw problems, but, had other problems, that, for now, make it no viable solution. I'll not discuss it here because this is another line of problems and will confuse everything. If it happens to be the only solution, I'll make another thread to discuss it. Logs and Configs: kernel .config dmesg xorg package list xorg.conf Xorg.0.log

    Read the article

  • How do you monitor the health of a mirrored disk in Windows?

    - by NitroxDM
    I have a Mirrored Dynamic disk on my Windows 2003 Server. How do you monitor the health of the volume? Is there a way to have the server send an email when there is an issue with the volume? Is there a way to have the server run S.M.A.R.T. tests? EDIT: Nothing says WTF like logging into a client server, running DISKPART LIST VOLUME and seeing this. Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 X xDrive NTFS Mirror 233 GB Failed Rd Volume 1 C NTFS Simple 57 GB Healthy System Volume 2 D DVD-ROM 0 B Healthy Volume 3 F RAW Partition 466 GB Healthy Volume 4 E New Volume NTFS Partition 932 GB Healthy

    Read the article

  • Access device with local ip over internet

    - by Joe Perrin
    I apologize up front if this is the wrong place to post this question. It seemed like the best fit. I have a device which is connected to my local network which has an IP of 192.168.1.10 from my router. Additionally I use a Windows 7 machine that runs some software called DirectUpdate which allows me to resolve the local IP of the Windows 7 machine (192.168.1.5) to be accessible to the internet via my domain (example.com) - Basic dynamic DNS updating. I'd like to access the device from example.com. I am unsure how to do this as I don't have any way to install DirectUpdate (or any software) on the device to make the device available to the internet. Any insight here would be appreciated. Thank you.

    Read the article

  • Can I proxy my no-ip domain using a .htaccess file on my hosted domain?

    - by Dean
    I have a domain http://www.example.com which has a hosting package and website on it. I also have a http://example.no-ip.org domain which contains some content I would like to appear under the same domain. Can I setup a .htaccess file at http://www.example.com/proxy/ which proxies the files at http://www.example.no-ip.org/files/ Similarly, could I host an entire domain in the same way?, e.g. http://www.example2.com/ proxying http://example.no-ip.org/files2/ Alternatively, if someone were to say "That's stupid, use this free (or super-cheap) dynamic DNS host:" I would probably accept that answer.

    Read the article

  • QUiLoader and ignored dynamic properties

    - by Googie
    I'm loading the .ui file, where one of the widgets (QComboBox) has a dynamic property (http://qt-project.org/doc/qt-5/properties.html#dynamic-properties). The UI file looks like this: <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>PopulateScriptConfig</class> <widget class="QWidget" name="PopulateScriptConfig"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>400</width> <height>300</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QGroupBox" name="langGroup"> <property name="title"> <string>Language</string> </property> <layout class="QVBoxLayout" name="verticalLayout_3"> <item> <widget class="QComboBox" name="langCombo"> <property name="ScriptingLangCombo" stdset="0"> <bool>true</bool> </property> </widget> </item> </layout> </widget> </item> <item> <widget class="QGroupBox" name="codeGroup"> <property name="title"> <string>Implementation</string> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <widget class="QPlainTextEdit" name="codeEdit"/> </item> </layout> </widget> </item> </layout> </widget> <resources/> <connections/> </ui> The important part is: <widget class="QComboBox" name="langCombo"> <property name="ScriptingLangCombo" stdset="0"> <bool>true</bool> </property> </widget> I'm loading the file with QUiLoader::load(). Note, that I have extended the QUiLoader class, but only to access createWidget() method, where I can query each widget like this: QWidget* UiLoader::createWidget(const QString& className, QWidget* parent, const QString& name) { QWidget* w = QUiLoader::createWidget(className, parent, name); qDebug() << w->dynamicPropertyNames(); return w; } As a result I see empty list displayed, so it seems like the dynamic property is completly ignored. Any ideas? P.S. I've made sure that I load correct file. 3 times.

    Read the article

  • SQL Injection Protection for dynamic queries

    - by jbugeja
    The typical controls against SQL injection flaws are to use bind variables (cfqueryparam tag), validation of string data and to turn to stored procedures for the actual SQL layer. This is all fine and I agree, however what if the site is a legacy one and it features a lot of dynamic queries. Then, rewriting all the queries is a herculean task and it requires an extensive period of regression and performance testing. I was thinking of using a dynamic SQL filter and calling it prior to calling cfquery for the actual execution. I found one filter in CFLib.org (http://www.cflib.org/udf/sqlSafe): <cfscript> /** * Cleans string of potential sql injection. * * @param string String to modify. (Required) * @return Returns a string. * @author Bryan Murphy ([email protected]) * @version 1, May 26, 2005 */ function metaguardSQLSafe(string) { var sqlList = "-- ,'"; var replacementList = "#chr(38)##chr(35)##chr(52)##chr(53)##chr(59)##chr(38)##chr(35)##chr(52)##chr(53)##chr(59)# , #chr(38)##chr(35)##chr(51)##chr(57)##chr(59)#"; return trim(replaceList( string , sqlList , replacementList )); } </cfscript> This seems to be quite a simple filter and I would like to know if there are ways to improve it or to come up with a better solution?

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >