Daily Archives

Articles indexed Friday May 14 2010

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

  • How do i get out of the habit of procedural programming and into object oriented programming?

    - by Shadi Almosri
    Hiya all, I'm hoping to get some tips to kinda help me break out of what i consider after all these years a bad habit of procedural programming. Every time i attempt to do a project in OOP i end up eventually reverting to procedural. I guess i'm not completely convinced with OOP (even though i think i've heard everything good about it!). So i guess any good practical examples of common programming tasks that i often carry out such as user authentication/management, data parsing, CMS/Blogging/eComs are the kinda of things i do often, yet i haven't been able to get my head around how to do them in OOP and away from procedural, especially as the systems i build tend to work and work well. One thing i can see as a downfall to my development, is that i do reuse my code often, and it often needs more rewrites and improvement, but i sometimes consider this as a natural evolution of my software development. Yet i want to change! to my fellow programmers, help :) any tips on how i can break out of this nasty habbit?

    Read the article

  • Upgrade MS Sql Report Server 08 for Dundas charts

    - by hadi
    Hi, We have ms sql server 2008, however the new dundas charts are not available on the report server. How do I upgrade the report server so it gets the new dundas charts as well. Dundas charts are a part of Microsoft charts now in the new version of the report server. Your help would be greatly appreciated

    Read the article

  • How to burn rEfit .cdr or .dmg in ubuntu or windows?

    - by beemzet
    Hi all, I don't have mac installed on my macbook pro, but I have Ubuntu and Windows. I was following this website http://mac.linux.be/content/single-boot-linux-without-delay to boot faster into Ubuntu without a 30 second delay. But I can't even burn a rEfit cdr image. Do you know how to burn it? Thanks

    Read the article

  • CSS code formatting from Autohotkey..........

    - by metal gear solid
    i need functionality of this tool in Autohotkey keyboard shortcut. If i would select all code and press AHK key combination then code should be set like this tool does. single line/ multiline. Need to AHK script for both multiline and single line http://www.newmediacampaigns.com/files/posts/css-formatting/clean.php

    Read the article

  • Using mem_fun_ref with boost::shared_ptr

    - by BlueRaja
    Following the advice of this page, I'm trying to get shared_ptr to call IUnknown::Release() instead of delete: IDirectDrawSurface* dds; ... //Allocate dds return shared_ptr<IDirectDrawSurface>(dds, mem_fun_ref(&IUnknown::Release)); error C2784: 'std::const_mem_fun1_ref_t<_Result,_Ty,_Arg std::mem_fun_ref(Result (_thiscall _Ty::* )(_Arg) const)' : could not deduce template argument for 'Result (_thiscall _Ty::* )(Arg) const' from 'ULONG (_cdecl IUnknown::* )(void)' error C2784: 'std::const_mem_fun_ref_t<_Result,_Ty std::mem_fun_ref(Result (_thiscall _Ty::* )(void) const)' : could not deduce template argument for 'Result (_thiscall _Ty::* )(void) const' from 'ULONG (__cdecl IUnknown::* )(void)' error C2784: 'std::mem_fun1_ref_t<_Result,_Ty,_Arg std::mem_fun_ref(Result (_thiscall _Ty::* )(_Arg))' : could not deduce template argument for 'Result (_thiscall _Ty::* )(Arg)' from 'ULONG (_cdecl IUnknown::* )(void)' error C2784: 'std::mem_fun_ref_t<_Result,_Ty std::mem_fun_ref(Result (_thiscall _Ty::* )(void))' : could not deduce template argument for 'Result (_thiscall _Ty::* )(void)' from 'ULONG (__cdecl IUnknown::* )(void)' error C2661: 'boost::shared_ptr::shared_ptr' : no overloaded function takes 2 arguments I have no idea what to make of this. My limited template/functor knowledge led me to try typedef ULONG (IUnknown::*releaseSignature)(void); shared_ptr<IDirectDrawSurface>(dds, mem_fun_ref(static_cast<releaseSignature>(&IUnknown::Release))); But to no avail. Any ideas?

    Read the article

  • Is it possible to overwrite a static method in parent class?

    - by MartinDenny2069
    I have a static method defined in a base class, I want to overwrite this method in its child class, is it possible? I tried this but it did not work as I expected. When I created an instance of class B and invoke its callMe() method, the static foo() method in class A is invoked. public abstract class A { public static void foo() { System.out.println("I am base class"); } public void callMe() { foo(); } } Public class B { public static void foo() { System.out.println("I am child class"); } }

    Read the article

  • Database hosting options for a PosgreSQL project

    - by AJ
    PostgreSQL has announced an Android app [contest] (http://wiki.postgresql.org/wiki/AndroidAppContest). I wanted to try out something but the only hosting I have does not provide PostgreSQL. Do I have any economical (read cheap :D ) options? Is there a free hosting that anyone knows of? Thanks in advance. --AJ

    Read the article

  • Getting ssh to execute a command in the background on target machine

    - by dagorym
    This is a follow-on question to the How do you use ssh in a shell script? question. If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ssh command to return? When I try to just include the ampersand (&) at the end of the command it just hangs. The exact form of the command looks like this: ssh user@target "cd /some/directory; program-to-execute &" Any ideas? One thing to note is that logins to the the target machine always produce a text banner and I have ssh keys set up so no password is required.

    Read the article

  • Can somebody suggest good source for IMS?

    - by Raja Reddy
    I would like to learn working with IMS, can somebody suggest me a good source? I'm not sure if it matters to say that I have quite good exposure and experience with INSYNC DB2 and QMF. So anything that can depict and explain the advantages and disadvantages over IMS would be really helpful. Thanks for your help beforehand..

    Read the article

  • how to retain one million of simultanous TCP connections?

    - by cow
    i am to design a server that needs to serve millions of clients that are simultaneously connected with the server via TCP. the data traffic between the server and the clients may be sparse. so bandwidth issue can be ignored. one important requirement is that whenever the server needs to send data to any client it can use the existing TCP connection instead of opening a new connection toward the client (because client can be behind a firewall). does anybody know how to do it and what hardware/software is needed (at the least cost)? thanks in advance for any suggestion.

    Read the article

  • Shorthand for nested null checking C#

    - by Myster
    As far as I know there is not a significantly more elegant way to write the following.... string src; if((ParentContent!= null) &&(ParentContent.Image("thumbnail") != null) &&(ParentContent.Image("thumbnail").Property("src") != null)) src = ParentContent.Image("thumbnail").Property("src").Value Do you think there should be a C# language feature to make this shorter? And if so, what should it look like? for example, something like extending the ?? operator string src = ParentContent??.Image("thumbnail")??.Property("width")??.Value; Apologies for the rather contrived example, and my over-simplified solution.

    Read the article

  • How can I center something if I don't know ahead of time what the width is?

    - by zeckdude
    I am trying to center a paragraph tag with some text in it within a div, but I can't seem to center it using margin: 0 auto without having to specify a fixed width for the paragraph. I don't want to specify a fixed width, because I will have dynamic text coming into the paragraph tag and it will always be a different width based on how much text it is. Does anyone know how I can center the paragraph tag within the div without having to specify a fixed width for the paragraph or without using tables?

    Read the article

  • Is any drag and drop facility in BlackBerry?

    - by sairam333
    I am new to BlackBerry. I have experience on Android. Now I want to learn BlackBerry. In Android an application contains res folder in that we add the layout in XML form and we can create the forms easily using views and layouts. In the same way, is there any facility in BlackBerry? How do I prepare forms in BlackBerry?

    Read the article

  • Creating a new workbook in Excel from Python breaks

    - by Marcelo Cantos
    I am trying to use the stock standard win32com approach to drive Excel 2007 from Python. However, when I try to create a new workbook, things go pear-shaped: Python 2.6.4 (r264:75706, Nov 3 2009, 13:23:17) [MSC v.1500 32 bit (Intel)] on win32 ... >>> import win32com.client >>> excel = win32com.client.Dispatch("Excel.Application") >>> wb = excel.Workbooks.Add() Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> wb = excel.Workbooks.Add() File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", line 467, in __getattr__ if self._olerepr_.mapFuncs.has_key(attr): return self._make_method_(attr) File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", line 295, in _make_method_ methodCodeList = self._olerepr_.MakeFuncMethod(self._olerepr_.mapFuncs[name], methodName,0) File "C:\Python26\lib\site-packages\win32com\client\build.py", line 297, in MakeFuncMethod return self.MakeDispatchFuncMethod(entry, name, bMakeClass) File "C:\Python26\lib\site-packages\win32com\client\build.py", line 318, in MakeDispatchFuncMethod s = linePrefix + 'def ' + name + '(self' + BuildCallList(fdesc, names, defNamedOptArg, defNamedNotOptArg, defUnnamedArg, defOutArg) + '):' File "C:\Python26\lib\site-packages\win32com\client\build.py", line 604, in BuildCallList argName = MakePublicAttributeName(argName) File "C:\Python26\lib\site-packages\win32com\client\build.py", line 542, in MakePublicAttributeName return filter( lambda char: char in valid_identifier_chars, className) File "C:\Python26\lib\site-packages\win32com\client\build.py", line 542, in <lambda> return filter( lambda char: char in valid_identifier_chars, className) UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 52: ordinal not in range(128) >>> What is going wrong here? Have I done something silly, or is Python/win32com/Excel somehow broken?

    Read the article

  • Quick question about pointers

    - by xbonez
    So, I have this code fragment: int * iPtr ; int * jPtr ; int i = 5, k = 7; iPtr = &i; jPtr = iPtr ; I have just started learning about pointers, and need to get some doubts cleared. is jPtr now essentially also pointing at i? I know I can change the value of i by using *iPtr, but how can I change the value of the object being pointed to by jPtr? How will changing the object being pointed to by jPtr affect the value of the object pointed to by iPtr, and i ?

    Read the article

  • iPhone link to map directions using string "current location" not lat and lng for saddr

    - by Nick
    I know there are numerous questions about how to construct a sharedApplication link to the maps app specifying the start and end address with coordinates. I've got that working no problem. Has anyone found a way to link with a source address generically specified as "current location". I ask because the scenario I'm working on having Core Location or a UIMapView would only be necessary in order to determine the user location prior to handing off to the map app where the user locating would seem to just happen again. I've tried throwing UTF8'd "Current Location" and "[Current Location]" into the saddr parameter which amusingly starts from Current Montana. I've also tried simply excluding the saddr param. I know this is often tread territory but this particular situation wasn't covered by anything I found searching here or on mapki. Before I add the core location code I just wanted to make sure there wasn't a more limited way to tackle this. Thanks

    Read the article

  • How can I reuse .NET resources in multiple executables?

    - by Brandon
    I have an existing application that I'm supposed to take and create a "mini" version of. Both are localized apps and we would like to reuse the resources in the main application as is. So, here's the basic structure of my apps: MainApplication.csproj /Properties/Resources.resx /MainUserControl.xaml (uses strings in Properties/Resources.resx) /MainUserControl.xaml.cs MiniApplication.csproj link to MainApplication/Properties/Resources.resx link to MainApplication/MainUserControl.xaml link to MainApplication/MainUserControl.xaml.cs MiniApplication.xaml (tries to use MainUserControl from MainApplication link) So, in summary, I've added the needed resources and user control from the main application as links in the mini application. However, when I run the mini application, I get the following exception. I'm guessing it's having trouble with the different namespaces, but how do I fix? Could not find any resources appropriate for the specified culture or the neutral culture. Make sure \"MainApplication.Properties.Resources.resources\" was correctly embedded or linked into assembly \"MiniApplication\" at compile time, or that all the satellite assemblies required are loadable and fully signed. FYI, I know I could put the user control in a user control library but the problem is that the mini application needs to have a small footprint. So, we only want to include what we need.

    Read the article

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