Daily Archives

Articles indexed Saturday March 13 2010

Page 10/89 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • "The name 'WithTable' does not exist in the current context" using Fluent NHibernate

    - by Byron Sommardahl
    Might be a really easy problem to fix, but it the solution is eluding me! I'm using Fluent NHibernate 1.0 RTM (and using NHibernate bins that ships with it). I'm trying to map my entities and cannot use the WithTable() method. It's not available in Intelligence and VS doesn't suggest any namespaces to reference. Here's my code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using GeoCodeThe.Net.Domain.Entities; using FluentNHibernate.Mapping; namespace GeoCodeThe.Net.Domain.Mappings { class CategoryMap: ClassMap<ICategory> { public CategoryMap() { WithTable("Categories"); // <----- Compile error: The name 'WithTable' does not exist in the current context Id(x => x.Id); Map(x => x.Name); Map(x => x.Tags); } } My bin folder has: Antlr3.Runtime.dll Castle.Core.dll Castle.DynamicProxy2.dll FluentNHibernate.dll Iesi.Collections.dll log4net.dll NHibernate.ByteCode.Castle.dll NHibernate.dll FluentNHibernate.pdb Castle.Core.xml Castle.DynamicProxy2.xml FluentNHibernate.xml Iesi.Collections.xml log4net.xml NHibernate.ByteCode.Castle.xml NHibernate.xml Any clue what I'm missing? Let me know if you need any more clarification.

    Read the article

  • Why is the value of this string, in a bash script, being executing?

    - by Ross
    Hello Why is this script executing the string in the if statement: #!/bin/bash FILES="*" STRING='' for f in $FILES do if ["$STRING" = ""] then echo first STRING='hello' else STRING="$STRING hello" fi done echo $STRING when run it with sh script.sh outputs: first lesscd.sh: line 7: [hello: command not found lesscd.sh: line 7: [hello hello: command not found lesscd.sh: line 7: [hello hello hello: command not found lesscd.sh: line 7: [hello hello hello hello: command not found lesscd.sh: line 7: [hello hello hello hello hello: command not found hello hello hello hello hello hello p.s. first attempt at a shell script thanks

    Read the article

  • Wishlist for Objective-C IDE/Xcode ?

    - by Null Pointer
    My company is evaluating the possibility of developing set of tools for Objective-C extending Xcode default functionality(basically we are thinking about providing better navigation,semantic search, more refactorings, quick fixes, improved code completion (visual assist inspired). So we would like to ask XCode/Objective-C developers: Do you feel that you are missing some features in XCode? What is your wish list? Are you considering the possibility of using addons to Xcode which are not created by Apple? Would you be willing to pay for these addons, or would you only consider free solutions?

    Read the article

  • Operator overloading C++ outside class

    - by bobobobo
    Well, so there are 2 ways to overload operators for a C++ class INSIDE CLASS class Vector2 { public: float x, y ; Vector2 operator+( const Vector2 & other ) { Vector2 ans ; ans.x = x + other.x ; ans.y = y + other.y ; return ans ; } } ; OUTSIDE CLASS class Vector2 { public: float x, y ; } ; Vector2 operator+( const Vector2& v1, const Vector2& v2 ) { Vector2 ans ; ans.x = v1.x + v2.x ; ans.y = v1.y + v2.y ; return ans ; } In C# apparently you can only use the OUTSIDE class method The question is, in C++, which is "morer-correcter?" Which is preferable? When is one way better than another?

    Read the article

  • nHibernate multiple classes pointing to same table?

    - by Amitabh
    Is it a good idea to create a lighter version of an Entity in some cases just for performance reason pointing to same table but with fewer columns mapped. E.g If I have a Contact Table which has 50 Columns and in few of the related entities I might be interested in FirstName and LastName property is it a good idea to create a lightweight version of Contact table. E.g. public class LightContact { public int Id {get; set;} public string FirstName {get; set;} public string LastName {get; set;} } Also is it possible to map multiple classes to same table?

    Read the article

  • Making Thunar the default file browser without hiding the desktop icons

    - by Manu
    I really dislike Ubuntu's default file browser, nautilus, and decided to opt for a lighter alternative (Thunar or Xfe). I've used the following script to change the default to Thunar, but now all my icons are gone from the desktop ! The files are still there, in /home/myid/Desktop, but they do not appear. Is there a way to show them, or is this a consequence of removing nautilus as the default file browser ? Can I modify the following script* in order to keep the icons ? *copied from https://help.ubuntu.com/...: ## Originally written by aysiu from the Ubuntu Forums ## This is GPL'ed code ## So improve it and re-release it ## Define portion to make Thunar the default if that appears to be the appropriate action makethunardefault() { ## I went with --no-install-recommends because ## I didn't want to bring in a whole lot of junk, ## and Jaunty installs recommended packages by default. echo -e "\nMaking sure Thunar is installed\n" sudo apt-get update && sudo apt-get install thunar --no-install-recommends ## Does it make sense to change to the directory? ## Or should all the individual commands just reference the full path? echo -e "\nChanging to application launcher directory\n" cd /usr/share/applications echo -e "\nMaking backup directory\n" ## Does it make sense to create an entire backup directory? ## Should each file just be backed up in place? sudo mkdir nonautilusplease echo -e "\nModifying folder handler launcher\n" sudo cp nautilus-folder-handler.desktop nonautilusplease/ ## Here I'm using two separate sed commands ## Is there a way to string them together to have one ## sed command make two replacements in a single file? sudo sed -i -n 's/nautilus --no-desktop/thunar/g' nautilus-folder-handler.desktop sudo sed -i -n 's/TryExec=nautilus/TryExec=thunar/g' nautilus-folder-handler.desktop echo -e "\nModifying browser launcher\n" sudo cp nautilus-browser.desktop nonautilusplease/ sudo sed -i -n 's/nautilus --no-desktop --browser/thunar/g' nautilus-browser.desktop sudo sed -i -n 's/TryExec=nautilus/TryExec=thunar/g' nautilus-browser.desktop echo -e "\nModifying computer icon launcher\n" sudo cp nautilus-computer.desktop nonautilusplease/ sudo sed -i -n 's/nautilus --no-desktop/thunar/g' nautilus-computer.desktop sudo sed -i -n 's/TryExec=nautilus/TryExec=thunar/g' nautilus-computer.desktop echo -e "\nModifying home icon launcher\n" sudo cp nautilus-home.desktop nonautilusplease/ sudo sed -i -n 's/nautilus --no-desktop/thunar/g' nautilus-home.desktop sudo sed -i -n 's/TryExec=nautilus/TryExec=thunar/g' nautilus-home.desktop echo -e "\nModifying general Nautilus launcher\n" sudo cp nautilus.desktop nonautilusplease/ sudo sed -i -n 's/Exec=nautilus/Exec=thunar/g' nautilus.desktop ## This last bit I'm not sure should be included ## See, the only thing that doesn't change to the ## new Thunar default is clicking the files on the desktop, ## because Nautilus is managing the desktop (so technically ## it's not launching a new process when you double-click ## an icon there). ## So this kills the desktop management of icons completely ## Making the desktop pretty useless... would it be better ## to keep Nautilus there instead of nothing? Or go so far ## as to have Xfce manage the desktop in Gnome? echo -e "\nChanging base Nautilus launcher\n" sudo dpkg-divert --divert /usr/bin/nautilus.old --rename /usr/bin/nautilus && sudo ln -s /usr/bin/thunar /usr/bin/nautilus echo -e "\nRemoving Nautilus as desktop manager\n" killall nautilus echo -e "\nThunar is now the default file manager. To return Nautilus to the default, run this script again.\n" } restorenautilusdefault() { echo -e "\nChanging to application launcher directory\n" cd /usr/share/applications echo -e "\nRestoring backup files\n" sudo cp nonautilusplease/nautilus-folder-handler.desktop . sudo cp nonautilusplease/nautilus-browser.desktop . sudo cp nonautilusplease/nautilus-computer.desktop . sudo cp nonautilusplease/nautilus-home.desktop . sudo cp nonautilusplease/nautilus.desktop . echo -e "\nRemoving backup folder\n" sudo rm -r nonautilusplease echo -e "\nRestoring Nautilus launcher\n" sudo rm /usr/bin/nautilus && sudo dpkg-divert --rename --remove /usr/bin/nautilus echo -e "\nMaking Nautilus manage the desktop again\n" nautilus --no-default-window & ## The only change that isn't undone is the installation of Thunar ## Should Thunar be removed? Or just kept in? ## Don't want to load the script with too many questions? } ## Make sure that we exit if any commands do not complete successfully. ## Thanks to nanotube for this little snippet of code from the early ## versions of UbuntuZilla set -o errexit trap 'echo "Previous command did not complete successfully. Exiting."' ERR ## This is the main code ## Is it necessary to put an elseif in here? Or is ## redundant, since the directory pretty much ## either exists or it doesn't? ## Is there a better way to keep track of whether ## the script has been run before? if [[ -e /usr/share/applications/nonautilusplease ]]; then restorenautilusdefault else makethunardefault fi;

    Read the article

  • Why would BitDefender Bootable Rescue CD be able to identify but unable to fix or delete malware?

    - by DaveDev
    Why would BitDefender Bootable Rescue CD (and loads of other Rescue CDs too) be able to identify but unable to fix or delete malware? It can however put it into quarintine. And what happens when the viruses are put into quarintine? It dosn't really mean anything if it can successfully put the malware into quarintine if it's a CD-bootable OS. It's only quarintined in the context of the memory it exists in. When I restart windows, I'm still infected with loads of viruses. Thanks Dave

    Read the article

  • ASP.net post and default page.

    - by diamandiev
    Scenario: I have a regular aspx page with a form. When someone clicks a button the form submitted via post like normal. HOWEVER. The page where the form resides is the default page(Default.aspx). So when someone goes to the site: http://site.com/ and submits the forms he gets redirected to http://site.com/default.aspx. I tried setting the action of the form to http://site.com/. However asp.net does not allow to use root urls with a POST. So is there any workaround? Ajax is not an option.

    Read the article

  • Windows Command Line

    - by Markus O'Reilly
    Does anyone know how to break out of a for loop when it's typed directly into the windows command-line? I know you can use gotos and labels to break out of it when it's in a batch file, but I can't find anything about breaking out of one on the command line. Here's a simple example: C:> for /l %i in (1,0,1) do @ping -n 1 google.com || (echo ^G & msg user "Google is down!" & QUIT) This should infinitely ping google.com. If it ever fails, it beeps (echo ^G), displays a message box to the user "user" that says "Google is down!", and QUITs. I don't know how to do the quit part though. I guess I could do something like taskkill /f /im cmd.exe, but I was looking for something more elegant. Any tips?

    Read the article

  • Operator overloading outside class

    - by bobobobo
    There are two ways to overload operators for a C++ class: Inside class class Vector2 { public: float x, y ; Vector2 operator+( const Vector2 & other ) { Vector2 ans ; ans.x = x + other.x ; ans.y = y + other.y ; return ans ; } } ; Outside class class Vector2 { public: float x, y ; } ; Vector2 operator+( const Vector2& v1, const Vector2& v2 ) { Vector2 ans ; ans.x = v1.x + v2.x ; ans.y = v1.y + v2.y ; return ans ; } (Apparently in C# you can only use the "outside class" method.) In C++, which way is more correct? Which is preferable?

    Read the article

  • how to initialize a 2d array in perl

    - by Mark
    How do I initialize a 2d array in perl? I am trying the following code: 0 use strict; 10 my @frame_events = (((1) x 10), ((1) x 10)); 20 print "$frame_events[1][1]\n"; but it gives the following error: Can't use string ("1") as an ARRAY ref while "strict refs" in use at ./dyn_pf.pl line 20. This syntax only seems to initialize a 1d array as print "$frame_events[1]\n" works. Though perl doesn't give any error during the assignment.

    Read the article

  • iPhone UIButton addTarget:action:forControlEvents: not working

    - by Aaron Vegh
    I see there are similar problems posted here, but none of the solutions work for me. Here goes: I have a UIButton instance inside a UIView frame, which is positioned within another UIView frame, which is positioned in the main window UIView. To wit: UIWindow --> UIView (searchView) --> UISearchBar (findField) --> UIView (prevButtonView) --> UIButton (prevButton) --> UIView (nextButtonView) --> UIButton (nextButton) So far, so good: everything is laid out as I want it. However, the buttons aren't accepting user input of any kind. I am using the UIButton method addTarget:action:forControlEvents: and to give you an idea of what I'm doing, here's my code for nextButton: nextButton = [UIButton buttonWithType:UIButtonTypeCustom]; [nextButton setImage:[UIImage imageNamed:@"find_next_on.png"] forState:UIControlStateNormal]; [nextButton setImage:[UIImage imageNamed:@"find_next_off.png"] forState:UIControlStateDisabled]; [nextButton setImage:[UIImage imageNamed:@"find_next_off.png"] forState:UIControlStateHighlighted]; [nextButton addTarget:self action:@selector(nextResult:) forControlEvents:UIControlEventTouchUpInside]; The method nextResult: never gets called, the state of the button doesn't change on touching, and there's not a damned thing I've been able to do to get it working. I assume that there's an issue with all these layers of views: maybe something is sitting on top of my button, but I'm not sure what it could be. In the interest of information overload, I found a bit of code that would print out all my view info. This is what I get for my entire view hierarchy: UIWindow {{0, 0}, {320, 480}} UILayoutContainerView {{0, 0}, {320, 480}} UINavigationTransitionView {{0, 0}, {320, 480}} UIViewControllerWrapperView {{0, 64}, {320, 416}} UIView {{0, 0}, {320, 416}} UIWebView {{0, 44}, {320, 416}} UIScroller {{0, 0}, {320, 416}} UIImageView {{0, 0}, {54, 54}} UIImageView {{0, 0}, {54, 54}} UIImageView {{0, 0}, {54, 54}} UIImageView {{0, 0}, {54, 54}} UIImageView {{-14.5, 14.5}, {30, 1}} UIImageView {{-14.5, 14.5}, {30, 1}} UIImageView {{0, 0}, {1, 30}} UIImageView {{0, 0}, {1, 30}} UIImageView {{0, 430}, {320, 30}} UIImageView {{0, 0}, {320, 30}} UIWebDocumentView {{0, 0}, {320, 21291}} UIView {{0, 0}, {320, 44}} UISearchBar {{10, 8}, {240, 30}} UISearchBarBackground {{0, 0}, {240, 30}} UISearchBarTextField {{5, -2}, {230, 31}} UITextFieldBorderView {{0, 0}, {230, 31}} UIPushButton {{205, 6}, {19, 19}} UIImageView {{10, 8}, {15, 15}} UILabel {{30, 7}, {163, 18}} UIView {{290, 15}, {23, 23}} UIButton {{0, 0}, {0, 0}} UIImageView {{-12, -12}, {23, 23}} UIView {{260, 15}, {23, 23}} UIButton {{0, 0}, {0, 0}} UIImageView {{-12, -12}, {23, 23}} UINavigationBar {{0, 20}, {320, 44}} UINavigationButton {{267, 7}, {48, 30}} UIImageView {{0, 0}, {48, 30}} UIButtonLabel {{11, 7}, {26, 15}} UINavigationItemView {{79, 8}, {180, 27}} UINavigationItemButtonView {{5, 7}, {66, 30}} MBProgressHUD {{0, 0}, {320, 480}} UIActivityIndicatorView {{141, 206}, {37, 37}} UILabel {{117, 247}, {86, 27}} The relevant part is noted above the UINavigationBar section. Anyone have any suggestions? I'm all out. Thanks for reading. Aaron.

    Read the article

  • What's the best way to deal with limitations in Google AJAX Language API?

    - by allyourcode
    I'm mostly interested in translation, but I'm sure someone else is looking for info on the other features of the language API (namely transliteration and virtual keyboard). I see alot of pages on the web about the limitations of the Language API, but I don't see anything about this in the official docs. Links to where this is described in the official docs would be greatly appreciated. Also, I'm guessing that the best solution will involve breaking up longer texts and translating each piece. Does this violate Google's term's of use? Doesn't this defeat the purpose of having a limit in the first place? Again, links to official documentation would be great.

    Read the article

  • Remove a child with a specific attribute, in SimpleXML for PHP

    - by TimTowdi
    I have several identical elements with different attributes that I'm accessing with SimpleXML: <data> <seg id="A1"/> <seg id="A5"/> <seg id="A12"/> <seg id="A29"/> <seg id="A30"/> </data> I need to remove a specific seg element, with an id of "A12", how can I do this? I've tried looping through the seg elements and unsetting the specific one, but this doesn't work, the elements remain. foreach($doc->seg as $seg) { if($seg['id'] == 'A12') { unset($seg); } }

    Read the article

  • Google Python Class Day 2 Part 1

    Google Python Class Day 2 Part 1 Google Python Class Day 2 Part 1: Regular Expressions. By Nick Parlante. Support materials and exercises: code.google.com From: GoogleDevelopers Views: 18 0 ratings Time: 42:00 More in Science & Technology

    Read the article

  • what can be causes of http server crash?

    - by mithunmo
    Hello , I am using WAMP server on Windows XP. Apache 2.2.11 MySQL 5.1.36 (INNODB engine) PHP 5.3.0 I observe that my WAMP server crashes in the following scenarios IF I use a Low end PC ( low processor speed and low RAM) After making some changes to httpd.conf file .For eg changing the Allow from IP address . But here it crashes only once and then it starts to work fine. Random crashes CRASH LOG szAppName : httpd.exe szAppVer : 2.2.11.0 szModName : php5ts.dll szModVer : 5.3.0.0 offset : 0000c309 C:\DOCUME~1\blrcom\LOCALS~1\Temp\WERc677.dir00\httpd.exe.mdmp C:\DOCUME~1\blrcom\LOCALS~1\Temp\WERc677.dir00\appcompat.txt My questions Does high CPU utilization/LOW RAM can also cause the HTTP server to crash ? excessive file reading as in every 10 seconds ? unlimited script execution time . I have set the maximum execution time in php script to 0 as my script has to execute for sometimes 2-3 days. Is there any way to avoid this ? Access to Database ? Should we use lock before reading and writing Can these be the reasons for random wamp server crashes ? OR is is some other programming error ? Please guide me . Regards, Mithun

    Read the article

  • Bought a 1U server, now can't find rails

    - by Paul Tomblin
    I bought a 1U server used on eBay (a Supermicro motherboard, but branded "Asempra"), and I also bought a set of "Supermicro" rails, but unfortunately the rails didn't fit the server. The side of the server looks like: Can you tell me where I can find rails for this machine?

    Read the article

  • Windows 7 boot from downloaded .iso

    - by Travis
    Downloaded Windows 7 .iso off the net and want to install from USB key on old laptop (previously/still running XP) that has no CD/DVD drive. Here's what I've got so far: Read the instructions in this post: http://kmwoley.com/blog/?p=345 , which were quite straight forward and clear. Properly formatted USB key with another laptop (this one running vista), also with no DVD drive wasn't sure how to make the USB bootable, since my .iso was downloaded and I have no DVD drive. Any help would be much appreciated!!

    Read the article

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