Search Results

Search found 21991 results on 880 pages for 'going crazy'.

Page 61/880 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Installing and using acts-as-taggable-on

    - by seaneshbaugh
    This is going to be a really dumb question, I just know it, but I'm going to ask anyways because it's driving me crazy. How do I get acts-as-taggable-on to work? I installed it as a gem with gem install acts-as-taggable-on because I can't ever seem to get installing plugins to work, but that's a whole other batch of questions that are all probably really dumb. Anyways, no problems there, it installed correctly. I did ruby script/generate acts_as_taggable_on_migration and rake db:migrate, again no problems. I added acts_as_taggable to the model I want to use tags with, started up the server and then loaded the index for the model just to see if what I've got so far is working and got the following error: undefined local variable or method `acts_as_taggable' for #. I figure that just means I need to do something like require 'acts-as-taggable-on' to my model's file because that's typically what's necessary for gems. So I did that hit refresh and got uninitialized constant ActiveRecord::VERSION. I'm not even going to pretend to begin to know what that means went wrong. Did I go wrong somewhere or there something else I need to do. The installation instructions seem to me like they just assume you generally know what you're doing and don't even begin to explain what to do when things go wrong.

    Read the article

  • Extending ASP.NET role providers

    - by Quick Joe Smith
    Because the RoleProvider interface seems to treat roles as nothing more than simple strings, I'm wondering if there is any non-hacky way to apply an optional value for a role on a per-user basis. Our current login management system implements roles as key-value pairs, where the value part is optional and usually used to clarify or limit the permissions granted by a role. For example, a role 'editor' might contain a user 'barry', but for 'barry' it will have an optional value 'raptors', which the system would interpret to mean that Barry can only edit articles filed under the 'raptors' category. I have seen elsewhere a suggestion to simply create additional delimited roles, such as 'editor.raptors' or somesuch. That's not really going to be ideal because it would bloat the number of roles greatly, and I can tell it's going to be a very hard sell to replace our current implementation (which is also very less than ideal, but has the advantage of being custom made to work with our user database). I can tell already that the concatenation method mentioned above is going to involve a lot of tedious string-splitting and partial matching. Is there a better way?

    Read the article

  • extern "C" has no effect in msvc++ 9.0

    - by Dewfy
    I manage project for JNI for both compilers: MSVC++ 8.0 and 9.0, my cpp file contains following implementation: extern "C" { JNIEXPORT jlong JNICALL Java_context_ServiceProviderContext_StartServiceProvider (JNIEnv * env, jclass, jstring jspath){ ..... } With help of depends.exe utility I can see that MSVC 8.0 successfully exports function as it is expected: Java_context_ServiceProviderContext_StartServiceProvider But compiling under MSVC 9.0 gets me crazy it exports like ignoring extern "C" at all. depends.exe shows me: _Java_context_ServiceProviderContext_StartServiceProvider@12 Does anybody know what exactly in 9.0 project that causes this behavior?

    Read the article

  • SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters

    - by Gremo
    Weird error and this is driving me crazy all the day. To me it seems a bug because there are no positional parameters in my query. Here is the method: public function getAll(User $user, DateTime $start = null, DateTime $end = null) { $params = array('user_id' => $user->getId()); $rsm = new \Doctrine\ORM\Query\ResultSetMapping(); // Result set mapping $rsm->addScalarResult('subtype', 'subtype'); $rsm->addScalarResult('count', 'count'); $sms_sql = "SELECT CONCAT('sms_', IF(is_auto = 0, 'user' , 'auto')) AS subtype, " . "SUM(messages_count * (customers_count + recipients_count)) AS count " . "FROM outgoing_message AS m INNER JOIN small_text_message AS s ON " . "m.id = s.id WHERE status <> 'pending' AND user_id = :user_id"; $news_sql = "SELECT CONCAT('news_', IF(is_auto = 0, 'user' , 'auto')) AS subtype, " . "SUM(customers_count + recipients_count) AS count " . "FROM outgoing_message AS m JOIN newsletter AS n ON m.id = n.id " . "WHERE status <> 'pending' AND user_id = :user_id"; if($start) : $sms_sql .= " AND sent_at >= :start"; $news_sql .= " AND sent_at >= :start"; $params['start'] = $start->format('Y-m-d'); endif; $sms_sql .= ' GROUP BY type, is_auto'; $news_sql .= ' GROUP BY type, is_auto'; return $this->_em->createNativeQuery("$sms_sql UNION ALL $news_sql", $rsm) >setParameters($params)->getResult(); } And this throws the exception: SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters Array $arams is OK and so generated SQL: var_dump($params); array (size=2) 'user_id' => int 1 'start' => string '2012-01-01' (length=10) Strangest thing is that it works with "$sms_sql" only! Any help would make my day, thanks. Update Found another strange thing. If i change only the name (to start_date instead of start): if($start) : $sms_sql .= " AND sent_at >= :start_date"; $news_sql .= " AND sent_at >= :start_date"; $params['start_date'] = $start->format('Y-m-d'); endif; What happens is that Doctrine/PDO says: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sent1rt_date' in 'where clause' ... as string 1rt was added in the middle of the column name! Crazy...

    Read the article

  • Why do people hate SQL cursors so much?

    - by Steven A. Lowe
    I can understand wanting to avoid having to use a cursor due to the overhead and inconvenience, but it looks like there's some serious cursor-phobia-mania going on where people are going to great lengths to avoid having to use one for example, one question asked how to do something obviously trivial with a cursor and the accepted answer proposed using a common table expression (CTE) recursive query with a recursive custom function, even though this limits the number of rows that could be processed to 32 (due to recursive call limit in sql server). This strikes me as a terrible solution for system longevity, not to mention a tremendous effort just to avoid using a simple cursor. what is the reason for this level of insane hatred? has some 'noted authority' issued a fatwa against cursors? does some unspeakable evil lurk in the heart of cursors that corrupts the morals of the children or something? wiki question, more interested in the answer than the rep thanks in advance! Related Info: http://stackoverflow.com/questions/37029/sql-server-fast-forward-cursors EDIT: let me be more precise: I understand that cursors should not be used instead of normal relational operations, that is a no-brainer. What I don't understand is people going waaaaay out of their way to avoid cursors like they have cooties or something, even when a cursor is a simpler and/or more efficient solution. It's the irrational hatred that baffles me, not the obvious technical efficiencies.

    Read the article

  • Java SFTP Transfer Library

    - by Claus Jørgensen
    Hi I'm looking for a dead simple Java Library to use for SFTP file transfers. I don't need any other features beyond that. I've tried Zehon's, but it's incredible naggy, and I think 8 jar files is a bit crazy for so little functionality as I require. And the library have to be free (as in free beer), and preferable Open Source (not a requirement). Thanks.

    Read the article

  • Does @JoinTable has a property of "table" or not?

    - by Kent Chen
    The following is copied from hibernate's document. (http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/#d0e2770) @CollectionOfElements @JoinTable( table=@Table(name="BoyFavoriteNumbers"), joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoriteNumber", nullable=false) However, when I put this in practice, I just found that @JoinTable has no "table" property, instead it has a "name" property to specify the table name. But I need "table" property to specify indexes. What's going on here? I'm almost driven crazy!

    Read the article

  • Is it possible to manipulate a request before IIS assigns that request to a specific site?

    - by Deane
    Is it possible to manipulate an inbound request at the IIS level, before it even gets assigned to site on the server? Essentially, I want to rewrite this -- www.somegenericdomain.com?site=someotherdomain To this -- www.someotherdomain.com And I need to do this before IIS picks which site the request belongs to, so I need to change the host header prior to this point. Possible, or crazy? We're running IIS7.

    Read the article

  • What does "===" mean?

    - by Stefan Konno
    I recently studied some code that I'm supposed to use for different reasons, it's unrelevant. The thing I've noticed is someone using the operator "===" which I can't make sense out of. I've tried it with a function and it corresponds in crazy ways. The language is PHP by the way. Does anyone know what the definition of this operator is, I can't even find it in the declaration of php operators.

    Read the article

  • ABAP - increment an integer

    - by Ben
    Hi there, sometimes ABAP drives me crazy with really simple tasks - as incrementing an integer within a loop... Here's my try: METHOD test. DATA: lv_id TYPE integer. lv_id = 1. LOOP AT x ASSIGNING <y>. lv_id = lv_id+1. ENDLOOP. ENDMETHOD. This gives me a strange error I can hardly translate to english..

    Read the article

  • Android Status Bar Notifications - Opening the correct activity when selecting a notification

    - by Mr Zorn
    I have been having a problem with a notification not opening/going to the correct activity when it has been clicked. My notification code (located in a class which extends Service): Context context = getApplicationContext(); CharSequence contentTitle = "Notification"; CharSequence contentText = "New Notification"; final Notification notifyDetails = new Notification(R.drawable.icon, "Consider yourself notified", System.currentTimeMillis()); Intent notifyIntent = new Intent(context, MainActivity.class); PendingIntent intent = PendingIntent.getActivity(context, 0, notifyIntent, PendingIntent.FLAG_UPDATE_CURRENT | Notification.FLAG_AUTO_CANCEL); notifyDetails.setLatestEventInfo(context, contentTitle, contentText, intent); ((NotificationManager)getSystemService(NOTIFICATION_SERVICE)).notify(NOTIFICATION_ID, notifyDetails); If I click the notification while the application which created the service is open, the notification disappears (due to the FLAG_AUTO_CANCEL) but the activity does not switch. If I click the notification from the home screen, the notification disappears and my app is brought to the front, however it remains on the activity which was open before going to the home screen, instead of going to the main screen. What am I doing wrong? How do I specify the activity that will be pulled up?

    Read the article

  • How to check in which position (landscape or portrait) os the iPhone now?

    - by Mike Rychev
    I have an app with a tab bar, and nav controllers in each tab. When user shakes the device, a UIImageView appears as a child view in the nav controller. But the UIImageView must contain a special image, depending on the device's current orientation. If I write just - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation) if (interfaceOrientation == UIInterfaceOrientationPortrait|| interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { //Code } else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight||interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { //Code } } The view just goes crazy if user rotated the device before shaking. Is there a method to get iPhones current orientation?

    Read the article

  • Sales by Category in Magento?

    - by Tegan Snyder
    We have a category called "Clearance" on our Magento website. Ideally it would be nice to be able to get a report of all orders sold in that category. Is there anyway I can join the orders collection with the products collection and filter by category id? Here is a similar thread: http://www.magentocommerce.com/boards/viewthread/44296/ Any ideas, or am I crazy? It doesn't need to be pretty.

    Read the article

  • [RESOLVED] ASP.NET Membership Password Reset

    - by Steve
    This is crazy, I have been trying for hours to get this to work. My client wants to be able to reset password for uses who have forgotten them The only parameter he has is the UserName. He does NOT want the user to be able to reset the password themselves, no that would be too easy...ARGHHHHH!! Anyway, if anyone has any suggestions how I could reset someones password or give them a new temp password somehow, that would be greatly appreciated. Thank you, Steve

    Read the article

  • passing callback function accross windows causing error with ie ...

    - by krul
    I have a problem with IE causing two errors: 1. Object doesn't support this property or method 2. Call was rejected by callee. My Intention: To call window.opener.myObject method that is going to retrieve some data using ajax and pass in callback function that live as nested function in popup window that initiated call that is going to handle response data and modify popup window html accordingly. Here is a scenario: I pull up popup window that handles some specific operation. This popup window calling window.opener.myObject method that using ajax call. I'm passing in popup window function that is going to handle response and it works with ff and safari but not with ie. Here is code sample //RELEVANT SCRIPT ON POPUP WINDOW $('#myButton').live('click', function() { var h = window.opener.myObject, p = { 'p1': 1 }; var responseHandler = function(responseObj) { //in IE we never got here if (!responseObj) { alert('Unexpected error!! No response from server'); return false; } //..handle response }; p.p1 = $('#control').val(); h.executeMethod(p, responseHandler); }); //RELEVANT SCRIPT ON WINDOW OPENER MYOBJECT try { $.ajax({ type: 'POST', async: true, url: url, data: postData, dataType: "json", contentType: 'application/x-www-form-urlencoded; charset=utf-8', success: r, // r here is reference to my responseHandler popup window function error: handleError }); } catch (ex) { alert(ex.message); } Any tips?

    Read the article

  • Remoting Error: Requested Service Not Found

    - by enableDeepak
    Hi, I am trying to create a very simple example of remoting which isn't working. I start the host and when I start client, it says "requested service not found" Parts of My Application are: Remoting Object : MarshalByRefObject ComponentHost Client You can download my project from here It has been 2 days and I am going crazy. Requested if someone can tell that where am I wrong?

    Read the article

  • Clean checkout from TFS 2008

    - by Luis Medel
    Hi all, I want to pass a project to a colleague without SCC bindings to avoid accidental changes in my repository. Is it possible to do a clean checkout from a TFS 2008 repo? I'm going crazy finding such an option in VS2008. Thanks in advance.

    Read the article

  • C# XPath id() not working?

    - by Iggyhopper
    I'm using C# and I'm stumped. Does it just not support id()? I have a large XML file, about 4-5 of them at ~400kb, so I need some speed and performance wherever I can get it. I use XmlDocument.SelectSingleNode("id('blahblahblah')") and it doesn't get the node by id. Am I going crazy or is it that C# XPath just doesn't support id()?

    Read the article

  • ASP.NET user database without web.config connection strings

    - by vikp
    Hi, I'm wondering whether it's possible to use built in ASP.NET application services (aspnet_user, aspnet_role etc table) without specifying a connection string in a web.config. At the moment I store connection strings externally, but I keep finding hard-coded connection strings all over the web.config xml, various providers etc. It's driving me crazy. Thank you

    Read the article

  • Interesting questions related to lighttpd on Amazon EC2

    - by terence410
    This problem appeared today and I have no idea what is going on. Please share you ideas. I have 1 EC2 DB server (MYSQL + NFS File Sharing + Memcached). And I have 3 EC2 Web servers (lighttpd) where it will mounted the NFS folders on the DB server. Everything going smoothly for months but suddenly there is an interesting phenomenon. In every 8 minutes to 10 minutes, PHP file will be unreachable. This will last about 1 minute and then back to normal. Normal files like .html file are unaffected. All servers have the same problem exactly at the same time. I have spent one whole day to analysis the reason. Finally, I find out when the problem appear, the file descriptor of lighttpd suddenly increased a lot. I used ls /proc/1234/fd | wc -l to check the number of fd. The # of fd is around 250 in normal time. However, when the problem appeared, it will be raised to 1500 and then back to normal. It sounds funny, right? Do you have any idea what's going on? ======================== The CPU graph of one of the web server.

    Read the article

  • Using Doctrine to abstract CRUD operations

    - by TomWilsonFL
    This has bothered me for quite a while, but now it is necessity that I find the answer. We are working on quite a large project using CodeIgniter plus Doctrine. Our application has a front end and also an admin area for the company to check/change/delete data. When we designed the front end, we simply consumed most of the Doctrine code right in the controller: //In semi-pseudocode function register() { $data = get_post_data(); if (count($data) && isValid($data)) { $U = new User(); $U->fromArray($data); $U->save(); $C = new Customer(); $C->fromArray($data); $C->user_id = $U->id; $C->save(); redirect_to_next_step(); } } Obviously when we went to do the admin views code duplication began and considering we were in a "get it DONE" mode so it now stinks with code bloat. I have moved a lot of functionality (business logic) into the model using model methods, but the basic CRUD does not fit there. I was going to attempt to place the CRUD into static methods, i.e. Customer::save($array) [would perform both insert and update depending on if prikey is present in array], Customer::delete($id), Customer::getObj($id = false) [if false, get all data]. This is going to become painful though for 32 model objects (and growing). Also, at times models need to interact (as the interaction above between user data and customer data), which can't be done in a static method without breaking encapsulation. I envision adding another layer to this (exposing web services), so knowing there are going to be 3 "controllers" at some point I need to encapsulate this CRUD somewhere (obviously), but are static methods the way to go, or is there another road? Your input is much appreciated.

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >