Search Results

Search found 4677 results on 188 pages for 'john clayton'.

Page 12/188 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to differenciate the data when doing a UNION on 2 SELECTS ?

    - by wiooz
    If I have the following two tables : Employes Bob Gina John Customers Sandra Pete Mom I will do a UNION for having : Everyone Bob Gina John Sandra Pete Mom The question is : In my result, how can I creat a dumn column of differenciate the data from my tables ? Everyone Bob (Emp) Gina (Emp) John (Emp Sandra (Cus) Pete (Cus) Mom (Cus) I want to know from with table the entry is from withouth adding a new column in the database... SELECT Employes.name FROM Employes UNION SELECT Customers.name FROM Customers;

    Read the article

  • ruby eval('\1') of gsub possible?

    - by Horace Ho
    I try to replace a sub-str by the content of a valiable where its name matches the sub-str by: >> str = "Hello **name**" => "Hello **name**" >> name = "John" => "John" str.gsub(/\*\*(.*)\*\*/, eval('\1')) # => error! the last line in the code above is a syntax error. and: >> str.gsub(/\*\*(.*)\*\*/, '\1') => "Hello name" >> str.gsub(/\*\*(.*)\*\*/, eval("name")) => "Hello John" what I want is the result of: str.gsub(/\*\*(.*)\*\*/, eval("name")) # => "Hello John" any help will be appreciated. thx!

    Read the article

  • Perl script matching a certain patern

    - by kivien
    Assuming the file.txt is as follows:- John Depp is a great guy. He is very inteligent. He can do anything. Come and meet John Depp. The perl code is as follows:- open ( FILE, "file.txt" ) || die "can't open file!"; @lines = <FILE>; close (FILE); $string = "John Depp"; foreach $line (@lines) { if ($line =~ $string) { print "$line"; } } The output is going to be first and fourth line. I want to make it working for the file having random line breaks rather than one English sentence per line. I mean it should also work for the following:- John Depp is a great guy. He is very inteligent. He can do anything. Come and meet John Depp. The output should be first and fourth sentence. Any ideas please?

    Read the article

  • OS X can't copy files from Windows Home Server...over wifi.

    - by John Clayton
    I'm a brand spanking new user of OS X, coming from a lifetime of Windows use. I've been setting up my new Macbook Pro and have run into a very unusual problem. Over wifi, I am unable to copy files to or from my Windows Home Server. The problem seems to exist only over wifi, and only to WHS. Here are the details of my setup: 2010 Macbook Pro (Core i7), OS X 10.6.3 Windows Home Server PP3 (virtualized in XenServer 5.5) Windows 7 Ultimate x64 desktop Windows 7 Ultimate x64 in Boot Camp D-Link DIR-655 wireless N router Here is what I've done to narrow down the problem: Files copy fine from WHS to OS X when using gigabit ethernet Files copy fine from desktop to OS X when using gigabit ethernet Files fail to copy from WHS to OS X when using wifi (error -51) Files copy fine from desktop to OS X when using wifi Files copy fine from WHS to Boot Camp when using wifi Files copy fine from desktop to Boot Camp when using wifi From what I can tell, it seems to be some sort of issue between OS X and WHS, but I can't for the life of me see what would be different between shares on WHS and my desktop. They are both connected using smb://ADDRESS (I've tried both by IP and name). I can browse the shares on the WHS, but copying to OS X fails. I originally found the issue while installing VS2010 off an ISO from WHS, mounted to a Windows 7 VM using VMware Fusion. During the installation the VM was unusable - even the clock got behind the host be about 8 minutes. Once I plugged in the ethernet and disabled the wifi things picked up and finished quickly. The Fusion 3.1 RC is the only I think of that I installed that may have messed with the wifi driver. I've also tried resetting the wifi router, and have changed it from being G & N to N-only. Under Boot Camp I get similar speeds as my wife's N laptop. Any ideas? Thanks!

    Read the article

  • On Windows XP, Start > Run "My Documents" sometimes doesn't work

    - by Clayton Hughes
    On all of my home computers, I can enter "my documents" into the Start Run prompt and the My Documents folder of the current profile will open up. What's more, I can continue typing subfolders, files, etc. and auto-complete works and it's smart and enjoyable. I can't check at the moment, but I'm almost positive entries like "My Pictures" and "My Music" also go to their correct folders. On my work computers, if I enter "my documents" into the Start Run prompt, I get the following error: "Windows cannot find 'my'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start Button, and then click Search." I can sort of circumvent this by creating a shortcut in my PATH named 'my' that points to My Documents folder, but this doesn't solve the auto-complete option (and it's otherwise imperfect, of course, because "my pictures" or "my music" all direct to the same place. A google search doesn't provide much help on this, although it does identify a poster in 2007 with this same question at another board: http://www.msfn.org/board/lofiversion/index.php/t124813.html (Login required, but Google cache available here: http://preview.tinyurl.com/ygxhwwl) Is this just a limitation of the networks belonging to a domain, or is there some way I can get this functionality back? My documents folder does live in the standard place (C:\Documents and Settings{username}\My Documents), and not on a network drive or anything. It's probably worth adding that the computers are part of some freakish Novell domain thing, too. I'm not in IT here so I'm not too up on the details. Thanks for any help/suggestions!

    Read the article

  • Confused with ECMAScript Language Specification Function Calls section

    - by Ding
    Hi, I am reading ECMAScript Language Specification Function Calls section Can someone rephrase or detailed explains the following sentense for me? The production CallExpression : MemberExpression Arguments is evaluated as follows: Evaluate MemberExpression. let's take this code as an example. var john = { name: 'John', greet: function(person) { alert("Hi " + person + ", my name is " + this.name); } }; john.greet("Mark"); Take above code as an example, what does production CallExpression mean? what is MemberExpression in this case, john.greet? Thanks!

    Read the article

  • How can I print lines that match a pattern in Perl?

    - by kivien
    Assuming the file.txt having just one sentence per line as follows:- John Depp is a great guy. He is very inteligent. He can do anything. Come and meet John Depp. The perl code is as follows:- open ( FILE, "file.txt" ) || die "can't open file!"; @lines = <FILE>; close (FILE); $string = "John Depp"; foreach $line (@lines) { if ($line =~ $string) { print "$line"; } } The output is going to be first and fourth line. I want to make it working for the file having random line breaks rather than one English sentence per line. I mean it should also work for the following:- John Depp is a great guy. He is very inteligent. He can do anything. Come and meet John Depp. The output should be first and fourth sentence. Any ideas please?

    Read the article

  • Class Problem (c++ and prolog)

    - by Joshua Green
    I am using the C++ interface to Prolog (the classes and methods of SWI-cpp.h). For working out a simple backtracking that john likes mary and emma and sara: likes(john, mary). likes(john, emma). likes(john, ashley). I can just do: { PlFrame fr; PlTermv av(2); av[0] = PlCompound("john"); PlQuery q("likes", av); while (q.next_solution()) { cout << (char*)av[1] << endl; } } This works in a separate code, so the syntax is correct. But I am also trying to get this simple backtracking to work within a class: class UserTaskProlog { public: UserTaskProlog(ArRobot* r); ~UserTaskProlog(); protected: int cycles; char* argv[1]; ArRobot* robot; void logTask(); }; This class works fine, with my cycles variable incrementing every robot cycle. However, when I run my main code, I get an Unhandled Exception error message: UserTaskProlog::UserTaskProlog(ArRobot* r) : robotTaskFunc(this, &UserTaskProlog::logTask) { cycles = 0; PlEngine e(argv[0]); PlCall("consult('myFile.pl')"); robot->addSensorInterpTask("UserTaskProlog", 50, &robotTaskFunc); } UserTaskProlog::~UserTaskProlog() { robot->remSensorInterpTask(&robotTaskFunc); // Do I need a destructor here for pl? } void UserTaskProlog::logTask() { cycles++; cout << cycles; { PlFrame fr; PlTermv av(2); av[0] = PlCompound("john"); PlQuery q("likes", av); while (q.next_solution()) { cout << (char*)av[1] << endl; } } } I have my opening and closing brackets for PlFrame. I have my frame, my query, etc... The exact same code that backtracks and prints out mary and emma and sara. What am I missing here that I get an error message? Here is what I think the code should do: I expect mary and emma and sara to be printed out once, every time cycles increments. However, it opens SWI-cpp.h file automatically and points to class PlFrame. What is it trying to tell me? I don't see anything wrong with my PlFrame class declaration. Thanks,

    Read the article

  • Split a line from a para in java

    - by John
    Hi... I am having problem splitting a para into line.... i need to first read a file then split in into lines if i get a . or ! or ? I also need to remove any extra white space... This is wad i've written so far.... try { Scanner line = new Scanner(mFile); mLine = line.nextLine(); String Matrix[]=mLine.split("\\."); for (int i = 0; i < Matrix.length; ++i) { System.out.println(Matrix[i]); } Input: Hi. My name is John. Who are you ? Output: Hi My name is John Who are you

    Read the article

  • Excel code question

    - by karatekid
    I have 2 different excel files(all people and special people) that i want to kick special people from all people. Cant find a way.. if you don't understand check my example: all people special people ---------- -------------- 1-john 1-john 2-jim 2-marry 3-mariah 4-russel 5-marry I want: all people special people ---------- -------------- 1-jim 1-john 2-mariah 2-marry 3-russel

    Read the article

  • Is it possible to use ContainsTable to get results for more than one column?

    - by LockeCJ
    Consider the following table: People FirstName nvarchar(50) LastName nvarchar(50) Let's assume for the moment that this table has a full-text index on it for both columns. Let's suppose that I wanted to find all of the people named "John Smith" in this table. The following query seems like a perfectly rational way to accomplish this: SELECT * from People p INNER JOIN CONTAINSTABLE(People,*,'"John*" AND "Smith*"') Unfortunately, this will return no results, assuming that there is no record in the People table that contains both "John" and "Smith" in either the FirstName or LastName columns. It will not match a record with "John" in the FirstName column, and "Smith" in the LastName column, or vice-versa. My question is this: How does one accomplish what I'm trying to do above? Please consider that the example above is simplified. The real table I'm working with has ten columns and the input I'm receiving is a single string which is split up based on standard word breakers (space, dash, etc.)

    Read the article

  • Graph databases and Php

    - by stagas
    I want to use a graph database using php. Can you point out some resources on where to get started? Is there any example code / tutorial out there? Or are there any other methods of storing data that relate to each other in totally random/abstract situations? Very abstract example of the relations needed: John relates to Mary, both relate to School, John is Tall, Mary is Short, John has Blue Eyes, Mary has Green Eyes, query I want is which people are related to 'Short people that have Green Eyes and go to School' - answer John It is possible in MySQL but it would require a fixed set of attributes/columns for each item and a complex non-flexible query, instead I need every attribute to be an item by itself and instead of 'belonging' to something, to be 'related' to something.

    Read the article

  • Why should I prepend my custom attributes with "data-"?

    - by Horace Loeb
    So any custom data attribute that I use should start with "data-": <li class="user" data-name="John Resig" data-city="Boston" data-lang="js" data-food="Bacon"> <b>John says:</b> <span>Hello, how are you?</span> </li> Will anything bad happen if I just ignore this? I.e.: <li class="user" name="John Resig" city="Boston" lang="js" food="Bacon"> <b>John says:</b> <span>Hello, how are you?</span> </li> I guess one bad thing is that my custom attributes could conflict with HTML attributes with special meanings (e.g., name), but aside from this, is there a problem with just writing "example_text" instead of "data-example_text"? (It won't validate, but who cares?)

    Read the article

  • scala integer weirdness

    - by williamstw
    Suppose you inadvertently use Integer instead of Int, as in this code: import scala.collection.mutable.Map val contributors = Map[String,Integer]() val count = contributors.getOrElseUpdate("john",0) contributors.put("john",count+1) println(contributors) Compiler output: (fragment of test.scala):7: error: type mismatch; found : Int(1) required: String contributors.put("john",count+1) ^ Why "required: String"?

    Read the article

  • Is there a local client like Gmail?

    - by Clayton Hughes
    I'd love to use something with the Gmail interface for my work (Exchange) e-mails, and I don't exactly carry enough weight to convince the entire company to switch to Google Apps. With that in mind, ss there a local, not-in-the-cloud web client that supports IMAP or POP3 and has the look and feel of Gmail's web interface? (that works on Windows XP).

    Read the article

  • Filter entities that match all pairs

    - by Jon
    I have an entity (let's say Person) with a set of arbitrary attributes with a known subset of values. I need to search for all of these entities that match all my filter conditions. For example, my table structures look like this: Person: id | name 1 | John Doe 2 | Jane Roe 3 | John Smith Attribute: id | attr_name 1 | Sex 2 | Eye Color ValidValue: id | attr_id | value_name 1 | 1 | Male 2 | 1 | Female 3 | 2 | Blue 4 | 2 | Green 5 | 2 | Brown PersonAttributes id | person_id | attr_id | value_id 1 | 1 | 1 | 1 2 | 1 | 2 | 3 3 | 2 | 1 | 2 4 | 2 | 2 | 4 5 | 3 | 1 | 1 6 | 3 | 2 | 4 In JPA, I have entities built for all of these tables. What I'd like to do is perform a search for all entities matching a given set of attribute-value pairs. For instance, I'd like to be able to find all males (John Doe and John Smith), all people with green eyes (Jane Roe or John Smith), or all females with green eyes (Jane Roe). I see that I can already take advantage of the fact that I only really need to match on value_id, since that's already unique and tied to the attr_id. But where can I go from there?

    Read the article

  • How to check for mutual existence of Fields in same table in Two columns

    - by ranabra
    I tried using "Exist" and "IN". Not only did I not succeed, it didn't seem as an efficient solution. Here is a simplified example: TblMyTable WorkerUserName  -  WorkerDegree  -  ManagerUserName  -  ManagerDegree I need a query where there is a mutual connection / existence. What I mean is only where the worker, ex. "John" has a manager named "Mary", and where Mary the manager has a worker named "John". John the worker can have several managers and Mary the manager can have several workers. So the result will be (the order doesn't matter) ideally in one line: John - BSc  --  Mary - M.A. or Mary - M.A.  --  John - BSc The punchline is it's only one table. it is not really managers and workers, this is just a simplification of the situation. In the real situation both are equal, in a Table of names of users working with other users. Database is SQL 2005. Many thanx in advance  

    Read the article

  • Slow wifi from Windows Server 2003 virtualized in XenServer

    - by John Clayton
    I'm a brand spanking new user of OS X, coming from a lifetime of Windows use. I've been setting up my new Macbook Pro and have run into a very unusual problem. Over wifi, I am unable to copy files to or from my Windows Home Server. The problem seems to exist only over wifi, and only to WHS. Here are the details of my setup: 2010 Macbook Pro (Core i7), OS X 10.6.3 Windows Home Server PP3 (virtualized in XenServer 5.5) Windows 7 Ultimate x64 desktop Windows 7 Ultimate x64 in Boot Camp D-Link DIR-655 wireless N router Here is what I've done to narrow down the problem: Files copy fine from WHS to OS X when using gigabit ethernet Files copy fine from desktop to OS X when using gigabit ethernet Files fail to copy from WHS to OS X when using wifi (error -51) Files copy fine from desktop to OS X when using wifi Files copy fine from WHS to Boot Camp when using wifi Files copy fine from desktop to Boot Camp when using wifi From what I can tell, it seems to be some sort of issue between OS X and WHS, but I can't for the life of me see what would be different between shares on WHS and my desktop. They are both connected using smb://ADDRESS (I've tried both by IP and name). I can browse the shares on the WHS, but copying to OS X fails. I originally found the issue while installing VS2010 off an ISO from WHS, mounted to a Windows 7 VM using VMware Fusion. During the installation the VM was unusable - even the clock got behind the host be about 8 minutes. Once I plugged in the ethernet and disabled the wifi things picked up and finished quickly. The Fusion 3.1 RC is the only I think of that I installed that may have messed with the wifi driver. I've also tried resetting the wifi router, and have changed it from being G & N to N-only. Under Boot Camp I get similar speeds as my wife's N laptop. Any ideas? Thanks! Update: The issue has been further narrowed down to Windows Server 2003, which Windows Home Server is based on, running in XenServer with the XenServer tools installed.

    Read the article

  • Mac OSX Server: svn via ssh command line and encrypted passwords.

    - by Ben Clayton
    Hi all. When I log into our mac mini server running OSX 10.6 via ssh and use svn I get the message: ATTENTION! Your password for authentication realm: can only be stored to disk unencrypted! You are advised to configure your system so that Subversion can store passwords encrypted, if possible. See the documentation for details. You can avoid future appearances of this warning by setting the value of the 'store-plaintext-passwords' option to either 'yes' or 'no' in '/Users/xxxxxxxx/.subversion/servers'. I dont' want to store the password unencrypted though. I've found some details on how to use GNOME keychain in linux to sort this, but nothing on how to use macosx's keychain. Anyone got any ideas? Thanks a lot!

    Read the article

  • VBScript + Regular Expressions

    - by Karthik
    Dim sString sString = "John;Mary;Anne;Adam;Bill;Ester" Is there a regex I can use to retrieve the following from the above list: John (; at the end of the name) Anne (; at the beginning and end) Ester (; at the beginning) I am currently using the following regex for each: 1. Joh.* 2. .*An.* 3. .*st.* But, the above retrieves the entire string instead of the values I want. How can I get the correct values? Code: Dim oRegex : Set oRegex = New RegExp oRegex.Global = False oRegex.IgnoreCase = False 'John oRegex.Pattern = "Joh.*" Set oMatch = oRegex.Execute(sString) sName = oMatch(0) The above code retrieves the entire string, instead of only John. Same issue with the others :(

    Read the article

  • How can I 'transpose' my data using SQL and remove duplicates at the same time?

    - by Remnant
    I have the following data structure in my database: LastName FirstName CourseName John Day Pricing John Day Marketing John Day Finance Lisa Smith Marketing Lisa Smith Finance etc... The data shows employess within a business and which courses they have shown a preference to attend. The number of courses per employee will vary (i.e. as above, John has 3 courses and Lisa 2). I need to take this data from the database and pass it to a webpage view (asp.net mvc). I would like the data that comes out of my database to match the view as much as possible and want to transform the data using SQl so that it looks like the following: LastName FirstName Course1 Course2 Course3 John Day Pricing Marketing Finance Lisa Smith Marketing Finance Any thoughts on how this may be achieved? Note: one of the reasons I am trying this approach is that the original data structure does not easily lend itself to be iterated over using the typical mvc syntax: <% foreach (var item in Model.courseData) { %> Because of the duplication of names in the orignal data I would end up with lots of conditionals in my View which I would like to avoid. I have tried transforming the data using c# in my ViewModel but have found it tough going and feel that I could lighten the workload by leveraging SQL before I return the data. Thanks.

    Read the article

  • Match entities fulfilling filter (strict superset of search)

    - by Jon
    I have an entity (let's say Person) with a set of arbitrary attributes with a known subset of values. I need to search for all of these entities that match all my filter conditions. That is, given a set of Attributes A, I need to find all people that have a set of Attributes that are a superset of A. For example, my table structures look like this: Person: id | name 1 | John Doe 2 | Jane Roe 3 | John Smith Attribute: id | attr_name 1 | Sex 2 | Eye Color ValidValue: id | attr_id | value_name 1 | 1 | Male 2 | 1 | Female 3 | 2 | Blue 4 | 2 | Green 5 | 2 | Brown PersonAttributes id | person_id | attr_id | value_id 1 | 1 | 1 | 1 2 | 1 | 2 | 3 3 | 2 | 1 | 2 4 | 2 | 2 | 4 5 | 3 | 1 | 1 6 | 3 | 2 | 4 In JPA, I have entities built for all of these tables. What I'd like to do is perform a search for all entities matching a given set of attribute-value pairs. For instance, I'd like to be able to find all males (John Doe and John Smith), all people with green eyes (Jane Roe or John Smith), or all females with green eyes (Jane Roe). I see that I can already take advantage of the fact that I only really need to match on value_id, since that's already unique and tied to the attr_id. But where can I go from there? I've been trying to do something like the following, given that the ValidValue is unique in all cases: select distinct p from Person p join p.personAttributes a where a.value IN (:values) Then I've tried putting my set of required values in as "values", but that gives me errors no matter how I try to structure that. I also have to get a little more complicated, as follows, but at this point I'd be happy with solving the first problem cleanly. However, if it's possible, the Attribute table actually has a field for default value: id | attr_name | default_value 1 | Sex | 1 2 | Eye Color | 5 If the value you're searching on happens to be the default value, I want it to return any people that have no explicit value set for that attribute, because in the application logic, that means they inherit the default value. Again, I'm more concerned about the primary question, but if someone who can help with that also has some idea of how to do this one, I'd be extremely grateful.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >