Search Results

Search found 3380 results on 136 pages for 'tim b james'.

Page 91/136 | < Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >

  • Reading value of cookie using curl in php

    - by james
    Hello, Im using Firefox 3.5.9. When i visit a url , it sets a cookie on my computer.I can see this cookie in Firefox by going to Tools-Options-Privacy,then clicking on 'Remove Individual Cookies'. There is a folder called xyz,which contains a cookie named JSessionId and which has some Content value . If i use curl in my php code to navigate to that website,is there a way i can read the Content value of that cookie programmatically ? . Some sample code would be really appreciated. Thank You

    Read the article

  • why is css not being applied to this jquery anchor button?

    - by Tim
    I must be missing something very basic in the CSS. My jQuery anchor button is functional, but it's rendering as a simple underlined label, not asa rounded-corner UI button. I would be grateful if someone could point out the error in this simple example. Thanks !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML LANG="en-US"> <HEAD> <TITLE>button test</TITLE> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Expires" content="Sat, 22 May 2010 00:00:11 GMT"> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <SCRIPT type="text/javascript"> $(document).ready( function() { $('a','.test').click(function(){showIntro();return false;}); }); function showIntro() { document.location.href="intro.htm"; } </script> <body> <div class='test'><a href="#">Button</a></div> </body> </html>

    Read the article

  • Nested Select in Rails

    - by James
    I am working on a Rails application which uses categories for items. My category model is self-joined so that categories can be nested: class Category < ActiveRecord::Base has_many :items # Self Join (categories can have subcategories) has_many :subcategories, :class_name => "Category", :foreign_key => "parent_id" belongs_to :parent, :class_name => "Category" ... end I have a form which allows a user to create an item which currently lists all categories in a select, but they are all listed together: <%= f.label :category_id %> <%= select :item, :category_id, Category.all.collect {|c| [ c.title, c.id ]} %> So the select looks something like this: Category1 Category2 Category3BelongsTo2 Category4BelongsTo1 But what I want is: Category1 - Category4BelongsTo1 Category2 - Category3BelongsTo2 Is there a helper for this (which would be awesome!)? If not, how could I accomplish this? Thanks!

    Read the article

  • Scrum stories and behind the scenes features

    - by James P.
    As I understand things, the Scrum backlog is composed of a series of Stories that represent something for the end user and this is further decomposed into Features. If this is the case, where does all the behind the scenes features go that aren't really linked to a story but are still useful? For example, say I'm making an application that catalogs the contents of a hard drive. A story wouldn't require it but having an md5 hash on each file would be a nice feature.

    Read the article

  • A C# Refactoring Question...

    - by james lewis
    I came accross the following code today and I didn't like it. It's fairly obvious what it's doing but I'll add a little explanation here anyway: Basically it reads all the settings for an app from the DB and the iterates through all of them looking for the DB Version and the APP Version then sets some variables to the values in the DB (to be used later). I looked at it and thought it was a bit ugly - I don't like switch statements and I hate things that carry on iterating through a list once they're finished. So I decided to refactor it. My question to all of you is how would you refactor it? Or do you think it even needs refactoring at all? Here's the code: using (var sqlConnection = new SqlConnection(Lfepa.Itrs.Framework.Configuration.ConnectionString)) { sqlConnection.Open(); var dataTable = new DataTable("Settings"); var selectCommand = new SqlCommand(Lfepa.Itrs.Data.Database.Commands.dbo.SettingsSelAll, sqlConnection); var reader = selectCommand.ExecuteReader(); while (reader.Read()) { switch (reader[SettingKeyColumnName].ToString().ToUpper()) { case DatabaseVersionKey: DatabaseVersion = new Version(reader[SettingValueColumneName].ToString()); break; case ApplicationVersionKey: ApplicationVersion = new Version(reader[SettingValueColumneName].ToString()); break; default: break; } } if (DatabaseVersion == null) throw new ApplicationException("Colud not load Database Version Setting from the database."); if (ApplicationVersion == null) throw new ApplicationException("Colud not load Application Version Setting from the database."); }

    Read the article

  • NSNotification postNotificationName in AppDelegate but NSNotificationCenter in ViewController?

    - by James Testa
    I can't get the selector method, receiveChatText, in the NSNotificationCenter to execute and I am wondering if the problem is because the NSNotification postNotificationName is in AppDelegate.m but NSNotificationCenter is in ViewController.m? I.E. can the postNotificationName know that the NSNotificationCenter is in another viewController file or is that something I need to tell it? In a viewController.m I have -(id)init { self = [super init]; if(self){ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveChatText:) name:ChatMessageReceived object:nil]; return self; } - (void)receiveChatText:(NSNotification *)note { NSLog(@"received chat text"); } and in the top level AppDelegate.m file I have the following: -(void) didReceiveMessage { [[NSNotificationCenter defaultCenter] postNotificationName:ChatMessageReceived object:nil userInfo:nil]; } Any ideas what could stop receiveChatText from being executed when didReceiveMessage is called?

    Read the article

  • C++ interface inheritance problem

    - by james t
    Hey, i'm trying to create a c++ stomp client, my client constructor is : Client(std::string &server, short port, std::string &login, std::string &pass, Listener &listener); it gets a listener object which when Listener is the following interface : class Listener { virtual void message(StmpMessage message) =0; }; now i attempt to instantiate a client in a test class : class test : public virtual Listener { public: void message(StmpMessage message) { message.prettyPrint(); } int main(int argc, char* argv[]) { Client client("127.0.0.1", 61613, *this); return 0; } }; i'm sending this to the client because this is a listener object, i get the following error : /Users/mzruya/Documents/STOMPCPP/main.cpp:18: error: no matching function for call to 'Client::Client(const char [10], int, test&)' /Users/mzruya/Documents/STOMPCPP/Client.h:43: note: candidates are: Client::Client(std::string&, short int, std::string&, std::string&, Listener&) /Users/mzruya/Documents/STOMPCPP/Client.h:37: note: Client::Client(const Client&)

    Read the article

  • MATLAB image corner coordinates & referncing to cell arrays

    - by James
    Hi, I am having some problems comparing the elements in different cell arrays. The context of this problem is that I am using the bwboundaries function in MATLAB to trace the outline of an image. The image is of a structural cross section and I am trying to find if there is continuity throughout the section (i.e. there is only one outline produced by the bwboundaries command). Having done this and found where the is more than one section traced (i.e. it is not continuous), I have used the cornermetric command to find the corners of each section. The code I have is: %% Define the structural section as a binary matrix (Image is an I-section with the web broken) bw(20:40,50:150) = 1; bw(160:180,50:150) = 1; bw(20:60,95:105) = 1; bw(140:180,95:105) = 1; Trace = bw; [B] = bwboundaries(Trace,'noholes'); %Traces the outer boundary of each section L = length(B); % Finds number of boundaries if L > 1 disp('Multiple boundaries') % States whether more than one boundary found end %% Obtain perimeter coordinates for k=1:length(B) %For all the boundaries perim = B{k}; %Obtains perimeter coordinates (as a 2D matrix) from the cell array end %% Find the corner positions C = cornermetric(bw); Areacorners = find(C == max(max(C))) % Finds the corner coordinates of each boundary [rowindexcorners,colindexcorners] = ind2sub(size(Newgeometry),Areacorners) % Convert corner coordinate indexes into subcripts, to give x & y coordinates (i.e. the same format as B gives) %% Put these corner coordinates into a cell array Cornerscellarray = cell(length(rowindexcorners),1); % Initialises cell array of zeros for i =1:numel(rowindexcorners) Cornerscellarray(i) = {[rowindexcorners(i) colindexcorners(i)]}; %Assigns the corner indicies into the cell array %This is done so the cell arrays can be compared end for k=1:length(B) %For all the boundaries found perim = B{k}; %Obtains coordinates for each perimeter Z = perim; % Initialise the matrix containing the perimeter corners Sectioncellmatrix = cell(length(rowindexcorners),1); for i =1:length(perim) Sectioncellmatrix(i) = {[perim(i,1) perim(i,2)]}; end for i = 1:length(perim) if Sectioncellmatrix(i) ~= Cornerscellarray Sectioncellmatrix(i) = []; %Gets rid of the elements that are not corners, but keeps them associated with the relevent section end end end This creates an error in the last for loop. Is there a way I can check whether each cell of the array (containing an x and y coordinate) is equal to any pair of coordinates in cornercellarray? I know it is possible with matrices to compare whether a certain element matches any of the elements in another matrix. I want to be able to do the same here, but for the pair of coordinates within the cell array. The reason I don't just use the cornercellarray cell array itself, is because this lists all the corner coordinates and does not associate them with a specific traced boundary.

    Read the article

  • WCF port routing

    - by C james
    I have NAT which received incoming WCF requests and changes port number before it hands off to the host however, this is causing problem is there anyway to turn this off or fix? ex) wcf.service.com:80 - NAT - wcf.service.2522 !error Thank you.

    Read the article

  • XML Parsing in Groovy strips attribute new lines

    - by Bill James
    I'm writing code where I retrieve XML from a web api, then parse that XML using Groovy. Unfortunately, it seems that both XmlParser and XmlSlurper for Groovy strip newline characters from the attributes of nodes when .text() is called. How can I get at the text of the attribute including the newlines? Sample code: def xmltest = ''' <snippet> <preSnippet att1="testatt1" code="This is line 1 This is line 2 This is line 3" > <lines count="10" /> </preSnippet> </snippet>''' def parsed = new XmlParser().parseText( xmltest ) println "Parsed" parsed.preSnippet.each { pre -> println pre.attribute('code'); } def slurped = new XmlSlurper().parseText( xmltest ) println "Slurped" slurped.children().each { preSnip -> println [email protected]() } the output of which is: Parsed This is line 1 This is line 2 This is line 3 Slurped This is line 1 This is line 2 This is line 3

    Read the article

  • How to give a no-Administrator user rights to manage IIS?

    - by James Weng
    The organization policy does not allow normal users be assigned to Administrators group of some Windows Server. But some of them need rights to manage the IIS service of these server via RDP. What kind of permission should I give to these users to let them could manage IIS without add them to Administrators group? All these servers are not in Domain.

    Read the article

  • How can I reference a drawable class in Android XML

    - by James Veenstra
    I've created a class that extends drawable that I'd like to reference inside a resource xml. I happen to need it in a selector, like so: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:state_pressed="false" android:drawable="com.sample.android.contacts.TopBarCollapsed" /> <item android:state_window_focused="true" android:state_pressed="true" android:drawable="@drawable/top_switcher_collapsed_selected" /> <item android:state_focused="true" android:drawable="@drawable/top_switcher_collapsed_focused" /> com.sample.android.contacts.TopBarCollapsed is the class that extends drawable.

    Read the article

  • Returning XML natively in a .NET (C#) webservice?

    - by James McMahon
    I realize that SOAP webservices in .NET return XML representation of whatever object the web method returns, but if I want to return data formatting in XML what is the best object to store it in? I am using the answer to this question to write my XML, here is the code: XmlWriter writer = XmlWriter.Create(pathToOutput); writer.WriteStartDocument(); writer.WriteStartElement("People"); writer.WriteStartElement("Person"); writer.WriteAttributeString("Name", "Nick"); writer.WriteEndElement(); writer.WriteStartElement("Person"); writer.WriteStartAttribute("Name"); writer.WriteValue("Nick"); writer.WriteEndAttribute(); writer.WriteEndElement(); writer.WriteEndElement(); writer.WriteEndDocument(); writer.Flush(); Now I can return this output as a String to my calling webmethod, but it shows up as <string> XML HERE </string>, is there anyway to just return the full xml? Please in your answer, give an example of how to use said object with either XmlWriter or another internal object (if you consider XmlWriter to be a poor choice). The System.Xml package (namespace) has many objects, but I haven't been able to uncover decent documentation on how to use the objects together, or what to use for what situations.

    Read the article

  • How can I perform a reverse string search in Excel without using VBA?

    - by e.James
    I have an Excel spreadsheet containing a list of strings. Each string is made up of several words, but the number of words in each string is different. Using built in Excel functions (no VBA), is there a way to isolate the last word in each string? Examples: Are you classified as human? - human? Negative, I am a meat popsicle - popsicle Aziz! Light! - Light!

    Read the article

  • How are attached properties useful in LINQ?

    - by James Cadd
    I got this question during an interview in the past and never really dug into in, but I've put some thought into it lately and I can't come up with a good answer. When I think of attached properties my mind goes straight to UI related concepts - what benefits could be had in using attached properties with LINQ? I'm starting to think the answer is "they're not" unless I find out otherwise!

    Read the article

  • Live streaming using Flash

    - by James
    Hi, I was working on an application that streams live video using Flash client and Wowza media server. As of now, I use an independent desktop based encoder(Flash Media Live Encoder) to publish my live stream. I wanted to know if it is possible to do the encoding part in the browser? My application would be a used by many to publish their streams so I cannot ask everyone to use FMLE to publish. I was wondering how do the other web based video chat applications do the encoding part over the web. Please help. Thanks

    Read the article

  • Creating an additional related model with Devise

    - by Tim Sullivan
    I've started to implement a new project using Devise, which is pretty fantastic for handling users. However, when a user signs up, they're not just creating a User model, but also need to create a related Account model that represents the company. Additional users will also belongs_to this Account model. I can't seem to find a hook for this in Devise, though it seems like a pretty common pattern. What's the best practice for this?

    Read the article

  • Storing date/times as UTC in database

    - by James
    I am storing date/times in the database as UTC and computing them inside my application back to local time based on the specific timezone. Say for example I have the following date/time: 01/04/2010 00:00 Say it is for a country e.g. UK which observes DST (Daylight Savings Time) and at this particular time we are in daylight savings. When I convert this date to UTC and store it in the database it is actually stored as: 31/03/2010 23:00 As the date would be adjusted -1 hours for DST. This works fine when your observing DST at time of submission. However, what happens when the clock is adjusted back? When I pull that date from the database and convert it to local time that particular datetime would be seen as 31/03/2009 23:00 when in reality it was processed as 01/04/2010 00:00. Correct me if I am wrong but isn't this a bit of a flaw when storing times as UTC? Example of Timezone conversion Basically what I am doing is storing the date/times of when information is being submitted to my system in order to allow users to do a range report. Here is how I am storing the date/times: public DateTime LocalDateTime(string timeZoneId) { var tzi = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId); return TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, tzi).ToLocalTime(); } Storing as UTC: var localDateTime = LocalDateTime("AUS Eastern Standard Time"); WriteToDB(localDateTime.ToUniversalTime());

    Read the article

  • Determine IP# of domain from client browser

    - by Tim W.
    Greetings all, I would very much like to determine the IP# of a domain from client script. It's for use in a testing application to determine whether or not a certain domain is set to a QA address as opposed to the address live on the . The testing machine will have it's host file set to resolve a domain to the QA address. Pinging from the server won't help since the server is getting the public DNS address. Is this possible in JavaScript? Maybe a Flash could do the trick?

    Read the article

  • Retrieving data from MySQL in one SQL statement

    - by james.ingham
    Hi all, If I'm getting my data from Mysql like so: $result = $dbConnector->Query("SELECT * FROM branches, businesses WHERE branches.BusinessId = businesses.Id ORDER BY businesses.Name"); $resultNum = $dbConnector->GetNumRows($result); if($resultNum > 0) { for($i=0; $i < $resultNum; $i++) { $row = $dbConnector->FetchArray($result); // $row['businesses.Name']; // $row['branches.Name']; echo $row['Name']; } } Does anyone know how to print the field Name in businesses and how to print the name from branches? My only other alternative is to rename the fields or to call Mysql with two seperate queries. Thanks in advance

    Read the article

  • VB.NET 2008, Windows 7 and saving files

    - by James Brauman
    Hello, We have to learn VB.NET for the semester, my experience lies mainly with C# - not that this should make a difference to this particular problem. I've used just about the most simple way to save a file using the .NET framework, but Windows 7 won't let me save the file anywhere (or anywhere that I have found yet). Here is the code I am using to save a text file. Dim dialog As FolderBrowserDialog = New FolderBrowserDialog() Dim saveLocation As String = dialog.SelectedPath ... Build up output string ... Try ' Try to write the file. My.Computer.FileSystem.WriteAllText(saveLocation, output, False) Catch PermissionEx As UnauthorizedAccessException ' We do not have permissions to save in this folder. MessageBox.Show("Do not have permissions to save file to the folder specified. Please try saving somewhere different.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Catch Ex As Exception ' Catch any exceptions that occured when trying to write the file. MessageBox.Show("Writing the file was not successful.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try The problem is that this using this code throws an UnauthorizedAccessException no matter where I try to save the file. I've tried running the .exe file as administrator, and the IDE as administrator. Is this just Windows 7 being overprotective? And if so, what can I do to solve this problem? The requirements state that I be able to save a file! Thanks.

    Read the article

< Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >