Search Results

Search found 1057 results on 43 pages for 'richard gadsden'.

Page 31/43 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Looking for a CSS Parser in java

    - by Richard
    Hi, I'm looking for a CSS Parser in java. In particular my requirement is, for a given node/element in an HTML document, to be able to ask/get the css styles for that element from the Parser. I know there is the W3C SAC interface and one or 2 implementations based on this - but turorials/examples appear non-existant. Any help/points in rigth direction much appreciated. Thanks

    Read the article

  • Even lighter than SQLite

    - by Richard Fabian
    I've been looking for a C++ SQL library implementation that is simple to hook in like SQLite, but faster and smaller. My projects are in games development and there's definitely a cutoff point between needing to pass the ACID test and wanting some extreme performance. I'm willing to move away from SQL string style queries, allowing it to be code driven, but I haven't found anything out there that provides SQL like flexibility while also preferring performance over the ACID test. I don't want to go reinventing the wheel, and the idea of implementing an SQL library on my own is quite daunting, even if it's only going to be simple subset of all the calls you could make. I need the basic commands (SELECT, MODIFY, DELETE, INSERT, with JOIN, and WHERE), not data operations (like sorting, min, max, count) and don't need the database to be atomic, or even enforce consistency (I can use a real SQL service while I'm testing and debugging).

    Read the article

  • server controls complex properties with sub collections.

    - by Richard Friend
    Okay i have a custom server control that has some autocomplete settings, i have this as follows and it works fine. /// <summary> /// Auto complete settings /// </summary> [System.ComponentModel.DesignerSerializationVisibility (System.ComponentModel.DesignerSerializationVisibility.Content), PersistenceMode(PersistenceMode.InnerProperty), Category("Data"), Description("Auto complete settings"), NotifyParentProperty(true)] public AutoCompleteLookupSettings AutoComplete { private set; get; } I also have a ParameterCollection that is really related to the auto complete settings, currently this collection resides off the control itself like so : /// <summary> /// Parameters for any data lookups /// </summary> [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content), PersistenceMode(PersistenceMode.InnerProperty)] public ParameterCollection Parameters { get; set; } What i would like to do is move the parameter collection inside of the AutoCompleteSettings as it really relates to my autocomplete, i have tried this but to no avail.. I would like to move from <cc1:TextField ID="TextField1" runat='server'> <AutoComplete MethodName="GetTest" TextField="Item1" TypeName ="AppFrameWork.Utils" /> <Parameters> <asp:ControlParameter ControlID="txtTest" PropertyName="Text" Name="test" /> </Parameters> </cc1:TextField> To <cc1:TextField ID="TextField1" runat='server'> <AutoComplete MethodName="GetTest" TextField="Item1" TypeName ="AppFrameWork.Utils" > <Parameters> <asp:ControlParameter ControlID="txtTest" PropertyName="Text" Name="test" /> </Parameters> </AutoComplete> </cc1:TextField>

    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

  • 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

  • Use Linq to SQL to generate sales report

    - by Richard Reddy
    I currently have the following code to generate a sales report over the last 30 days. I'd like to know if it would be possible to use linq to generate this report in one step instead of the rather basic loop I have here. For my requirement, every day needs to return a value to me so if there are no sales for any day then a 0 is returned. Any of the Sum linq examples out there don't explain how it would be possible to include a where filter so I am confused on how to get the total amount per day, or a 0 if no sales, for the last days I pass through. Thanks for your help, Rich //setup date ranges to use DateTime startDate = DateTime.Now.AddDays(-29); DateTime endDate = DateTime.Now.AddDays(1); TimeSpan startTS = new TimeSpan(0, 0, 0); TimeSpan endTS = new TimeSpan(23, 59, 59); using (var dc = new DataContext()) { //get database sales from 29 days ago at midnight to the end of today var salesForDay = dc.Orders.Where(b => b.OrderDateTime > Convert.ToDateTime(startDate.Date + startTS) && b.OrderDateTime <= Convert.ToDateTime(endDate.Date + endTS)); //loop through each day and sum up the total orders, if none then set to 0 while (startDate != endDate) { decimal totalSales = 0m; DateTime startDay = startDate.Date + startTS; DateTime endDay = startDate.Date + endTS; foreach (var sale in salesForDay.Where(b => b.OrderDateTime > startDay && b.OrderDateTime <= endDay)) { totalSales += (decimal)sale.OrderPrice; } Response.Write("From Date: " + startDay + " - To Date: " + endDay + ". Sales: " + String.Format("{0:0.00}", totalSales) + "<br>"); //move to next day startDate = startDate.AddDays(1); } }

    Read the article

  • How do I force all Tree itemrenderers to refresh?

    - by Richard Haven
    I have item renderers in an mx.controls.Tree that I need to refresh on demand. I have code in the updateDisplayList that fires for only some of the visible nodes no matter what I do. I've tried triggering a change that they should all be listening for; I have tried clearing and resetting the dataProvider and the itemRenderer properties. private function forceCategoryTreeRefresh(event : Event = null) : void { trace("forceCategoryTreeRefresh"); var prevDataProvider : Object = CategoryTree.dataProvider; CategoryTree.dataProvider = null; CategoryTree.validateNow(); CategoryTree.dataProvider = prevDataProvider; var prevItemRenderer : IFactory = CategoryTree.itemRenderer; CategoryTree.itemRenderer = null; CategoryTree.itemRenderer = prevItemRenderer as IFactory; _categoriesChangeDispatcher.dispatchEvent(new Event(Event.CHANGE)); } The nodes refresh properly when I scroll them into view (e.g. the .data gets set), but I cannot force the ones that already exist to refresh or reset themselves. Any ideas?

    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

  • PHP use function return value as array

    - by Richard Knop
    Why is it that this works: $cacheMatchesNotPlayed = $cache->load('externalData'); $cacheMatchesNotPlayed = $cacheMatchesNotPlayed['matchesNotPlayed']; But this doesn't work: $cacheMatchesNotPlayed = $cache->load('externalData')['matchesNotPlayed']; Is there some reason for it? The second bit is easier to write.

    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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

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