Daily Archives

Articles indexed Saturday April 17 2010

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

  • hook_user not being called for 'login' operation

    - by Allain Lalonde
    I've read in the drupal documentation that hook_user should be invoked for the login operation. To test this I've added a call to drupal_set_message at the top of my modules hook implementation and the only message I'm receiving is a call with 'load' as the $op. I've confirmed that drupal_set_message can be called multiple times and it doesn't erase the previous message, so I'm confident that hook_user is only being invoked the one time. Any good reasons for why hook_user isn't being invoked with 'login' as an operation when I'm logging in?

    Read the article

  • SharePoint 2007 Central Admin w3wp.exe process consumin 99% CPU

    - by Matrich
    Hi, I have been running an intranet using SharePoint 2007 for over a year and all has been working fine. However, after some time, I realized that the intranet portal was slow. Trying to access the Central Admin over another computer not the SharePoint server also became an issue. So I logged onto the real SharePoint Server and it took some ages to login and then was so slow even on the server unlike other times. When I checked the Task Manager, I found out that w3wp.exe was consuming 99% of the CPU speed. When I restarted the Central Admin App Pool, everything came back to normal and all was running well but after a few minutes (15 or so), it again became slow. I have checked the Event Logs and nothing conclusive was there to help me out. Anyone who has had this experience? or has any good resource? Please help. Thanks in advance

    Read the article

  • Overwriting a core Wordpress function - should work but it doesn't

    - by Will Ashworth
    I'm trying to overwrite a core Wordpress function (found in media.php) using add_filter() in my theme's functions.php file. This should work accord to the blogs that I've come across, but for some reason I see no change whatsoever. #override what WP is trying to do to scaling images by default function my_image_hwstring($width, $height) { $out = ''; #if ($width) # $out .= 'width="'.intval($width).'" '; #if ($height) # $out .= 'height="'.intval($height).'" '; return $out; } add_filter('image_hwstring', 'my_image_hwstring', 1, 2); I prefer to not edit media.php manually because any Wordpress upgrades later will overwrite the changes we've made. The way I'm doing it is correct (I think) but isn't working as expected. Totally hung up on this and appreciate any responses. This is a weird one!

    Read the article

  • Facebook PHP API Calls

    - by Daniel Hertz
    Hello, So I simply want to add my current facebook status to my personal website. I have been looking at tutorials and other posts about fb and fb connect, but I am still confused. Is there anyway to do this with simple REST calls? Like twitter or flickr? From what I understand I dont need FB connect because I am just getting my own status and do not need to get any info from other visitors. Any know how to do this?

    Read the article

  • opengl invert framebuffer pixels

    - by ToxIk
    I was wondering was the best way to invert the color pixels in the frame buffer is. I know it's possible to do with glReadPixels() and glDrawPixels() but the performance hit of those calls is pretty big. Basically, what I'm trying to do is have an inverted color cross-hair which is always visible no matter what's behind it. For instance, I'd have an arbitrary alpha mask bitmap or texture, have it render without depth test after the scene is drawn, and all the frame buffer pixels under the masked (full alpha) pixels of the texture would be inverted. I've been trying to do this with a texture, but I'm getting some strange results, also all the blending options I still find confusing.

    Read the article

  • Are there macro facility for Java or C#?

    - by h2g2java
    Macros are useful. Therefore, I occasionally bemoan the absence of macros in Java and C#. Macros allow me to force in-line but allow me the code-manageability of non-macro code. Is there any Java- or C#-based project/product somewhere out there that effectively allow macros or specifying in-line expansion. I am thinking of something like @macro public void hello(int x){ ... } or when I call a method, an @inline annotation preceding the call would effect the called-method to be in-lined. or, should I need to know that I should just trust the compiler to make the best the decision for me that at the best of its analysis it might in-line a call. I hope this question will not lead to debating the pro/cons/usefulness of macros.

    Read the article

  • Mapping A Sphere To A Cube

    - by petrocket
    There is a special way of mapping a cube to a sphere described here: http://mathproofs.blogspot.com/2005/07/mapping-cube-to-sphere.html It is not your basic "normalize the point and your done" approach and gives a much more evenly spaced mapping. I've tried to do the inverse of the mapping going from sphere coords to cube coords and have been unable to come up the working equations. It's a rather complex system of equations with lots of square roots. Any math geniuses want to take a crack at it? Here's the equations in c++ code: sx = x * sqrtf(1.0f - y * y * 0.5f - z * z * 0.5f + y * y * z * z / 3.0f); sy = y * sqrtf(1.0f - z * z * 0.5f - x * x * 0.5f + z * z * x * x / 3.0f); sz = z * sqrtf(1.0f - x * x * 0.5f - y * y * 0.5f + x * x * y * y / 3.0f); sx,sy,sz are the sphere coords and x,y,z are the cube coords.

    Read the article

  • Preserve time stamp when shrinking an image

    - by Ckhrysze
    My digital camera takes pictures with a very high resolution, and I have a PIL script to shrink them to 800x600 (or 600x800). However, it would be nice for the resultant file to retain the original timestamp. I noticed in the docs that I can use a File object instead of a name in PIL's image save method, but I don't know if that will help or not. My code is basically name, ext = os.path.splitext(filename) # open an image file (.bmp,.jpg,.png,.gif) you have in the working folder image = Image.open(filename) width = 800 height = 600 w, h = image.size if h > w: width = 600 height = 800 name = name + ".jpg" shunken = image.resize((width, height), Image.ANTIALIAS) shunken.save(name) Thank you for any help you can give!

    Read the article

  • xsd-based code generator to build xml?

    - by Tim
    I have a schema (xsd), and I want to create xml files that conform to it. I've found code generators that generate classes which can be loaded from an xml file (CodeSynthesis). But I'm looking to go the other direction. I want to generate code that will let me build an object which can easily be written out as an xml file. In C++. I might be able to use Java for this, but C++ would be preferable. I'm on solaris, so a VisualStudio plugin won't help me (such as xsd2code). Is there a code generator that lets me do this?

    Read the article

  • In MAYA 2009, is it possible to capture the cube rotate event?

    - by Rahul2047
    I need to call a function ( Maya-Python ) based on cube rotationX. For that I have to capture the event, programmatically. I tried using while loop but It stucks in the loop, Nothing can be done in that time. I tried theading (python), still same. Can it be done this or other way? If yes, How? Maya 2009 in Windows XP Some failed code references: import maya.cmds as cmds while (count < 90): lock = cmds.getAttr('pCube1.rotateX',lock=False) print lock count = count + 1 Here Python wise: #!/usr/bin/python import thread import time # Define a function for the thread def cubeRotateX( threadName, delay): count = 0 while count < 5: time.sleep(delay) count += 1 try: thread.start_new_thread( cubeRotateX, ("Thread-1", 2, ) ) except: print "Error: unable to start thread" while 1: pass

    Read the article

  • Free tools/libraries to compare tables with filtering in different databases and visualize/sync diff

    - by MicMit
    I am building certain GUI in C# for a content manager and looking for the tools or code snippets or open libraries ( code ideally in C# ) which allow me the following : 1. For table A in database X (test ) and table A in database Y (production) and for a simple filter ( e.g. listname = "XYZ" ) I need to show additions/deletions/updates in some way. which might be side-by-side or just html report 2 record added html table with some fields 2 record deleted html table with some fields Considering that this task is very common, I guess, certain components should exist ? Components either return some collections from parameters given for further visualizing or just produce reports mentioned above. 2. I need to push changes for the filter I mentioned in 1 and update table in production database for this filter only ( ie for the particular list approved by content person). Again probably there are certain SQL code generators - components in addition to diffs or standalone. 3. The key thing tools/libraries - should be suitable for integration with the existing application in C#.

    Read the article

  • iPhone User Interface Design

    - by Blaenk
    Hey guys, I've just had a nagging question for a while regarding iPhone app user interfaces. For example, consider WeightBot's User Interface. I am wondering, how are most of these user interfaces created? In general, of course. Is there a way to simply design controls (that is, the images) in a program like Photoshop, then use that 'skin' for controls in UIKit? I realize that there are some controls that are probably created by the programmer (custom controls), but I'm referring to the ready-made ones that come in UIKit. In other words, is the concept similar to 'splicing' web site designs? Where a designer draws out the design of the website in something like Photoshop, and then it is cut up into pieces which can be applied to form the actual website? I know this can be done for UIButtons, can this also be done for other controls, and is this how it is usually done? Or perhaps this is done with Core Animation? I've heard this from time to time, so does this mean that the User Interfaces are 'hard-coded'? Or is Core Animation only use for the 'effects', such as applying the glowing effect to the numbers in WeightBot? If there are any resources you can point me to I would really appreciate it. Thanks!

    Read the article

  • Why Hire Programmers?

    - by editorial photography
    You might keep pondering over this question a million times in your head. When there are so many softwares available that can make the work easy, why to hire web programmer. There is a difference. Building a website on your own and seeking the help of professionals can create a major impact on your business.

    Read the article

  • Dynamically resizing CMFCPropertySheet with PropSheetLook_OneNoteTabs style

    - by Ryan
    Hi everybody, I'm trying to resize dynamically a CMFCPropertySheet to add a custom control at the bottom of each page. As all Property Pages are not of the same height, I have a mechanism to increase the size if necessary. For this, I have overridden the OnActivatePage method and by using SetWindowPos, I can resize the sheet, first, then the tab control, then the page and finally I can move the OK/Cancel/Help buttons. It works fine with PropSheetLook_OutlookBar and PropSheetLook_Tabs styles but not with PropSheetLook_OneNoteTabs style. The page (or the tab) is not correctly resized (the lighter grey color of the page does not fill the sheet. OneNote style Outlook style Any idea? A MFC Feature Pack bug?

    Read the article

  • Regarding Debugging in Xcode

    - by user185590
    #import <Foundation/Foundation.h> @interface ClassA : NSObject { int x; } -(void) initVar; @end @implementation ClassA -(void) initVar { x = 100; } @end @interface ClassB : ClassA { int y; } -(void) initVar; -(void) printVar; @end @implementation ClassB -(void) initVar { x = 200; y = 300; } - (void) printVar { NSLog(@"x= %i", x ); NSLog(@"y= %i", y); } @end int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; ClassB * b = [[ClassB alloc] init]; [b initVar]; [b printVar]; [b release]; [pool drain]; return 0; }

    Read the article

  • sIFR - getting a:hover to work in navigation list

    - by HudRom
    Hi, I am currently struggling with sIFR and a:hover. My problem site is hosted at http://irene.huditsch.info I have the following HTML code: <body id="irene-huditsch-info"> <div id="header"> <h1>Irene Huditsch</h1> <div id="top-nav"> <ul> <li id="impressum"> <a href="impressum.html" rel="index">Impressum</a> </li> <li id="kontakt"> <a href="kontakt.html">Kontakt</a> </li> </ul> </div> ... My sIFR-config.js looks like: sIFR.replace(braganza, { selector: 'div#top-nav a', css: '.sIFR-root { background-color: transparent; color: #FFFFFF; line-height: 13px; font-size: 11px; text-decoration: underline; cursor: pointer; } .sIFR-root:hover { color: #592b02; }', wmode: 'transparent' }); But the hover doesn't take effect. I tried different solution with no success either. When I write sIFR.replace(braganza, { selector: 'div#top-nav li', css: 'a { background-color: transparent; color: #FFFFFF; line-height: 13px; font-size: 11px; text-decoration: underline; cursor: pointer; } a:hover { color: #592b02; }', wmode: 'transparent' }); (which seems logical to me), the list items are not rendered at all. Could you please give me an advice how to do it correctly with the structure given? Thanks, Roman

    Read the article

  • Attribute References in Python

    - by Jeune
    I do Java programming and recently started learning Python via the official documentation. I see that we can dynamically add data attributes to an instance object unlike in Java: class House: pass my_house = House() my_house.number = 40 my_house.rooms = 8 my_house.garden = 1 My question is, in what situations is this feature used? What are the advantages and disadvantages compared to the way it is done in Java?

    Read the article

  • jBoss Portal deployment

    - by cc96ai
    I am new in jBoss and Portal I download the jBoss Tools for Eclipse and go through the document to create Java Portlet http://docs.jboss.org/tools/3.1.0.GA/en/jboss_portal_tools_ref_guide/html/portlet_tools_tasks.html#deploying_to_portal When I run the application in server and go to http://localhost:8080/portal/portal/default/default/ I cannot see my portlet, any idea why?

    Read the article

  • C++ containers on classes, returning pointers

    - by otneil
    Hello, I'm having some trouble to find the best way to accomplish what I have in mind due to my inexperience. I have a class where I need to a vector of objects. So my first question will be: is there any problem having this: vector< AnyType container* and then on the constructor initialize it with new (and deleting it on the destructor)? Another question is: if this vector is going to store objects, shouldn't it be more like vector< AnyTipe* so they could be dynamically created? In that case how would I return an object from a method and how to avoid memory leaks (trying to use only STL)?

    Read the article

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