Search Results

Search found 155 results on 7 pages for 'glenn andersson'.

Page 4/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • How do you implement caching in Linq to SQL?

    - by Glenn Slaven
    We've just started using LINQ to SQL at work for our DAL & we haven't really come up with a standard for out caching model. Previously we had being using a base 'DAL' class that implemented a cache manager property that all our DAL classes inherited from, but now we don't have that. I'm wondering if anyone has come up with a 'standard' approach to caching LINQ to SQL results? We're working in a web environment (IIS) if that makes a difference. I know this may well end up being a subjective question, but I still think the info would be valuable. EDIT: To clarify, I'm not talking about caching an individual result, I'm after more of an architecture solution, as in how do you set up caching so that all your link methods use the same caching architecture.

    Read the article

  • Which Workflow Engine do you recommend?

    - by Glenn
    I am kicking around the idea of using a workflow engine on this upcoming project. We know that there is a lot of caveats with using a workflow engine and we have a lot of development experience in many platforms so we would be willing to let the choice of workflow engine take precedence over our favorite toolset or developer IDE. We are more interested in internal workflow (i.e. petri net for easily changeable ERP purposes without involving additional coder time) than external workflow (i.e. aggregating SOAP calls into a transaction aware, higher level SOA). Which workflow engine would you recommend? We have superficially looked at offerings by Oracle, Microsoft, and some open source stuff too. It's all very overwhelming so please respond only if you have real life experience with implementing internal workflow.

    Read the article

  • how to find the last instance of a setting in a config file

    - by Glenn Kelley
    I am trying to figure out how to find the last entry of a string in multiple config files across a server. Each of the strings will be in the /home/***usernamewouldbehere/public_html/typo3conf/localconf.php file In short - the last entry in the config files will point to the database server the application is utilizing - and we need to know which accounts point to which db server. While I can run something like this - grep "$_db_host" /home/*/public_html/conf/localconf.php It does not really help much because it gives us way to much information ... and not what we really need. What i really need to know is the last entry of this string $_db_host = 'xx'; and to sort them out in an export file Since the config files may have multiple entries (example below) $_db_host = 'localhost'; $_db_host = '10.0.1.234'; It would be great to list in a file all of those that have the entry for 'localhost' and then list all of those that have the entry for '10.0.1.234' (or whichever server there may be there) but even if I need to do that manually that would be great. I am not sure how to get to it using Awk - ... and really stuck What I am hoping for is something that would be piped as follows db_host = localhost /home/username1/www/conf/localconf.php db_host = localhost / home/username2/public_html/conf/localconf.php db_host= '10.1.2.23' /home/username55/public_html/conf/localconf.php hoping that helps you help me :-)

    Read the article

  • Eclipse users: Do you use Aptana too?

    - by Glenn
    This San Mateo development company makes a freely downloadable convenient packaging of many plugins for Eclipse called Aptana. I was recently in an environment where Aptana came pre-installed. Not only is it a good IDE for RoR, it also does a somewhat decent job (sans debugging) for PHP, Python, HTML, CSS, and Javascript. According to their own web site, their IDE also supports Adobe Air and the iPhone. If you are currently using Eclipse, then do you also use Aptana too? What, if any, are the drawbacks to using Aptana?

    Read the article

  • How to parse a string into a nullable int in C# (.NET 3.5)

    - by Glenn Slaven
    I'm wanting to parse a string into a nullable int in C#. ie. I want to get back either the int value of the string or null if it can't be parsed. I was kind of hoping that this would work int? val = stringVal as int?; But that won't work, so the way I'm doing it now is I've written this extension method public static int? ParseNullableInt(this string value) { if (value == null || value.Trim() == string.Empty) { return null; } else { try { return int.Parse(value); } catch { return null; } } } Is there a better way of doing this? EDIT: Thanks for the TryParse suggestions, I did know about that, but it worked out about the same. I'm more interested in knowing if there is a built-in framework method that will parse directly into a nullable int?

    Read the article

  • What's a good Web Crawler tool

    - by Glenn Slaven
    I need to index a whole lot of webpages, what good webcrawler utilities are there? I'm preferably after something that .NET can talk to, but that's not a showstopper. What I really need is something that I can give a site url to & it will follow every link and store the content for indexing.

    Read the article

  • optional search parameters in sql query and rows with null values

    - by glenn.danthi
    Ok here is my problem : Before i start the description, let me to tell you that I have googled up a lot and I am posting this question for a good optimal solution :) i am building a rest service on WCF to get userProfiles... the user can filter userProfiles by giving something like userProfiles?location=London now i have the following method GetUserProfiles(string firstname, string lastname, string age, string location) the sql query string i built is: select firstname, lastname, .... from profiles where (firstName like '%{firstname}%') AND (lastName like '%{lastName}%') ....and so on with all variables being replaced by string formatter. Problem with this is that it filters any row having firstname, lastname, age or location having a null value.... doing something like (firstName like '%{firstName}%' OR firstName IS NULL) would be tedious and the statement would become unmaintanable! (in this example there are only 4 arguments, but in my actual method there are 10) What would be the best solution for this?....How is this situation usually handled? Database used : MySql

    Read the article

  • Creating search functionality with Laravel 4

    - by Mitch Glenn
    I am trying to create a way for users to search through all the products on a website. When they search for "burton snowboards", I only want the snowboards with the brand burton to appear in the results. But if they searched only "burton", then all products with the brand burton should appear. This is what I have attempted to write but isn't working for multiple reasons. Controller: public function search(){ $input = Input::all(); $v= Validator::make($input, Product::$rules); if($v->passes()) { $searchTerms = explode(' ', $input); $searchTermBits = array(); foreach ($searchTerms as $term) { $term = trim($term); if (!empty($term)){ $searchTermBits[] = "search LIKE '%$term%'"; } } $result = DB::table('products') ->select('*') ->whereRaw(". implode(' AND ', $searchTermBits) . ") ->get(); return View::make('layouts/search', compact('result')); } return Redirect::route('/'); } I am trying to recreate the first solution given for this stackoverflow.com problem The first problem I have identified is that i'm trying to explode the $input, but it's already an array. So i'm not sure how to go about fixing that. And the way I have written the ->whereRaw(". implode(' AND ', $searchTermBits) . "), i'm sure isn't correct. I'm not sure how to fix these problems though, any insights or solutions will be greatly appreciated.

    Read the article

  • Is Horde an acceptable framework for PHP groupware development?

    - by Glenn
    I'm working on this project and the customer wants it to integrate with a groupware package including bulk email, calendars, and task lists. He has heard about Horde and Horde GroupWare and is interested in using that. Do you have any developer related experience with Horde? If so, then what were your findings? Did you find it to be stable? What about the framework/API? Was it easy to integrate with?

    Read the article

  • How to Programmatically Identify a PI Font (a Dingbat) under OS X

    - by Glenn Howes
    There is a class of fonts called Pi fonts whose glyphs, under OS X, get mapped to the private Unicode space 0xF021-0xF0FF such that if you subtract 0xF000 from each unicode character to retrieve the 8-bit version of the character and be able to draw that character as if it were a standard Roman character. My question is how do I recognize these fonts? It's obvious the system can do so because there is a category on the Special Characters palette called "Pi Fonts" which apparently has the various such fonts installed on my system. In my case they are BookshelSymbolSeven, MSReferenceSpeciality, MT-Extras, Marlett, MonotypeSorts, Webdings, and various Wingdings. If I use the old fashioned QuickDraw routines to ask for the TextEncoding of these fonts, I get a value of 0x20000 which I do not see in the system header file TextCommon.h. Am I supposed to treat any font with a TextEncoding of 0x20000 as a Pi Font? And I'd rather not use any QuickDraw font handling routines for obvious reasons.

    Read the article

  • How to return all records and whether a related record exists?

    - by David Glenn
    Using Entity Framework 4 CTP5 I have a basic model and a basic DbContext that works public class Customer { public int CustomerId { get; set; } public int Name { get; set; } //... public ICollection<Address> Addresses { get; set; } public bool HasAddress { get { return Addresses.Count > 0; } } } public class Address { public int AddressId { get; set; } public string StreetLine1 { get; set; } //.... public Customer Customer { get; set; } } How can I query my DbContext to return all customers and whether they have an address? A customer can have multiple addresses and I don't want to return all the addresses for each customer when I am only interested in whether they have an address or not. I use context.Customers.Include(c => c.Addresses) but that returns all addresses for each customer

    Read the article

  • Tablet interface for the physically disabled?

    - by Glenn
    My sister has Cerebral Palsy, which in her case means she has only gross motor control and her speech is slurred. Implications should be obvious: traditional computer/phone/tablet interfaces won't work for her and she can't speak clearly enough for speech recognition software to help her at all. She enjoys reading but has difficulty holding the book and/or turning a page. There are a few options for helping her use a computer, but nothing for tablets or eReaders. That's where you come in. I would like to make (or buy, if such a thing exists) a better interface to an Android tablet that would work for someone with little to no physical dexterity or speech ability. I'd also be interested in work on the Kindle or iPad, but I'm most familiar with Android so I'm starting there. I know Android has Bluetooth capability. Is it possible to interface a joystick to control the Android device? By "control", I mean the entire operating system - selecting an app, launching it, controlling the menus, etc. I want to give her control over the whole thing, not just a specific app. On a PC this can be accomplished by creating a generic USB HID interface and an arcade joystick to move the mouse over the screen and click on thigns. Is it possible to do something like that in Android? Any help you can offer would be greatly appreciated. Thanks!

    Read the article

  • How to bind to localStorage change event using jQuery for all browsers?

    - by David Glenn
    How do I bind a function to the HTML5 localStorage change event using jQuery? $(function () { $(window).bind('storage', function (e) { alert('storage changed'); }); localStorage.setItem('a', 'test'); }); I've tried the above but the alert is not showing. Update: It works in Firefox 3.6 but it doesn't work in Chrome 8 or IE 8 so the question should be more 'How to bind to localStorage change event using jQuery for all browsers?'

    Read the article

  • mysql insert multiple rows, return rows that failed

    - by Glenn
    When I try to insert (lets say) 30 rows in my table. For example INSERT INTO customers(cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country) VALUES( 'Pep E. LaPew', '100 Main Street', 'Los Angeles', 'CA', '90046', 'USA' ), ( 'M. Martian', '42 Galaxy Way', 'New York', 'NY', '11213', 'USA' ), ... ; And cust_name has to be unique. How can I then identify the records that failed to insert because their cust_name already exists? Is it possible to return them?

    Read the article

  • How can I create and use a web service in public but still restrict its use to only my app?

    - by Glenn
    I'm creating a web service with create/update/delete calls. But for now I'd like to restrict use of it on my own web app and no other clients. How can I have clear text javascript code that makes these calls but still be confident the credentials won't be used elsewhere? My idea is to use server side generated nonces for each request. But I am open to different ideas you guys may have. Thanks.

    Read the article

  • Porting WebSphere code to get remote credentials to Tomcat

    - by Glenn Lawrence
    I have been asked to look into porting some code from a web app under IBM WAS 7 so that it will run under Tomcat 7. This is part of a larger SPNEGO/Kerberos SSO system but for purposes of discussion I have distilled the code down to the following that shows the dependencies on the two WebSphere classes AccessController and WSSubject: GSSCredential clientCreds = (GSSCredential) com.ibm.ws.security.util.AccessController.doPrivileged(new java.security.PrivilegedAction() { public Object run() { javax.security.auth.Subject subject = com.ibm.websphere.security.auth.WSSubject.getCallerSubject(); GSSCredential clientCreds = (GSSCredential) subject.getPrivateCredentials(GSSCredential.class).iterator().next(); return clientCreds; } }); I'd like to be able to do this in Tomcat.

    Read the article

  • Is there a design pattern for injecting methods into a class?

    - by glenn I.
    I have a set of classes that work together (I'm coding in javascript). There is one parent class and a number of child classes that are instantiated by the parent class. I have a number of clients of these classes that each need to add on one more methods to the parent or child classes. Rather than having each client inherit from these classes, which is doable but messy because of the child classes, I am having these clients pass functions into the parent class when they instantiate the main class. The main class creates the methods dynamically and the clients can call the methods like they were there all along. My questions are: is this a sensible thing to do? what would the design pattern be for what I am doing?

    Read the article

  • In SQL Server what is most efficient way to compare records to other records for duplicates with in

    - by Glenn
    We have an SQL Server that gets daily imports of data files from clients. This data is interrelated and we are always scrubbing it and having to look for suspect duplicate records between these files. Finding and tagging suspect records can get pretty complicated. We use logic that requires some field values to be the same, allows some field values to differ, and allows a range to be specified for how different certain field values can be. The only way we've found to do it is by using a cursor based process, and it places a heavy burden on the database. So I wanted to ask if there's a more efficient way to do this. I've heard it said that there's almost always a more efficient way to replace cursors with clever JOINS. But I have to admit I'm having a lot of trouble with this one. For a concrete example suppose we have 1 table, an "orders" table, with the following 6 fields. order_id, customer_id product_id, quantity, sale_date, price We want to look through the records to find suspect duplicates on the following example criteria. These get increasingly harder. 1. Records that have the same product_id, sale_date, and quantity but different customer_id's should be marked as suspect duplicates for review. 2. Records that have the same customer_id, product_id, quantity and have sale_dates within five days of each other should be marked as suspect duplicates for review 3. Records that have the same customer_id, product_id, but different quantities within 20 units, and sales dates within five days of each other should be considered suspect. Is it possible to satisfy each one of these criteria with a single SQL Query that uses JOINS? Is this the most efficient way to do this?

    Read the article

  • sending +-200 emails using php mail() function in a loop

    - by Glenn
    Note: It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient. Source: PHP manual What are larger volumes? A 100 or a 1000?? Can I safely make it loop 200 times without much problems? (I can't install pear)

    Read the article

  • How do you prove a function works?

    - by glenn I.
    I've recently gotten the testing religion and have started primarily with unit testing. I code unit tests which illustrate that a function works under certain cases, specifically using the exact inputs I'm using. I may do a number of unit tests to exercise the function. Still, I haven't actually proved anything other than the function does what I expect it to do under the scenarios I've tested. There may be other inputs and scenarios I haven't thought of and thinking of edge cases is expensive, particularly on the margins. This is all not very satisfying to do me. When I start to think of having to come up with tests to satisfy branch and path coverage and then integration testing, the prospective permutations can become a little maddening. So, my question is, how can one prove (in the same vein of proving a theorem in mathematics) that a function works (and, in a perfect world, compose these 'proofs' into a proof that a system works)? Is there a certain area of testing that covers an approach where you seek to prove a system works by proving that all of its functions work? Does anybody outside of academia bother with an approach like this? Are there tools and techniques to help? I realize that my use of the word 'work' is not precise. I guess I mean that a function works when it does what some spec (written or implied) states that it should do and does nothing other than that. Note, I'm not a mathematician, just a programmer.

    Read the article

  • How do you mentally handle going from writing managed to non-managed code?

    - by Glenn Sandoval
    ~80% of the code I write is in C#. The other ~20% is in C++. Whenever I have to switch from C# to C++, it takes me quite a while to mentally "shift gears" to thinking in C++. I make simple mistakes using pointers and memory allocation that I would not have made when I was in university. Is this normal? Does anyone else experience something similar and if so, what do you do to cut down on the time this wastes?

    Read the article

  • DataReader is not returning results from a MySQL Stored Proc

    - by Glenn Slaven
    I have a stored proc in MySQL (5.5) that I'm calling from a C# application (using MySQL.Data v6.4.4.0). I have a bunch of other procs that work fine, but this is not returning any results, the data reader says the result set is empty. The proc does a couple of inserts & an update inside a transaction then selects 2 local variables to return. The inserts & update are happening, but the select is not returning. When I run the proc manually it works, gives a single row with the two fields, but the data reader is empty. This is the proc: CREATE DEFINER=`root`@`localhost` PROCEDURE `File_UpdateFile`(IN siteId INT, IN fileId INT, IN description VARCHAR(100), IN folderId INT, IN fileSize INT, IN filePath VARCHAR(100), IN userId INT) BEGIN START TRANSACTION; SELECT MAX(v.versionNumber) + 1 INTO @versionNumber FROM `file_version` v JOIN `file` f ON (v.fileId = f.fileId) WHERE v.fileId = fileId AND f.siteId = siteId; INSERT INTO `file_version` (fileId, versionNumber, description, fileSize, filePath, uploadedOn, uploadedBy, fileVersionState) VALUES (fileId, @versionNumber, description, fileSize, filePath, NOW(), userId, 0); INSERT INTO filehistory (fileId, `action`, userId, createdOn) VALUES (fileId, 'UPDATE', userId, NOW()); UPDATE `file` f SET f.checkedOutBy = NULL WHERE f.fileId = fileId; COMMIT; SELECT fileId, @versionNumber `versionNumber`; END$$ I'm calling the proc using Dapper, but I've debugged into the SqlMapper class and I can see that the reader is not returning anything.

    Read the article

  • windows mobile - connection link failed

    - by Glenn
    Windows mobile 6.1 device, attempting to connect via a mobile network and we sometime see the message "Connection Link failed". Can anyone verify what this actually means, I'm beginning to think it relates to signal from the mobile carrier but does anyone have any other ideas?

    Read the article

  • Serialize a C# class to binary be used by C++. How to handle alignment?

    - by glenn.danthi
    I am currently serializing a C# class into a binary stream using BinaryWriter. I take each element of the class and write it out using BinaryWriter. This worked fine as the C++ application reading this binary file supported packed structs and hence the binary file could be loaded directly. Now I have got a request to handle alignment as a new application has popped up which cannot support packed structs. What's the best way to convert the C# class and exporting it out as a binary keeping both 2 byte as well as 4 byte alignment in mind? The user can choose the alignment.

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >