Daily Archives

Articles indexed Thursday April 8 2010

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

  • Porting Perl to Python.

    - by The Rook
    I am wondering if there are any tips or tricks to converting perl into python. It would be nice if there was a script like python's 2to3. Or perhaps some compatibility libraries.

    Read the article

  • Linking indivuidal queries in a unbound listbox in ACCESS 2007

    - by Jeremy
    I have created a unbound listbox. I have the box showing a list of queries i want the use to be able to select. My problem is I don't understand how to get the submit button to select the currently selected query and run it. So how do I link the submit button to the listbox and have each item in the box submit it's own query.

    Read the article

  • How do I allow edit only a particular column in datagridview in windows application using C#

    - by cmrhema
    Hi, I want to enable only two columns in the DataGridview to be able to edit. The others should not be allowed to edit. Further I am not directly linking to datasource; I will be doing some thing like this way DataTable dt = new DataTable(); dt.Columns.Add("Email"); dt.Columns.Add("email1"); for (int i = 0; i < 5; i++) { DataRow dr = dt.NewRow(); dr["Email"] = i.ToString(); dr["email1"] = i.ToString() + "sdf"; dt.Rows.Add(dr); } BindingSource bs = new BindingSource(); bs.DataSource = dt; dataGridView1.DataSource = bs; So which property should I set, that will enable only one column say Email(in the above eg) to be editable. Thanks

    Read the article

  • Database migrations for SQL Server

    - by Art
    I need a database migration framework for SQL Server, capable of managing both schema changes and data migrations. I guess I am looking for something similar to django's South framework here. Given the fact that South is tightly coupled with django's ORM, and the fact that there's so many ORMs for SQL Server I guess having just a generic migration framework, enabling you to write and execute in controlled and sequential manner SQL data/schema change scripts should be sufficient.

    Read the article

  • virtualenvwrapper .hook problem

    - by Wraith
    I've used virtualenvwrapper, but I'm having problems running it on a new computer. My .bashrc file is updated per the instructions: export WORKON_HOME=$DEV_HOME/projects source /usr/local/bin/virtualenvwrapper.sh But when source is run, I get the following: bash: /25009.hook: Permission denied bash: /25009.hook: No such file or directory This previous post leads me to believe the filename is being recycled and locked because virtualenvwrapper.sh uses $$. Is there any way to fix this?

    Read the article

  • Transparent Proxy for IPv6 traffic under Linux

    - by Jerub
    When maintaining networks, it is often an expedient thing to do to run a transparent proxy. By transparent proxy I mean a proxy that 'hijacks' outgoing connections and runs them through a local service. Specifically I run a linux firewall with squid configured so that all tcp/ip connections fowarded on port 80 are proxied by squid. This is achived using the iptables 'nat' table, using IPv4. But iptables for IPv6 does not have a 'nat' table, so I cannot use the same implementation. What is a technique I can use to transparently proxy traffic for IPv6 connections? (this question has still not been answered adequately yet, a year on)

    Read the article

  • A lot has happened since last post!!!!!!!!!

    - by Ratman21
    And I mean a lot! First off had two interviews (one was selling insurance) and other installing cable. I have more hope for the cable one. Getting more emails from my job search engines (having problems with going through them and applying for those jobs, I know I can do). It seems the more I apply to, the more job emails pop up in my in box. But at the same time I am fighting feelings of worthlessness (18 months and no job). It is putting a strain on my marriage (We had had blow out over a broken drinking glass since I last posted).     But, at the same time, I am fighting mad about (a figure of speech, really) not having a job. Look just because I am over 55 and have gray hair. It does not mean, my brain is dead or I can not longer trouble shoot a router or circuit or LAN issue. Or that I can do “IT” work at all. And I could prove this if; some one would give me at job. Come on try me for 90 days at min. wage.   I know you will end up keeping me (hope fully at normal pay) around. Is any one hearing me…come on take up the challenge!

    Read the article

  • Better layout of Expose on Leopard

    - by joshhunt
    Is it possible for Expose on Mac OS X Leopard to arrange the preview windows in a more optimal manner? After a while on superuser, opening up a new windows for each question that interests me, Expose looks like this: It is of minimal value seeing each preview is so small. I have no hope in hell seeing the contents of each windows. Is there some secret setting or 3rd party application that could fix this for me?

    Read the article

  • Why does virtual assignment behave differently than other virtual functions of the same signature?

    - by David Rodríguez - dribeas
    While playing with implementing a virtual assignment operator I have ended with a funny behavior. It is not a compiler glitch, since g++ 4.1, 4.3 and VS 2005 share the same behavior. Basically, the virtual operator= behaves differently than any other virtual function with respect to the code that is actually being executed. struct Base { virtual Base& f( Base const & ) { std::cout << "Base::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Base::operator=(Base const &)" << std::endl; return *this; } }; struct Derived : public Base { virtual Base& f( Base const & ) { std::cout << "Derived::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Derived::operator=( Base const & )" << std::endl; return *this; } }; int main() { Derived a, b; a.f( b ); // [0] outputs: Derived::f(Base const &) (expected result) a = b; // [1] outputs: Base::operator=(Base const &) Base & ba = a; Base & bb = b; ba = bb; // [2] outputs: Derived::operator=(Base const &) Derived & da = a; Derived & db = b; da = db; // [3] outputs: Base::operator=(Base const &) ba = da; // [4] outputs: Derived::operator=(Base const &) da = ba; // [5] outputs: Derived::operator=(Base const &) } The effect is that the virtual operator= has a different behavior than any other virtual function with the same signature ([0] compared to [1]), by calling the Base version of the operator when called through real Derived objects ([1]) or Derived references ([3]) while it does perform as a regular virtual function when called through Base references ([2]), or when either the lvalue or rvalue are Base references and the other a Derived reference ([4],[5]). Is there any sensible explanation to this odd behavior?

    Read the article

  • .NET XmlSerializer fails with List<T>

    - by Redshirt
    I'm using a singleton class to save all my settings info. It's first utilized by calling Settings.ValidateSettings(@"C:\MyApp"). The problem I'm having is that 'List Contacts' is causing the xmlserializer to fail to write the settings file, or to load said settings. If I comment out the List<T> then I have no problems saving/loading the xml file. What am I doing wrong? // The actual settings to save public class MyAppSettings { public bool FirstLoad { get; set; } public string VehicleFolderName { get; set; } public string ContactFolderName { get; set; } public List<ContactInfo> Contacts { get { if (contacts == null) contacts = new List<ContactInfo>(); return contacts; } set { contacts = value; } } private List<ContactInfo> contacts; } // The class in which the settings are manipulated public static class Settings { public static string SettingPath; private static MyAppSettings instance; public static MyAppSettings Instance { get { if (instance == null) instance = new MyAppSettings(); return instance; } set { instance = value; } } public static void InitializeSettings(string path) { SettingPath = Path.GetFullPath(path + "\\MyApp.xml"); if (File.Exists(SettingPath)) { LoadSettings(); } else { Instance.FirstLoad = true; Instance.VehicleFolderName = "Cars"; Instance.ContactFolderName = "Contacts"; SaveSettingsFile(); } } // load the settings from the xml file private static void LoadSettings() { XmlSerializer ser = new XmlSerializer(typeof(MyAppSettings)); TextReader reader = new StreamReader(SettingPath); Instance = (MyAppSettings)ser.Deserialize(reader); reader.Close(); } // Save the settings to the xml file public static void SaveSettingsFile() { XmlSerializer ser = new XmlSerializer(typeof(MyAppSettings)); TextWriter writer = new StreamWriter(SettingPath); ser.Serialize(writer, Settings.Instance); writer.Close(); } public static bool ValidateSettings(string initialFolder) { try { Settings.InitializeSettings(initialFolder); } catch (Exception e) { return false; } // Do some validation logic here return true; } } // A utility class to contain each contact detail public class ContactInfo { public string ContactID; public string Name; public string PhoneNumber; public string Details; public bool Active; public int SortOrder; }

    Read the article

  • Loading views dynamically

    - by Dan
    Case 1: I have created View-based sample application and tried execute below code. When I press on "Job List" button it should load another view having "Back Btn" on it. In test function, if I use [self.navigationController pushViewController:jbc animated:YES]; nothing gets loaded, but if I use [self presentModalViewController:jbc animated:YES]; it loads another view haveing "Back Btn" on it. Case 2: I did create another Navigation Based Applicaton and used [self.navigationController pushViewController:jbc animated:YES]; it worked as I wanted. Can someone please explain why it was not working in Case 1. Does it has something to do with type of project that is selected? @interface MWViewController : UIViewController { } -(void) test; @end @interface JobViewCtrl : UIViewController { } @end @implementation MWViewController (void)viewDidLoad { UIButton* btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(80, 170, 150, 35); [btn setTitle:@"Job List!" forState:UIControlStateNormal]; [btn addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:btn]; [super viewDidLoad]; } -(void) test { JobViewCtrl* jbc = [[JobViewCtrl alloc] init]; [self.navigationController pushViewController:jbc animated:YES]; //[self presentModalViewController:jbc animated:YES]; [jbc release]; } (void)dealloc { [super dealloc]; } @end @implementation JobViewCtrl -(void) loadView { self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; self.view.backgroundColor = [UIColor grayColor]; UIButton* btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(80, 170, 150, 35); [btn setTitle:@"Back Btn!" forState:UIControlStateNormal]; [self.view addSubview:btn]; } @end

    Read the article

  • Binary operator overloading on a templated class (C++)

    - by GRB
    Hi all, I was recently trying to gauge my operator overloading/template abilities and as a small test, created the Container class below. While this code compiles fine and works correctly under MSVC 2008 (displays 11), both MinGW/GCC and Comeau choke on the operator+ overload. As I trust them more than MSVC, I'm trying to figure out what I'm doing wrong. Here is the code: #include <iostream> using namespace std; template <typename T> class Container { friend Container<T> operator+ <> (Container<T>& lhs, Container<T>& rhs); public: void setobj(T ob); T getobj(); private: T obj; }; template <typename T> void Container<T>::setobj(T ob) { obj = ob; } template <typename T> T Container<T>::getobj() { return obj; } template <typename T> Container<T> operator+ <> (Container<T>& lhs, Container<T>& rhs) { Container<T> temp; temp.obj = lhs.obj + rhs.obj; return temp; } int main() { Container<int> a, b; a.setobj(5); b.setobj(6); Container<int> c = a + b; cout << c.getobj() << endl; return 0; } This is the error Comeau gives: Comeau C/C++ 4.3.10.1 (Oct 6 2008 11:28:09) for ONLINE_EVALUATION_BETA2 Copyright 1988-2008 Comeau Computing. All rights reserved. MODE:strict errors C++ C++0x_extensions "ComeauTest.c", line 27: error: an explicit template argument list is not allowed on this declaration Container<T> operator+ <> (Container<T>& lhs, Container<T>& rhs) ^ 1 error detected in the compilation of "ComeauTest.c". I'm having a hard time trying to get Comeau/MingGW to play ball, so that's where I turn to you guys. It's been a long time since my brain has melted this much under the weight of C++ syntax, so I feel a little embarrassed ;). Thanks in advance. EDIT: Eliminated an (irrelevant) lvalue error listed in initial Comeau dump.

    Read the article

  • Combing a symlink to an external folder with a Rewrite Rule?

    - by Tristan
    I've created a symlink in an account to an folder external to that user account (although with the same ownership). The symlink works but I'd like to combine it with a RewriteRule, and I'm having problems with that. For instance I create the symlink with: ln -s /home/target shortcut And I add the following RewriteRule to .htaccess: RewriteRule ^shortcut/([a-zA-Z0-9_-]+) shortcut/index.php?var=$1 This however fails. Yet if instead of being located in an external folder, the target folder is in the same folder as the shortcut address, then the RewriteRule will work. i.e. it works if the symlink is: ln -s ./target shortcut How might I get the RewriteRule working for the case where the target folder is an external folder?

    Read the article

  • image and text in listobx

    - by Anu
    I want to inesrt one image beside one text,like this i have to include three items in listbox. in run time. If the number of items is more than 3,then the last items get removed. How can i do that in WPF,C#. And the newly added item should get added in first place. Now i did up to include text at runtime. if (listBox1.Items.Count >= 3) listBox1.Items.RemoveAt(2); listBox1.Items.Insert(0,lData); But i do nto know how to insert image(small rectangle with red colr,green color)

    Read the article

  • Comparing images using SIFT

    - by Luís Fernando
    I'm trying to compare 2 images that are taken from a digital camera. Since there may be movement on the camera, I want to first make the pictures "match" and then compare (using some distant function). To match them, I'm thinking about cropping the second picture and using SIFT to find it inside the first picture... it will probably have a small difference on scale/translation/rotation so then I'd need to find the transformation matrix that converts image 1 to image 2 (based on points found by SIFT) any ideas on how to do that (or I guess that's a common problem that may have some opensource implementation?)? thanks

    Read the article

  • Iceface: reset old values while update

    - by J L A
    Hello all, I have information of user in bean, and I want to update this user. but my problem is: when the value of inputtext changed I want to put validation on it. and if the new value is wrong I want to reset the old value. please can any one help me

    Read the article

  • How To Detect "Touch Down" in superview of UIScrollView?

    - by wgpubs
    I have a UIView that contains a UIScrollView and I want to be able to capture the "Touch Down" event in the UIView any time the user taps on the UIScrollView. I've tried including all the touchesBegan/Ended/Cancelled handlers in my UIViewController but none of them get fired when tapping inside the UIScrollView contained in the main UIView. What is the best way to accomplish this?

    Read the article

  • Compiling flex file into dll.

    - by Szpilona
    Hi, I've got a lexer created with flex (cygwin). Normally I compile it to an .exe file. For the newest project I need a lexer to use in a bigger C# program running on Windows XP. Of course I can execute a file using System.Diagnostics.Process. But it is not the best solution for me as I want that program to run on several machines. How can I create a dll under cygwin having the source code of the lexer? Thanks in advance... Szpilona

    Read the article

  • Some questions about special operators i've never seen in C++ code.

    - by toto
    I have downloaded the Phoenix SDK June 2008 (Tools for compilers) and when I'm reading the code of the Hello sample, I really feel lost. public ref class Hello { //-------------------------------------------------------------------------- // // Description: // // Class Variables. // // Remarks: // // A normal compiler would have more flexible means for holding // on to all this information, but in our case it's simplest (if // somewhat inelegant) if we just keep references to all the // structures we'll need to access as classstatic variables. // //-------------------------------------------------------------------------- static Phx::ModuleUnit ^ module; static Phx::Targets::Runtimes::Runtime ^ runtime; static Phx::Targets::Architectures::Architecture ^ architecture; static Phx::Lifetime ^ lifetime; static Phx::Types::Table ^ typeTable; static Phx::Symbols::Table ^ symbolTable; static Phx::Phases::PhaseConfiguration ^ phaseConfiguration; 2 Questions : What's that ref keyword? What is that sign ^ ? What is it doing protected: virtual void Execute ( Phx::Unit ^ unit ) override; }; override is a C++ keyword too? It's colored as such in my Visual Studio. I really want to play with this framework, but this advanced C++ is really an obstacle right now. Thank you.

    Read the article

  • Cleanest way to tell if 3 times are within half an hour of each other

    - by niggles
    I have 3 date / time input boxes on a form and the user cannot select any times within half an hour of each other. I've converted all values to epoch format using a Javascript implementation of strtotime, but not sure how to recursively check that any of the times are actually half an hour apart. I can hand code all checks, but it would be cleaner to write a recursive function (especially if there were theoretically more than 3 time slots). Did some Google research but no luck. Any suggestions on implementing this in Javascript or Jquery. Thanks.

    Read the article

  • Setup requires .NET Framework v1.1.4322 - BUT i already have all frameworks 1.0,1.1,2.0,3.0,and 3.5

    - by joedotnot
    Tried to install some program, it gives above message requiring 1.1.4322. BUT as the title says, all the frameworks are already installed on my WinXP SP2, if i inspect C:\WINDOWS\Microsoft.NET\Framework\ The machine has VS2008 which essentially required full installtion of Framework 3.5 SP1. Any ideas? (i know, just re-install framework 1.1 again, but why should i - I can see all Frameworks are installed, and things are supposed to be backward compatible.

    Read the article

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