Search Results

Search found 1156 results on 47 pages for 'richard j foster'.

Page 33/47 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • How do you escape double quotes inside a SQL fulltext 'contains' function?

    - by Richard Davies
    How do you escape a double quote character inside a MS SQL 'contains' function? SELECT decision FROM table WHERE CONTAINS(decision, '34" AND wide') Normally contains() expects double quotes to surround an exact phrase to match, but I want to search for an actual double quote character. I've tried escaping it with \, `, and even another double quote, but none of that has worked. P.S. I realize a simple example like this could also be done using the LIKE statement, but I need to use the fulltext search function. The query I provided here has been simplified from my actual query for example purposes.

    Read the article

  • Striped table rows in ASP.NET MVC (without using jQuery or equivalent)

    - by Richard Ev
    When using an ASP.NET WebForms ListView control to display data in an HTML table I use the following technique in to "stripe" the table rows: <ItemTemplate> <tr class="<%# Container.DisplayIndex % 2 == 0 ? "" : "alternate" %>"> <!-- table cells in here --> </tr> </ItemTemplate> With the following CSS: tr.alternate { background-color: #EFF5FB; } I have just gone through the ASP.NET MVC Movie Database Application tutorial and learnt that in MVC-land table rows can be (must be?) constructed as follows: <% foreach (var item in Model) { %> <tr> <td> <%= Html.Encode(item.Title) %> </td> <!-- and so on for the rest of the table cells... --> </tr> <% } %> What can I add to this code to stripe the rows of my table? Note: I know that this can be done using jQuery, I want to know if it can be done another way. Edit If jQuery (or equivalent) is in your opinion the best or most appropriate post, I'd be interested in knowing why.

    Read the article

  • PL/SQL embedded insert into table that may not exist

    - by Richard
    Hi, I much prefer using this 'embedded' style inserts in a pl/sql block (opposed to the execute immediate style dynamic sql - where you have to delimit quotes etc). -- a contrived example PROCEDURE CreateReport( customer IN VARCHAR2, reportdate IN DATE ) BEGIN -- drop table, create table with explicit column list CreateReportTableForCustomer; INSERT INTO TEMP_TABLE VALUES ( customer, reportdate ); END; / The problem here is that oracle checks if 'temp_table' exists and that it has the correct number of colunms and throws a compile error if it doesn't exist. So I was wondering if theres any way round that?! Essentially I want to use a placeholder for the table name to trick oracle into not checking if the table exists.

    Read the article

  • Is the WCF REST Starter Kit dead in the water?

    - by Richard Ev
    We are looking at switching from using WCF for our service layer in applications to REST. So far we are assuming that the way to do this is to use the WCF REST Starter Kit. However this is still in Preview 2 and hasn't been updated since March 2009. Is this project dead in the water? If so, what alternatives do we have for creating .NET-based REST services? (Some are suggesting using ASP.NET MVC, which we're already using for our UI layer)

    Read the article

  • What is the easiest way to deploy a MVC2 application from Visual Studio 2010 to IIS 7.5?

    - by Richard
    I´ve tried a couple of different ways to deploy a application to a IIS 7.5 running on my machine for testing purposes and i´ve sort of hit a wall. Nothing works out of the box. Everything assumes I have knowledge I don't have and would prefer not to have to aqquire. Google isn't really helping either with answers ranging from "copy files by hand" to "install teamcity and set it up for CI". I have set up TeamCity for java projects before and it's really over kill for my needs at the moment. So anyone know of a fast, simple and easy way to deploy a application during testing/building?

    Read the article

  • Using system time directly to get random numbers

    - by Richard Mar.
    I had to return a random element from an array so I came up with this placeholder: return codes[(int) (System.currentTimeMillis() % codes.length - 1)]; Now than I think of it, I'm tempted to use it in real code. The Random() seeder uses system time as seed in most languages anyway, so why not use that time directly? As a bonus, I'm free from the worry of non-random lower bits of many RNGs. It this hack coming back to bite me? (The language is Java if that's relevant.)

    Read the article

  • Communicate between service and winform

    - by Richard Tivey
    I could do with a bit of help with a windows service im writing in c#. The service basically just runs various tasks on a schedule. It has 3 main sections: a class which contains everything for the task (config, code to be executed when it runs, etc), the service which contains instances of the tasks, running them on a timer and a windows form which is used to configure the settings for the task. The question I have is would it be possible to reference the service from the Winform whilst the service is running? Ultimately I want to be able to open the Winform and see a live status of what the service is currently doing. I've considered writing something network related to get around it but it didn't seem correct considering that both processes would be on the same machine.

    Read the article

  • Sharepoint page menu items gone?

    - by Richard
    I'm running MOSS 2007 and have created a new site under an existing one using sitemanager.aspx. I've done this on two machines. on one of those everything works correctly, while on the other some of the menu items for pages in the site seem to be gone. Also on the faulty site I get "Access denied" when I click "Version history". The permissions on both sites should be the same. I attach a screenshot of how the menus differ from each other. The one to the right (the faulty one) is unfortunately not in English but the items appearing on it are "Open link in a new window", "Copy", "Edit page settings" and "Version history". "View properties" and some more items are missing! What could have caused this? Screenshot: I'm running MOSS 2007 and have created a new site under an existing one using sitemanager.aspx. I've done this on two machines. on one of those everything works correctly, while on the other some of the menu items for pages in the site seem to be gone. Also on the faulty site I get "Access denied" when I click "Version history". The permissions on both sites should be the same. I attach a screenshot of how the menus differ from each other. The one to the right (the faulty one) is unfortunately not in English but the items appearing on it are "Open link in a new window", "Copy", "Edit page settings" and "Version history". "View properties" and some more items are missing! What could have caused this? Screenshot: hxxp://i40.tinypic.com/302naxx.jpg

    Read the article

  • Emulating a computer running MS-DOS

    - by Richard
    Writing emulators has always fascinated me. Now I want to write an emulator for an IBM PC and run MS-DOS on it (I've got the floppy image files). I have good experience in C++ and C and basic knowledge of assembler and the architecture of a CPU. I also know that there are thousands of emulators out there doing exactly what I want to do, but I'd be doing this for pure joy only. How much work do I have to expect? (If my goal is to boot DOS and create a text file with it, all emulated) What CPU should I emulate ? Where can I find documentation on how the machine code is organized and which opcodes mean what, so I can unpack and execute them correctly with my emulator? Does MS-DOS still run on the newest generations of processors? Would it theoretically be able to natively run on a 64-bit AMD Phenom 2 processor w/ a modern mainboard, HDD, RAM, etc.? What else, besides emulating the CPU, could be an important factor (in terms of difficulty)? I would only aim for outputting / inputting text to the system via the host system's console, no sound or other more advanced IO etc. Have you written an emulator yet? What was your first one for? How hard was it? Do you have any special tips for me? Thanks in advance

    Read the article

  • A C# class with a null namespace

    - by Richard Ev
    While going through some legacy code today I discovered that you can declare a C# class without placing it in a namespace (in this scenario I have an ASP.NET WebForms application and some of the web forms are not declared within any namespace). A GetType() on such a class returns a type where the namespace property is set to null. I did not know that this was allowed - can anyone suggest why it would be desirable to have a class that is not declared within a namespace?

    Read the article

  • Working with wchar in C

    - by Richard Mar.
    I have this code: #include <stdio.h> #include <wchar.h> int main() { wchar_t *foo = L"ðh"; wprintf(L"[%ls]\n", foo); return 0; } And when I compile it, it gives me the implicit declaration of function ‘wprintf’ warning. I know that I should link the wchar library during compilation, but how do I do that?

    Read the article

  • OpenCV compare two images and get different pixels

    - by Richard Knop
    For some reason the code bellow is not working. I have two 640*480 images which are very similar but not the same (at least few hundred/thousand pixels should be different). This is how I am comparing them and counting different pixels: unsigned char* row; unsigned char* row2; int count = 0; // this happens in a loop // fIplImageHeader is current image // lastFIplImageHeader is image from previous iteration if ( NULL != lastFIplImageHeader->imageData ) { for( int y = 0; y < fIplImageHeader->height; y++ ) { row = &CV_IMAGE_ELEM( fIplImageHeader, unsigned char, y, 0 ); row2 = &CV_IMAGE_ELEM( lastFIplImageHeader, unsigned char, y, 0 ); for( int x = 0; x < fIplImageHeader->width*fIplImageHeader->nChannels; x += fIplImageHeader->nChannels ) { if (row[x] == row2[x]) // the pixel in the first channel (usually G) { count++; } if (row[x+1] == row2[x+1]) // ... second channel (usually B) { count++; } if (row[x+2] == row2[x+2]) // ... third channel (usually R) { count++; } } } } Now at the end I get number 3626 which would seem alright. But, I tried opening one of the images in MS Paint and drawing thick red lines all over it which should increase the number of different pixels substantially. I got the same number again: 3626. Obviously I am doing something wrong here. I am comparing these images in a loop. This line is before the loop: IplImage* lastFIplImageHeader = cvCreateImageHeader(cvSize(640, 480), 8, 3); Then inside the loop I load images like this: IplImage* fIplImageHeader = cvLoadImage( filePath.c_str() ); // here I compare the pixels (the first code snippet) lastFIplImageHeader->imageData = fIplImageHeader->imageData; So lastFIplImageHeader is storing the image from the previous iteration and fIplImageHeader is storing the current image.

    Read the article

  • How to insert form data into MySQL database table

    - by Richard
    So I have this registration script: The HTML: <form action="register.php" method="POST"> <label>Username:</label> <input type="text" name="username" /><br /> <label>Password:</label> <input type="text" name="password" /><br /> <label>Gender:</label> <select name="gender"> <optgroup label="genderset"> <option value="Male">Male</option> <option value="Female">Female</option> <option value="Hermaphrodite">Hermaphrodite</option> <option value="Not Sure!!!">Not Sure!!!</option> </optgroup> </select><br /> <input type="submit" value="Register" /> </form> The PHP/SQL: <?php $username = $_POST['username']; $password = $_POST['password']; $gender = $_POST['gender']; mysql_query("INSERT INTO registration_info (username, password, gender) VALUES ('$username', '$password', '$gender') ") ?> The problem is, the username and password gets inserted into the "registration_info" table just fine. But the Gender input from the select drop down menu doesn't. Can some one tell me how to fix this, thanks.

    Read the article

  • Subversion causes network problems

    - by richard
    I often use tortoisesvn to checkout or update a working copy on a development server. Whenever I do this, it seems to slow down the network and other users complain that browsing websites and accessing files on the dev server is slow. Is this a common bug in Subversion or has anyone else has come across similar problems?

    Read the article

  • Missing something with Reader monad - passing the damn thing around everywhere

    - by Richard Huxton
    Learning Haskell, managing syntax, have a rough grasp of what monads etc are about but I'm clearly missing something. In main I can read my config file, and supply it as runReader (somefunc) myEnv just fine. But somefunc doesn't need access to the myEnv the reader supplies, nor do the next couple in the chain. The function that needs something from myEnv is a tiny leaf function. So - how do I get access to the environment in a function without tagging all the intervening functions as (Reader Env)? That can't be right because otherwise you'd just pass myEnv around in the first place. And passing unused parameters through multiple levels of functions is just ugly (isn't it?). There are plenty of examples I can find on the net but they all seem to have only one level between runReader and accessing the environment.

    Read the article

  • capistrano initial deployment

    - by Richard G
    I'm trying to set up Capistrano to deploy to an AWS box. This is the first time I've tried to set this up, so please bear with me. Could someone take a look at this and let me know if you can solve this error? The output below is the deploy.rb file, and it's output when it runs. set :application, "apparel1" set :repository, "git://github.com/rgilling/GroceryRun.git" set :scm, :git set :user, "ubuntu" set :scm_passphrase, "pre5ence" # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` ssh_options[:keys] = ["/Users/rgilling/Documents/Projects/Apparel1/abesakey.pem"] ssh_options[:forward_agent] = true set :location, "ec2-107-22-27-42.compute-1.amazonaws.com" role :web, location # Your HTTP server, Apache/etc role :app, location # This may be the same as your `Web` server role :db, location, :primary => true # This is where Rails migrations will run set :deploy_to, "/var/www/#{application}" set :deploy_via, :remote_cache set :use_sudo, true # if you want to clean up old releases on each deploy uncomment this: # after "deploy:restart", "deploy:cleanup" # if you're still using the script/reaper helper you will need # these http://github.com/rails/irs_process_scripts # If you are using Passenger mod_rails uncomment this: namespace :deploy do task :start do ; end task :stop do ; end task :restart, :roles => :app, :except => { :no_release => true } do run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" end end Then the execution results in this permission error. I think I"ve set up the SSH etc. correctly... updating the cached checkout on all servers executing locally: "git ls-remote git://github.com/rgilling/GroceryRun.git HEAD" command finished in 1294ms * executing "if [ -d /var/www/apparel1/shared/cached-copy ]; then cd /var/www/apparel1/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard f35dc5868b52649eea86816d536d5db8c915856e && git clean -q -d -x -f; else git clone -q git://github.com/rgilling/GroceryRun.git /var/www/apparel1/shared/cached-copy && cd /var/www/apparel1/shared/cached-copy && git checkout -q -b deploy f35dc5868b52649eea86816d536d5db8c915856e; fi" servers: ["ec2-107-22-27-42.compute-1.amazonaws.com"] [ec2-107-22-27-42.compute-1.amazonaws.com] executing command ** **[ec2-107-22-27-42.compute-1.amazonaws.com :: err] error: cannot open .git/FETCH_HEAD: Permission denied**

    Read the article

  • Is a point inside or outside a polygon which is on the surface of a globe

    - by richard
    How do I determine if a point is inside or outside a polygon that lies on the the surface of the earth? The inside of the polygon can be determined via the right hand rule, ie. the inside of the polygon is on your right hand side when you walk around the polygon. The polygon may Circle either pole Cross the 180 longitude Cover more than 50% of the globe As the globe is a sphere the normal ray crossing algorithms do not work correctly.

    Read the article

  • Will array_unique work also with array of objects?

    - by Richard Knop
    Is there a better way than using array-walk in combination with unserialize? I have two arrays which contain objects. The objects can be same or can be different. I want to merge both arrays and keep only unique objects. This seems to me like a very long solution for something so trivial. Is there any other way? class Dummy { private $name; public function __construct($theName) {$this->name=$theName;} } $arr = array(); $arr[] = new Dummy('Dummy 1'); $arr[] = new Dummy('Dummy 2'); $arr[] = new Dummy('Dummy 3'); $arr2 = array(); $arr2[] = new Dummy('Dummy 1'); $arr2[] = new Dummy('Dummy 2'); $arr2[] = new Dummy('Dummy 3'); function serializeArrayWalk(&$item) { $item = serialize($item); } function unSerializeArrayWalk(&$item) { $item = unserialize($item); } $finalArr = array_merge($arr, $arr2); array_walk($finalArr, 'serializeArrayWalk'); $finalArr = array_unique($finalArr); array_walk($finalArr, 'unSerializeArrayWalk'); var_dump($finalArr);

    Read the article

  • How to split and join array in C++?

    - by Richard Knop
    I have a byte array like this: lzo_bytep out; // my byte array size_t uncompressedImageSize = 921600; out = (lzo_bytep) malloc((uncompressedImageSize + uncompressedImageSize / 16 + 64 + 3)); wrkmem = (lzo_voidp) malloc(LZO1X_1_MEM_COMPRESS); // Now the byte array has 802270 bytes r = lzo1x_1_compress(imageData, uncompressedImageSize, out, &out_len, wrkmem); How can I split it into smaller parts under 65,535 bytes (the byte array is one large packet which I want to sent over UDP which has upper limit 65,535 bytes) and then join those small chunks back into a continuous array?

    Read the article

  • What are the requirements of a collection type when model binding?

    - by Richard Ev
    I have been reviewing model binding with collections, specifically going through this article http://weblogs.asp.net/nmarun/archive/2010/03/13/asp-net-mvc-2-model-binding-for-a-collection.aspx However, the model I would like to use in my code does not implement collections using generic lists. Instead it uses its own collection classes, which inherit from a custom generic collection base class, the declaration of which is public abstract class CollectionBase<T> : IEnumerable<T> The collections in my POSTed action method are all non-null, but contain no elements. Can anyone advise?

    Read the article

  • How to delete a Dictionary row that is a Double by using an Int?

    - by Richard Reddy
    Hi, I have a Dictionary object that is formed using a double as its key values. It looks like this: Dictionary<double, ClassName> VariableName = new Dictionary<double, ClassName>(); For my project I have to have the key as the double as I require values like 1.1,1.2,2.1,2.2,etc in my system. Everything in my system works great except when I want to delete all the keys in a group eg all the 1 values would be 1.1,1.2, etc. I can delete rows if I know the full value of the key eg 1.1 but in my system I will only know the whole number. I tried to do the following but get an error: DictionaryVariable.Remove(j => Convert.ToInt16(j.Key) == rowToEdit).OrderByDescending(j => j.Key); Is there anyway to remove all rows per int value by converting the key? Thanks, Rich

    Read the article

  • Messaging in local network with .NET

    - by Richard
    Hi All, I need to implement some form of communication mechanism in my application, to send notifications/messages from one application instance to all the others. This is a normal scenario where someone adds and item or deletes and item and you want to notify other users that this has happened. The application runs on the client and connects to a database on the local network. So its not like all clients access a server instance of the application. So from what I know I could use MessageQueues or some form of Database polling where I have a table that stores all the messages (not ideal). Issue is I need to implement this very quickly, so sadly can't go very complex but need the quickest easiest solution. thanks for the help!

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >