Search Results

Search found 405 results on 17 pages for 'decorator chaining'.

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

  • Error with python decorator

    - by Timmy
    I get this error object has no attribute 'im_func' with this class Test(object): def __init__(self, f): self.func = f def __call__( self, *args ): return self.func(*args) pylons code: class TestController(BaseController): @Test def index(self): return 'hello world'

    Read the article

  • BlockingQueue decorator that logs removed objects

    - by scompt.com
    I have a BlockingQueue that's being used in a producer-consumer situation. I would like to decorate this queue so that every object that's taken from it is logged. I know what the straightforward implementation would look like: simply implement BlockingQueue and accept a BlockingQueue in the constructor to which all of the methods would delegate. Is there another way that I'm missing? A library perhaps? Something with a callback interface?

    Read the article

  • Window borders missing - gtk-window-decorator segmentation fault

    - by Balakrshnan Ramakrishnan
    I have been using Ubuntu for about 1 year now and I got a problem just two days ago. Suddenly I started experiencing a problem with the window borders (title bar with close, maximize, and minimize buttons). The problem : The window borders disappear I run "gtk-window-decorator --replace" For like 20 seconds everything is back to normal But it again returns to the problem. I searched over the Internet and found that my problem is similar to what is specified in this bug report: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/814091 This bug report says that the "fix released". I updated everything using the Update Manager, but still the problem remains. Can anyone let me know whether the problem is fixed? If yes, can you please let me know how to do it? I have already tried normal replace/reset commands like unity --reset unity --replace compiz --replace The "window borders" plugin is on in CCSM (CompizConfig Settings Manager) and it points to "gtk-window-decorator". I use Ubuntu 11.10 on an Intel Core2Duo T6500 with AMD Mobility Radeon HD 4300 graphics card. If you need more information, please let me know.

    Read the article

  • Use decorator and factory together to extend objects?

    - by TheClue
    I'm new to OOP and design pattern. I've a simple app that handles the generation of Tables, Columns (that belong to Table), Rows (that belong to Column) and Values (that belong to Rows). Each of these object can have a collection of Property, which is in turn defined as an enum. They are all interfaces: I used factories to get concrete instances of these products, depending on circumnstances. Now I'm facing the problem of extending these classes. Let's say I need another product called "SpecialTable" which in turn has some special properties or new methods like 'getSomethingSpecial' or an extended set of Property. The only way is to extend/specialize all my elements (ie. build a SpecialTableFactory, a SpecialTable interface and a SpecialTableImpl concrete)? What to do if, let's say, I plan to use standard methods like addRow(Column column, String name) that doesn't need to be specialized? I don't like the idea to inherit factories and interfaces, but since SpecialTable has more methods than Table i guess it cannot share the same factory. Am I wrong? Another question: if I need to define product properties at run time (a Table that is upgraded to SpecialTable at runtime), i guess i should use a decorator. Is it possible (and how) to combine both factory and decorator design? Is it better to use a State or Strategy pattern, instead?

    Read the article

  • How to differentiate between method and function in a decorator?

    - by defnull
    I want to write a decorator that acts differently depending on whether it is applied to a function or to a method. def some_decorator(func): if the_magic_happens_here(func): # <---- Point of interest print 'Yay, found a method ^_^ (unbound jet)' else: print 'Meh, just an ordinary function :/' return func class MyClass(object): @some_decorator def method(self): pass @some_decorator def function(): pass I tried inspect.ismethod(), inspect.ismethoddescriptor() and inspect.isfunction() but no luck. The problem is that a method actually is neither a bound nor an unbound method but an ordinary function as long as it is accessed from within the class body. What I really want to do is to delay the actions of the decorator to the point the class is actually instantiated because I need the methods to be callable in their instance scope. For this, I want to mark methods with an attribute and later search for these attributes when the .__new__() method of MyClass is called. The classes for which this decorator should work are required to inherit from a class that is under my control. You can use that fact for your solution. In the case of a normal function the delay is not necessary and the decorator should take action immediately. That is why I wand to differentiate these two cases.

    Read the article

  • How do I add a method with a decorator to a class in python?

    - by Timmy
    How do I add a method with a decorator to a class? I tried def add_decorator( cls ): @dec def update(self): pass cls.update = update usage add_decorator( MyClass ) MyClass.update() but MyClass.update does not have the decorator @dec did not apply to update I'm trying to use this with orm.reconstructor in sqlalchemy.

    Read the article

  • Method chaining vs encapsulation

    - by Oak
    There is the classic OOP problem of method chaining vs "single-access-point" methods: main.getA().getB().getC().transmogrify(x, y) vs main.getA().transmogrifyMyC(x, y) The first seems to have the advantage that each class is only responsible for a smaller set of operations, and makes everything a lot more modular - adding a method to C doesn't require any effort in A, B or C to expose it. The downside, of course, is weaker encapsulation, which the second code solves. Now A has control of every method that passes through it, and can delegate it to its fields if it wants to. I realize there's no single solution and it of course depends on context, but I would really like to hear some input about other important differences between the two styles, and under what circumstances should I prefer either of them - because right now, when I try to design some code, I feel like I'm just not using the arguments to decide one way or the other.

    Read the article

  • Compiz window decorator randomly disappears

    - by adjfac
    I know people have posted this problem before such as http://askubuntu.com/users/authenticate/?s=9b515fe8-5da2-4bb9-ba01-dcea538b9b9c&dnoa.userSuppliedIdentifier=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid&openid.mode=cancel&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0 but i am looking for a more permanent solution right now. It happens to me at least once a day and when that happens, I usually go to compiz, uncheck and check window decorator and it will bring it back. But it's sort annoying and just wonder if there is a permanent fix out yet? I am using gnome (not unity), on a bran-new thinkpad t520.

    Read the article

  • Class decorator to declare static member (e.g., for log4net)?

    - by Ken
    I'm using log4net, and we have a lot of this in our code: public class Foo { private static readonly ILog log = LogManager.GetLogger(typeof(Foo)); .... } One downside is that it means we're pasting this 10-word section all over, and every now and then somebody forgets to change the class name. The log4net FAQ also mentions this alternative possibility, which is even more verbose: public class Foo { private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); ... } Is it possible to write a decorator to define this? I'd really like to say simply: [LogMe] // or perhaps: [LogMe("log")] public class Foo { ... } I've done similar things in other languages, but never a statically-compiled language like C#. Can I define class members from a decorator?

    Read the article

  • Automatically decorating every instance method in a class

    - by max
    I want to apply the same decorator to every method in a given class, other than those that start and end with __. It seems to me it should be doable using a class decorator. Are there any pitfalls to be aware of? Ideally, I'd also like to be able to: disable this mechanism for some methods by marking them with a special decorator enable this mechanism for subclasses as well enable this mechanism even for methods that are added to this class in runtime [Note: I'm using Python 3.2, so I'm fine if this relies on features added recently.] Here's my attempt: _methods_to_skip = {} def apply(decorator): def apply_decorator(cls): for method_name, method in get_all_instance_methods(cls): if (cls, method) in _methods_to_skip: continue if method_name[:2] == `__` and method_name[-2:] == `__`: continue cls.method_name = decorator(method) return apply_decorator def dont_decorate(method): _methods_to_skip.add((get_class_from_method(method), method)) return method Here are things I have problems with: how to implement get_all_instance_methods function not sure if my cls.method_name = decorator(method) line is correct how to do the same to any methods added to a class in runtime how to apply this to subclasses how to implement get_class_from_method

    Read the article

  • Subdomain Routing Rules (using chaining) Broke after upgrading to Zend Framework 1.9.5, but only for

    - by Dan
    I asked a similar question months ago (see How do I write Routing Chains for a Subdomain in Zend Framework in a routing INI file?), on how to write chaining rules in an app.ini format. The answer to this question worked wonderfully! Now, however, I have upgraded to the latest version of the Zend Framework 1.9.5 (I needed to upgrade for another issue) and now my subdomains no longer work! To clarify, if I visit subdomain.domain.com, it does not recognize my rule. However, if I visit subdomain.domain.com/somepage/ it does recognize my routing rule. Here is my code: ;; the following is apparently being ignored, and does not work routes.manager.type = "Zend_Controller_Router_Route_Hostname" routes.manager.route = "manager.sitename.com" routes.manager.defaults.module = "manager" ;; this is not being ignored and works! routes.manager.chains.settings.type = "Zend_Controller_Router_Route_Static" routes.manager.chains.settings.route = "/settings" routes.manager.chains.settings.defaults.controller = "manager" routes.manager.chains.settings.defaults.action = "settings" So for example, if I go to manager.sitename.com, it just redirects to my default index and controller (does not access the module, $this-getRequest()-getModuleName() is blank). However, if I go to manager.sitename.com/settings, the page comes up! This app.ini configuration works fine in ZF 1.7.8, But now since I upgraded to 1.9.5, it no longer works. I have tried adding routes.manager.defaults.controller = "manager" and routes.manager.defaults.action = 'index" to my configuration as well, but this didn't work. There is not much out there on the internet with chaining and app.ini dealing with Zend Framework. Any help on this issue would be greatly appreciated.

    Read the article

  • window decoration command change

    - by Pedro
    I'm quite new to Ubuntu, and I don't know how to fix this: I have been experiencing the problem with window decorations that go away. I have been told that I could correct that with compiz fusion icon, just restarting the graphics whenever it happened. This solution only fixed the problem for like 30 seconds. Then I found out that the command inside the window decorator had changed, so I only had to reset it to default (/usr/bin/compiz-decorator). The only problem is that it keeps changing the command by itself once or twice a day. I can live with that, but I would like to find a more permanent solution, if there is one. I am running Ubuntu 11.10

    Read the article

  • Decorator that can take both init args and call args?

    - by digitala
    Is it possible to create a decorator which can be __init__'d with a set of arguments, then later have methods called with other arguments? For instance: from foo import MyDecorator bar = MyDecorator(debug=True) @bar.myfunc(a=100) def spam(): pass @bar.myotherfunc(x=False) def eggs(): pass If this is possible, can you provide a working example?

    Read the article

  • How does this decorator make a call to the 'register' method?

    - by BryanWheelock
    I'm trying to understand what is going on in the decorator @not_authenticated. The next step in the TraceRoute is to the method 'register' which is also located in django_authopenid/views.py which I just don't understand because I don't see anywhere that register is even mentioned in signin() How is the method 'register' called? def not_authenticated(func): """ decorator that redirect user to next page if he is already logged.""" def decorated(request, *args, **kwargs): if request.user.is_authenticated(): next = request.GET.get("next", "/") return HttpResponseRedirect(next) return func(request, *args, **kwargs) return decorated @not_authenticated def signin(request,newquestion=False,newanswer=False): """ signin page. It manage the legacy authentification (user/password) and authentification with openid. url: /signin/ template : authopenid/signin.htm """ request.encoding = 'UTF-8' on_failure = signin_failure next = clean_next(request.GET.get('next')) form_signin = OpenidSigninForm(initial={'next':next}) form_auth = OpenidAuthForm(initial={'next':next}) if request.POST: if 'bsignin' in request.POST.keys() or 'openid_username' in request.POST.keys(): form_signin = OpenidSigninForm(request.POST) if form_signin.is_valid(): next = clean_next(form_signin.cleaned_data.get('next')) sreg_req = sreg.SRegRequest(optional=['nickname', 'email']) redirect_to = "%s%s?%s" % ( get_url_host(request), reverse('user_complete_signin'), urllib.urlencode({'next':next}) ) return ask_openid(request, form_signin.cleaned_data['openid_url'], redirect_to, on_failure=signin_failure, sreg_request=sreg_req) elif 'blogin' in request.POST.keys(): # perform normal django authentification form_auth = OpenidAuthForm(request.POST) if form_auth.is_valid(): user_ = form_auth.get_user() login(request, user_) next = clean_next(form_auth.cleaned_data.get('next')) return HttpResponseRedirect(next) question = None if newquestion == True: from forum.models import AnonymousQuestion as AQ session_key = request.session.session_key qlist = AQ.objects.filter(session_key=session_key).order_by('-added_at') if len(qlist) > 0: question = qlist[0] answer = None if newanswer == True: from forum.models import AnonymousAnswer as AA session_key = request.session.session_key alist = AA.objects.filter(session_key=session_key).order_by('-added_at') if len(alist) > 0: answer = alist[0] return render('authopenid/signin.html', { 'question':question, 'answer':answer, 'form1': form_auth, 'form2': form_signin, 'msg': request.GET.get('msg',''), 'sendpw_url': reverse('user_sendpw'), }, context_instance=RequestContext(request)) Looking at the request, it seems that account/register/ does reference the register method with 'PATH_INFO': u'/account/register/' Here is the request: <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {u'username': [u'BryanWheelock'], u'email': [u'[email protected]'], u'bnewaccount': [u'Signup']}>, COOKIES:{'__utma': '127460431.1218630960.1266769637.1266769637.1266864494.2', '__utmb': '127460431.3.10.1266864494', '__utmc': '127460431', '__utmz': '127460431.1266769637.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)', 'sessionid': 'fb15ee538320170a22d3a3a324aad968'}, META:{'CONTENT_LENGTH': '74', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'DOCUMENT_ROOT': '/usr/local/apache2/htdocs', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'close', 'HTTP_COOKIE': '__utmz=127460431.1266769637.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=127460431.1218630960.1266769637.1266769637.1266864494.2; __utmc=127460431; __utmb=127460431.3.10.1266864494; sessionid=fb15ee538320170a22d3a3a324aad968', 'HTTP_HOST': 'workproject.com', 'HTTP_ORIGIN': 'http://workproject.com', 'HTTP_REFERER': 'http://workproject.com/account/signin/complete/?next=%2F&janrain_nonce=2010-02-22T18%3A49%3A53ZG2KXci&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2010-02-22T18%3A49%3A53Znxxxxxxxxxw&openid.return_to=http%3A%2F%2Fworkproject.com%2Faccount%2Fsignin%2Fcomplete%2F%3Fnext%3D%252F%26janrain_nonce%3D2010-02-22T18%253A49%253A53ZG2KXci&openid.assoc_handle=AOQobUepU4xs-kGg5LiyLzfN3RYv0I0Jocgjf_1odT4RR9zfMFpQVpMg&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=Jf76i2RNhqpLTJMjeQ0nnQz6fgA%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItxxxxxxxxxs9CxHQ3PrHw_N5_3j1HM&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOaxxxxxxxxxxx4s9CxHQ3PrHw_N5_3j1HM', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9', 'HTTP_X_FORWARDED_FOR': '96.8.31.235', 'PATH': '/usr/bin:/bin', 'PATH_INFO': u'/account/register/', 'PATH_TRANSLATED': '/home/spirituality/webapps/work/spirit_app.wsgi/account/register/', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '59956', 'REQUEST_METHOD': 'POST', 'REQUEST_URI': '/account/register/', 'SCRIPT_FILENAME': '/home/spirituality/webapps/spirituality/spirit_app.wsgi', 'SCRIPT_NAME': u'', 'SERVER_ADDR': '127.0.0.1', 'SERVER_ADMIN': '[no address given]', 'SERVER_NAME': 'workproject.com', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SIGNATURE': '', 'SERVER_SOFTWARE': 'Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4', 'mod_wsgi.application_group': 'www.workProject.com|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '25931', 'mod_wsgi.process_group': '', 'mod_wsgi.reload_mechanism': '0', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (2, 5), 'wsgi.errors': <mod_wsgi.Log object at 0xb7ce0038>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb7e94b18>, 'wsgi.input': <mod_wsgi.Input object at 0x999cc78>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>

    Read the article

  • What is there so useful in the Decorator Pattern? My example doesn't work

    - by Green
    The book says: The decorator pattern can be used to extend (decorate) the functionality of a certain object I have a rabbit animal. And I want my rabbit to have, for example, reptile skin. Just want to decorate a common rabbit with reptile skin. I have the code. First I have abstract class Animal with everythig that is common to any animal: abstract class Animal { abstract public function setSleep($hours); abstract public function setEat($food); abstract public function getSkinType(); /* and more methods which for sure will be implemented in any concrete animal */ } I create class for my rabbit: class Rabbit extends Animal { private $rest; private $stomach; private $skinType = "hair"; public function setSleep($hours) { $this->rest = $hours; } public function setFood($food) { $this->stomach = $food; } public function getSkinType() { return $this->$skinType; } } Up to now everything is OK. Then I create abstract AnimalDecorator class which extends Animal: abstract class AnimalDecorator extends Animal { protected $animal; public function __construct(Animal $animal) { $this->animal = $animal; } } And here the problem comes. Pay attention that AnimalDecorator also gets all the abstract methods from the Animal class (in this example just two but in real can have many more). Then I create concrete ReptileSkinDecorator class which extends AnimalDecorator. It also has those the same two abstract methods from Animal: class ReptileSkinDecorator extends AnimalDecorator { public function getSkinColor() { $skin = $this->animal->getSkinType(); $skin = "reptile"; return $skin; } } And finaly I want to decorate my rabbit with reptile skin: $reptileSkinRabbit = ReptileSkinDecorator(new Rabbit()); But I can't do this because I have two abstract methods in ReptileSkinDecorator class. They are: abstract public function setSleep($hours); abstract public function setEat($food); So, instead of just re-decorating only skin I also have to re-decorate setSleep() and setEat(); methods. But I don't need to. In all the book examples there is always ONLY ONE abstract method in Animal class. And of course it works then. But here I just made very simple real life example and tried to use the Decorator pattern and it doesn't work without implementing those abstract methods in ReptileSkinDecorator class. It means that if I want to use my example I have to create a brand new rabbit and implement for it its own setSleep() and setEat() methods. OK, let it be. But then this brand new rabbit has the instance of commont Rabbit I passed to ReptileSkinDecorator: $reptileSkinRabbit = ReptileSkinDecorator(new Rabbit()); I have one common rabbit instance with its own methods in the reptileSkinRabbit instance which in its turn has its own reptileSkinRabbit methods. I have rabbit in rabbit. But I think I don't have to have such possibility. I don't understand the Decarator pattern right way. Kindly ask you to point on any mistakes in my example, in my understanding of this pattern. Thank you.

    Read the article

  • WIF, ADFS 2 and WCF&ndash;Part 6: Chaining multiple Token Services

    - by Your DisplayName here!
    See the previous posts first. So far we looked at the (simpler) scenario where a client acquires a token from an identity provider and uses that for authentication against a relying party WCF service. Another common scenario is, that the client first requests a token from an identity provider, and then uses this token to request a new token from a Resource STS or a partner’s federation gateway. This sounds complicated, but is actually very easy to achieve using WIF’s WS-Trust client support. The sequence is like this: Request a token from an identity provider. You use some “bootstrap” credential for that like Windows integrated, UserName or a client certificate. The realm used for this request is the identifier of the Resource STS/federation gateway. Use the resulting token to request a new token from the Resource STS/federation gateway. The realm for this request would be the ultimate service you want to talk to. Use this resulting token to authenticate against the ultimate service. Step 1 is very much the same as the code I have shown in the last post. In the following snippet, I use a client certificate to get a token from my STS: private static SecurityToken GetIdPToken() {     var factory = new WSTrustChannelFactory(         new CertificateWSTrustBinding(SecurityMode.TransportWithMessageCredential,         idpEndpoint);     factory.TrustVersion = TrustVersion.WSTrust13;       factory.Credentials.ClientCertificate.SetCertificate(         StoreLocation.CurrentUser,         StoreName.My,         X509FindType.FindBySubjectDistinguishedName,         "CN=Client");       var rst = new RequestSecurityToken     {         RequestType = RequestTypes.Issue,         AppliesTo = new EndpointAddress(rstsRealm),         KeyType = KeyTypes.Symmetric     };       var channel = factory.CreateChannel();     return channel.Issue(rst); } To use a token to request another token is slightly different. First the IssuedTokenWSTrustBinding is used and second the channel factory extension methods are used to send the identity provider token to the Resource STS: private static SecurityToken GetRSTSToken(SecurityToken idpToken) {     var binding = new IssuedTokenWSTrustBinding();     binding.SecurityMode = SecurityMode.TransportWithMessageCredential;       var factory = new WSTrustChannelFactory(         binding,         rstsEndpoint);     factory.TrustVersion = TrustVersion.WSTrust13;     factory.Credentials.SupportInteractive = false;       var rst = new RequestSecurityToken     {         RequestType = RequestTypes.Issue,         AppliesTo = new EndpointAddress(svcRealm),         KeyType = KeyTypes.Symmetric     };       factory.ConfigureChannelFactory();     var channel = factory.CreateChannelWithIssuedToken(idpToken);     return channel.Issue(rst); } For this particular case I chose an ADFS endpoint for issued token authentication (see part 1 for more background). Calling the service now works exactly like I described in my last post. You may now wonder if the same thing can be also achieved using configuration only – absolutely. But there are some gotchas. First of all the configuration files becomes quite complex. As we discussed in part 4, the bindings must be nested for WCF to unwind the token call-stack. But in this case svcutil cannot resolve the first hop since it cannot use metadata to inspect the identity provider. This binding must be supplied manually. The other issue is around the value for the realm/appliesTo when requesting a token for the R-STS. Using the manual approach you have full control over that parameter and you can simply use the R-STS issuer URI. Using the configuration approach, the exact address of the R-STS endpoint will be used. This means that you may have to register multiple R-STS endpoints in the identity provider. Another issue you will run into is, that ADFS does only accepts its configured issuer URI as a known realm by default. You’d have to manually add more audience URIs for the specific endpoints using the ADFS Powershell commandlets. I prefer the “manual” approach. That’s it. Hope this is useful information.

    Read the article

  • Implicit Permissions Due to Ownership Chaining or Scopes in SQL Server

    I have audited for permissions on my databases because users seem to be accessing the tables, but I don't see permissions which give them such rights. I've gone through every Windows group that has access to my SQL Server and into the database, but with no success. How are the users accessing these tables? The Future of SQL Server Monitoring "Being web-based, SQL Monitor 2.0 enables you to check on your servers from almost any location" Jonathan Allen.Try SQL Monitor now.

    Read the article

  • Why does compiz window decorator crashes unity

    - by user32509
    I used to run Unity 2D on my work machine. Now I am trying to use Unity. Everthing looks fine except for the missing window decoration. I have installed the compiz manager. Every time I activate the plugin "window decoration" Unity "crashes" the Unity bar along with the top panel . unity --reset oder replace does nothing. The command for the window manager is /usr/bin/compiz-decorator Maybe I need to specify another window decorator?

    Read the article

  • Expand chaining hashtable. Errors on code.

    - by FILIaS
    Expanding a hashtable with linked lists there are some errors and warnings. I wanna make sure that the following code is right (expand method) and find out what happens that raise these warnings/errors typedef struct { int length; struct List *head; struct List *tail; } HashTable; //resolving collisions using linked lists - chaining typedef struct { char *number; char *name; int time; struct List *next; }List; //on the insert method i wanna check hashtable's size, //if it seems appropriate there is the following code: //Note: hashtable variable is: Hashtable * ...... hashtable = expand(hashtable,number,name,time); /**WARNING**:assignment makes pointer from integer without a cast*/ HashTable* expand( HashTable* h ,char number[10],char* name,int time) /**error**: conflicting types for ‘expand’ previous implicit declaration of ‘expand’ was here*/ { HashTable* new; int n; clientsList *node,*next; PrimesIndex++; int new_size= primes[PrimesIndex]; /* double the size,odd length */ if (!(new=malloc((sizeof( List*))*new_size))) return NULL; for(n=0; n< h->length; ++n) { for(node=h[n].head; node; node=next) { add (&new, node->number, node->name,node->time); next=node->next;//// free(node); } } free(h); return new; }

    Read the article

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