Search Results

Search found 77 results on 4 pages for 'joan yin'.

Page 1/4 | 1 2 3 4  | Next Page >

  • How the yin-yang puzzle works?

    - by Hrundik
    I'm trying to grasp the semantics of call/cc in Scheme, and the Wikipedia page on continuations shows the yin-yang puzzle as an example: (let* ((yin ((lambda (cc) (display #\@) cc) (call-with-current-continuation (lambda (c) c)))) (yang ((lambda (cc) (display #\*) cc) (call-with-current-continuation (lambda (c) c)))) ) (yin yang)) It should output @\*@\**@\**\*@\**\**@..., but I don't understand why; I'd expect it to output @\*@\**\**\**\**\*... Can somebody explain in detail why the yin-yang puzzle works the way it works?

    Read the article

  • Problem with develop of XML Schema based on an existent XML

    - by farhad
    Hello! I have a problem with the validation of this piece of XML: <?xml version="1.0" encoding="UTF-8"?> <i-ching xmlns="http://www.oracolo.it/i-ching"> <predizione> <esagramma nome="Pace"> <trigramma> <yang/><yang/><yang/> </trigramma> <trigramma> <yin/><yin/><yin/> </trigramma> </esagramma> <significato>Questa combinazione preannuncia <enfasi>boh</enfasi>, e forse anche <enfasi>mah, chissa</enfasi>.</significato> </predizione> <predizione> <esagramma nome="Ritorno"> <trigramma> <yang/><yin/> <yin/> </trigramma> <trigramma> <yin/><yin/><yin/> </trigramma> </esagramma> <significato>Si prevede con certezza <enfasi>qualcosa</enfasi>, <enfasi>ma anche <enfasi>no</enfasi></enfasi>.</significato> </predizione> </i-ching> This XML Schema was developed with Russian Dolls technique: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.oracolo.it/i-ching" targetNamespace="http://www.oracolo.it/i-ching" > <xsd:element name="i-ching"> <xsd:complexType> <xsd:sequence> <xsd:element name="predizione" minOccurs="0" maxOccurs="64"> <xsd:complexType> <xsd:sequence> <xsd:element name="esagramma"> <xsd:complexType> <!-- vi sono 2 trigrammi --> <xsd:sequence> <xsd:element name="trigramma" minOccurs="2" maxOccurs="2"> <xsd:complexType> <xsd:sequence minOccurs="3" maxOccurs="3"> <xsd:choice> <xsd:element name="yang"/> <xsd:element name="yin"/> </xsd:choice> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attribute name="nome" type="xsd:string"/> </xsd:complexType> </xsd:element> <!-- significato: context model misto --> <xsd:element name="significato"> <xsd:complexType mixed="true"> <xsd:sequence> <xsd:element name="enfasi" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> For exercise I have to develop an XML Schema to validate the previous XML. The problem is that oxygen says me this: cvc-complex-type.2.4.a: Invalid content was found starting with element 'predizione'. One of '{predizione}' is expected. Start location: 3:6 End location: 3:16 URL: http://www.w3.org/TR/xmlschema-1/#cvc-complex-type why? is it something wrong with my xml schema? thank you very much

    Read the article

  • Change language encoding for file uploading

    - by jc.yin
    Previously we were running a Wordpress site on a Mac OS Server machine. We had several hundred images with Chinese characters for the image names. Now we're trying to migrate to a Ubuntu system and everything is fine except the images. Every time I try to upload an image with a Chinese name via FTP, I get the following message: "MyImage contains illegal characters. Please choose an appropriate text encoding" I have no idea how to solve this issue, do I need to somehow change the system language encoding in Ubuntu to allow for image uploading? Thanks

    Read the article

  • How to FTP transfer files to /var/www?

    - by jc.yin
    I'm new to linux and I've set up a web server with Ubuntu Desktop edition so I can practice with the GUI a bit before transitioning to Ubuntu Server. I've already set up a LAMP stack as well as FTP. Now I just need to know how to transfer my web files to the /var/www folder in Ubuntu. Previously I've worked on Mac OS and there's a central server for all the web files where I can FTP to. Anyone able to help me understand how do I FTP to the /var/www folder in Ubuntu? Thanks

    Read the article

  • Ubuntuone fails to sync with 'File Sync starting...' displayed

    - by a different ben
    I am on 12.04 using ubuntuone-client 3.0.1-0ubuntu1.0.1. I actually have two machines that I sync with, having the same Ubuntu version and ubuntuone-client version. One is fine, the other is not. File sync has frozen within a user-defined folder under my home folder. The graphical client reports in the top-right corner: 'File Sync starting...', but this doesn't change. I have two files with changes that show a syncing overlay in Nautilus. They are both very small text files. Here are some details: harb@joan:~$ u1sdtool --status State: READY connection: With User Not Network description: ready to connect is_connected: False is_error: False is_online: False queues: WORKING harb@joan:~$ u1sdtool --current-transfers Current uploads: 0 Current downloads: 0 The status seems to suggest that I am not connected to a network, however I am connected to a network - in fact I am accessing this machine via NX. Is it not working because I am connected via NX? Happy to provide other info, just not sure what would be useful.

    Read the article

  • School vs Self-Taught [duplicate]

    - by Joan Venge
    This question already has an answer here: Do I need a degree in Computer Science to get a junior Programming job? [closed] 8 answers Do you think university is a good learning environment or is it better to be autodidact? [closed] 3 answers Do you think formal education is necessary to gain strong programming skills? There are a lot of jobs that aren't programming but involves programming, such as tech artists in games, fx tds in film for example. I see similar patterns in the people I work where the best ones I have seen were self-taught, because of being artists primarily. But I also see that while the software, programming knowledge is varied and deep, hardware knowledge is very basic, including me, again due to lack of formal education. But I also work with a lot of programmers who possess both skills in general (software and hardware). Do you think it's necessary to have a formal education to have great programming skills? Would you think less of someone if he didn't have a degree in computer science, or software engineering, etc in terms of job opportunities? Would you trust him to do a software engineering job, i.e. writing a complex tool? Basically I feel the self-taught programmer doesn't know a lot of things, i.e. not knowing a particular pattern or a particular language, etc. But I find that the ability to think outside the box much more powerful. As "pure" programmers what's your take on it?

    Read the article

  • Why isn't Japanese software industry as strong as their hardware technology?

    - by Joan Venge
    I admire Japanese technology and their innovation. They always seem to be one step ahead of everyone else. But why isn't their software industry just as developed? Why aren't there any Japanese operating systems, high-end game engines, 3D digital content creation applications? I would like to see their take on these and I think it could bring alot of innovation. Btw I mentioned 3D software because the animation industry is strong there as well, but they are using North American software for this.

    Read the article

  • HTML5 media loading sometimes suspends or aborts: misconfigured Apache?

    - by Joan Botella
    Recently, some code that has been working fine for months started to run unexpectedly. That code is just a media files loading JavaScript function, that uses jQuery. It's pretty long, but in essence it is like this: var $audio=$('<audio>'); $audio.on('canplaythrough',function(e){ $audio[0].play(); }); $audio.attr('src','song.ogg'); Basically, the file only loads sometimes, and sometimes stops loading with a suspend or even an abort event. I have uploaded a little testing HTML to http://www.joanbotella.com/tests/loading , where you can see what's happening. You can download the test files from http://www.joanbotella.com/tests/loading/loadingTest.zip for local testing. I have just checked that opening the test index.html file directly into Firefox, and not through my localhost Apache server, makes the audio files perfectly playable. So, I assume, my hosting and I have the Apache server misconfigured for serving media files. My software versions are: Apache 2.2.22-1ubuntu1.7 , Mozilla Firefox 31.0 , Chromium 36.0.1985.125 and jQuery 1.11.0. Can you help me? Thanks in advance!

    Read the article

  • Why are Facebook Likes Insisting on using Wrong Product Image...?

    - by Joan Kent
    Firstly, I'm not a web developer so please be patient. I have read the other posts but I think i have everything covered. My website http://www.joaniesgifts.co.uk includes the like button on the product pages. However, I've found that certain product pages are using the incorrect image when a user likes the page. For example - http://www.joaniesgifts.co.uk/terramundi-money-pots/terramundi-money-pot-holiday-fund I think this may have been down to an original incorrect setup which is now corrected. However, the problem remains... The only thing I have to go on :- if i use the facebook url linter (developers.facebook.com/tools/debug) on the above product page, I receive the following error :- Object at URL 'http://www.joaniesgifts.co.uk/terramundi-money-pot-holiday-fund' of type '213689662010141:product' is invalid because the domain 'www.joaniesgifts.co.uk' is not allowed for the application id '213689662010141' which owns the specified object type. If you are the owner of this application, you can verify your configured 'Site Domain' at developers.facebook.com/apps/213689662010141. (I have verified my site's domain) Everything else appears fine except it is also showing the wrong image!! However, under Raw Open Graph Document Information it has the correct link! If I then click graph api - graph.facebook.com/10150450766583352 it again shows the wrong image was linked! I've no idea what else to do - can you help me? Kind Regards, Joan PS Graph API shows the incorrect image after a scrape only minutes ago { "url": "http://www.joaniesgifts.co.uk/terramundi-money-pot-holiday-fund", "type": "website", "title": "Terramundi Money Pot - Holiday Fund", "image": [ { "url": "http://www.joaniesgifts.co.uk/index.php?route=product\u00252Fproduct\u00252Fcaptcha" } ], "updated_time": "2011-11-11T18:54:38+0000", "id": "10150450766583352" }

    Read the article

  • What sources of sample work should be used in a job interview?

    - by Joan Venge
    One of my friends has been laid off. When I talked to him, he said they didn't let him take a copy of anything he worked on. When he asked how to show what he worked on to another employer in an interview, he was told that he will have some explaining to do. Should we, as programmers, be allowed to take samples of our previous work former employers? What sources of code should we be expected to show off in an interview? When almost every employer asks for sample work, how are we to justify what can be sent? Is it our responsibility to maintain after-work projects for our entire life so we have code we can legally show to our next employer?

    Read the article

  • Create 301 Redirection in Amazon Route 53 for Wildcard Subdomains

    - by Eric Yin
    My domain name hosted on Route 53 DNS. Amazon has a guide to do 301 redirection for www. To naked domain by point www. version to a S3 static website with 301 setted up. My question is, how can I have *.domain.com all have 301 redirec to naked domain name. I guess either: Some way to get all wildcard subdomains end up into one S3 bucket, how? Or: Use CloudFront on the www. version S3 site and put wildcard subdomains on the CloudFront, but how? Or: There's some hidden settings just lies on Router 53, then where? Or: use EC2, better not suggest me this, too costing for this task. Please advice.

    Read the article

  • Ubuntu how to FTP transfer files to folder /var/www?

    - by jc.yin
    I'm new to linux and I've set up a web server with Ubuntu Desktop edition so I can practice with the GUI a bit before transitioning to Ubuntu Server. I've already set up a LAMP stack as well as FTP. Now I just need to know how to transfer my web files to the /var/www folder in Ubuntu. Previously I've worked on Mac OS and there's a central server for all the web files where I can FTP to. Now after I've managed to connect via FTP to the Ubuntu server, I see all the folders such as Desktop, Downloads, Documents etc but no web folder. Anyone able to help me understand how do I FTP to the /var/www folder in Ubuntu? Thanks

    Read the article

  • HP dv6910 laptop no longer recognizes wireless adapter, dvd drive, and one usb port. What can I do about this?

    - by Joan H.
    In the last 3 weeks, my not even 3 year old HP laptop (vista) just seems to be failing. First, one of the usb ports stopped working. Next, the dvd drive all of a sudden was not recognized as even existing, so it is now useless. And as of today, I no longer seem to have a wireless adapter on my laptop. It doesn't show up in device manager, same as the dvd drive. I can connect to the internet by ethernet cable, but not wirelessly. It worked fine last night; now it doesn't even exist! I have tried a 'hard reset' I read about on HP's forum- no help. I am not sure what else to try. I read about the USB wifi dongle in another response, but I already have maxed our my usb ports even though I have bought a USB hub since the one port failed. Plus, I'd like my laptop to just work like it's supposed to instead of being jerry rigged with usb hubs, external dvd drives, and wifi dongles etc. Any ideas?

    Read the article

  • Good projects to learn OCaml and F#

    - by Yin Zhu
    After learning the basic syntax, reading some non-trivial code is a fast way to learn a language. We can also learn how to design a library/software during reading others' code. I have following lists. A Chess program in OCaml by Tomek Czajka. Hal Daumé has written several machine learning libraries in Ocaml. Including decision trees, logistic regression and SVM. All of them are near-production-quality code. A Chess Game Analysis program in F# in Microsoft Research. The above three are my favorites. Will you suggest some other sources? General purpose open source software are good, specialized open source like the three I list here are even more welcome.

    Read the article

  • Storing information inside YAML

    - by yuval
    I looked through the YAML for ruby documentation and couldn't find an answer. I have a list of several employees. Each has a name, phone, and email as such: Employees: Name | Phone | Email john 111 [email protected] joe 123 [email protected] joan 321 [email protected] How would I write the above information in YAML to end up with the following ruby output? employees = [ {:name => 'john', :phone => '111', :email => '[email protected]'}, {:name => 'joe', :phone => '123', :email => '[email protected]'}, {:name => 'joan', :phone => '321', :email => '[email protected]'} ] This is how I parse the YAML file: APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yml") Thank you!

    Read the article

  • How to disable Excel's auto recognition of numbers and text

    - by Yin Zhu
    I used Python to generate a CSV file. But when I open it in Excel, Excel will auto recognize a string into a number if it could be converted. e.g.33E105, which is actually an ID, not a number. How to disable this in Excel while opening a CSV file? Or I need to resort to a excel-python library to output a excel file and specify the format myself? Thanks!

    Read the article

  • read a file with both text and binary information in .Net

    - by Yin Zhu
    I need to read binary PGM image files. Its format: P5 # comments nrows ncolumns max-value binary values start at this line. (totally nrows*ncolumns bytes/unsigned char) I know how to do it in C or C++ using FILE handler by reading several lines first and read the binary block. But don't know how to do it in .Net.

    Read the article

  • The speed of .NET in numerical computing

    - by Yin Zhu
    In my experience, .net is 2 to 3 times slower than native code. (I implemented L-BFGS for multivariate optimization). I have traced the ads on stackoverflow to http://www.centerspace.net/products/ the speed is really amazing, the speed is close to native code. How can they do that? They said that: Q. Is NMath "pure" .NET? A. The answer depends somewhat on your definition of "pure .NET". NMath is written in C#, plus a small Managed C++ layer. For better performance of basic linear algebra operations, however, NMath does rely on the native Intel Math Kernel Library (included with NMath). But there are no COM components, no DLLs--just .NET assemblies. Also, all memory allocated in the Managed C++ layer and used by native code is allocated from the managed heap. Can someone explain more to me? Thanks!

    Read the article

  • PInvoke or using /clr:pure to compile

    - by Yin Zhu
    I have a set of numerical libraries in C++ and I want to call them interactively in a interpretive language like F# or IronPython. So I have two choices now: Compile the library in native DLL and use PInvoke to call functions in it. Compile the C++ library to .Net dll using visual c++ (/clr:pure compile option). The advantage of 1 is that it is very fast, however there are more work in it, e.g. I cannot PInvoke double pointer (e.g. float **), I must write another wrapper in the C++ library to make the interface friendly to .Net. The advantage of 2 is that I don't need to do know Mashaling strings, arrays, etc. However, the .net dll is slower compared to the native one. What others factors should be considered when choosing between the two?

    Read the article

  • Compiling a c++ project using blas (Fortran) in Matlab mex

    - by Yin Zhu
    I am trying to use a package here. I have no problem compiling it under 64-bit Linux as all the Makefiles are already provides. Only minor changes are needed, which I can handle. However, I have a problem compiling it under 64-bit Windows. I have installed gfortran and also compiled BLAS and CBLAS to their static libraries. The problem is that Matlab mex does not support GCC in windows, so I need to use VC 2008 instead. I found in the Makefile this line is to get the final klr_train.mexw64: klr_train.$(MEX_EXT): klr_train.cpp $(MEX) $(MEX_OPTION) klr_train.cpp ../libklr/libklr.cpp $(CBLASDIR)/lib/LINUX/cblas_LINUX.a $(BLASDIR)/blas_LINUX.a -lgfortran I don't know how to execute this line using VC 2008's command line tool cl. As cl obviously does not support -lgfortran, which I think is used to link some library in gfortran to support BLAS.

    Read the article

  • Understanding F# Asynchronous Programming

    - by Yin Zhu
    I kind of know the syntax of asynchronous programming in F#. E.g. let downloadUrl(url:string) = async { let req = HttpWebRequest.Create(url) // Run operation asynchronously let! resp = req.AsyncGetResponse() let stream = resp.GetResponseStream() // Dispose 'StreamReader' when completed use reader = new StreamReader(stream) // Run asynchronously and then return the result return! reader.AsyncReadToEnd() } In F# expert book (and many other sources), they say like let! var = expr simply means "perform the asynchronous operation expr and bind the result to var when the operation completes. Then continue by executing the rest of the computation body" I also know that a new thread is created when performing async operation. My original understanding was that there are two parallel threads after the async operation, one doing I/O and one continuing to execute the async body at the same time. But in this example, I am confused at let! resp = req.AsyncGetResponse() let stream = resp.GetResponseStream() What happens if resp has not started yet and the thread in the async body wants to GetResponseStream? Is this a possible error? So maybe my original understanding was wrong. The quoted sentences in the F# expert book actually means that "creating a new thread, hang the current thread up, when the new thread finishes, wake up the body thread and continue", but in this case I don't see we could save any time. In the original understanding, the time is saved when there are several independent IO operations in one async block so that they could be done at the same time without intervention with each other. But here, if I don't get the response, I cannot create the stream; only I have stream, I can start reading the stream. Where's the time gained?

    Read the article

  • Best method to compress JSON string in term of performance and compress radio

    - by Eric Yin
    For a JSON string, contains all kinds of settings, numbers, string etc. Total JSON string fairly fall into 10k~50K range. I want to compress it before save to database. So I wonder which compress method should I choose, I am using c# 4, I know I can choose gzip and deflate but the compression radio is not good (although speed is good). More specific, compress can be a little slow (since only once) but should be small. Decompress should be lighting fast since decompress happens lots. Please give some advice.

    Read the article

  • How to compile a svn python binding for windows from the source?

    - by yin-gang
    I'm setting up a new svn+trac environment, the svn server's version is 1.6.11, then I can't find any corresponding pre-compiled svn-python binding, finally I found the following thread: http://stackoverflow.com/questions/677252/python-svn-bindings-for-windows so, my question is: how to compile from these source? http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/python/

    Read the article

  • The internal implementation of R's dataset

    - by Yin Zhu
    I am trying to build a data processing program. Currently I use a double matrix to represent the data table, each row is an instance, each column represents a feature. I also have an extra vector as the target value for each instance, it is of double type for regression, it is of integer for classification. I want to make it more general. I am wondering how what kind of structure R uses to store a dataset, i.e. the internal implementation in R.

    Read the article

1 2 3 4  | Next Page >