Search Results

Search found 911 results on 37 pages for 'jesper blad jensen aka deldy'.

Page 22/37 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Is preg_match safe enaught in input satinization?

    - by DaNieL
    Im building a new web-app, LAMP environment... im wondering if preg_match can be trusted for user's input validation (+ prepared stmt, of course) for all the text-based fields (aka not html fields; phone, name, surname, etc..). For example, for a classic 'email field', if i check the input like: $email_pattern = "/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)" . "|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}" . "|[0-9]{1,3})(\]?)$/"; $email = $_POST['email']; if(preg_match($email_pattern, $email)){ //go on, prepare stmt, execute, etc... }else{ //email not valid! do nothing except warn the user } can i sleep easy against the sql/xxs injection? I write the regexp to be the more restrictive as they can.

    Read the article

  • How to determine if a file will be logically moved or physically moved.

    - by Frederic Morin
    The facts: When a file is moved, there's two possibilities: The source and destination file are on the same partition and only the file system index is updated The source and destination are on two different file system and the file need to be moved byte per byte. (aka copy on move) The question: How can I determine if a file will be either logically or physically moved ? I'm transferring large files (700+ megs) and would adopt a different behaviors for each situation. Edit: I've already coded a moving file dialog with a worker thread that perform the blocking io call to copy the file a meg at a time. It provide information to the user like rough estimate of the remaining time and transfer rate. The problem is: how do I know if the file can be moved logically before trying to move it physically ?

    Read the article

  • Google Bot information?

    - by Bub Bradlee
    Does anyone know any more details about google's web-crawler (aka GoogleBot)? I was curious about what it was written in (I've made a few crawlers myself and am about to make another) and if it parses images and such. I'm assuming it does somewhere along the line, b/c the images in images.google.com are all resized. It also wouldn't surprise me if it was all written in Python and if they used all their own libraries for most everything, including html/image/pdf parsing. Maybe they don't though. Maybe it's all written in C/C++. Thanks in advance-

    Read the article

  • save selected row in UITableView after reloadData

    - by vinnitu
    I write custom jabber client in iphone. I use xmppframework as engine. And I have UITableViewController with NSMutableArray for repesent contact list. When i receive(or somebody change it contents) roster (aka contact list) i wanna change UITableView items (add/remove/modify). So if User work with listView at time when list updates by [items addObject:newItem]; [self.tableView reloadData]; user lost current selection item. So, my question is howto save (if possible, i mean if given selected item not removed) current select item after reloadData? Thx.

    Read the article

  • Git under windows: MSYS or Cygwin?

    - by Joce
    I plan to migrate my projects over to git, and I'm currently wondering which is the best and / or most stable option under windows. From what I gather I basically have 2.5 options: MSYSgit git under Cygwin (aka 2.5) MSYSgit from a Cygwin prompt (given that Cygwin git is already installed). Note: IMO Cygwin in itself is a big plus as you can have access to pretty much all the *nix command line tools, as where with MSYSgit bash, you only have access to a rather small subset of these tools. Given that, what option would you suggest?

    Read the article

  • Async actions inside Silverlight Method - returning the value

    - by tyndall
    What is the proper way to call an Async framework component - wait for an answer and then return the value. AKA contain the entire request/response in a single method. Example code: public class Experiment { public Experiment() { } public string GetSomeString() { WebClient wc = new WebClient(); wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted); Uri u = new Uri("http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&topic=t&output=rss"); wc.DownloadStringAsync(u); return "the news RSS from Google"; } private void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { //don't really see how this callback method makes it able // to return the answer I'm looking for on the return // statement in the method above. } } MORE INFO: The reason I'm asking this that I have a project I'm working on where I'd like JavaScript code in the browser to use Silverlight like a Facade/Proxy to Web services and complex calculations & operations. I'd like to make the calls to the [ScriptableMembers] in Silvelight synchronously. I don't want Silverlight to callback into the browser's JavaScript

    Read the article

  • How to handle BL cache for multiple web applications?

    - by Eran Betzalel
    I recently received a project that contains multiple web applications with no MVC structure. For starters I've created a library (DLL) that will contain the main Business Logic. The problem is with Caching - If I use the current web context cache object than I might end up with duplicate caching (as the web context will be different for every application). I'm currently thinking about implementing a simple caching mechanism with a singleton pattern that will allow the different web sites (aka different application domains) to share their "caching wisdom". I'd like to know what is the best way to solve this problem.

    Read the article

  • How do I write x86 Debug registers from user space on OSX?

    - by nall
    I'd like to play around with the debug MSRs defined in the x86 spec (DR0-7) from my OSX user-space program. Unfortunately, these require CPL == 0 (aka ring 0). I've thumbed through the OSX syscalls and with the exception of kernel_debug nothing really jumps out as a way to access these. It may be the case that they are only available via some higher level interface like kernel_debug, but it's unclear to me if that's the case or if I just haven't found the magic invocation to get to them. Anyone know how to do this?

    Read the article

  • ItemSearch totally different from Amazon.com search - What am I doing wrong?

    - by RadiantHex
    I'm using ItemSearch in order to get a list of books ordered by 'salesrank' aka 'bestselling', problem is that the books that pop up for any BrowseNode are totally different from the Amazon list. Test Case Author:"J R R Tolkien", SearchIndex:"Books", Sort:"salesrank" Using the API: J.R.R. Tolkien Boxed Set (The Hobbit and The Lord of the Rings) The Hobbit: 70th Anniversary Edition The Lord of the Rings: 50th Anniversary, One Vol. Edition The Legend of Sigurd and Gudrun The Silmarillion The Lord of the Rings The Children of Hurin The Fellowship of the Ring: Being the First Part of The Lord of the Rings The Return of the King: Being the Third Part of The Lord of the Rings Using Amazon.com Adv. Search: The Lord of the Rings (Trilogy) The Hobbit J.R.R. Tolkien Boxed Set (The Hobbit and The Lord of the Rings) The Legend of Sigurd and Gudrun The Lord of the Rings: 50th Anniversary, One Vol. Edition The Silmarillion The Fellowship of the Ring The Children of Hurin Lord of the Rings, The Return of the King, The (Vol 3) Help would very much appreciated

    Read the article

  • is there a small portable linux with good development environment?

    - by Sriram
    let me put it this way..! i use windows/ my company wants me to use windows i like Linux i don't want to use cygwin i want a simple portable Linux with a development environment aka( make,gcc,g++,llvm,...) with a bash and vi is enough for me no need any gui. these 4 points never change. ;) i tried damn small Linux.. its awesome but it doesn't have what i need. so is there a portable Linux distribution that i can run from windows using qemu or something with a good up2date development environment? thanks in advance

    Read the article

  • Get MAC address from Jetty HTTPServletRequest

    - by Chris Thompson
    Hi all, Does anybody know if there is a way to get the sender's MAC address from an HTTPServletRequest in Jetty? (Note: by sender, I mean immediate sender aka the last hop before my server). If there isn't a direct way, does anybody know a way to translate an IP address to a MAC address in Java? Other note: I completely realize that MAC addresses do not leave the local subnet, and that's the intended functionality. I know this seems like an odd question, but trust me, I know what I'm doing :-) If you're curious, I'd be happy to explain why I want this. Thanks, Chris

    Read the article

  • Waiting for Transformations in a Job

    - by DaDaDom
    I am working with Pentaho Data Integration (aka Kettle) and I have several Transformations, let's call them A, B, C, D, E. B depends on A, D depends on C and E depends on B and D. In a job I'd like to run A, B and C, D in parallel: -> A -> B _ Start< \ -> C -> D----> E where A and C run in parallel. Is there any way to execute E only iff B AND D were successful? Right now, looking at the Job metrics, E gets executed as soon as either B OR D are finished.

    Read the article

  • Continuous Integration or Publishing System

    - by Chris M
    I've been testing Hudson for a few days now and for PHP projects it seems ok; What I need though is a system that will allow me to publish an SVN tag to an FTP folder without adding a pile of rubbish on the end; hudson gets overexcited and adds a pile of folders to the export. Are their any other decent systems; it needs to be simple to use as this will eventually fall under the control of 'admins' in order to meet sox compliance (aka the man with the gun cant pull the trigger). Basic Requirements: Must be free and downloadable to a server (FTP's internal only here) Needs to be able to interact with SVN Needs to be able to publish to FTP Needs matrix login permissions (or AD if its something that can go on IIS) Needs to be auditable (logging) Tell me if im not being clear enough here; thanks. Chris

    Read the article

  • What is the right license for tutorial source code ?

    - by devdude
    Putting sourcecode from tutorials or books online requires the author to add some kind of disclaimer or license (otherwise people would use it make lots of $$$ or break a power plant IT control system and sue you as author). But what is the right license or disclaimer statement ? Can I use BSD license with ... IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,... We are talking about tutorials ! Released to teach and share knowledge. Or do I need to follow the (potentially different) licenses of the libraries I use ? Might be insignificant now but I feel we will face a license hunt in "public" sourcecode (aka OSS) in future, similar to companies/lawyers currently crawling the web for pictures with wrong copyright statement or infringing their IP (and suing someone using a picture in a personal blog,etc..).

    Read the article

  • Ruby New dnssd (bonjour zeroconf) service not appearing while browsing

    - by Poul
    Here is my simple zeroconf (aka bonjour dnssd) browser. If I have other services running when I start the browser I can see it (the 'resolved to' line prints to the screen). However, if I start up another service while this browser is running it will not appear. It just waits at the top of the block so I would expect it to enter the block once a new service is registered. Any ideas? require 'rubygems' require 'dnssd' browser = DNSSD::Service.new browser.browse '_http._tcp.' do |reply| #<-- code seems to wait here for more services DNSSD.resolve reply do |r| puts "resolved to: http://#{r.target}:#{r.port}" end end #example service register_service = DNSSD::register( "My Service","_http._tcp", nil, my_port) do puts "* Registering the service *" end

    Read the article

  • MYSQL - Selecting a specific date range to get "current" popular screensavers.

    - by Joe
    Let's say I have a screensaver website. I want to display the CURRENT top 100 screensavers on the front page of the website. What I mean is, "RECENT" top 100 screensavers. What would be an example query to do this? My current one is: SELECT * FROM tbl_screensavers WHERE WEEK(tbl_screensavers.DateAdded) = WEEK('".date("Y-m-d H:i:s",strtotime("-1 week"))."') ORDER BY tbl_screensavers.ViewsCount, tbl_screensavers.DateAdded This will select the most viewed ("tbl_screensavers.ViewsCount") screensavers that were added ("tbl_screensavers.DateAdded") in the last week. However, in some cases there are no screensavers, or less than 100 screensavers, submitted in that week. So, how can I perform a query which would select "RECENT" top 100 screensavers? Hopefully you have an idea of what I'm try to accomplish when I say "RECENT" or "CURRENT" top screensavers. -- aka. the most viewed, recently - not the most viewed, all-time.

    Read the article

  • Does performance even matter anymore? [closed]

    - by Jeff Dahmer
    The performance differences between C/C++ and C# are astounding. An ASP.NET page loads in 1/8 the time that a PHP script does haha.... WPF, aka " The Future ", (you know it will be, all the companies are gonna want cool looking desktop apps, don't kid yourself.) And it has huge performance hits just to start up. We've let Microsoft make us as developers lazy! Why do I hate this, it's such a good thing? Are we at a point in time where the majority of computers can handle this kinda crap? I remember when performance used to matter. Anyways, I'm writing a .NET library and ever since I found out LINQ is slower than traditional delegates which is slower than the normal procedural code... well it's a guilty evil I feel for every LINQ query I write, because they are so beautiful. Am I just too much of a performance stickler? Or just too big of a nerd?

    Read the article

  • How do Scala parser combinators compare to Haskell's Parsec?

    - by artif
    I have read that Haskell parser combinators (in Parsec) can parse context sensitive grammars. Is this also true for Scala parser combinators? If so, is this what the "into" (aka "") function is for? What are some strengths/weaknesses of Scala's implementation of parser combinators, vs Haskell's? Do they accept the same class of grammars? Is it easier to generate error messages or do other miscellaneous useful things with one or the other? How does packrat parsing (introduced in Scala 2.8) fit into this picture? Is there a webpage or some other resource that shows how different operators/functions/DSL-sugar from one language's implementation maps onto the other's?

    Read the article

  • How do i fix this JS scope in GM_xmlhttpRequest

    - by acidzombie24
    When i run this code alert 2 shows 6 different href links. alert 3 shows the last href 6 times. How do i make it use the same object (linkdom aka thelink) as alert 2. NOTE: This is in a greasemonkey script { var linkdom = thelink; alert('2' + linkdom.getAttribute("href")); GM_xmlhttpRequest({ method: 'GET', url: href, onload: function(resp){ //... alert('3' + linkdom.getAttribute("href")); } }); //... }

    Read the article

  • How to structure controller to sort multiple criteria asp.net mvc

    - by Solomon
    Hi, What's the best way to set up a controller to sort by many (possibly null) criteria? Say for example, I was building a site that sold cars. My CarController has a function Index() which returns an IList of cars to the view, and details on each car are rendered with a partial view. What's the best way to structure this? Especially if there are a lot of criteria: Car Type (aka SUV), Car Brand, Car Model, Car Year, Car Price, Car Color, bool IsNew, or if I want to sort by closest to me etc... I'm using NHibernate as my ORM. Should I have just a ton of possible NHibernate queries and figure out which one to choose based on if/then's in the controller? Or is there a simpler way. Thanks so much for the help.

    Read the article

  • Where do DQL statements live in an application that is using Zend Framework and Doctrine

    - by Dewayne
    In an application that is using Zend Framework 1.10 and Doctrine 1.2, where should the DQL statements live if our application is built such that it has a Service Layer and a Gateway(aka Doctrine_Table) layer. It seems that our possibilities include: 1) Placing the DQL statements in the Service layer which seems to be a bit too high in our application hierarchy to store DQL. 2) Placing the DQL statements within each model's Table/Gateway which seems a bit redundant because we also need to expose the DQL statements that do things such as getAllUsers() through the Service layer. Which of these is a preferable design? We intend to make use of the Service layer as much as possible so that other projects might consume various parts of our application.

    Read the article

  • blackberry deployment and release process

    - by hishboy
    So I'm building a blackberry app and was wondering if there is any good documentation on deployment/release best practices? Blackberry's "A70 – How to Deploy and Distribute Applications" document is kind of lacking. I guess I'm looking for answers for the following question (Specifically for Over-The-Air aka OTA): I'm building an app for OS 4.5 and up. Do I need to compile a separate COD/JAD for each version? (i.e. 4.5, 4.6, 4.6.1, 4.7, and 5.0) How do I detect OS version from the user-agent? What's the best way to compile COD/JAD files? anything else that might be good to know :) Thanks in advance!

    Read the article

  • C# - Do you use "var"?

    - by Paul Stovell
    C# 3.0 introduces implicitly typed variables, aka the "var" keyword. var daysInAWeek = 7; var paul = FindPerson("Paul"); var result = null as IPerson; Others have asked about what it does or what the problems with it are: http://stackoverflow.com/questions/527685/anonymous-types-vs-local-variables-when-should-one-be-used http://stackoverflow.com/questions/209199/whats-the-point-of-the-var-keyword http://stackoverflow.com/questions/41479/use-of-var-keyword-in-c I am interested in some numbers - do you use it? If so, how do you use it? I never use var (and I never use anonymous types) I only use var for anonymous types I only use var where the type is obvious I use var all the time!

    Read the article

  • Which Win32 API reports the Format preference in the Region and Language control panel?

    - by Integer Poet
    Windows 7 and Windows Vista have a Region and Language control panel which contains a Formats tab which contains a popup menu titled Format. This menu allows the user to select from among many language-oriented sets of number, currency, time, and date formatting preferences regardless of the language of the base system. For example, I could decide I prefer the default currency symbol to be Japanese yen on a US English system. The Windows Contacts application changes its behavior depending on these format preferences. For example, if I select Japanese formatting preferences, Windows Contacts displays and lets me edit phonetic names (AKA "ruby", "yomi", and "furigana") but not middle names. If I select US English formatting preferences, Windows Contacts displays and lets me edit middle names but not phonetic names. I need to write code (native C calling Win32) which mirrors the behavior of the Windows Contacts application in this respect. Which API should I call?

    Read the article

  • Unescape _xHHHH_ XML escape sequences using Python

    - by John Machin
    I'm using Python 2.x [not negotiable] to read XML documents [created by others] that allow the content of many elements to contain characters that are not valid XML characters by escaping them using the _xHHHH_ convention e.g. ASCII BEL aka U+0007 is represented by the 7-character sequence u"_x0007_". Neither the functionality that allows representation of any old character in the document nor the manner of escaping is negotiable. I'm parsing the documents using cElementTree or lxml [semi-negotiable]. Here is my best attempt at unescapeing the parser output as efficiently as possible: import re def unescape(s, subber=re.compile(r'_x[0-9A-Fa-f]{4,4}_').sub, repl=lambda mobj: unichr(int(mobj.group(0)[2:6], 16)), ): if "_" in s: return subber(repl, s) return s The above is biassed by observing a very low frequency of "_" in typical text and a better-than-doubling of speed by avoiding the regex apparatus where possible. The question: Any better ideas out there?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >