Search Results

Search found 4763 results on 191 pages for 'adams john'.

Page 99/191 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • Rails' page caching vs. HTTP reverse proxy caches

    - by John Topley
    I've been catching up with the Scaling Rails screencasts. In episode 11 which covers advanced HTTP caching (using reverse proxy caches such as Varnish and Squid etc.), they recommend only considering using a reverse proxy cache once you've already exhausted the possibilities of page, action and fragment caching within your Rails application (as well as memcached etc. but that's not relevant to this question). What I can't quite understand is how using an HTTP reverse proxy cache can provide a performance boost for an application that already uses page caching. To simplify matters, let's assume that I'm talking about a single host here. This is my understanding of how both techniques work (maybe I'm wrong): With page caching the Rails process is hit initially and then generates a static HTML file that is served directly by the Web server for subsequent requests, for as long as the cache for that request is valid. If the cache has expired then Rails is hit again and the static file is regenerated with the updated content ready for the next request With an HTTP reverse proxy cache the Rails process is hit when the proxy needs to determine whether the content is stale or not. This is done using various HTTP headers such as ETag, Last-Modified etc. If the content is fresh then Rails responds to the proxy with an HTTP 304 Not Modified and the proxy serves its cached content to the browser, or even better, responds with its own HTTP 304. If the content is stale then Rails serves the updated content to the proxy which caches it and then serves it to the browser If my understanding is correct, then doesn't page caching result in less hits to the Rails process? There isn't all that back and forth to determine if the content is stale, meaning better performance than reverse proxy caching. Why might you use both techniques in conjunction?

    Read the article

  • Find a name in a list if the name is spelt wrong

    - by Matt
    I've got a list of names which some code checks against to see if the person exists, and if so do some stuff.. My issue is that I want to handle the case of the name being entered incorrectly.. I.e. I have a list of names Bob Frank Tom Tim John If I type in Joohn, I want it to ask me if I meant John. If I type Tm, I get asked if I meant Tim, if I say no, it asks if i meant Tom.. Etc.. Has anyone done something like this before?

    Read the article

  • Combine query results from one table with the defaults from another

    - by pulegium
    This is a dumbed down version of the real table data, so may look bit silly. Table 1 (users): id INT username TEXT favourite_food TEXT food_pref_id INT Table 2 (food_preferences): id INT food_type TEXT The logic is as follows: Let's say I have this in my food preference table: 1, 'VEGETARIAN' and this in the users table: 1, 'John', NULL, 1 2, 'Pete', 'Curry', 1 In which case John defaults to be a vegetarian, but Pete should show up as a person who enjoys curry. Question, is there any way to combine the query into one select statement, so that it would get the default from the preferences table if the favourite_food column is NULL? I can obviously do this in application logic, but would be nice just to offload this to SQL, if possible. DB is SQLite3...

    Read the article

  • I want to query whitepages.com 4,000 times, how to save the results?

    - by John Corbin
    I have an old customer list of 4,000 businesses. I want to determine if the phone numbers associated with each listing are still working (and therefore the business is probably still open). I can put each number in whitepages.com and check them one by one... but want to automate the results. I have looked at their API and can't digest it. I can form the correct query URL, but trying things like cURL -O doesn't work. I have access to Mac tools, Unix tools, and could try various javascript stuff if anyone could point me in the right direction... would even pay. Help? Thx

    Read the article

  • ImportError and Django driving me crazy

    - by John Peebles
    OK, I have the following directory structure (it's a django project): - project -- app and within the app folder, there is a scraper.py file which needs to reference a class defined within models.py I'm trying to do the following: import urllib2 import os import sys import time import datetime import re import BeautifulSoup sys.path.append('/home/userspace/Development/') os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings' from project.app.models import ClassName and this code just isn't working. I get an error of: Traceback (most recent call last): File "scraper.py", line 14, in from project.app.models import ClassName ImportError: No module named project.app.models This code above used to work, but broke somewhere along the line and I'm extremely confused as to why I'm having problems. On SnowLeopard using python2.5.

    Read the article

  • Clang LLVM doesn't generate warnings in Xcode

    - by John Gallagher
    I want lots of lovely warnings when compiling. I've set my build configuration to be based on a build config file I have. When I switch to GCC 4.0, it generates all the required warnings. As soon as I change to the Clang LLVM compiler, all the warnings disappear. Every other setting is identical. What am I missing?

    Read the article

  • Is there an easy way to convert C# classes to PHP?

    - by John
    I am used to writing C# Windows application. However I have some free hosted PHP web space that I would like to make use of. I have a basic understanding of PHP but have never used it's object oriented capabilities. Is there an easy way to convert C# classes to PHP classes or is it just not possible to write a fully object oriented application in PHP? Update: There are no reliance on the .NET framework beyond the basics. The main aim would be to restructure the class properties, variable enums, etc. The PHP will be hosted on a Linux server.

    Read the article

  • Git to svn: Adding commit date to log messages

    - by Arnauld VM
    How should I do to have the author (or committer) name/date added to the log message when "dcommitting" to svn? For example, if the log message in Git is: This is a nice modif I'd like to have the message in svn be something like: This is a nice modif ----- Author: John Doo <[email protected] 2010-06-10 12:38:22 Committer: Nice Guy <[email protected] 2010-06-10 14:05:42 (Note that I'm mainly interested in the date, since I already mapped svn users in .svn-authors) Any simple way? Hook needed? Other suggestion? (See also: http://article.gmane.org/gmane.comp.version-control.git/148861) Thank you in advance. Yours faithfully, -- Arnauld Van Muysewinkel

    Read the article

  • How to change proxy settings while using Watin?

    - by john
    Hi, I am using Watin mostly to automate thing I do by hand. Sometimes, I need to change proxy. To do this, I have to set up IE to use a local proxy all the time (listens locally and forwards to a remote porxy), and then by hand change the settings of that program each time I need to use another proxy. This is not an elegant solution! It may work, but it is not nice. So, my question is, how do I change programmatically IE settings while using Watin? I code in VB.NET. Thank you

    Read the article

  • Renaming ICSharpCode.SharpZipLib.dll

    - by John B.
    Hi, well I am having a problem renaming the ICSharpCode.SharpZipLib.dll file to anythig else. I am trying to shorten the file name. I reference the assembly in the project, but when the program reaches the statements where I use the library. It spawns an error that it could not find the assembly or file 'ICSharpCode.SharpZipLib'. When I change the file name back to ICSharpCode.SharpZipLib.dll the application works noramally. So, is there any way to change the file name. Also, am I allowed to change it without violating the license (I am going to use it in a commercial application). Thanks.

    Read the article

  • Paypal Encrypted Website payments

    - by John Isaacks
    I am trying to integrate a PayPal Website Payments Standard Cart Upload payment type into my shopping cart. I integrated Google Checkout a while back and I did not find it overly confusing as I do paypal. I am getting info on how to encrypt it from here: https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_html_encryptedwebpayments#id08A3I0P017Q Paypal says I need to generate a private key and a public certificate using OpenSSL. I went to OpenSSL and downloaded the latest release, which is just a folder containing various files but I see no application I can use, not sure what to do here. Even if I were to get OpenSSL to generate me a private key and public cert, the next step is to download either an MS or Java command line tool to create the encrypted cart ahead of time with the cart-total, tax, etc. which sounds crazy to me, like I am supposed to manually do this prior to every order?? Obviously I do not know the items in the cart the customer is going to buy before hand so I need this to be done on the fly on my website using PHP. But I am completely lost. There has to be a way to setup dynamic secure cart uploads to paypal. Can someone please point me in the right direction?

    Read the article

  • How can I mix SVG and HTML into a page?

    - by John Duff
    I've been using the jQuery.svg plugin to do some SVG rendering and it works perfectly but I also want to have the server render some SVG into the page and I can't get that to work. How do I add some SVG like below into the page so that Firefox will render it? <svg xmlns="http://www.w3.org/2000/svg" version="1.1" preserveAspectRatio="none" viewBox="0 0 100 100"> <linearGradient id="background_gradient_black" x1="0%" y1="10" x2="0%" y2="90" gradientUnits="userSpaceOnUse"> <stop offset="0%" stop-color="#000" stop-opacity="1" /> <stop offset="45%" stop-color="#444" stop-opacity="1" /> <stop offset="55%" stop-color="#444" stop-opacity="1" /> <stop offset="100%" stop-color="#000" stop-opacity="1" /> </linearGradient> <rect x="0" y="0" width="100" height="100" fill="url(#background_gradient_black)"" /> </svg> Do I need a meta tag saying that there is SVG content in the page or define the SVG namespace somehow?

    Read the article

  • users see my SMS messages as coming from '1010100001'

    - by John Leonard
    In my application, I ask the user to enter their cell and select their provider. I append the provider's email and create the message and fire via php.mail() The problem is that no matter what the header info is, the message comes from '1010100001' on some phones (like AT&T and the iPhone). When testing on my Verizon phone, I get the proper email address as the sender. Any idea how I can send a clearer message?

    Read the article

  • asp.net Dynamic Data Site with custom own MetaData

    - by loviji
    Hello, I'm searching info about configuring own MetaData in asp.NET Dynamic Site. For example. I have a table in MS Sql Server with structure shown below: CREATE TABLE [dbo].[someTable]( [id] [int] NOT NULL, [pname] [nvarchar](20) NULL, [FullName] [nvarchar](50) NULL, [age] [int] NULL) and I there are 2 Ms Sql tables (I've created), sysTables and sysColumns. sysTables: ID sysTableName TableName TableDescription 1 | someTable |Persons |All Data about Persons in system sysColumns: ID TableName sysColumnName ColumnName ColumnDesc ColumnType MUnit 1 |someTable | sometable_pname| Name | Persona Name(ex. John)| nvarchar(20) | null 2 |someTable | sometable_Fullname| Full Name | Persona Name(ex. John Black)| nvarchar(50) | null 3 |someTable | sometable_age| age | Person age| int | null I want that, in Details/Edit/Insert/List/ListDetails pages use as MetaData sysColumns and sysTableData. Because, for ex. in DetailsPage fullName, it is not beatiful as Full Name . someIdea, is it possible? thanks

    Read the article

  • SQL 2005: Select top N, group by ID with joins

    - by Suzy Fresh
    I'm having real difficulty with a query involving 3 tables. I need to get the 3 newest users per department grouped by department names. The groups should be sorted by the users.dateadded so the department with the newest activity is first. The users can exist in multiple departments so Im using a lookup table that just contains the userID and deptID. My tables are as follows. Department - depID|name Users - userID|name|dateadded DepUsers - depID|userID The output I need would be Receiving John Doe - 4/23/2010 Bill Smith - 4/22/2010 Accounting Steve Jones - 4/22/2010 John Doe - 4/21/2010 Auditing Steve Jones - 4/21/2010 Bill Smith - 4/21/2010

    Read the article

  • Looking for marg_setValue in UIKit

    - by John Smith
    I am trying to compile a library originally written for Cocoa. Things are good until it looks for the function marg_setValue(). It says it can't find it. I have googled and found it is defined in How can I use this file in cocoa-touch? Or does cocoa-touch not support runtime.

    Read the article

  • Future proof Primary Key design in postgresql

    - by John P
    I've always used either auto_generated or Sequences in the past for my primary keys. With the current system I'm working on there is the possibility of having to eventually partition the data which has never been a requirement in the past. Knowing that I may need to partition the data in the future, is there any advantage of using UUIDs for PKs instead of the database's built-in sequences? If so, is there a design pattern that can safely generate relatively short keys (say 6 characters instead of the usual long one e6709870-5cbc-11df-a08a-0800200c9a66)? 36^6 keys per-table is more than sufficient for any table I could imagine. I will be using the keys in URLs so conciseness is important.

    Read the article

  • Is key 'chord' functionality provided by Win32/.net?

    - by John
    Several MS apps support the concept of chords, like "CTRL+X,Y" which means "holding down CTRL, press X, then Y". Is this a bespoke thing they (and other companies) implement, or is it built into any APIs? It would be nice to be able to set up event handlers or accelerators based on chords rather than write code to do it.

    Read the article

  • Sharing Jinja2 templates between Pylons and Django applications

    - by Joe Holloway
    I'm writing a couple of Jinja2 templates that basically implement some common grid layouts. I'd like to be able to share this 'library' of templates between a Pylons app and Django app. I've hit a minor stumbling block in that Django's template context is accessible from the "top-level" of the template, whereas Pylons wraps your context inside the thread local c (or tmpl_context) variable. Here are some analogous examples that demonstrate this. Django from django.shortcuts import render_to_response ctx = {} ctx['name'] = 'John' return render_to_response('hello.html', ctx) hello.html: Hello {{ name }} Pylons from pylons import tmpl_context as c from myapp.lib.base import render c.name = 'John' return render('hello.html') hello.html: Hello {{ c.name }} What I'm trying to do is make it so that hello.html is the same across both frameworks. One way I see to do it is by wrapping the Django render_to_response and do something like this: ctx['c'] = ctx But that just doesn't feel right. Anybody see other alternatives to this? Thanks

    Read the article

  • problem with fork()

    - by john
    I'm writing a shell which forks, with the parent reading the input and the child process parsing and executing it with execvp. pseudocode of main method: do{ pid = fork(); print pid; if (p<0) { error; exit; } if (p>0) { wait for child to finish; read input; } else { call function to parse input; exit; } }while condition return; what happens is that i never seem to enter the child process (pid printed is always positive, i never enter the else). however, if i don't call the parse function and just have else exit, i do correctly enter parent and child alternatingly. full code: int main(int argc, char *argv[]){ char input[500]; pid_t p; int firstrun = 1; do{ p = fork(); printf("PID: %d", p); if (p < 0) {printf("Error forking"); exit(-1);} if (p > 0){ wait(NULL); firstrun = 0; printf("\n> "); bzero(input, 500); fflush(stdout); read(0, input, 499); input[strlen(input)-1] = '\0'; } else exit(0); else { if (parse(input) != 0 && firstrun != 1) { printf("Error parsing"); exit(-1); } exit(0); } }while(strcmp(input, "exit") != 0); return 0; }

    Read the article

  • WPF: Binding with title and subitems

    - by John
    I am having some issues trying to learn WPF. What I am trying to do is to bind a class that has a string and an array of strings. I would like to bind the string as the title and array as the contents of an expander, but I am having difficulties. What am I missing to make this work? Any help would be appreciated, TIA. This is the code I have thus far: XAML <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <ListBox Grid.Column="0" Name="lbTopics" ItemsSource="{Binding}"> <ListBox.ItemTemplate> <DataTemplate> <Expander Header="{Binding Path=TopicName}" > <Expander.Content> <ListBox> <ListBox.ItemTemplate> <DataTemplate> <Label Content="{Binding Path=(ItemName)}" Width="120px" Height="32px" Foreground="Black" /> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Expander.Content> </Expander> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid> C# namespace WpfApplication1 { public partial class Window1 : Window { public Window1() { InitializeComponent(); lbTopics.DataContext = new Topics(); } } public class Topics : ObservableCollection<Topic> { public Topics() { for (int i = 0; i < 10; i++) { this.Add(new Topic(i)); } } } public class Topic { public Topic(int i) { TopicName = "Topic " + i; ItemName = new List<string>(10); for (int j = 0; j < 10; j++) { ItemName.Add(i + " - Item " + j); } } public string TopicName { get; set; } public List<string> ItemName { get; set; } } }

    Read the article

  • JTree - Issues with adding of nodes

    - by John
    Hi. Im developing a system that stores courses that participants can apply to. I'm presenting the enrollments in a JTree in the courseadministratorGUI. My problem is that, for every enrollment it's adding a new courseNode. Been trying for many hours, and hope I can now get some advice that will point me in the correct direction. Thank you. private void updateJTree() { for (Category cat : catcontrol.getAllCategoriesList()) { category = new DefaultMutableTreeNode(cat); for (Course c : ccontrol.getAllCourses()) { if (cat.getIdCategory() == c.getIdCategory()) { for (Enrollment e : econtrol.getAllEnrollments()) { if (e.getIdCourse() == c.getIdCourse()) { if (cat.getIdCategory() == c.getIdCategory() && e.getCourse().equals(c)) { root.add(category); } if (c.getIdCourse() == e.getIdCourse()) { course = new DefaultMutableTreeNode(c); category.add(course); enrollment = new DefaultMutableTreeNode(e.getParticipant().getFirstNames()); course.add(enrollment); } } } } } } jTree1.setModel(new DefaultTreeModel(root)); jTree1.addTreeSelectionListener(this); jTree1.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); }

    Read the article

  • Why does Perl's DBI complain about "failed: ERROR OCIEnvNlsCreate" when I try to connect to Oracle 1

    - by John
    I am getting the following error connecting to an Oracle 11g database using a simple Perl script: failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc. at The script is as follows: #!/usr/local/bin/perl use strict; use DBI; if ($#ARGV < 3) { print "Usage: perl testDbAccess.pl dataBaseUser dataBasePassword SID dataBasePort\n"; exit 0; } my ($user, $pwd, $sid, $port) = @ARGV; my $host = `hostname`; my $dbh; my $sth; my $dbname = "dbi:Oracle:HOST=$host;SID=$sid;PORT=$port"; openDbConnection(); closeDbConnection(); sub openDbConnection() { $dbh = DBI->connect ($dbname, $user ,$pwd , { RaiseError => 1}) || die "Database connection not made: $DBI::errstr"; } sub closeDbConnection() { #$sth->finish(); $dbh->disconnect(); } Anyone seen this problem before?

    Read the article

  • Linq to NHibernate using Queryable.Where predicate

    - by Groo
    I am querying an SQLite database using LINQ to NHibernate. Person is an entity containing an Id and a Name: public class Person { public Guid Id { get; private set; } public string Name { get; private set; } } Let's say my db table contains a single person whose name is "John". This test works as expected: var query = from item in session.Linq<Person>() where (item.Name == "Mike") select item; // no such entity should exist Assert.IsFalse(query.Any()); but this one fails: var query = from item in session.Linq<Person>() select item; query.Where(item => item.Name == "Mike"); // following line actually returns the // "John" entry Assert.IsFalse(query.Any()); What am I missing?

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >