Search Results

Search found 1366 results on 55 pages for 'universal coder'.

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

  • Closures and universal quantification

    - by Apocalisp
    I've been trying to work out how to implement Church-encoded data types in Scala. It seems that it requires rank-n types since you would need a first-class const function of type forAll a. a -> (forAll b. b -> b). However, I was able to encode pairs thusly: import scalaz._ trait Compose[F[_],G[_]] { type Apply = F[G[A]] } trait Closure[F[_],G[_]] { def apply[B](f: F[B]): G[B] } def pair[A,B](a: A, b: B) = new Closure[Compose[PartialApply1Of2[Function1,A]#Apply, PartialApply1Of2[Function1,B]#Apply]#Apply, Identity] { def apply[C](f: A => B => C) = f(a)(b) } For lists, I was able to get encode cons: def cons[A](x: A) = { type T[B] = B => (A => B => B) => B new Closure[T,T] { def apply[B](xs: T[B]) = (b: B) => (f: A => B => B) => f(x)(xs(b)(f)) } } However, the empty list is more problematic and I've not been able to get the Scala compiler to unify the types. Can you define nil, so that, given the definition above, the following compiles? cons(1)(cons(2)(cons(3)(nil)))

    Read the article

  • universal content manager

    - by ankur
    I found one limitation in Oracle UCM. Well it might not be limitation but I am not able to figure it out yet: I didn't find mapping between metadata and content type. What if I wish to associate different set of metadata with different content type which is likely the case? Thanks.

    Read the article

  • Universal oAuth for objective-c class?

    - by phpnerd211
    I have an app that connects to 6+ social networks via APIs. What I want to do is transfer over my oAuth calls to call directly from the phone (not from the server). Here's what I have (for tumblr): // Set some variables NSString *consumerKey = CONSUMER_KEY_HERE; NSString *sharedSecret = SHARED_SECRET_HERE; NSString *callToURL = @"https://tumblr.com/oauth/access_token"; NSString *thePassword = PASSWORD_HERE; NSString *theUsername = USERNAME_HERE; // Calculate nonce & timestamp NSString *nonce = [[NSString stringWithFormat:@"%d", arc4random()] retain]; time_t t; time(&t); mktime(gmtime(&t)); NSString *timestamp = [[NSString stringWithFormat:@"%d", (int)(((float)([[NSDate date] timeIntervalSince1970])) + 0.5)] retain]; // Generate signature NSString *baseString = [NSString stringWithFormat:@"GET&%@&%@",[callToURL urlEncode],[[NSString stringWithFormat:@"oauth_consumer_key=%@&oauth_nonce=%@&oauth_signature_method=HMAC-SHA1&oauth_timestamp=%@&oauth_version=1.0&x_auth_mode=client_auth&x_auth_password=%@&x_auth_username=%@",consumerKey,nonce,timestamp,thePassword,theUsername] urlEncode]]; NSLog(@"baseString: %@",baseString); const char *cKey = [sharedSecret cStringUsingEncoding:NSASCIIStringEncoding]; const char *cData = [baseString cStringUsingEncoding:NSASCIIStringEncoding]; unsigned char cHMAC[CC_SHA256_DIGEST_LENGTH]; CCHmac(kCCHmacAlgSHA256, cKey, strlen(cKey), cData, strlen(cData), cHMAC); NSData *HMAC = [[NSData alloc] initWithBytes:cHMAC length:sizeof(cHMAC)]; NSString *signature = [HMAC base64EncodedString]; NSString *theUrl = [NSString stringWithFormat:@"%@?oauth_consumer_key=%@&oauth_nonce=%@&oauth_signature=%@&oauth_signature_method=HMAC-SHA1&oauth_timestamp=%@&oauth_version=1.0&x_auth_mode=client_auth&x_auth_password=%@&x_auth_username=%@",callToURL,consumerKey,nonce,signature,timestamp,thePassword,theUsername]; From tumblr, I get this error: oauth_signature does not match expected value I've done some forum scouring, and no oAuth for objective-c classes worked for what I want to do. I also don't want to have to download and implement 6+ social API classes into my project and do it that way.

    Read the article

  • Python universal feedparser xml

    - by timg
    I am trying to read an xml feed with the python feedparser, but cannot seem to navigate the elements. Here is what I am trying: import feedparser d = feedparser.parse('http://www.website.com/feed') text= d.status.test and here is the xml: <?xml version="1.0" encoding="UTF-8"?> <statuses type="array"> <status> <created>Tue Dec 21 14:16:12 +0000 2010</created> <id>123</id> <text>Hello</text> </status> </statuses>

    Read the article

  • Universal control - simple question about dock and anchor

    - by Vytas999
    I use Visual Studio .NET to develop internal applications. I create a Windows control that will display custom status bar information. Different developers will use the control to display the same information in many different applications. The control must always be displayed at the bottom of the parent form in every application. It must always be as wide as the form. When the form is resized, the control should be resized and repositioned accordingly. How should I do that in the best way and why? A)Create a property to allow the developers to set the Dock property of the control. Set the default value of the property to AnchorStyle.Bottom. B) Create a property to allow the developer to set the Anchor property of the control. Set the default value of the property to AnchorStyle.Bottom.

    Read the article

  • Is ctrl-s save universal for save or are there different combinations for different languages

    - by aepheus
    I imagine that there are different combination, just looking for an affirmation. Or, are we developers really that english-centric? If I were in japan, using a word processor on some computer, would ctrl-s save? Are there keyboards where ctrl-s doesn't even exist (non-english keyboards)? Most of what I've seen usually has latin + [insert language here] characters, usually overridden on the normal qwerty keyboard.

    Read the article

  • best method for creating a universal extention/plugin

    - by rashcroft44
    Hi, I'm looking to create an extension for the leading browsers (firefox, safari and ie). Its rather simple, and I'm looking for the most efficient way to go about this. I need to get the hostname of the current site the user is on, and if it matches a certain parameter(eg, mysite.org), I'll need to append to the link some extra data and refresh to the new link. What is the simplest way to go about this? (I don't want to go in the direction of a bookmarklet - since this would require the user to click. I'd like this to happen automatically) sort of something like this: if(window.location.hostname == 'mysite.org') { location.replace(document.location.href + '/&mystuff=xyz'); } Thanks!

    Read the article

  • MySQL: host name universal change.

    - by ctrlShiftBryan
    I am making some updates to a php site which I did not design. I have a local copy of the site. At the top of each page there are settings for the host name for the db connection. Is there someway I can setup a pointer to the remote address. The address is 'mysqlhost' for example and I want that to point to 'mysql.myhost.com'. I tried creating a HOST record for mysqlhost pointing to the IP address it resolves to but that doesn't work. If I put 'mysql.myhost.com' in the connection it works. If I put that IP address it doesn't so that is probably why the HOST record idea doesn't work. Other than creating a local copy of the DB is there a quick way so that I don't have to modify each file in my dev environment and then again when I redeploy?

    Read the article

  • Would a cut and paste coder ever get past a job interview?

    - by bigdave
    As a long time cut and paste coder I never committed much of the syntax of a language to memory. Even worse, I now use google to solve many of the coding problems which are of the type typically used in job interviews. This has greatly increased my productivity, the quality of the end result and stops me perpetuating the same bugs across all my code. However it means I don't actually remember the detail of the solution. For some reason in a job interview "I would look that up on google" does not seem to be the right answer. Am I better off in the interview to pass no comment on my coding style and simply pull out an iPad and produce the solution?

    Read the article

  • Quel Environnements de Développement Intégré utilisez-vous pour coder avec Symfony, le framework MVC libre en PHP ?

    Quel EDI utilisez-vous pour coder avec Symfony ? Cela fait déjà un petit temps que je développe avec symfony, en utilisant un bon vieux Notepad++. Et je remarque que, pour le C++, je code quand même bien plus vite avec un EDI plus que correct (Visual Studio) qu'avec Notepad++. Ce n'est pas le premier que je tente d'utiliser mais c'est le seul qui me convient. J'ai déjà essayé NetBeans avec support de symfony, mais je n'ai pas vraiment réussi à le prendre en main, pas hypra intuitif, etc. Ce qui fait que je suis retourné vite fait à mon Notepad++. Mais c'était au tout début du support de symfony (6.5, il me semble). Depuis, on en est à la 6.9 (7.0 en beta), est-ce que ça vaut la peine de réessayer cet EDI ? ...

    Read the article

  • How would you communicate with aliens as a computer scientist?

    - by Pyrolistical
    Let's say aliens arrive on Earth and instead of just sending mathematicians and linguistic experts governments around the work decide to send an expert of major field. After a quick round of sorting you are paired up with an alien computer scientist. Given you don't understand each others language how would you using computer science to start the ground work of communication? eg. We know binary is universal, but not the way we write it. The symbols are not universal nor is the the direction we write it (MSB vs LSB and left vs right) Assume aliens are "similar" to us physically it won't impede visual communication.

    Read the article

  • g++ on MacOSX doesn't work with -arch ppc64

    - by Albert
    I am trying to build a Universal binary on MacOSX with g++. However, it doesn't really work. I have tried with this simple dummy code: #include <iostream> using namespace std; int main() { cout << "Hello" << endl; } This works fine: % g++ test.cpp -arch i386 -arch ppc -arch x86_64 -o test % file test test: Mach-O universal binary with 3 architectures test (for architecture i386): Mach-O executable i386 test (for architecture ppc7400): Mach-O executable ppc test (for architecture x86_64): Mach-O 64-bit executable x86_64 However, this does not: % g++ test.cpp -arch i386 -arch ppc -arch x86_64 -arch ppc64 -o test In file included from test.cpp:1: /usr/include/c++/4.2.1/iostream:44:28: error: bits/c++config.h: No such file or directory In file included from /usr/include/c++/4.2.1/ios:43, from /usr/include/c++/4.2.1/ostream:45, from /usr/include/c++/4.2.1/iostream:45, from test.cpp:1: /usr/include/c++/4.2.1/iosfwd:45:29: error: bits/c++locale.h: No such file or directory /usr/include/c++/4.2.1/iosfwd:46:25: error: bits/c++io.h: No such file or directory In file included from /usr/include/c++/4.2.1/bits/ios_base.h:45, from /usr/include/c++/4.2.1/ios:48, from /usr/include/c++/4.2.1/ostream:45, from /usr/include/c++/4.2.1/iostream:45, from test.cpp:1: /usr/include/c++/4.2.1/ext/atomicity.h:39:23: error: bits/gthr.h: No such file or directory /usr/include/c++/4.2.1/ext/atomicity.h:40:30: error: bits/atomic_word.h: No such file or directory ... Any idea why that is? I have installed Xcode 3.2.2 with all SDKs it comes with.

    Read the article

  • cannot upgrade current target for ipad

    - by choise
    Hi everyone, i try to upgrade my old existing app to make it a universal application for iphone and ipad. i clicked on my target and tryed to select "upgrade current target for ipad", but i cannot click it, because its not clickable. my project settings are: The Base SDK is set to iPhone Device 3.2 The iPhone OS Deployment Target is set to iPhone OS 3.1 The Targeted Device Family is set to iPhone/iPad are there any other things i have to pay attention? please help, to get my application upgraded.

    Read the article

  • How to port existing iPhone application to iPad

    - by Ansari
    Hi all, I have an iPhone application, now i want to convert that application to a universal application which runs on all the devices iPhone/iPod/iPad. So, where to start, what things i need to do? Any help, link, sample app, anything, will be highly appreciated. Thanks in advance :)

    Read the article

  • What is the point of padding?

    - by ktm5124
    In particular, I'm reading into the Mach-O binary file format for Intel 32 on OS X. After the FAT header there is a whole bunch of padding before the offset of the first archive. What is the point of all this padding? To be more specific, there is upwards of 4000 bytes of padding between the FAT header and the first archive (in particular, the mach_header). Why include all these extra bytes?! Is OS X fond of adding 4 MB to all their universal binaries?

    Read the article

  • How to add HP 64 bit printers for printers that use universal printer driver to server 2003

    - by Luma
    We have quite a few hp printers and I noticed now they all use the HP Universal printer driver which I added to the printer server (2003 serveR) but when someone on win7 64 bit tries to install the printer they still get an error that says no driver was found on the server for this printer. I don't have any problems with our canon's and Dells but they supply a driver for each model unlike hp who is going to this universal driver route which frankly I don't like. any ideas? thanks. Luc

    Read the article

  • Is linux binary universal to all kinds of distributions?

    - by prosseek
    I happen to install model sim VHDL simulator on Linux. The manual says it only supports RedHat or Suse, but I just tried to install it on Ubuntu. And, it just installed and works perfectly. Is linux binary universal to all kinds of distribution? I mean, if I make a program on distrubution A, can I be sure it will run on any linux? Why most of the commercial program vendor says the program is running on specific distribution? (mostly Redhat and Suse, not ubuntu)

    Read the article

  • "Upgrade current target for ipad" is grayed out (disabled)?

    - by Eric
    I'm trying to create a universal iPhone/iPad app using this method: http://www.enscand.com/roller/enscand/entry/ready_for_ipad which is also described all over the web. My problem is that the "Upgrade current target for iPad" line is grayed out and doesn't appear at all when I right click the target. I'm working on an app that I inherited from someone, and have tried this with an app that I wrote entirely myself (no problems on that one). And yes, I'm sure that I'm selecting the target. Just wondering if anyone has any insight into what checks are being run that would cause this option to be unavailable.

    Read the article

  • Dynamically load nib for iPhone/iPad within view controller

    - by qui
    Hello I have converted an iPhone application using the wizard like thing in XCode into a universal app. It builds fine but obviously looks a bit rubbish in some areas :) I need to load nibs according to which device is being used. I dont wish to create my view controllers using initWithNib as I already have code to create the controllers with some data (initWithMyLovelyData) which doesnt do anything to do with nib loading. I know to find out the device you use UI_USER_INTERFACE_IDIOT() so I tried overriding the initWithNibName within the actual view controllers themselves, assuming they get called internally somehow. But it's not working as I guess I am unsure of the syntax. I have tried if(ipad..) self = [super initWithNibName:@"MyIpadNib" bundle:nibBundleOrNil]; And that doesnt work :/ EDIT - I know I have massively edited this, made my question a bit more specific after doing some more research - apologies!

    Read the article

  • Porting iPhone app to iPad fails to sign?

    - by mobibob
    I am able to create a new application profile targeted for my iPad, however, when I convert from iPhone to "Universal" device, I am getting an error in signing. [BEROR]Code Sign error: a valid provisioning profile matching the application's Identifier 'rfc1034identifier' could not be found Also note: I am able to run it in the simulator (which does not require signing). It is a very old application ~OS version 2.x or 3.1 that had SDK problems which required more manual process to get the signing code into the build settings, so I would not be surprised if there is some residual foo in the build settings.

    Read the article

  • Working with iPhone OS 3.2 only classes

    - by user324881
    How would you write a universal app that uses classes introduced in iPhone OS 3.2, such as UIPopoverController and UISplitViewController? On Jeff LaMarche's blog about this, Ole provides a method for instantiating these objects; you would instantiate a UIPopoverController like so: [NSClassFromString(@"UIPopoverController") alloc]. This is fine for instantiating these classes in code but what about protocols and their methods? My iPad app uses a UISplitViewController and has a class that needs to conform to the UISplitViewControllerDelegate and UIPopoverControllerDelegate. How would you declare this? And how would you work with a method such as the following? - (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc where the method call requires UISplitViewController to be passed in?

    Read the article

  • What's the proper size of Default png's for iPad?

    - by David John
    I am confused by conflicting information. Most commonly I see these being the sizes quoted for the various Default images: Launch image Portrait Default-Portrait.png 768 x 1004 Launch image Portrait [email protected] 1536 x 2008 Launch image Landscape [email protected] 2048 x 1496 Launch image Landscape Default-Landscape.png 1024 x 748 Seemed like slightly unusual sizes, but I went along with it and dragged the images into the Launch images section in XCode. XCode however promptly puts little yellow triangles over these images and tell me that the sizes should be: 768x1024, 1536x2048, 1024x768 and 2048x1536 Oh and one last important bit. Do I really need to have all these images for submission to the app store? It's really not clear which images are required and which are just recommended. Mine is a Universal app btw if that makes any difference.

    Read the article

  • Best practices for team workflow with RoR/Github for designer + coder?

    - by Josh
    My friend and I have started to try to collaborate on some projects. For background, I come from a PHP/Wordpress/Drupal coding background, but recently I've become more experienced with the RoR framework, while he is more experienced as an HTML/CSS designer, working with PHP and WordPress. We're both relatively new to RoR I think, and so we're trying to figure out our collaborative workflow, but we have no idea where to start. For instance, we were trying to figure out how he could do some minor edits to the CSS file without having to do a full RoR deploy on his box. We still haven't figured out a solution, so I think it's best if we start to set some sort of workflow based on best practices. I was wondering if you guys have any insight or links to articles/case studies regarding this topic?

    Read the article

  • Troubles with PyDev and external libraries in OS X

    - by Davide Gualano
    I've successfully installed the latest version of PyDev in my Eclipse (3.5.1) under OS X 10.6.3, with python 2.6.1 I have troubles in making the libraries I have installed work. For example, I'm trying to use the cx_Oracle library, which is perfectly working if called from the python interpeter of from simple scripts made with some text editor. But I cant make it work inside Eclipse: I have this small piece of code: import cx_Oracle conn = cx_Oracle.connect(CONN_STRING) sql = "select field from mytable" cursor = conn.cursor() cursor.execute(sql) for row in cursor: field = row[0] print field If I execute it from Eclipse, I get the following error: import cx_Oracle File "build/bdist.macosx-10.6-universal/egg/cx_Oracle.py", line 7, in <module> File "build/bdist.macosx-10.6-universal/egg/cx_Oracle.py", line 6, in __bootstrap__ ImportError: dlopen(/Users/dave/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.6-universal.egg-tmp/cx_Oracle.so, 2): Library not loaded: /b/227/rdbms/lib/libclntsh.dylib.10.1 Referenced from: /Users/dave/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.6-universal.egg-tmp/cx_Oracle.so Reason: no suitable image found. Did find: /Users/dave/lib/libclntsh.dylib.10.1: mach-o, but wrong architecture Same snippet works perfectly from the python shell I have configured the interpeter in Eclipse in preferences - PyDev -- Interpreter - Python, using the Auto Config option and selecting all the libs found. What am I doing wrong here? Edit: launching file /Users/dave/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.6-universal.egg-tmp/cx_Oracle.so from the command line tells this: /Users/dave/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.6-universal.egg-tmp/cx_Oracle.so: Mach-O universal binary with 3 architectures /Users/dave/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.6-universal.egg-tmp/cx_Oracle.so (for architecture i386): Mach-O bundle i386 /Users/dave/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.6-universal.egg-tmp/cx_Oracle.so (for architecture ppc7400): Mach-O bundle ppc /Users/dave/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.6-universal.egg-tmp/cx_Oracle.so (for architecture x86_64): Mach-O 64-bit bundle x86_64

    Read the article

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