Search Results

Search found 1278 results on 52 pages for 'sam bryant'.

Page 6/52 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • sql query for 3 tables

    - by greffe
    i have 3 tables (A,B,C) Table A - ID Name 1 Sam 2 Manuel 3 Jane Table B ID Tab_A_ID Name 1 1 Meer 2 1 Kutti 3 2 Mikaro Table C ID Tab_B_ID Price 1 1 255.11 2 1 30.52 3 3 125.22 I need a query that shall pick up the top price for TableA-Name from TableC. So only 1 top price for 1 nae record. e.g.- Sam - 255.11 Manuel - 125.22 How can i get this?

    Read the article

  • Select Union Query problem

    - by Krishma
    I have 2 tables Table A id name ------------ 1 Scott 2 Dan 3 Sam Table B id name ------------ 1 Dan 2 Andi 3 Jess Result needs to be Id Name Found 1 Scott A 2 Dan C i.e. found in both 3 Sam A 2 Andi B 3 Jess B I am able to do UNION to fetch the result but how i generate column Founds. Any idea ?? Thank you in advance :)

    Read the article

  • Making a rails inflection for possessive strings?

    - by chovy
    I would like to create a method in additional to the default 'foo'.titlecase that will correctly add "possessiveness" to it. The string is a user's name (<- just did one right there! ) For example: "sam" is the user <%= user.titlecase.possessive + ' Profile' % = #Sam's Profile It just needs to handle edge cases like: Steelers's Profile ( should be Steelers' Profile) Ross's Profile ( should be Ross' Profile )

    Read the article

  • problem with awk script

    - by Samantha
    Hello, when I call my awk script, I keep getting an error : sam@sam-laptop:~/shell/td4$ awk -f agenda.awk -- -n Robert agenda.txt awk: agenda.awk:6: printf "Hello" awk: agenda.awk:6: ^ syntax error the script contains this : #!/usr/bin/awk BEGIN { } printf "Hello" END { } Thank you

    Read the article

  • exception occured in java compiler

    - by user2892977
    I am a beginner in Java.I have JDK1.7.0 installed on windows 7 OS.I just wrote a sample java file where the file was not getting compiled and throws the below error. Sam.java:5: ';' expected Sample p = New Sample(); An exception has occurred in the compile r (1.7.0-ea). Please file a bug at the Java Developer Connection (http://java.su n.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.StringIndexOutOfBoundsException: String index out of range: 26 at java.lang.String.charAt(String.java:694) at com.sun.tools.javac.util.Log.printErrLine(Log.java:251) at com.sun.tools.javac.util.Log.writeDiagnostic(Log.java:343) at com.sun.tools.javac.util.Log.report(Log.java:315) at com.sun.tools.javac.util.AbstractLog.error(AbstractLog.java:96) at com.sun.tools.javac.parser.Parser.reportSyntaxError(Parser.java:295) at com.sun.tools.javac.parser.Parser.accept(Parser.java:326) at com.sun.tools.javac.parser.Parser.blockStatements(Parser.java:1599) at com.sun.tools.javac.parser.Parser.block(Parser.java:1500) at com.sun.tools.javac.parser.Parser.block(Parser.java:1514) at com.sun.tools.javac.parser.Parser.methodDeclaratorRest(Parser.java:25 69) at com.sun.tools.javac.parser.Parser.classOrInterfaceBodyDeclaration(Par ser.java:2518) at com.sun.tools.javac.parser.Parser.classOrInterfaceBody(Parser.java:24 45) at com.sun.tools.javac.parser.Parser.classDeclaration(Parser.java:2290) at com.sun.tools.javac.parser.Parser.classOrInterfaceOrEnumDeclaration(P arser.java:2228) at com.sun.tools.javac.parser.Parser.typeDeclaration(Parser.java:2217) at com.sun.tools.javac.parser.Parser.compilationUnit(Parser.java:2163) at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:530) at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:571) at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:82 2) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:748) at com.sun.tools.javac.main.Main.compile(Main.java:386) at com.sun.tools.javac.main.Main.compile(Main.java:312) at com.sun.tools.javac.main.Main.compile(Main.java:303) at com.sun.tools.javac.Main.compile(Main.java:82) at com.sun.tools.javac.Main.main(Main.java:67) Below is the code for Sam.java file class sam { public static void main(String args[]) { Sample p = New Sample(); p.show(); p.display(); } } I researched in google with the various compiler options but that did not help.I would like to understand the below errors. 1 - Sam.java:5: ';' expected 2 - An exception has occurred in the compiler (1.7.0-ea)

    Read the article

  • How to transform multiple line into one line in bash stdout ?

    - by Samantha
    Hello, I sometimes do this in my shell : sam@sam-laptop:~/shell$ ps aux | grep firefox | awk '{print $2}' 2681 2685 2689 4645 $ kill -9 2681 2685 2689 4645 Is there a way I can transform the multiple lines containing the PIDs into one line separated by spaces ? (It's a little bit annoying to type the PIDs every time and I really would like to learn :) ) Thanks a lot.

    Read the article

  • ASP.NET MVC Get a list of users with particular profile properties

    - by Sam Huggill
    Hi, I'm using ASP.NET MVC 1 and I have added a custom Profile class using the WebProfile Builder VS add-in (found here: http://code.msdn.microsoft.com/WebProfileBuilder/Release/ProjectReleases.aspx?ReleaseId=980). On one of my forms I want a drop-down list of all users who share a specific profile value in common. I can see that I can get a list of all users using: Membership.GetAllUsers() However I cannot see how to get all users who have a specific profile value, which in my case is CellId. Am I approaching this in the right way? I have used membership roles to define which users are administrators etc, but profiles seems like the right place to group users. Any pointers both in specifics of how to access the user list but also comments on whether am I pursuing the right avenue here would be greatly appreciated. Many thanks, Sam

    Read the article

  • Pasting images in TinyMCE on rails app

    - by Sam Kong
    Hi, I found a weird problem with TinyMCE editor. Copying & pasting images from another domain works fine but if the images are on the same domain the path are relative but not correct sometimes. I figured out that the problem is related to the rails URL scheme. Example) Images are copied from http://mydomain.com/index.html page and the real images path is http://mydomain.com/photos/image.jpg. Editor page: http://mydomain.com/posts/new = image path is set as ../photos/image.jpg http://mydomain.com/posts/edit/123 = image path is set as ../../photos/image.jpg So I tried http://mydomain.com/posts/new/ and it worked. How do I solve this problem? Thanks. Sam

    Read the article

  • How to extract hhp file from a chm file

    - by Sam
    Hi, I have an A.chm file for my windows application which runs as expected. When I decompile it using HTML workshop I get set of html files, .hhc file, .hhk file. When I compile another file B.chm from these extracted files without changing any of the files.((I want to add more html contents to this file but looks like I am losing some information after decompiling)) The output file I get is 72K where as the original file was 75K. B.chm's contents look all file when viewed in the chm viewer but the behavior is lost when when used with the application. After reading around I found that if .hhp can be extracted from a .chm file then it can be re-constructed as it is without losing any mapping or aliases. Is that true? How can I extract .hhp file from a .chm file? Thanks, Sam

    Read the article

  • Easy XPath question for iPhone

    - by Sam
    Hey guys! This is driving me NUTS! Here's my XML document <?xml version="1.0" encoding="UTF-8"?> <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="content.opf" media-type="application/oebps-package+xml"/> </rootfiles> </container> All I want to do is get the root file element. I'm using TouchXML on the iPhone and here is my xPath query: /container/rootfiles/rootfile It doesn't work! I've tried everything. Any help would be appreciated... Sam

    Read the article

  • How do I refresh TinyMCE for the code that I add with JavaScript

    - by Sam Kong
    Hi, I need to insert code for flash to TinyMCE with JavaScript. If I insert the same code using HTML menu of TinyMCE, it automatically add flash icon to the editor. But if I insert the code using JavaScript, the actual code is inserted but it shows nothing on the screen. One trick I found is toggle TinyMCE to normal textarea and back to TinyMCE. Then, it shows the flash icon. Is there a better way to do that? Thanks. Sam

    Read the article

  • White bar at the bottom of root view!

    - by Sam
    Hi, I have two view controllers in the app. When the app starts, the layout of the root view controller's view is just fine. When a button is clicked, the view controller switches to the other one - which shows fine too. However, when the view is switched back to the root view, the contents are shifted UP by about 20 pixels, leaving a white bar at the bottom! - and it was not there when the app had started. Has anyone seen this? Any idea what's going on there? Thanks, Sam.

    Read the article

  • loading HTML fragments with jQuery

    - by sam
    Hi everybody, I'm very new to jQuery, Ajax and things like these. I've found solutions on how to inject HTML fragments into my site: $(document).ready(function(){ $('a').click(openContent); //binding all anchors to this function }); function openContent(){ var path = $(this).attr('href'); $('#content').load(path); return false; //to prevent browser from loading the single HTML fragment } That works really fine! The problem is, these function won't be executed when clicking on anchors located in the new HTML fragment which were injected right before. So the fragment won't get injected into div, the browser will only load the fragment for itself. Hope there are solutions which aren't that tricky... thanks sam

    Read the article

  • Visual Studio Packaging: Another version of this product is already installed

    - by Sam
    Hi All, I have a msi created for a project which uses C# & Jscript. version-1.0 is currently public. I want to release a bug-fixed version v-1.0.1 of this package but while testing it, I am getting "Another version of this product is already installed Installation of this version cannot continue.To configure or remove the existing version of this product, use Add/Remove program on the Control Panel". I want this bug-fixed version to install silently without asking user to uninstall and install new one. Please help me how can I achieve this, I am using visual studio 2008. Thanks in Advance! Sam

    Read the article

  • file upload in existing site with jquery and codeigniter

    - by Sam
    I am a new bee to ajax world. I am working on a site which uses jquery and codeigniter which processes big files like 2GB. It basically parses file and stores some extracted data from it, it uses ajax to show how far the files have been processed etc. Now I want to change the way we process files. I want to first store the file on server side and then start the processing. I evaluated upload class of codeigniter but looks like I cannot use it for this purpose as this class works with field_name and I could not find a way to make an ajax call to the upload class. My questions is : What would be suitable for my problem? Thanks in advance, Sam

    Read the article

  • Can rails test speed be increased?

    - by Sam
    Hi all, I'm a recent convert to TDD but as my codebase grows in size and complexity, I find myself waiting longer and longer periods for the framework to load every time I want to run a test. I am aware of rspec's spec_server but I'm using Test::Unit with shoulda. I tried Snailgun (http://github.com/candlerb/snailgun) but noticed very little increased in speed. I have also tried spork-testunit (http://github.com/timcharper/spork-testunit) but it's not fully compatible with my existing tests. The delay in running tests is a definite pain point and is putting me of TDD (at least with rails). Is anyone aware of any other options? thanks Sam

    Read the article

  • Get a random name and number (same contact) from an iPhone users address book

    - by Sam Jarman
    Hi there, I have had only very little experience using the address book in the iPhone SDK. Does anyone have a code snippet or knows the code to get a persons name and number Eg 'Fred Smith - 027 292 2112". I haven't had much luck with the stuff I've tried. I want to achieve this programmatically, and not let the user decide (random pick of the person). I also don't want to display the contact picker either any tutorial links, or anything would be appreciated. Thanks in advance Sam

    Read the article

  • Configurability for windows application built in C#

    - by Sam
    Hi, I am working on a windows application which is developed in C#. I am kinda new in windows world. I want to restrict number of parallel threads running for this application at a given point of time. This number can be changed by user on a beefier machine. What is the best way to do this configuration and how it can be achieved. I can think of following approaches. 1. Use ConfigurationManager to read the configuration value. If user exists more than N number of threads show a message and give option there to modify the value of N. 2. Use registery entry? Thanks in Advance! Sam

    Read the article

  • Bug in Programming Interviews Exposed?

    - by Sam
    Hi, I could not find an errata for the 2nd edition of this book. My question concerns the if-statement in the following piece of code. void removeHead (Node ** head) { Node * temp; if (!(*head)) { temp = (*head)->next; delete *head; *head = temp; } } So I understand that the point of the if-statement is to check if the Node is null. However by adding an additional "!" to the evaluation, wouldn't this negate the false value of null? Would it be correct to change it to something like: if (*head) { ... } Also if anyone knows where I can find an official errata for the 2nd edition that would be great. Thanks, Sam

    Read the article

  • MVVM: How to handle interaction between nested ViewModels?

    - by Dan Bryant
    I'm been experimenting with the oft-mentioned MVVM pattern and I've been having a hard time defining clear boundaries in some cases. In my application, I have a dialog that allows me to create a Connection to a Controller. There is a ViewModel class for the dialog, which is simple enough. However, the dialog also hosts an additional control (chosen by a ContentTemplateSelector), which varies depending on the particular type of Controller that's being connected. This control has its own ViewModel. The issue I'm encountering is that, when I close the dialog by pressing OK, I need to actually create the requested connection, which requires information captured in the inner Controller-specific ViewModel class. It's tempting to simply have all of the Controller-specific ViewModel classes implement a common interface that constructs the connection, but should the inner ViewModel really be in charge of this construction? My general question is: are there are any generally-accepted design patterns for how ViewModels should interact with eachother, particularly when a 'parent' VM needs help from a 'child' VM in order to know what to do?

    Read the article

  • Filtering in a HierarchicalDataTemplate via MarkupExtension?

    - by Dan Bryant
    I'm trying to create a MarkupExtension to allow filtering of items in an ItemsSource of a HierarchicalDataTemplate. In particular, I'd like to be able to supply a method name that will be executed on the DataContext in order to perform the filtering. The usage syntax I'm after looks like this: <HierarchicalDataTemplate DataType="{x:Type src:DeviceBindingViewModel}" ItemsSource="{Utilities:FilterCollection {Binding Definition.Entries}, MethodName=FilterEntries}"> <StackPanel Orientation="Horizontal"> <Image Source="{StaticResource BindingImage}" Width="24" Height="24" Margin="3"/> <TextBlock Text="{Binding DisplayName}" FontSize="12" VerticalAlignment="Center"/> </StackPanel> </HierarchicalDataTemplate> My code for the custom MarkupExtension looks like this: public sealed class FilterCollectionExtension : MarkupExtension { private readonly MultiBinding _binding; private Predicate<Object> _filterMethod; public string MethodName { get; set; } public FilterCollectionExtension(Binding binding) { _binding = new MultiBinding(); _binding.Bindings.Add(binding); //We package a reference to the DataContext with the binding so that the Converter has access to it var selfBinding = new Binding {RelativeSource = RelativeSource.Self}; _binding.Bindings.Add(selfBinding); _binding.Converter = new InternalConverter(this); } public FilterCollectionExtension(Binding binding, string methodName) : this(binding) { MethodName = methodName; } public override object ProvideValue(IServiceProvider serviceProvider) { return _binding; } private bool FilterInternal(Object dataContext, Object value) { //Filtering is only applicable if a DataContext is defined if (dataContext != null) { if (_filterMethod == null) { var type = dataContext.GetType(); var method = type.GetMethod(MethodName, new[] { typeof(Object) }); if (method == null || method.ReturnType != typeof(bool)) throw new InvalidOperationException("Could not locate a filter predicate named " + MethodName + " on the DataContext"); _filterMethod = (Predicate<Object>)Delegate.CreateDelegate(typeof(Predicate<Object>), dataContext, method); } else { if (_filterMethod.Target != dataContext) { _filterMethod = (Predicate<Object>) Delegate.CreateDelegate(typeof (Predicate<Object>), dataContext, _filterMethod.Method); } } if (_filterMethod != null) return _filterMethod(value); } //If no filtering resolved, just allow all elements return true; } private class InternalConverter : IMultiValueConverter { private readonly FilterCollectionExtension _owner; public InternalConverter(FilterCollectionExtension owner) { _owner = owner; } public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { var enumerable = values[0]; var targetElement = (FrameworkElement)values[1]; var view = CollectionViewSource.GetDefaultView(enumerable); view.Filter = item => _owner.FilterInternal(targetElement.DataContext, item); return view; } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture) { throw new NotSupportedException("Cannot convert back"); } } } I can see that the extension is instantiated and I can see it return the MultiBinding that is used by the Template. I also see the call to the InternalConverter.Convert method, which sees the expected parameters (I see the collection provided by the nested {Binding}) and is successfully able to retrieve the ICollectionView for the incoming collection. The only problem is that FilterInternal never gets called. The template is ultimately being used by a TreeView, if that's relevant. I haven't been able to figure out why the FilterInternal method is not being called and I was hoping somebody might be able to offer some insight.

    Read the article

  • Synchronized Enumerator in C#

    - by Dan Bryant
    I'm putting together a custom SynchronizedCollection<T> class so that I can have a synchronized Observable collection for my WPF application. The synchronization is provided via a ReaderWriterLockSlim, which, for the most part, has been easy to apply. The case I'm having trouble with is how to provide thread-safe enumeration of the collection. I've created a custom IEnumerator<T> nested class that looks like this: private class SynchronizedEnumerator : IEnumerator<T> { private SynchronizedCollection<T> _collection; private int _currentIndex; internal SynchronizedEnumerator(SynchronizedCollection<T> collection) { _collection = collection; _collection._lock.EnterReadLock(); _currentIndex = -1; } #region IEnumerator<T> Members public T Current { get; private set;} #endregion #region IDisposable Members public void Dispose() { var collection = _collection; if (collection != null) collection._lock.ExitReadLock(); _collection = null; } #endregion #region IEnumerator Members object System.Collections.IEnumerator.Current { get { return Current; } } public bool MoveNext() { var collection = _collection; if (collection == null) throw new ObjectDisposedException("SynchronizedEnumerator"); _currentIndex++; if (_currentIndex >= collection.Count) { Current = default(T); return false; } Current = collection[_currentIndex]; return true; } public void Reset() { if (_collection == null) throw new ObjectDisposedException("SynchronizedEnumerator"); _currentIndex = -1; Current = default(T); } #endregion } My concern, however, is that if the Enumerator is not Disposed, the lock will never be released. In most use cases, this is not a problem, as foreach should properly call Dispose. It could be a problem, however, if a consumer retrieves an explicit Enumerator instance. Is my only option to document the class with a caveat implementer reminding the consumer to call Dispose if using the Enumerator explicitly or is there a way to safely release the lock during finalization? I'm thinking not, since the finalizer doesn't even run on the same thread, but I was curious if there other ways to improve this.

    Read the article

  • TwoWay Binding to ListBox SelectedItem on more than one list box in WPF

    - by Dan Bryant
    I have a scenario where I have a globally available Properties window (similar to the Properties window in Visual Studio), which is bound to a SelectedObject property of my model. I have a number of different ways to browse and select objects, so my first attempt was to bind them to SelectedObject directly. For example: <ListBox ItemsSource="{Binding ActiveProject.Controllers}" SelectedItem="{Binding SelectedObject, Mode=TwoWay}"/> <ListBox ItemsSource="{Binding ActiveProject.Machines}" SelectedItem="{Binding SelectedObject, Mode=TwoWay}"/> This works well when I have more than one item in each list, but it fails if a list has only one item. When I select the item, SelectedObject is not updated, since the list still thinks its original item was selected. I believe this happens because the two way binding simply ignores the update from source when SelectedObject is not an object in the list, leaving the list's SelectedItem unchanged. In this way, the bindings become out of sync. Does anybody know of a way to make sure the list boxes reset their SelectedItem when the SelectedObject is not in the list? Is there a better way to do this that doesn't suffer from this problem?

    Read the article

  • Killing a deadlocked Task in .NET 4 TPL

    - by Dan Bryant
    I'd like to start using the Task Parallel Library, as this is the recommended framework going forward for performing asynchronous operations. One thing I haven't been able to find is any means of forcible Abort, such as what Thread.Abort provides. My particular concern is that I schedule tasks running code that I don't wish to completely trust. In particular, I can't be sure this untrusted code won't deadlock and therefore I can't be certain if a Task I schedule using this code will ever complete. I want to stay away from true AppDomain isolation (due to the overhead and complexity of marshaling), but I also don't want to leave a Task thread hanging around, deadlocked. Is there a way to do this in TPL?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >