Search Results

Search found 262 results on 11 pages for 'shaun casey'.

Page 9/11 | < Previous Page | 5 6 7 8 9 10 11  | Next Page >

  • SQL? "Show me all the Activities that can be performed by User X."

    - by Casey Fulton
    I'm at my wits end. I've searched like crazy, read plenty of database textbooks and God knows how many online guides, blogs and forums. Can someone put me out of my misery? PseudoSchema Diagram (Warning: although pretty, not in a format even remotely approaching ER diagrams! Primary keys are bold, foreign keys are italics.) Given the above set of tables relating Users to Groups to Privileges, and then a set of Activities that can each require a Privilege to perform, how do you find out this: Show me all the Activities that can be performed by User X. That is: User X is a member of groups G and F; groups G and F correlate to privileges P, Q, R and S; show me all the activities that require privileges either P, Q, R or S. How do you do this?

    Read the article

  • Multicore programming: what's necessary to do it?

    - by Casey
    I have a quadcore processor and I would really like to take advantage of all those cores when I'm running quick simulations. The problem is I'm only familiar with the small Linux cluster we have in the lab and I'm using Vista at home. What sort of things do I want to look into for multicore programming with C or Java? What is the lingo that I want to google? Thanks for the help.

    Read the article

  • UIButton stops responding after going into landscape mode - iPhone

    - by casey
    I've been trying different things the last few days and I've run out of ideas so I'm looking for help. The situation is that I'm displaying my in-app purchasing store view after the user clicks a button. Button pressed, view is displayed. The store shows fine. Inside this view, I have a few labels with descriptions of the product, and then below them I have the price and a Buy button which triggers the in-app purchase. Problem is when I rotate the phone to landscape, that Buy button no longer responds, weird. Works fine in portrait. The behavior in landscape when the I touch the button is nothing. It doesn't appear to press down and be selected or anything, just not responding to my touches. But then when I rotate back to portrait or even upside down portrait, it works fine. Here is the rough structure of my view in IB, all the rotating and layout is setup in IB. I set the autoresizing in IB so that everything looks ok in landscape and the Buy button expands horizontally a little bit. The only layout manipulation I do in my code is after loading, I set the content size of the scroll view. File Owner with view set to the scrollView / scrollView ----/ view --------/ label --------/ label --------/ label --------/ label --------/ label --------/ label --------/ label --------/ label --------/ uibutton (Buy) After orientation changes I printed out the userInteractionEnabled property of the scrollView and the button, and they were both TRUE at all orientations. Ideas? Or maybe some other way of displaying a buy button that won't be nonfunctional? I've already begun a branch that plays with a toolbar and placing the buy button there, but I can't seem to get the bar to stay in place while scrolling.

    Read the article

  • How to preserve sibling element position when one sibling is absolutely positioned?

    - by Casey
    In the snippet below, the child div is normally positioned until it is :hovered , when it becomes absolutely positioned. The reasoning behind this markup is to simulate a popup style in a limited environment where I can't use a <select> (among other limitations). When child is hovered, the sibling elements jump around, which is expected, as the contents of the block have changed. But how can I preserve their positioning? That is, what CSS can I add to prevent the siblings from jumping around when child is hovered. Javascript is also not allowed, so please no answers using JS. HTML: <div class="container"> <div class="child"> <span class="d4"></span> <label><input type="radio" name="radio" value="1"/>One</label> <label><input type="radio" name="radio" value="2"/>Two</label> </div> <input type="text" name="sibling"/> <button name="sibling2">Button</button> </div> CSS: .container, .child, button { display:inline-block; } .child { vertical-align: middle; width: 35px; height: 35px; } .child:hover { background: gray; position:absolute; width: 100px; height: auto; } .child:hover > .d4 { display: none; } .child label { display:none; } .child:hover label { display: inline-block; } .d4 { background-position: -411px -1px; width: 35px; height: 35px; background-image: url("https://i.imgur.com/zkgyBOi.png"); background-repeat: no-repeat; color: transparent; display: inline-block; } Here's a fiddle: http://jsfiddle.net/cpctZ/1/

    Read the article

  • Autorelease with elements in a UITableViewCell - memory leak

    - by Shaun Budhram
    In my 'cellForRowAtIndexPath' method for a UITableView delegate, I'm allocating a cell if it doesn't exist, and in this cell, I'm creating a new activity spinner like so: UIActivityIndicatorView *actView = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray ] autorelease]; I'm using Leaks to detect memory leaks in my program, and for some reason, this is coming up as a leak, even though it's autoreleasing. The cell itself is also autoreleasing. Has anyone had experience with autoreleasing variables coming up as leaks in the Leaks instrument, and how to tackle these problems? Also, if it helps, this is the history Leaks is displaying for this memory location. It looks like it at some point gets an additional retain message? This is not being done in my code.

    Read the article

  • Get Rails to save a record to the database in a non-UTC time

    - by Shaun
    Is there a way to get Rails to save records to the database without it automagically converting the timestamp into UTC before saving? The problem is that I have a few models that pull data from a legacy database that saves everything in Mountain Time and occasionally I have to have my Rails app write to that database. The problem is that every time it does, it converts the time I give it from Mountain Time to UTC, which is 6-7 hours ahead (depending on DST)! Needless to say, this really messes with reporting on that database. If I could get around doing this, I would. Unfortunately, I can't do anything about the fact that this other database uses a different timezone, nor can I really get away from the need for this app to save to that database occasionally. If I could just get Rails to stop trying to help me, it'd be great.

    Read the article

  • Why does Python array moduel handle strings and lists differently?

    - by Casey
    I'm having trouble understanding the result of the following statements: >>> from array import array >>> array('L',[0xff,0xff,0xff,0xff]) array('L', [255L, 255L, 255L, 255L]) >>> from array import array >>> array('L','\xff\xff\xff\xff') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: string length not a multiple of item size

    Read the article

  • How do you work on Strategic Development initiatives when Tactical work takes priority?

    - by Shaun F
    My day-to-day job consists of maintaining large volume websites and this has given me exposure to developing better methods to develop and maintain the code. This has also given me a large body of knowledge in the code base in terms of troubleshooting that is beneficial to the company. I'm also the maintainer of an IDE plug in I created to help navigate and generate code that is used. Operationally though, my job is to handle any client requests that come in of that are emergencies and make any enhancements and additions to the code base required. This work, along with the daily managing and feeding of the the project managers will take up my entire day. How does one manage the time between the tactical day job and the strategic initiatives? How does one get and ask for recognition for taking strategic initiatives? Is the 8-9 hour day just not going to cut it? Is there even a job out there for programmers to develop strategic initiatives and solutions for a company? I want to also point out that this isn't a problem with the company at all. I think this is more of a personal-improvement decision. Nobody will say no to the improvements at all. I believe in making the things happen but I don't think I'm going to get time from the company to do it...

    Read the article

  • Sending message from one server to another in Twisted

    - by Casey Patton
    I've implemented my servers in the following way: def makeServer(application, port): factory = protocol.ServerFactory() factory.protocol = MyChat factory.clients = [] internet.TCPServer(port, factory).setServiceParent(application) application = service.Application("chatserver") server1 = makeServer(application, port=1025) server2 = makeServer(application, port=1026) server3 = makeServer(application, port=1027) Note that MyChat is an event handling class that has a "receiveMessage" action: def lineReceived(self, line): print "received", repr(line) for c in self.factory.clients: c.transport.write(message + '\n') I want server1 to be able to pass messages to server2. Rather, I want server1 to be treated as a client of server2. If server1 receives the message "hi" then I want it to send that same exact message to server2. How can I accomplish this?

    Read the article

  • Python function argument scope (Dictionaries v. Strings)

    - by Shaun Meyer
    Hello, given: foo = "foo" def bar(foo): foo = "bar" bar(foo) print foo # foo is still "foo"... foo = {'foo':"foo"} def bar(foo): foo['foo'] = "bar" bar(foo) print foo['foo'] # foo['foo'] is now "bar"? I have a function that has been inadvertently over-writing my function parameters when I pass a dictionary. Is there a clean way to declare my parameters as constant or am I stuck making a copy of the dictionary within the function? Thanks!

    Read the article

  • Is it possible to specify a return type of "Derivative(of T)" for a MustOverride sub in VB.NET?

    - by Casey
    VB.NET 2008 .NET 3.5 I have two base classes that are MustInherit (partial). Let's call one class OrderBase and the other OrderItemBase. A specific type of order and order item would inherit from these classes. Let's call these WebOrder (inherits from OrderBase) and WebOrderItem (inherits from OrderItemBase). Now, in the grand scheme of things WebOrder is a composite class containing a WebOrderItem, like so: Public Class WebOrder Inherits OrderBase Public Property OrderItem() as WebOrderItem End Property End Class Public Class WebOrderItem Inherits OrderItemBase End Class In order to make sure any class that derives from OrderBase has the OrderItem property, I would like to do something like this in the OrderBase class: Public MustInherit Class OrderBase Public MustOverride Property OrderItem() as Derivative(Of OrderItemBase) End Class In other words, I want the derived class to be forced to contain a property that returns a derivative of OrderItemBase. Is this possible, or should I be using an entirely different approach?

    Read the article

  • problem with struts actions and redirections

    - by Casey
    I am trying to update a simple web app that was built with struts2, jsp and standard servlets. I am trying to redirect a url to a specific action but can't seem to get it to work right. For example, the url that is correct is: http://localhost:8080/theapp/lookup/search.action Here is my web.xml: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"><web-app> <display-name>theapp</display-name> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.FilterDispatcher </filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> And here is my struts.xml: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <default-action-ref name="search" /> <action name="search" method="search" class="com.theapp.SearchAction" > <result>index.jsp</result> <result name="input" >index.jsp</result> <result name="error" type="redirect">site_locator_mobile/error.action</result> </action> The problem here is that if I don't specify the correct url as above, I just get the index.jsp file, but without any properties in index.jsp being processed because the information is contained in the servlet. What I would like to is if someone just entered: http://localhost:8080/theapp/lookup/ than they would be taken to: http://localhost:8080/theapp/lookup/search.action Thanks

    Read the article

  • Make index.cgi redirect to Apache webserver document root

    - by Casey
    I'm trying to expose a CGI file as my document root and web server. I do not want to expose the fact that the server is running a CGI script. How can I map a URL http://host/index.cgi/ back to http://host/ in Apache2? I'm guessing it involves mod-rewrite, but I haven't finished grokking all the docs yet. The following configuration is working, but I'm guessing there is a more complete solution: RewriteEngine ON Redirect /index.cgi/ /

    Read the article

  • java web templates across multiple WAR files

    - by Casey
    I have a multi WAR web application that was designed badly. There is a single WAR that is responsible for handling some authorization against a database and defines a standard web page using a jsp taglib. The main WAR basically checks the privileges of the user and than based on that, displays links to the context path of the other deployed WARS. Each of the other deployed WARs includes this custom tag lib. I am working on redesigning this application, and one of the nice things that I want to retain is that we have other project teams that have developed these WAR modules that "plug into" our current system to take advantage of other things we have to offer. I am not entirely sure how to handle the page templates though. I need a templating system that would be easy enough to use across multiple wars (I was thinking of jsp fragments??). I really only need to define a consistent header and main navigation section. Whatever else is displayed on the page is up to the individual web project. Any suggestions? I hope that this is clear, if not I can elaborate more.

    Read the article

  • SVN:Team member can checkout, commit; can't update

    - by Casey K.
    Hi all, got a weird problem for you: I've set up an svn server on a home machine, which is accessible to the members of my game team over DynDNS. So far so good- everyone was able to checkout the repo no problem. In addition, several team members and I were able to update and commit just fine. The conundrum is this: One of my team members, who is able to both checkout and commit, is unable to update. TortoiseSVN proffers: Error Could not open the requested SVN filesystem Has anyone dealt with this problem before? This isn't my first SVN rodeo, but I have to admit I'm stumped. Thanks!

    Read the article

  • Is it possible to override a property and return a derived type in VB.NET?

    - by Casey
    Consider the following classes representing an Ordering system: Public Class OrderBase Public MustOverride Property OrderItem() as OrderItemBase End Class Public Class OrderItemBase End Class Now, suppose we want to extend these classes to a more specific set of order classes, keeping the aggregate nature of OrderBase: Public Class WebOrder Inherits OrderBase Public Overrides Property OrderItem() as WebOrderItem End Property End Class Public Class WebOrderItem Inherits OrderItemBase End Class The Overriden property in the WebOrder class will cause an error stating that the return type is different from that defined in OrderBase... however, the return type is a subclass of the type defined in OrderBase. Why won't VB allow this?

    Read the article

  • Intializing dictionary in c# 3.0

    - by Casey
    I'm having trouble with the following collections initalization: private Dictionary<string, string> mydictionary = new Dictionary<string, string>() { {"key", "value"} , {"key2", "value2"} , {"key3", "value3"} }; I keep getting various compiler errors about the syntax. From what I have googled this should be perfectly valid C# 3.0 code. The first error that pops up is: Error 102 ; expecte What am I doing wrong?

    Read the article

  • How to update records based on sum of a field then use the sum to calc a new value in sql

    - by Casey
    Below is what i'm trying to do with by iterating through the records. I would like to have a more elegant solution if possible since i'm sure this is not the best way to do it in sql. set @counter = 1 declare @totalhrs dec(9,3), @lastemp char(7), @othrs dec(9,3) while @counter <= @maxrecs begin if exists(select emp_num from #tt_trans where id = @counter) begin set @nhrs = 0 set @othrs = 0 select @empnum = emp_num, @nhrs = n_hrs, @othrs = ot_hrs from #tt_trans where id = @counter if @empnum = @lastemp begin set @totalhrs = @totalhrs + @nhrs if @totalhrs > 40 begin set @othrs = @othrs + @totalhrs - 40 set @nhrs = @nhrs - (@totalhrs - 40) set @totalhrs = 40 end end else begin set @totalhrs = @nhrs set @lastemp = @empnum end update #tt_trans set n_hrs = @nhrs, ot_hrs = @othrs where id = @counter and can_have_ot = 1 end set @counter = @counter + 1 end Thx

    Read the article

  • How do you hide a Swing Popup when you click somewhere else.

    - by Casey Watson
    I have a Popup that is shown when a user clicks on a button. I would like to hide the popup when any of the following events occur: The user clicks somewhere else in the application. (The background panel for example) The user minimizes the application. The JPopupMenu has this behavior, but I need more than just JMenuItems. The following code block is a simplified illustration to demonstrate the current usage. import java.awt.*; import java.awt.event.ActionEvent; import javax.swing.*; public class PopupTester extends JFrame { public static void main(String[] args) { final PopupTester popupTester = new PopupTester(); popupTester.setLayout(new FlowLayout()); popupTester.setSize(300, 100); popupTester.add(new JButton("Click Me") { @Override protected void fireActionPerformed(ActionEvent event) { Point location = getLocationOnScreen(); int y = (int) (location.getY() + getHeight()); int x = (int) location.getX(); JLabel myComponent = new JLabel("Howdy"); Popup popup = PopupFactory.getSharedInstance().getPopup(popupTester, myComponent, x, y); popup.show(); } }); popupTester.add(new JButton("No Click Me")); popupTester.setVisible(true); popupTester.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } }

    Read the article

  • Why do Java and C# not have implicit conversions to boolean?

    - by Shaun
    Since I started Java it's been very aggravating for me that it doesn't support implicit conversions from numeric types to booleans, so you can't do things like: if (flags & 0x80) { ... } instead you have to go through this lunacy: if ((flags & 0x80) != 0) { ... } It's the same with null and objects. Every other C-like language I know including JavaScript allows it, so I thought Java was just moronic, but I've just discovered that C# is the same (at least for numbers, don't know about null/objects): http://msdn.microsoft.com/en-us/library/c8f5xwh7(VS.71).aspx Microsoft changed it on purpose from C++, so why? Clearly I'm missing something. Why change (what I thought was) the most natural thing in the world to make it longer to type? What on Earth is wrong with it?

    Read the article

< Previous Page | 5 6 7 8 9 10 11  | Next Page >