Search Results

Search found 1337 results on 54 pages for 'ryan king'.

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

  • Databinding to an Entity Framework in WPF

    - by King Chan
    Is it good to use databinding to Entity Framework's Entity in WPF? I created a singleton entity framework context: To have only one connection and it won't open and close all the time. So I can pass the Entity around to any class, and can modify the Entity and make changes to the database. All ViewModels getting the entity out from the same Context and databinding to the View saves me time from mapping new object, but now I imagine there is problem in not using the newest Context: A ViewModel databinding to a Entity, then someone else updated the data. The ViewModel will still display the old data, because the Context is never being dispose to refresh. I always create new Context and then dispose of it. If I want to pass the Entity around, then there will be conflicts between Context and Entity. What is the suggested way of doing this ?

    Read the article

  • Should each app have its own database, or should small apps be merged into one?

    - by King
    We have a bunch of small to medium sized apps, each of which has its own database (MSSQL Server). There was a suggestion that we consoldate the 'related' databases into a smaller set amount of larger databases. They don't particularly share a lot of data, they would just be under a similar business group. For example, using a 'Finance' DB to hold the tables and procedures for finance apps. Would it be appropriate to use a different schema for each app? E.g. App1.SomeTable App1.SomeOtherTable AppTwo.SomeTable What are the pros and cons of this approach? What should I watch out for? Thanks

    Read the article

  • FFmpeg not recording audio during screen capture

    - by King
    I'm using the script below to run FFmpeg on Ubuntu 10.10. I followed these instructions to install FFmpeg & x264. While ffmpeg does capture the screen it does not capture the mic audio. I've checked that the mic works via "System Preferences". Anyone have any ideas on what the problem(s) could be and suggestions on how to resolve this issue? Thanks. ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 30 -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 -y screen-capture.mkv

    Read the article

  • Programatically clicking a HTML button by vb.net [closed]

    - by Chauhdry King
    I have to click a HTML button programatically which is on the 3rd page of the website. The button is without id. It has just name type and value. The HTML code of the button is given below <FORM NAME='form1' METHOD='post' action='/dflogin.php'> <INPUT TYPE='hidden' NAME='txtId' value='E712050-15'><INPUT TYPE='hidden' NAME='txtassId' value='1'><INPUT TYPE='hidden' NAME='txtPsw' value='HH29'><INPUT TYPE='hidden' NAME='txtLog' value='0'><h6 align='right'><INPUT TYPE='SUBMIT' NAME='btnSub' value='Next' style='background-color:#009900; color:#fff;'></h6></FORM> I am using the following code to click it Dim i As Integer Dim allButtons As HtmlElementCollection allButtons = WebBrowser1.Document.GetElementsByTagName("input") i = 0 For Each webpageelement As HtmlElement In allButtons i += 1 If i = 5 Then webpageelement.InvokeMember("click") End If Next But I am not able to click it. I am using the vb.net 2008 platform. Can anyone tell me the solution to click it?

    Read the article

  • Need suggestion for Mutiple Windows application design

    - by King Chan
    This was previously posted in StackOverflow, I just moved to here... I am using VS2008, MVVM, WPF, Prism to make a mutiple window CRM Application. I am using MidWinow in my MainWindow, I want Any ViewModel would able to make request to MainWindow to create/add/close MidChildWindow, ChildWindow(from WPF Toolkit), Window (the Window type). ViewModel can get the DialogResult from the ChildWindow its excutes. MainWindow have control on all opened window types. Here is my current approach: I made Dictionary of each of the windows type and stores them into MainWindow class. For 1, i.e in a CustomerInformationView, its CustomerInformationViewModel can execute EditCommand and use EventAggregator to tell MainWindow to open a new ChildWindow. CustomerInformationViewModel: CustomerEditView ceView = new CustomerEditView (); CustomerEditViewModel ceViewModel = CustomerEditViewModel (); ceView.DataContext = ceViewModel; ChildWindow cWindow = new ChildWindow(); cWindow.Content = ceView; MainWindow.EvntAggregator.GetEvent<NewWindowEvent>().Publish(new WindowEventArgs(ceViewModel.ViewModeGUID, cWindow )); cWindow.Show(); Notice that all my ViewModel will generates a Guid for help identifies the ChildWindow from MainWindow's dictionary. Since I will only be using 1 View 1 ViewModel for every Window. For 2. In CustomerInformationViewModel I can get DialogResult by OnClosing event from ChildWindow, in CustomerEditViewModel can use Guid to tell MainWindow to close the ChildWindow. Here is little question and problems: Is it good idea to use Guid here? Or should I use HashKey from ChildWindow? My MainWindows contains windows reference collections. So whenever window close, it will get notifies to remove from the collection by OnClosing event. But all the Windows itself doesn't know about its associated Guid, so when I remove it, I have to search for every KeyValuePair to compares... I still kind of feel wrong associate ViewModel's Guid for ChildWindow, it would make more sense if ChildWindow has it own ID then ViewModel associate with it... But most important, is there any better approach on this design? How can I improve this better?

    Read the article

  • View matrix question (rotate by 180 degrees)

    - by King Snail
    I am using a third party rendering API on top of OpenGL code and I cannot get my matrices correct. The API states this: We're right handed by default, and we treat y as up by convention. Since IwGx's coordinate system has (0,0) as the top left, you typically need a 180 degree rotation around Z in your view matrix. I think the viewer does this by default. In my OpenGL app I have access to the view and projection matrices separately. How can I convert them to fit the criteria used by my third party rendering API? I don't understand what they mean to rotate 180 degrees around Z, is that in the view matrix itself or something in the camera before making the view matrix. Any code would be helpful, thanks.

    Read the article

  • How to detect which edges of a rectange touch when they collide in iOS

    - by Mike King
    I'm creating a basic "game" in iOS 4.1. The premise is simple, there is a green rectangle ("disk") that moves/bounces around the screen, and red rectangle ("bump") that is stationary. The user can move the red "bump" by touching another coordinate on the screen, but that's irrelevant to this question. Each rectangle is a UIImageView (I will replace them with some kind of image/icon once I get the mechanics down). I've gotten as far as detecting when the rectangles collide, and I'm able to reverse the direction of the green "disk" on the Y axis if they do. This works well when the green "disk" approaches the red "bump" from top or bottom, it bounces off in the other direction. But when it approaches from the side, the bounce is incorrect; I need to reverse the X direction instead. Here's the timer I setup: - (void)viewDidLoad { xSpeed = 3; ySpeed = -3; gameTimer = [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(mainGameLoop:) userInfo:nil repeats:YES]; [super viewDidLoad]; } Here's the main game loop: - (void) mainGameLoop:(NSTimer *)theTimer { disk.center = CGPointMake(disk.center.x + xSpeed, disk.center.y + ySpeed); // make sure the disk does not travel off the edges of the screen // magic number values based on size of disk's frame // startAnimating causes the image to "pulse" if (disk.center.x < 55 || disk.center.x > 265) { xSpeed = xSpeed * -1; [disk startAnimating]; } if (disk.center.y < 55 || disk.center.y > 360) { ySpeed = ySpeed * -1; [disk startAnimating]; } // check to see if the disk collides with the bump if (CGRectIntersectsRect(disk.frame, bump.frame)) { NSLog(@"Collision detected..."); if (! [disk isAnimating]) { ySpeed = ySpeed * -1; [disk startAnimating]; } } } So my question is: how can I detect whether I need to flip the X speed or the Y speed? ie: how can I calculate which edge of the bump was collided with?

    Read the article

  • Algorithmic Forecasting and Pattern Recognition

    - by Ryan King
    Say a user could enter project data into my software. Each project has 2 variables "size" and "work" and they're related but the relationship is not known. Is there a way to programmatically determine the relationship between the variables based on previous data and forecast the amount of work provided if only given the size of the project in the future? For Example, say the user had manually entered the following projects. Project 1 - Size:1, Work: 4 Project 2 - Size:2, Work: 7 Project 3 - Size:3, Work: 10 Project 4 - Size:4, Work: x What should I look into to be able to programmatically determine, that Work = Size*3+1 and therefor be able to say that x=13?

    Read the article

  • Is HTML5 more secure to develop for than Silverlight?

    - by King Chan
    I'm learning Silverlight, and I know that if I master it, I can apply the same concepts to WPF, which means I can do either web or desktop development pretty easily. But I've read articles and followed the discussion online, and I understand HTML5 is gaining traction for being cross-platform, and a lot of people seem to be moving to HTML5. From my understanding, any HTML5 application would be built with HTML and JavaScript (or Flash). But is it secure? It seems like anyone can easily use their browser's "view source" option and grab your code. Is this something I should be worried about, or is there a way to protect against it?

    Read the article

  • JavaScript and callback nesting

    - by Jake King
    A lot of JavaScript libraries (notably jQuery) use chaining, which allows the reduction of this: var foo = $(".foo"); foo.stop(); foo.show(); foo.animate({ top: 0 }); to this: $(".foo").stop().show().animate({ top: 0 }); With proper formatting, I think this is quite a nice syntactic capability. However, I often see a pattern which I don't particularly like, but appears to be a necessary evil in non-blocking models. This is the ever-present nesting of callback functions: $(".foo").animate({ top: 0, }, { callback: function () { $.ajax({ url: 'ajax.php', }, { callback: function () { ... } }); } }); And it never ends. Even though I love the ease non-blocking models provide, I hate the odd nesting of function literals it forces upon the programmer. I'm interesting in writing a small JS library as an exercise, and I'd love to find a better way to do this, but I don't know how it could be done without feeling hacky. Are there any projects out there that have resolved this problem before? And if not, what are the alternatives to this ugly, meaningless code structure?

    Read the article

  • error: no such partition after 11.10 upgrade to 12.04

    - by Alan King
    -I recently upgraded my 11.10 install to 12.04 LTS and got the above error message upon reboot after a GNU GRUB version ubuntu3 display showing Ubuntu 3.2.0-23-generic pae and other kernels or memory tests to choose from. The upgrade had to be done by CD because the Update Manager did not show the 12.04 upgrade option. After selecting the default install option of upgrading 11.10 to 12.04, I was presented with a screen saying that I had not specified a swap partition. Upon selection the 'back' key, I was taken to a partition page which listed two current partitions (only Ubuntu 11.10 had been installed - no Windoz): an ext4 partition plus a small 1.8GB partition. I double clicked the small partition and selected it as the swap partition even though I wondered at the time why this even came up. I can see the two user folders under home from the file manager screen while runnning 12.04 from the CD but if I try to access either one an error message is displayed saying I do not have permission while I get a loading message in the lower right corner of the window that does not go away. I have two questions: Can I access the user folders prior to recovery via the Terminal? If so, how? How do I fix the GRUB issue?

    Read the article

  • Implenting ActiveRecord with inheritance?

    - by King
    I recently converted an old application that was using XML files as the data store to use SQL instead. To avoid a lot of changes I basically created ActiveRecord style classes that inherited from the original business objects. For example SomeClassRecord :SomeClass //ID Property //Save method I then used this new class in place of the other one, because of polymorphism I didn't need to change any methods that took SomeClass as a parameter. Would this be considered 'Bad'? What would be a better alternative?

    Read the article

  • How to remove Ubuntu and put Windows back on?

    - by Josev King
    I installed Ubuntu 12.04, as a dual boot on my windows Vista laptop, and the next thing I know, I get black screen with error: unknown filesystem. grub rescue> I have tried reinstalling Windows, reinstalling Ubuntu, booting from Ubuntu disk, and managed to actually get into the OS, but there is nothing I can find of uninstalling Ubuntu, and deleting the partition it created. I know nothing at all about Linux, and I desperately need to get my laptop back up and running.

    Read the article

  • How to make Ubuntu 14.04 run with less lag?

    - by King Shimkus
    I recently updated from Ubuntu 12.04 LTS to 14.04 LTS and for the first time it worked! However, whenever I move my mouse over an application icon on the unity shell, the animation takes forever to show me what the name of the application is ( A.k.a the tooltip ). The same happens with menus and sub-menus. Other than that, it is overall in general, slow. I just want to know if there are any tips to fix this or make my system faster. This is what it says when I type in glxinfo | grep renderer: GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) Output of lspci | grep VGA: 00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)

    Read the article

  • Is there a good XP like windows explorer for windows Vista?

    - by Brett Ryan
    I'm still refusing to go to Windows Vista and now Windows 7 mainly due to the windows explorer, I find it cumbersome and hard to use exclusively with a keyboard. I use XP file explorer in the most basic view, the address bar at the top and files always in list view underneath. The reason I do this is because I'm almost blind and do everything from the keyboard and don't touch the mouse whilst navigating through files, this is because I can type "L[ENTER]D[Enter]B[Enter]" and know that I'm in "c:\documents and settings\Brett Ryan", and I can hit [Tab] once to go to the address bar to type in a folder. Can anyone suggest a replacement for windows explorer that brings back this basic navigational behavior?

    Read the article

  • User Profile cannot be loaded - Windows 7

    - by Ryan
    After uninstalling an HP Vector Mouse driver, then rebooting, when Windows tries to auto log me in, i get an error message saying tyhe following: The User Profile Service failed the Login. User Profile cannot be loaded. Due to the fact that it is the only account on this PC, I cannot even go into another account. I rebooted the machine several times, before going into Safe Mode with Networking. For some reason, I cannot create a new account whilst in safe mode (I think it is to do with UAC, nothing with UAC is clickable). Thus, I am stuck. I cannot get into my account, nor can I create a new one to copy files over to. Any ideas? Thanks in advance! Ryan EDIT: System Restore was, for some reason turned off. Thus, I cannot restore to a working point.

    Read the article

  • iPhone 3G S sync services problem

    - by Ryan McCue
    When I try and synchronise my iPhone with iTunes, I get a dialog informing me that "syncing has been disabled on this computer". (I've never disabled syncing myself, and it worked perfectly fine a day ago) Music synchronises fine, as do videos, however, my contacts do not. Google Contacts no longer appears in the list to choose from, and the select box is empty. When I choose to re-enable syncing, iTunes informs me that "iTunes was unable to load provider data from Sync Services". I've followed several steps I've found on the internet, including deleting the C:\Users\Ryan\AppData\Roaming\Apple Computer\Sync Services directory, but to no avail. Any ideas on what could be causing this? Is there a Service (in the Windows-form-of-daemon sense) that I accidentally disabled?

    Read the article

  • php-cgi cpu usage is super high

    - by Ryan Thompson
    I am getting constantly high and wildly fluctuating CPU usage % for php-cgi commands as seen via "top" on my Centos server.. I have a server density account and it seems that this is a common trend: User - PID - CPU % - MEM % - VSZ - RSS - TT - Stat - Started - Time - Command 500 - 6389 - 22.4 - 3 - 271136 - 32380 - ? - S - 20:26 - 0:40 - /usr/bin/php-cgi Seems there are about 6 or so of those records in my processes list at any given check-in. Any ideas what's causing this? I have fast_cgi installed and the module is loading.. Not sure why it isn't handling this though. Any help would be greatly appreciated! Ryan

    Read the article

  • Outlook DASL Filter - Custom Search

    - by Ryan B
    I'm trying to write a DASL filter to combine three queries: Get all mail with no category and no flag. ("urn:schemas-microsoft-com:office:office#Keywords" IS NULL AND "urn:schemas:httpmail:messageflag" IS NULL) Get all mail that is categorized as "Ryan" and flagged with a red "Today" flag. Don't know how to write this one. Get all mail that is uncategorized and flagged with a red "Today" flag. Don't know how to write this one. Once I have the individual queries, I will combine and OR them. I am stuck on how to filter the flag value.

    Read the article

  • In Windows 7 Home Premium, is it possible to grant a user account the "log on as a service" right and if so, how?

    - by Ryan Johnson
    The title says it all. I need to have the ability for a local user account to log on as a service on a computer running Windows 7 Home Premium. In Windows 7 Ultimate, this is accomplished by going to Control Panel - Administrative Tools - Local Security Policy and adding the user to the "Log on as a service" policy. In Home Premium, there is no Local Security Policy in the Control Panel. Is there another way to add the use to that policy (i.e. registry setting) or is my only recourse to upgrade the computer to Windows 7 Professional? Thanks in Advance, Ryan

    Read the article

  • Is it possible to install Canon EOS T3 Camera Drivers on Windows 7 Embedded

    - by Ryan Johnson
    I have a computer running Windows 7 Embedded. It's an embedded system that will be used in a industrial setting. It needs to be connected to a Canon EOS camera and download pictures from the camera. Other versions of windows come with the Canon drivers so Canon does not provide them as a download on their website. In the past, I had a similar issue with the "N" version of Microsoft Windows Starter and had to download the "Microsoft Media Feature Pack" which then installed the drivers. I attempted to install that on this device, but understandably it complains that its not applicable for this version of windows. So, is there there a feature pack or some other sort of download available that will install the camera drivers? Alternatively, is there some place to get the drivers and manually install them. Thanks in Advance, Ryan

    Read the article

  • iPhone 3G S sync services problem

    - by Ryan McCue
    When I try and synchronise my iPhone with iTunes, I get a dialog informing me that "syncing has been disabled on this computer". (I've never disabled syncing myself, and it worked perfectly fine a day ago) Music synchronises fine, as do videos, however, my contacts do not. Google Contacts no longer appears in the list to choose from, and the select box is empty. When I choose to re-enable syncing, iTunes informs me that "iTunes was unable to load provider data from Sync Services". I've followed several steps I've found on the internet, including deleting the C:\Users\Ryan\AppData\Roaming\Apple Computer\Sync Services directory, but to no avail. Any ideas on what could be causing this? Is there a Service (in the Windows-form-of-daemon sense) that I accidentally disabled?

    Read the article

  • How to code Microsoft Excel "Shift Cells Up" feature in SQL

    - by user293249
    Take a simple table like below: Column Headings: || Agent's Name || Time Logged In || Center || Row 1: Andrew || 12:30 PM || Home Base Row 2: Jeff || 7:00 AM || Virtual Base Row 3: Ryan || 6:30 PM || Test Base Now lets say that a single cell is deleted so the table now looks like this: Column Headings: || Agent's Name || Time Logged In || Center || Row 1: Andrew || 12:30 PM || Row 2: Jeff || 7:00 AM || Virtual Base Row 3: Ryan || 6:30 PM || Test Base Notice that "Home Base" is missing. Now in excel you can delete the cell and shift the rest so the finished product looks like below: Column Headings: || Agent's Name || Time Logged In || Center || Row 1: Andrew || 12:30 PM || Virtual Base Row 2: Jeff || 7:00 AM || Test Base Row 3: Ryan || 6:30 PM || And you can see we are left with a blank cell last row. How do I code this procedure of shifting the cells up in SQL? I've been struggling on this problem for weeks! Thank you!

    Read the article

  • Django many to many annotations and filters

    - by dl8
    So I have two models, Person and Film where they're in a many to many relationship. My goal is to grab a film, and output the persons that have also appeared in at least 10 films. For example I can get the count individually by: >>> Person.objects.get(short__istartswith = "Matt Damon").film_set.count() 71 However, if I try to filter all the actors of a particular film out: >>> Film.objects.get(name__istartswith="Saving Private Ryan").actors.all().annotate(film_count=Count('film')).filter(film_count__gte=10) [] it returns an empty set since if I manually look at everyone's film_count it's 1, even though an actor such as Matt Damon (as seen above) has been in 71 films in my db. As you can see with this query, the annotation doesn't work: >>> Film.objects.get(name__istartswith="Saving Private Ryan").actors.all().annotate(film_count=Count('film'))[0].film_count 1 >>> Film.objects.get(name__istartswith="Saving Private Ryan").actors.all().annotate(film_count=Count('film'))[0].film_set.count() 7 and I can't seem to figure out a way to filter it by the film_set.count()

    Read the article

  • Filter Phrase Query

    - by alsuelo
    I try to filter a phrase to make a search in my website i've this query, this code working with one word but when i type wit more than one isn't working becuase the print is without spaces. $phrase = $this->getState($this->context.".filter_phrase"); printf("Original string: %s\n", $phrase); if(!empty($phrase)) { $escaped = $db->escape($phrase, true); printf("Escaped string: %s\n", $escaped); $quoted = $db->quote("%" . $escaped . "%" , false); $query->where ('a.title LIKE ' .$quoted); } Example i type king and the output is king , when i type the king the output is theking, i want to know if exist any way to conserve the blank spaces.

    Read the article

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