Search Results

Search found 34 results on 2 pages for 'rasmus pedersen'.

Page 2/2 | < Previous Page | 1 2 

  • Applescript from Mac App says "Expected end of line but found \U201c\"\U201d."

    - by Rasmus Styrk
    I am trying to perform a copy/paste for my to the the last active app, here's my code: NSString *appleScriptSource = [NSString stringWithFormat:@"\ntell application \"%@\" to activate\ntell application \"System Events\" to tell process \"%@\"\nkeystroke \"v\" using command down\nend tell", [lastApp localizedName], [lastApp localizedName]]; NSDictionary *error; NSAppleScript *aScript = [[NSAppleScript alloc] initWithSource:appleScriptSource]; NSAppleEventDescriptor *aDescriptor = [aScript executeAndReturnError:&error]; The problem is that on some computers it works just fine, but on others it fails. My error output from error that is returned by executeAndReturnError is: 2012-06-13 17:43:19.875 Mini Translator[1206:303] (null) (error: { NSAppleScriptErrorBriefMessage = "Expected end of line but found \U201c\"\U201d."; NSAppleScriptErrorMessage = "Expected end of line but found \U201c\"\U201d."; NSAppleScriptErrorNumber = "-2741"; NSAppleScriptErrorRange = "NSRange: {95, 1}"; }) I can't seem to figure out what it means or why it happens. We tried copying the generated apple-script code into the Apple Script editor, and here it works just fine. My App is sandboxed - i have added the bundle identifiers for the key "com.apple.security.temporary-exception.apple-events" for the apps i want to support. Any suggestions?

    Read the article

  • Uninitialized constant Item::Types

    - by Rasmus
    Hi! First of, im a newbie ruby programmer so please bare with me if this is a very dumb question. I get this uninitialized constant error when i submit my nested forms. order.rb class Order < ActiveRecord::Base has_many :items, :dependent => :destroy has_many :types, :through => :items accepts_nested_attributes_for :items accepts_nested_attributes_for :types validates_associated :items validates_associated :types end item.rb class Item < ActiveRecord::Base has_one :types belongs_to :order accepts_nested_attributes_for :types validates_associated :types end type.rb class Type < ActiveRecord::Base belongs_to :items belongs_to :orders end new.erb.html <% form_for @order do |f| %> <%= f.error_messages %> <% f.fields_for :items do |builder| %> <table border="0"> <th>Type</th> <th>Amount</th> <th>Text</th> <th>Price</th> <tr> <% f.fields_for :type do |m| %> <td> <%= m.collection_select :type, Type.find(:all, :order => "created_at DESC"), :id, :name, {:prompt => "Select a Type" }, {:id => "selector", :onchange => "type_change(this)"} %> </td> <% end %> <td> <%= f.text_field :amount, :id => "amountField", :onchange => "change_total_price()" %> </td> <td> <%= f.text_field :text, :id => "textField" %> </td> <td> <%= f.text_field :price, :class => "priceField", :onChange => "change_total_price()" %> </td> <td> <%= link_to_remove_fields "Remove Item", f %> </td> </tr> </table> <% end %> <p><%= link_to_add_fields "Add Item", f, :items %></p> <p> <%= f.label :total_price %><br /> <%= f.text_field :total_price, :class => "priceField", :id => "totalPrice" %> </p> <p><%= f.submit "Create"%></p> <% end %> <%= link_to 'Back', orders_path %> create method in orders_controller.rb def create @order = Order.new(params[:order]) respond_to do |format| if @order.save flash[:notice] = 'Post was successfully created.' format.html { redirect_to(@order) } format.xml { render :xml => @order, :status => :created, :location => @order } else format.html { render :action => "new" } format.xml { render :xml => @order.errors, :status => :unprocessable_entity } end end end Hopefully you can see what i cant

    Read the article

  • Le PHP aurait été créé par un "faux programmeur" et serait aussi passionnant qu'une "brosse à dents"

    Le PHP aurait été créé par un "faux programmeur" Et serait aussi passionnant qu'une "brosse à dents"... déclare son inventeur Le PHP a-t-il été créé par un programmeur qui déteste développer. Et qui en plus le fait mal. C'est la question que l'on peut se poser quand on lit les déclarations de son inventeur (qui précise : "je n'ai pas créé le PHP que l'on connait aujourd'hui [?], j'ai simplement été son premier développeur"). Il faut dire que le danois Rasmus Lerdorf est expert en formules provocantes. Il avoue ainsi "je n'avais absolument aucune idée sur la manière d'écrire un langage de programmation...

    Read the article

  • SyncToBlog #11 Stuff and more stuff

    - by Eric Nelson
    Just getting more stuff “down on paper” which grabbed my attention over the last couple of weeks. http://www.koodibook.com/ is live. This is a a rich desktop application built in WPF by some ex-colleagues and current friends :-) Check it out if “photo books” is your thing or you like sweet WPF UX. Study rates Microsoft .NET Framework rated top, Ruby on Rails 2nd bottom. I know a bit about both of these frameworks. Both are sweet for different reasons. .NET top. Ok – I liked that. But Ruby on Rails 2nd bottom just blows away the credibility of the survey results for me. Stylecop is going Open Source. Sweet. ”…will be taking code submissions from the open source community” VMforce for running Java in the cloud. Hmmmmm… Windows Azure Guidance Code and Docs available on patterns and practices. Download both zip files. – One is just the code and the other is 7 chapters of the guide to migration. UK Architect Insight Conference post event presentations are here including a full day track of cloud stuff. http://uxkit.cloudapp.net/ This appears to be a well-kept secret but the Silverlight Demo Kit is on-line in Windows Azure. You already knew! Ok – just me then :-) 3 day Silverlight Masterclass training in the UK from people I trust and like :-) http://silverlightmasterclass.net/ (£995) SQL Server Driver for PHP 2.0 CTP adds PHP's PDO style data access for SQL Server/SQL Azure A Domain Oriented N-Layered .NET 4.0 App Sample from Microsoft Spain. Not looked at it yet – but had it recommended to me (tx Torkil Pedersen) You might also want to check out delicious stream – a blur of azure, ruby and gaming right now http://delicious.com/ericnel :-)

    Read the article

  • Interesting sessions/tips from RMOUG

    - by jean-pierre.dijcks
    One of the sessions I was at at last week's RMOUG was a session on Temp Tablespace Groups. I had a look because I had no experience with this and it seemed to help with parallel processing and the allocation/usage of temp. You can read the excellent write-up at Kellyn Pedersen's blog - who did the session and all the work - here. So for all of those who may be seeing lot's of waits like enq: TS - Contention when you are doing hash joins and sorts, do have a look at the above blog post. I also had the chance to listen in at Stewart Bryson's session on Restartability (he had 3 R-s) where he gave very useful tips about how to deal with your data warehouse loads. Questions like archive log mode - should I or should I not were well covered. Flashback archives, also nice to hear about. Very nice talk, very interesting. Unfortunately he hasn't blogged about it yes, so no pointers to that one. Got to see a couple of other interesting sessions, and as conferences go got to meet some interesting Oracle folks from the region. As usual RMOUG was useful and fun. Off to the drawing boards to design next year's session!

    Read the article

  • Help to translate SQL query to Relational Algebra

    - by Mestika
    Hi everyone, I'm having some difficulties with translating some queries to Relational Algebra. I've a great book about Database Design and here is a chapter about Relational Algebra but I still seem to have some trouble creating the right one: Thoes queries I've most difficuelt with is these: SELECT COUNT( cs.student_id ) AS counter FROM course c, course_student cs WHERE c.id = cs.course_id AND c.course_name = 'Introduction to Database Design' SELECT COUNT( cs.student_id ) FROM Course c INNER JOIN course_student cs ON c.id = cs.course_id WHERE c.course_name = 'Introduction to Database Design' and SELECT COUNT( * ) FROM student JOIN grade ON student.f_name = "Andreas" AND student.l_name = "Pedersen" AND student.id = grade.student_id I know the notation can be a bit hard to paste into HTML forum, but maybe just use some common name or the Greek name. Thanks in advance Mestika

    Read the article

  • making use of c++ to speed up php

    - by Ygam
    I saw this post on Sitepoint quoting a statement by Rasmus Lerdorf which goes (according to Sitepoint) as follows: "How can you make PHP fast? Well, you can’t" was his quick answer. PHP is simply not fast enough to scale to Yahoo levels. PHP was never meant for those sorts of tasks. "Any script based language is simply not fast enough". To get the speed that is necessary for truly massive web systems you have to use compiled C++ extensions to get true, scaleable architecture. That is what Yahoo does and so do many other PHP heavyweights. Intrigued by the statement (not to mention the fact that up to now, all I was doing in PHP was small database-based apps), I was wondering how I could "use compiled C++ extensions" with PHP. Any ideas or resources?

    Read the article

  • Visual Basic Cryptography Question

    - by Glenn Sullivan
    I am trying to mimic the results of some C code that uses the OpenSSL library using the system.security.crytography library in the .net 3.5 world, and I can't seem to get it right. I need some help... part of the issue is my understanding of crytography in general. Here's what is supposed to happen: I send a request for authentication to a device. It returns a challenge digest, which I then need to sign with a known key and return The device returns a "success" or "Fail" message. I have the following code snippet that I am trying to "copy": //Seed the PRNG //Cheating here - the PRNG will be seeded when we create a key pair //The key pair is discarded only doing this to seed the PRNG. DSA *temp_dsa = DSA_new(); if(!temp_dsa) { printf("Error: The client had an error with the DSA API\n"); exit(0); } unsigned char seed[20] = "Our Super Secret Key"; temp_dsa = DSA_generate_parameters(128, seed, sizeof(seed), NULL, NULL, NULL, NULL); DSA_free(temp_dsa); //A pointer to the private key. p = (unsigned char *)&priv_key; //Create and allocate a DSA structure from the private key. DSA *priv_dsa = NULL; priv_dsa = d2i_DSAPrivateKey(NULL, &p, sizeof(priv_key)); if(!priv_dsa) { printf("Error: The client had an error with the DSA API\n"); exit(0); } //Allocate memory for the to be computed signature. sigret = OPENSSL_malloc(DSA_size(priv_dsa)); //Sign the challenge digest recieved from the ISC. retval = DSA_sign(0, pResp->data, pResp->data_length, sigret, &siglen, priv_dsa); A few more bits of information: priv_key is a 252 element character array of hex characters that is included. The end result is a 512 (or less) array of characters to send back for validation to the device. Rasmus asked to see the key array. Here it is: unsigned char priv_key[] = {0x30, 0x81, 0xf9, 0x02, 0x01, 0x00, 0x02, 0x41, 0x00, 0xfe, 0xca, 0x97, 0x55, 0x1f, 0xc0, 0xb7, 0x1f, 0xad, 0xf0, 0x93, 0xec, 0x4b, 0x31, 0x94, 0x78, 0x86, 0x82, 0x1b, 0xab, 0xc4, 0x9e, 0x5c, 0x40, 0xd9, 0x89, 0x7d, 0xde, 0x43, 0x38, 0x06, 0x4f, 0x1b, 0x2b, 0xef, 0x5c, 0xb7, 0xff, 0x21, 0xb1, 0x11, 0xe6, 0x9a, 0x81, 0x9a, 0x2b, 0xef, 0x3a, 0xbb, 0x5c, 0xea, 0x76, 0xae, 0x3a, 0x8b, 0x92, 0xd2, 0x7c, 0xf1, 0x89, 0x8e, 0x4d, 0x3f, 0x0d, 0x02, 0x15, 0x00, 0x88, 0x16, 0x1b, 0xf5, 0xda, 0x43, 0xee, 0x4b, 0x58, 0xbb, 0x93, 0xea, 0x4e, 0x2b, 0xda, 0xb9, 0x17, 0xd1, 0xff, 0x21, 0x02, 0x41, 0x00, 0xf6, 0xbb, 0x45, 0xea, 0xda, 0x72, 0x39, 0x4f, 0xc1, 0xdd, 0x02, 0xb4, 0xf3, 0xaa, 0xe5, 0xe2, 0x76, 0xc7, 0xdc, 0x34, 0xb2, 0x0a, 0xd8, 0x69, 0x63, 0xc3, 0x40, 0x2c, 0x58, 0xea, 0xa6, 0xbd, 0x24, 0x8b, 0x6b, 0xaa, 0x4b, 0x41, 0xfc, 0x5f, 0x21, 0x02, 0x3c, 0x27, 0xa9, 0xc7, 0x7a, 0xc8, 0x59, 0xcd, 0x5b, 0xdd, 0x6c, 0x44, 0x48, 0x86, 0xd1, 0x34, 0x46, 0xb0, 0x89, 0x55, 0x50, 0x87, 0x02, 0x41, 0x00, 0x80, 0x29, 0xc6, 0x4a, 0x08, 0x3e, 0x30, 0x54, 0x71, 0x9b, 0x95, 0x49, 0x55, 0x17, 0x70, 0xc7, 0x96, 0x65, 0xc8, 0xc2, 0xe2, 0x8a, 0xe0, 0x5d, 0x9f, 0xe4, 0xb2, 0x1f, 0x20, 0x83, 0x70, 0xbc, 0x88, 0x36, 0x03, 0x29, 0x59, 0xcd, 0xc7, 0xcd, 0xd9, 0x4a, 0xa8, 0x65, 0x24, 0x6a, 0x77, 0x8a, 0x10, 0x88, 0x0d, 0x2f, 0x15, 0x4b, 0xbe, 0xba, 0x13, 0x23, 0xa1, 0x73, 0xa3, 0x04, 0x37, 0xc9, 0x02, 0x14, 0x06, 0x8e, 0xc1, 0x41, 0x40, 0xf1, 0xf6, 0xe1, 0xfa, 0xfb, 0x64, 0x28, 0x02, 0x15, 0xce, 0x47, 0xaa, 0xce, 0x6e, 0xfe}; Can anyone help me translate this code to it's VB.net crypto equivalent? TIA, Glenn

    Read the article

< Previous Page | 1 2