Search Results

Search found 1462 results on 59 pages for 'sam gabriel'.

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

  • How can I get started using TDD to code some simple functionality?

    - by Gabriel
    I basically have the gist of TDD. I'm sold that it's useful and I've got a reasonable command of the MSTEST framework. However, to date I have not been able to graduate to using it as a primary development method. Mostly, I use it as a surrogate for writing console apps as test drivers (my traditional approach). The most useful thing about it for me is the way it absorbs the role of regression testing. I have not yet built anything yet that specifically isolates various testable behaviors, which is another big part of the picture I know. So this question is to ask for pointers on what the first test(s) I might write for the following development task: I want to produce code that encapsulates task execution in the fashion of producer/consumer. I stopped and decided to write this question after I wrote this code (wondering if I could actually use TDD for real this time) Code: interface ITask { Guid TaskId { get; } bool IsComplete { get; } bool IsFailed { get; } bool IsRunning { get; } } interface ITaskContainer { Guid AddTask(ICommand action); } interface ICommand { string CommandName { get; } Dictionary<string, object> Parameters { get; } void Execute(); }

    Read the article

  • Stop KDE services from running

    - by Gabriel
    I recently installed KDE with the command sudo apt-get install kubuntu-desktop. Now whenever I log into Unity I can see KDE-related services running in the background and I see no obvious way to prevent them from opening at startup. I checked bum but I see nothing there. These are the services I see running right now: kde4 klauncher knotify4 These ones I can identify as being related to KDE given their names, but there could be more. How can I prevent these services from launching by themselves? I should mention I often use KDE applications such as kate, okular and kile. Could these be responsible for opening those services?

    Read the article

  • Two graphical entities, smooth blending between them (e.g. asphalt and grass)

    - by Gabriel Conrad
    Supposedly in a scenario there are, among other things, a tarmac strip and a meadow. The tarmac has an asphalt texture and its model is a triangle strip long that might bifurcate at some point into other tinier strips, and suppose that the meadow is covered with grass. What can be done to make the two graphical entities seem less cut out from a photo and just pasted one on top of the other at the edges? To better understand the problem, picture a strip of asphalt and a plane covered with grass. The grass texture should also "enter" the tarmac strip a little bit at the edges (i.e. feathering effect). My ideas involve two approaches: put two textures on the tarmac entity, but that involves a serious restriction in how the strip is modeled and its texture coordinates are mapped or try and apply a post-processing filter that mimics a bloom effect where "grass" is used instead of light. This could be a terrible failure to achieve correct results. So, is there a better or at least a more obvious way that's widely used in the game dev industry?

    Read the article

  • Bricscad V12 on ubuntu 11.10!

    - by gabriel
    i tried to install bricscad from the deb file but is for 32bit systems.So i had problems and i downloaded the .tgz file and ran tar -xvf and i was in the directory /opt/bricsys/bricscad/v12 So i managed to run bricscad with the command sudo sh bricscad.sh in the directory this.So my question is, do you have any idea of how to make a launcher or smthing so i can run the program from an easier way?I cannot find it in dash(unity) or in the desktop. Any help will be great! Thanks

    Read the article

  • Should I change the name in the WTFPL?

    - by Domenic
    I'm using the WTFPL in my personal projects published on GitHub. Currently I'm using it verbatim, but I have the suspicion I shouldn't be leaving Copyright (C) 2004 Sam Hocevar <[email protected]> in there, and instead should use my name. But the license is very confusing about this. Half of the WTFPL is about the WTFPL itself, so I thought that copyright might refer to a copyright on the license text itself, and not on the project this is licensing. Also, it says Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. So would I have to change the name, from WTFPL to, say, "WTFPL-Domenic"?

    Read the article

  • Can't login to Ubuntu One

    - by Gabriel
    I uninstalled Ubuntu One about two months ago and now I re-installed it. I can still login with my account through the site (Ubuntu One) but the client keeps telling me "The authentication failed". If I try to use the Recover password option it also fails with telling me that my email address is not recognized (while I can use it with zero issues through the site) If I attempt to create a new account from the client, it also fails to load the captcha every time. Something is clearly broken here but I can't figure out what it is. Any ideas?

    Read the article

  • Is there a jQuery lightbox plugin that has thumbnails inside the box?

    - by Gabriel
    I'm trying to find a lightbox style plugin in jQuery that displays thumbnails at the bottom of the picture (or video, or whatever). I found plenty of lightbox plugins, but none that allows navigation by thumbnail inside the box. The plugin must be able to open images, swf and inline content. I realize that jQuery will not be able to generate the thumbnails and that's ok. Do you have any good ones to suggest? Thanks

    Read the article

  • Can't fix broken packages using Synaptic (Broken Package: Wine1.4)

    - by Rustyblade
    Ok so I am trying to fix a broken package in order to install wine. When I do "sudo apt-get install wine" I get: sam@ubuntu:~$ sudo apt-get install wine [sudo] password for sam: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: wine : Depends: wine1.4 but it is not going to be installed E: Unable to correct problems, you have held broken packages. Then I try "sudo apt-get install wine1.4" sam@ubuntu:~$ sudo apt-get install wine1.4 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: wine1.4 : Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) but it is not installable Recommends: gnome-exe-thumbnailer but it is not going to be installed or kde-runtime but it is not going to be installed Recommends: winetricks but it is not going to be installed E: Unable to correct problems, you have held broken packages. So someone told me to try Synaptic. Here is what I tried: Searched wine Right clicked wine1.4 Said I needed to mark other packages Mark I click Apply. It says, You have to fix broken packages first! I do EditFix Broken Packages I get this E: Unable to correct problems, you have held broken packages. E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. E: Unable to correct dependencies E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. E: Unable to correct dependencies I am really frustrated. I removed the Official Wine PPA and tried it I even tried $ sudo apt-get -f install 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Please help me :( System: Ubuntu 12.10 64bit

    Read the article

  • How do you proactively guard against errors of omission?

    - by Gabriel
    I'll preface this with I don't know if anyone else who's been programming as long as I have actually has this problem, but at the very least, the answer might help someone with less xp. I just stared at this code for 5 minutes, thinking I was losing my mind that it didn't work: var usedNames = new HashSet<string>(); Func<string, string> l = (s) => { for (int i = 0; ; i++) { var next = (s + i).TrimEnd('0'); if (!usedNames.Contains(next)) { return next; } } }; Finally I noticed I forgot to add the used name to the hash set. Similarly, I've spent minutes upon minutes over omitting context.SaveChanges(). I think I get so distracted by the details that I'm thinking about that some really small details become invisible to me - it's almost at the level of mental block. Are there tactics to prevent this? update: a side effect of asking this was fixing the error it would have for i 9 (Thanks!) var usedNames = new HashSet<string>(); Func<string, string> name = (s) => { string result = s; if(usedNames.Contains(s)) for (int i = 1; ; result = s + i++) if (!usedNames.Contains(result)) break; usedNames.Add(result); return result; };

    Read the article

  • Customizing Texmaker

    - by Gabriel Furstenheim
    I use LaTeX a lot but I find quite obnoxious all the crappy files it leaves behind when you compile: .aux, .log... Fortunately TeXMaker has the option "clean" that deletes all of these. However, I don't like having to remember to click on it every time I'm going to close a document, ie I'd like a button that both closes a document and cleans all that stuff. Any hint as how to do it? I suppose if I knew how to access the program code I'd be able to do it as I'd just have to put together two options that already exist. Thanks

    Read the article

  • How to deal with elimination of duplicate logic vs. cost of complexity increase?

    - by Gabriel
    I just wrote some code that is very representative of a recurring theme (in my coding world lately): repeated logic leads to an instinct to eliminate duplication which results in something that is more complex the tradeoff seems wrong to me (the examples of the negative side aren't worth posting - but this is probably the 20th console utility I've written in the past 12 months). I'm curious if I'm missing some techniques or if this is really just on of those "experience tells you when to do what" type of issues. Here's the code... I'm tempted to leave it as is, even though there will be about 20 of those if-blocks when I'm done. static void Main(string[] sargs) { try { var urls = new DirectTrackRestUrls(); var restCall = new DirectTrackRestCall(); var logger = new ConsoleLogger(); Args args = (Args)Enum.Parse(typeof(Args), string.Join(",", sargs)); if (args.HasFlag(Args.Campaigns)) { var getter = new ResourceGetter(logger, urls.ListAdvertisers, restCall); restCall.UriVariables.Add("access_id", 1); getter.GotResource += new ResourceGetter.GotResourceEventHandler(getter_GotResource); getter.GetResources(); SaveResources(); } if (args.HasFlag(Args.Advertisers)) { var getter = new ResourceGetter(logger, urls.ListAdvertisers, restCall); restCall.UriVariables.Add("access_id", 1); getter.GotResource += new ResourceGetter.GotResourceEventHandler(getter_GotResource); getter.GetResources(); SaveResources(); } if (args.HasFlag(Args.CampaignGroups)) { var getter = new ResourceGetter(logger, urls.ListCampaignGroups, restCall); getter.GotResource += new ResourceGetter.GotResourceEventHandler(getter_GotResource); getter.GetResources(); SaveResources(); } } catch (Exception e) { Console.WriteLine(e.InnerException); Console.WriteLine(e.StackTrace); }

    Read the article

  • Destroyed user account on OS X with dscl; how to restore? [migrated]

    - by Sam Ritchie
    I was trying to create a new user on my OS X Lion machine, and somehow managed to destroy my own user's account. Here are the steps I took; hopefully someone here can recognize what I did, and maybe identify some way around this. First, I ran these commands: sudo dscl localhost -create /Local/Default/Users/elasticsearch sudo dscl localhost -create /Local/Default/Users/elasticsearch /bin/bash # mistake! sudo dscl localhost -create /Local/Default/Users/elasticsearch UserShell /bin/bash sudo dscl localhost -create /Local/Default/Users/elasticsearch RealName "Elastic Search" sudo dscl localhost -create /Local/Default/Users/elasticsearch UniqueID 503 # MY uniqueID sudo dscl localhost -create /Local/Default/Users/elasticsearch PrimaryGroupID 1000 sudo dscl localhost -create /Local/Default/Users/elasticsearch NFSHomeDirectory /Local/Users/elasticsearch The big mistake I made here was using "503", which was my user's UniqueID. Immediately my shell username changed to "elasticsearch". I fiddled around, tried to change the current user with sudo su -u sritchie, but this didn't work. On restart, only the "Elastic Search" user was available. I logged into the Lion Recovery partition and reset the root password. After logging in as root and checking on the terminal, I made the remarkable discovery that my home folder was totally empty. I deleted the elasticsearch user, but it made no difference. I don't see anything in Deleted Users either. The odd thing is that when I log in now as myself (sritchie) I can see desktop icons with previews. I can even open a few text files from the Downloads folder if I use the dock alias to Downloads. Could this data be hiding somewhere? Any help would be REALLY appreciated! Thanks, Sam

    Read the article

  • ssh-add insists on passphrase

    - by Sam Walton
    I have a new ssh key problem. I have successfully used them for years with Heroku, Git and other servers so I can login without having to issue a passphrase. A few weeks ago, I was unable to push a git repository on my machine to my Heroku and it responded with Permission denied (publickey). Hmm. Everything else but this Heroku function still works. So I ssh-keygen -t rsa -C "newHeroku" with no passphrase (hit return so it would be empty). So I enter: sudo chmod 600 ~/.ssh/newHeroku* Then: ssh-add ~/.ssh/newHeroku.pub Returning return for the passphrase asked it exits without error. The next step is to: ssh-add /Users/sam/.ssh/newHeroku.pub To verify that it's "live" I enter: ssh-add -l To which the output is still The agent has no identities. Okay, to eliminate variables, I repeat the key generation process but entering in a passphrase for a new key. I ssh-add the new key and get the "Enter passphrase" as expected. Now this is why I'm posting here and not on a Heroku blog because ssh-add fails because the passphrase I used keeps getting rejected. It appears, even though I have no problem with my keys elsewhere, that something is wrong with passphrase because even though I get no errors, I get errors when on the one that expects a passphrase. One question, should I expect the Passphrase request for ssh-add when I have not generated a passphrase? It's been suggested that this is a clue and I offer it. Or maybe I have a poor understanding of what ssh-add is doing. Wouldn't be the first time I asked a stupid Q. Also, I'm on Lion and have updated no system updates in the few weeks of this period except application updates.

    Read the article

  • 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

  • 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

  • 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

  • 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

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