Search Results

Search found 12267 results on 491 pages for 'cool stuff'.

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

  • How do I get autotest (ZenTest) to see my namespaced stuff?

    - by Blaine LaFreniere
    Autotest is supposed to map my tests to a class, I believe. When I have class Foo and class FooTest, autotest should see FooTest and say, "Hey, this test corresponds to the unit Foo, so I'll look for changes there and re-run tests when changes occur." And that works, however... When I have Foo::Bar and Foo::BarTest, autotest doesn't seem to make the connection, and whenever I edit Foo::Bar, autotest does not re-run Foo::BarTest Am I doing something wrong? EDIT: File structure might be helpful. Here it is: Module and class files: lib/foo.rb lib/foo/bar.rb lib/foo/baz.rb Test files: test/unit/foo/bar.rb test/unit/baz.rb I would think that autotest is able to make the connection between Foo::Bar and Foo::BarTest, but apparently it doesn't.

    Read the article

  • Where can I find good tutorials on XSL-FO (Formating/ed Objects), the stuff one feeds to fop and get

    - by Gustavo Carreno
    On a company that I've worked, me and my colleagues, implemented a tailored document distribution system on top of XSL-FO. My task was to get the script to deliver the documents and configure the CUPS print server and the Fax server, so I never had the time to get my hands dirty on XSL-FO. I'm thinking of implementing something in the region that was made there but I'll need some templates to work with while testing. Where can I find some good tutorials on XSL-FO, since the fop process I've mastered already?

    Read the article

  • Insight into how things get printed onto the screen (cout,printf) and origin of really complex stuff

    - by sil3nt
    I've always wondered this, and still haven't found the answer. Whenever we use "cout" or "printf" how exactly is that printed on the screen?. How does the text come out as it does...(probably quite a vague question here, ill work with whatever you give me.). So basically how are those functions made?..is it assembly?, if so where does that begin?. This brings on more questions like how on earth have they made openGl/directx functions.. break it down people break it down.:)

    Read the article

  • What's the best way to return stuff from a PHP function, and simultaneously trigger a jQuery action?

    - by Jack Webb-Heller
    So the title is a tad ambiguous, but I'll try and give an example. Basically, I have an 'awards' system (similar to that of StackOverflow's badges) in my PHP/CodeIgniter site, and I want, as soon as an award is earned, a notification to appear to the user. Now I'm happy to have this appear on the next page load, but, ideally I'd like it to appear as soon as the award is transactioned since my site is mostly Ajax-powered and there may not be page reloads very often. The way the system works currently, is: 1) If the user does something to trigger the earning of an award, CodeIgniter does this: $params['user_id'] = $this->tank_auth->get_user_id(); $params['award_id'] = 1; // (I have a database table with different awards in) $this->awards->award($params); 2) My custom library, $this->awards, runs the award function: function award($params) { $sql = $this->ci->db->query("INSERT INTO users_awards (user_id, award_id) VALUES ('".$params['user_id']."','".$params['award_id']."') ON DUPLICATE KEY UPDATE duplicate=duplicate+1"); $awardinfo = $this->ci->db->query("SELECT * FROM awards WHERE id = ".$params['award_id']); // If it's the 'first time' the user has gotten the award (e.g. they've earnt it) if ($awardinfo->row('duplicate') == 0) { $params['title'] = $awardinfo->row('title'); $params['description'] = $awardinfo->row('description'); $params['iconpath'] = $awardinfo->row('iconpath'); $params['percentage'] = $awardinfo->row('percentage'); return $params; } } So, it awards the user (and if they've earnt it twice, updates a useless duplicate field by one), then checks if it's the first time they've earnt it (so it can alert them of the award). If so, it gets the variables (title of the award, the award description, the path to an icon to display for the award, and finally the percentage of users who have also got this award) and returns them as an array. So... that's that. Now I'd like to know, what's the best way to do this? Currently my Award-giving bit is called from a controller, but I guess if I want this to trigger via Ajax, then the code should be placed in a View file...? To sum it up: I need the returned award data to appear without a page refresh. What's the best way of doing this? (I'm already using jQuery on my page). Thanks very much everybody! Jack

    Read the article

  • What do you call the << operator in Ruby when it's used for appending stuff?

    - by more or less
    In other contexts I know this << is called the bitshift operator. Is there a name for it when it's just used for append operations like you would do in an array or string (not sure what else you can append with it)? I'd like to be able to use an English word to refer to it instead of saying "you know, the operator with the two left arrows that's not really the left bitshift operator".

    Read the article

  • Semantic stuff (RDF, OWL) on mobile phones - is it possible?

    - by Brian Schimmel
    I'm thinking about using semantic (web) technogies like RDF and OWL in an application on mobile devices. Currently I'm targeting android, but I'd also be interested in the possibilities on the iPhone and on J2ME. I would like to use a lib instead of implementing everything from scratch. I know that there are some libraries and frameworks like Jena, Redland, Protégé but they don't state on which platforms they are known to work. Having a dynamic object model and parsing from and to XML are must-haves for me. I'd also like to use reasoning, but I've been told it was rather computing-intensive, so that's only a nice-to-have. For all platforms mentioned, the question can be interpreted as Is it possible in theory (especially for J2ME I'm not sure) Are there libs that are known to work on those platforms? Is the performance on a mobile platform good enough for real world usage?

    Read the article

  • Associate "Code/Properties/Stuff" with Fields in C# without reflection. I am too indoctrinated by J

    - by AlexH
    I am building a library to automatically create forms for Objects in the project that I am working on. The codebase is in C#, and essentially we have a HUGE number of different objects to store information about different things. If I send these objects to the client side as JSON, it is easy enough to programatically inspect them to generate a form for all of the properties. The problem is that I want to be able to create a simple way of enforcing permissions and doing validation on the client side. It needs to be done on a field by field level. In javascript I would do this by creating a parallel object structure, which had some sort of { permissions : "someLevel", validator : someFunction } object at the nodes. With empty nodes implying free permissions and universal validation. This would let me simply iterate over the new object and the permissions object, run the check, and deal with the result. Because I am overfamilar with the hammer that is javascript, this is really the only way that I can see to deal with this problem. My first implementation thus uses reflection to let me treat objects as dictionaries, that can be programatically iterated over, and then I just have dictionaries of dictionaries of PermissionRule objects which can be compared with. Very javascripty. Very awkward. Is there some better way that I can do this? Essentially a way to associate a data set with each property, and then iterate over those properties. Or else am I Doing It Wrong?

    Read the article

  • Can bad stuff happen when dividing 1/a very small float?

    - by Jeremybub
    If I want to check that positive float A is less than the inverse square of another positive float B (in C99), could something go wrong if B is very small? I could imagine checking it like if(A<1/(B*B)) but if B is small enough, would this possibly result in infinity? If that were to happen, would the code still work correctly in all situations? in a similar vein, I might do if(1/A>B*B) Which might be slightly better because B*B might be zero if B is small (is this true?) Finally, a solution that I can't imagine being wrong is if(sqrt(1/A)>B) Which I don't think would ever result in zero division, but still might be problematic if A is close to zero. So basically, my questions are Can 1/X ever be infinity if X is greater than zero (but small)? Can X*X ever be zero if X is greater than zero? Will comparisons with infinity work the way I would expect them to?

    Read the article

  • In Winform I need ASP.NET like membership and roles stuff. But Roles doesn't work

    - by user512602
    Hi, following http://www.theproblemsolver.nl/usingthemembershipproviderinwinforms.htm I set up the membership & roles providers in app.config and try use it in code. Authentication works well, bur roles always returns empty roles array for connected user. This part works: If Membership.ValidateUser(userName, password) Then ' Set the current application principal information to a known user Dim identity As GenericIdentity Dim principal As RolePrincipal Dim user As MembershipUser user = Membership.GetUser(userName) identity = New GenericIdentity(user.UserName) principal = New RolePrincipal(identity) Threading.Thread.CurrentPrincipal = principal This one doesn't: If principal.IsInRole("Club") Then LoggedInUserRole = "Club" Return True Exit Function End If No error is thrown though. Similarly, if I try to add a user to a known, existing role, an exception is thrown : If Not Roles.IsUserInRole(userName, "club") Then Roles.AddUserToRole(userName, "club") End If Exception msg is: Cannot find role '' (I mean the role name isn't given back in exception.) Any clue? Please do not tell me to use Windows Client Administration within project services, I need my own SQL DB connection + the client app services is a bloated dfeature, bug prone.

    Read the article

  • Do you have to use display to output stuff using r6rs?

    - by incrediman
    Background: I am new to scheme, and am using DrScheme to write my programs. The following program outputs 12345 when I run the program as r5rs: 12345 However the following program outputs nothing (it's an r6rs program): #!r6rs (import (rnrs)) 12345 That being said, I can get it to output 12345 by doing this: #!r6rs (import (rnrs)) (display 1235) Is that something new with r6rs, where output only occurs when specifically specified using display? Or am I just doing something else wrong

    Read the article

  • What is better for non-active directory stuff, WMI or ADSI?

    - by nbolton
    I've used both technologies in C# for some time now and thus far have not been able to figure out which is better (in terms of ease of use). It seems to me that because there is support for Windows 95 in WMI, it's an older technology than ADSI (which I assume was invented along with Active Directory). However, despite the hint that ADSI is "for AD", I've used it for several non-AD things, such as managing IIS and local users. So, for those sort of tasks (managing IIS and local users), which is more practical? WMI or ADSI? Consider also that I'm using C# to implement these technologies, not vbscript. However, this may equally apply to vbscript.

    Read the article

  • What's the deal with all of the abstract stuff?

    - by JustVenting
    I see a lot of talk about MVVM, MVC, Design Patterns etc... You know, some guy has a blog, and he spent the last six months learning about one these things and desiging a program centered around that concept and then he goes on and on about it like its better than sliced bread. I read all of this crap and I wonder, whatever happened to simple logical programming? Not self-absorbed huge frameworks of design patterns and mvc and whatever else you can think of... just simple linear programming, perhaps a few classes to encapsulate things here and there.

    Read the article

  • C++ header files and variable scope

    - by MrDatabase
    I want to organize my c++ variables and functions in the following way: function prototypes in a header file "stuff.h", function implementation in "stuff.cpp", then say #include "stuff.h" in main.cpp (so I can call functions implemented in stuff.cpp). So far so good. Now I want to declare some variables in stuff.cpp that have global scope (so I can modify the variables in functions implemented in stuff.cpp and main.cpp). This doesn't seem to work. How can I do this?

    Read the article

  • How do I send this email in Python, opening files and stuff?

    - by alex
    msg = EmailMessage(subject, body, from_email, [to_email]) msg.content_subtype = "html" msg.send() This is how I send an email in Django. But what if I want to open a text file and take into account all its line breaks and tabs. I want to take the body of the text file (with line breaks \n) and email it as text of the "body".

    Read the article

  • Phones, Nokia, Microsoft and More

    - by Bill Evjen
    The phone revolution that is under way at the moment is insanely interesting and continuously full of buzz about directions, failures, and promises. The movement started with Apple completely reinventing what a smart phone was all about and now we have the followers. Though – don’t dismiss the followers, they are usually the ones that come out with the leap frog products when most of the world is thinking about jumping on. Remember the often used analogy – the USA invented the TV – but it was Japan that took it to the next level and now all TVs are from somewhere else other than the USA. Really there are two camps for the phones – the Cool Kids and other kids that no one wants to hang out with anymore. When it comes to cool – for some reason, the phone is an important part of that factor. Everyone wants to show their phone and its configuration (apps installed, etc) to their friends as a sign of (1) “I have money” and (2) I have smarts/tastes/style/etc when it comes to my applications that are on my phone. For those that don’t know – the Cool Kids include: Apple – this is quite obvious as everything Apple produces is in the cool camp. Just having an Apple product on your person means you can dance. Google – this is one of the more interesting releases as they have created something called Android (which in it’s own right is a major brand in itself). Microsoft – you might be saying “Really, Microsoft is cool?”. I would argue that they are indeed cool as it is now associated with XBOX 360, Kinect, and Windows 7. Gone are the days of Bob and that silly paperclip. Well – that’s it. There is nobody else I would stick in that camp. The other kids that weren’t picked for that dodgeball team include: Nokia Motorola Palm Blackberry and many many more The sad part of all this is that no matter what this second camp does now, it won’t be able to get out of this bucket easily. They will always be associated as yesterday’s technology and that association will drive the sales of the phone purchasers of the world. For those in that group, the only possible way out is to get invited to the cool club by one of the cool club members in the hope that their coolness somehow rubs off. To me, this is the move that Nokia is making. They are at this point where they have realized that they don’t have the full scope of the required end to end solution to make this all work. They have the plants to build the phones and the reach of the retailers that sell what they have. What they are missing is the proper operating system for the new world of multi-touch form factor phones. Even the companies that come up with some sort of new operating system for this type of new device, they are still associated with the yesterday and lack the developer community behind them to be the real wave of adoption that this market needs. Think about that – this is a major different between Nokia/Blackberry when you compare it to the likes of Apple, Google, and Microsoft. These three powerhouses having a very large and strong development community that will eagerly take on new initiatives using the skillsets that they have already cultivated over the years of already working with the company. This then results in a plethora of applications that are then placed on an app store of some kind. The developer gets a cut and then Apple/Google/Microsoft then get their cut. It is definitely a win-win. None of the other phone companies and wannabies can provide the same results. What Microsoft was missing was the major phone manufactures coming on board to create and push forward with the phones that are required to start the wave. This is where Nokia can come in and help Microsoft. They have the ability to promote the Windows Phone operating system on a new wave of phones. This does mean that Nokia will sell phones, but they lose out on the application store that they might have been thinking about making some money on as well as controlling the end to end solution. What is interesting is in questioning to oneself if Microsoft will purchase Nokia. It really depends upon how they want to compete and with whom Microsoft views as the major competitor. For instance, they can purchase Nokia and have their own hardware company and distribution network for phones – thereby taking on a model that is quite similar to Apple. On the other hand, they could just leave it up to the phone hardware companies such as Nokia and others to build and promote phones in a model that is similar to Google. Both ways have pluses and minuses. If they own the phone manufacturer, they really can put some thought into the design and technical specifications of the phone that is really designed to exactly how they want it. Microsoft has shown that they have this ability – especially with the XBOX initiative they have done over the years. Think about how good and powerful they have moved forward with XBOX – and I am not talking about just copying what others are doing, but coming up with leapfrog products that are steps ahead of everyone else. Though, if they didn’t do it themselves, they could then leave it up to the phone manufacturers to drive each other to build better and better phones that run the Microsoft OS – competition drives better products. We have seen this with the Android line of phones that are out there on the market. I have read a lot about Nokia investors really upset about the new Microsoft relationship – but really, this is a great thing. I for one am a fan of this relationship (I am also a Nokia stock holder btw). This will mean better days for Nokia.

    Read the article

  • Read how a customer uses Oracle NoSQL Database

    - by Jean-Pierre Dijcks
    For those who have had the pleasure to be in SF for Oracle Openworld, you might have seen or heard about this story already. If you did not, here is a great story on how to use Oracle NoSQL Database. Apart from all the cool technology, I'm just excited that this is a company founded by a football international and dealing with sports data, games and other cool things. Like an all things cool combo in one place.

    Read the article

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