Search Results

Search found 858 results on 35 pages for 'vincent of earth'.

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

  • Haskell: Gluing a char and a list together?

    - by Vincent
    So I have this code here: toWords :: String - [a] toWords "" = [] toWords (nr1 : rest) | nr1 == ' ' = toWords rest | otherwise = nr1 : toWords rest The "toWords" function should simply remove all spaces and return a list with all the words. But I keep getting this error: test.hs:5:18: Couldn't match expected type a' against inferred typeChar' `a' is a rigid type variable bound by the type signature for `toWords' at test.hs:1:22 In the first argument of `(:)', namely `nr1' In the expression: nr1 : toWords rest In the definition of `toWords': toWords (nr1 : rest) | nr1 == ' ' = toWords rest | otherwise = nr1 : toWords rest Failed, modules loaded: none.

    Read the article

  • Sun webstack vs Installing PHP, MySQL, Apache individually

    - by Vincent
    Is it possible to install PHP, MySQL, Apache individually on Solaris instead of installing them through a webstack? What are the advantages and disadvantages? I seem to frequently get a CURL error on Solaris when dealing with HTTPS sites. (error:81072080:lib(129):func(114):reason(128). I have no clue why that error is occuring and thought it might solve it, if I upgrade to latest PHP,MySQL,Apache versions. At this point I am not even sure if it's a Solaris issue. Any advice? Thanks

    Read the article

  • Zend Framework - Deny access to folders other than public folder

    - by Vincent
    All, I have the following Zend application structure: helloworld - application - configs - controllers - models - layouts - include - library - public - .htaccess - index.php - design - .htaccess The .htaccess in the root folder has the following contents: ##################################################### # CONFIGURE media caching # Header unset ETag FileETag None Header unset Last-Modified Header set Expires "Fri, 21 Dec 2012 00:00:00 GMT" Header set Cache-Control "max-age=7200, must-revalidate" SetOutputFilter DEFLATE # ##################################################### ErrorDocument 404 /custom404.php RedirectMatch permanent ^/$ /public/ The .htaccess in the public folder has the following: Options -MultiViews ErrorDocument 404 /custom404.php RewriteEngine on # The leading %{DOCUMENT_ROOT} is necessary when used in VirtualHost context RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -s [OR] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -l [OR] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] My vhost configuration is as under: <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:\\xampp\\htdocs\\xampp\\helloworld\\" ServerName helloworld ServerAlias helloworld <Directory "C:\\xampp\\htdocs\\xampp\\helloworld\\"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> </VirtualHost> Currently, if the user visits, http://localhost, my .htaccess files above make sure, the request is routed to http://localhost/public automatically. If the user visits any other folder apart from public folder from the address bar, he gets a directory listing of that folder. How can I make sure to deny the user access to every other folder except the public folder? I want the user to be redirected to the public folder if he visits any other folder. However, if the underlying code requests something from other folders, (ex: ) it should still work.. Thanks

    Read the article

  • Can phper give me some code snippet to consume the .net wcf service

    - by Vincent
    Hi, I can successfully make a call to wcf from php without WCF message security enabled. I search the whole forum and cannot find any clue. I'd like to know how can I pass the credential ? My WCF service use the basichttpbinding on SSL with Message security enabled. Here is my code snippet to call my wcf from .NET ServiceReference1.TestClient sc = new TestClient(); sc.ClientCredentials.UserName.UserName = "[email protected]"; sc.ClientCredentials.UserName.Password = "ABC123"; Console.WriteLine(sc.GetProfiledSchemas(412));

    Read the article

  • Construct a variadic template of unsigned int recursively

    - by Vincent
    I need a tricky thing in a C++ 2011 code. Currently, I have a metafunction of this kind : template<unsigned int N, unsigned int M> static constexpr unsigned int myFunction() This function can generate number based on N and M. I would like to write a metafunction with input N and M, and that will recursively construct a variadic template by decrementing M. For example, by calling this function with M = 3, It will construct a variadic template called List equal to : List... = myFunction<N, 3>, myFunction<N, 2>, myFunction<N, 1>, myFunction<N, 0> How to do that (if it is possible of course) ?

    Read the article

  • Zend XML parsing

    - by Vincent
    I have an xml file called error.xml like this: <?xml version="1.0" encoding="UTF-8"?> <errorList> <error> <code>0</code> <desc>Fault</desc> <ufmessage>Fault</ufmessage> </error> <error> <code>1</code> <desc>Unknown</desc> <ufmessage>Unknown</ufmessage> </error> <error> <code>2</code> <desc>Internal Error</desc> <ufmessage>Internal Error</ufmessage> </error> </errorList> I am using Zend and have the above xml file stored in a Zend Registry variable called "apperrors" like this: $apperrors = new Zend_Config_Xml( 'error.xml'); Zend_Registry::set('apperrors', $apperrors->errorList); If my code throws an error code of 2, I want a snippet of code to check the error code with "code" key in "apperrors" array and echo the ufmessage value corresponding to it. How can I do this? Ex: //Error thrown by the code. Hardcoded for now... $errorThrownByCode = 2; //Get the Zend Registry value for all errors $errorList = Zend_Registry::get('apperrors'); //Write some code to compare $errorThrownByCode with $errorList->error->code //If found echo $errorList->error->ufmessage, else echo "An Unknown error occured"; Thanks

    Read the article

  • htaccess: how to prevent infinite subdirectories?

    - by Vincent Isles
    My .htaccess at the root directory contains this: Options -MultiViews +FollowSymlinks -Indexes ErrorDocument 404 /404.htm RewriteEngine On RewriteBase / followed by a bunch of RewriteRules. The .htaccess at the /forum subdirectory contains this: RewriteEngine On RewriteBase /forum RewriteRule ^index.html$ index.php [L,NE] RewriteRule ^(.*)-t-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L] RewriteRule ^(.*)-t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L] followed by other rules mapping SEO-friendly URLs to the true URLs. mydomain.com/forum/a-thread-t-1.html returns the page showthread.php?tid=1 but so does mydomain.com/forum/forum/a-thread-t-1.html, mydomain.com/forum/forum/forum/a-thread-t-1.html and so on. I don't want this behavior - I want pages accessed as /forum/forum/* to return a 404. Any hint on where I had been wrong?

    Read the article

  • R- delete rows in multiple columns by unique number

    - by Vincent Moriarty
    Given data like this C1<-c(3,-999.000,4,4,5) C2<-c(3,7,3,4,5) C3<-c(5,4,3,6,-999.000) DF<-data.frame(ID=c("A","B","C","D","E"),C1=C1,C2=C2,C3=C3) How do I go about removing the -999.000 data in all of the columns I know this works per column DF2<-DF[!(DF$C1==-999.000 | DF$C2==-999.000 | DF$C3==-999.000),] But I'd like to avoid referencing each column. I am thinking there is an easy way to reference all of the columns in a particular data frame aka: DF3<-DF[!(DF[,]==-999.000),] or DF3<-DF[!(DF[,(2:4)]==-999.000),] but obviously these do not work And out of curiosity, bonus points if you can me why I need that last comma before the ending square bracket as in: ==-999.000),]

    Read the article

  • UIView animation does not animate at first try?

    - by Bacalso Vincent
    Considering that my _palette's frame is like this: _palette.frame = CGRectMake(0,480,320,200); I have this code here to slide up/down a UIView: if(![_pallete superview]) { [self.view addSubview:_pallete]; [self.view insertSubview:_tempViewPaletteListener belowSubview:_pallete]; [UIView animateWithDuration:0.3 animations:^{ _pallete.top -= kPaletteHeight; } completion:^(BOOL isFinished) { }]; } else { [UIView animateWithDuration:0.3 animations:^{ _pallete.top += kPaletteHeight; } completion:^(BOOL isFinished) { [_tempViewPaletteListener removeFromSuperview]; [_pallete removeFromSuperview]; }]; } *the _tempViewPaletteListener is just a view with a tap gesture use to dismiss the palette* The problem is when I first try to run code here, the _palette view will just stiffly display right away. What I expected is, it should slide up the _palette view. Though it works fine after the first try

    Read the article

  • Retrieve Domain Name instead of IP

    - by Vincent
    All, I am using the following command to retrieve the domain name of my server. $_SERVER['HTTP_HOST'] This seems to return the IP address instead of domain name like www.example.com. I looked at PHPInfo and it also lists an IP address for HTTP_HOST instead of Domain name. What do I need to change to make the domain name appear instead of IP? Thanks

    Read the article

  • How do I add "Press any key to boot from usb" when installing Windows from a flash drive? (Grub4dos question / how to remove a bootloader)

    - by Vincent
    Hi there! I've been struggling with this problem for a while now and finially decided to ask for help. Let me first explain what the main purpose of the app is: to provide the a very easy to use way of backing up files, after which I format the drive and start Windows 7 setup. I do this by booting WinPE, which runs a script to detect Windows installations and then opens a file browser. After the file browser is closed, the script continues and formats the drive that contains the Windows installation, and starts an unattended Windows 7 install. Now here is the problem: When you start Windows setup or WinPE from a dvd, you get a nice option to "Press any key to boot from DVD". This is to prevent the computer from booting the DVD when the first phase of the installation is complete and the computer reboots. However, when booting from a flash drive, Windows does not provide this option: it simply boots the flash drive every reboot. To replicate the "press any key" function, I installed Grub4Dos, which works great. It provides a small menu, the first standard item being "Continue installation", the second being "start installation". After quite a lot of tweaking, I got everything working: Start installation starts WinPE, which in turn starts the Windows installation. At first reboot, the Grub4Dos menu comes up, counts 5 seconds and boots the second stage of the installation. Here, I am greeted with the error: "Windows setup could not configure windows to run on this computer's hardware." When I boot into WinPE the normal way (put the bootmgr on the stick root) and change my bios to boot from the primary hdd after first reboot, I don't get this error. I've been looking around, and the only thing I could find was that the BIOS automatically names the boot device hd0, and that Windows can only be run / installed to hd 0. I'm not sure if this is the problem. I read about remapping to solve this problem, but to do that you have to know the phisical location of the hard drive and partition, like hd(0,1). I want this flash drive to work on any PC, regardless of where the OS is installed, so that's not really a possibility. A possible fix I thought of is removing the bootloader from the flash drive when I'm in WinPE. That way, when the pc reboots the BIOS will not see the flash drive as a boot drive and instead boot the primary hdd. I have yet to find a way to do this. Thank you for reading my question, and if you have any suggestion, please do.

    Read the article

  • how to get a constant in java with class

    - by vincent
    basically I need to get a constant for a class however I have no instance of the object but only its class. In PHP I would do constant(XYZ); Is there a similar way of retrieving a constant in JAVA? I need it to facilitate a dynamic getMethod call Class parameterType = Class.forName(class_name); object.setProperty(field name, field value, parameterType); the set property method would then get the correct method and set the specified property, however I cant get a method which has int as parameter type without using Interger.TYPE

    Read the article

  • Hyphen in Array keys

    - by Vincent
    All, I have an array with hyphens in the key name. How do I extract the value of it in PHP? It returns a 0 to me, if I access like this: print $testarray->test-key; This is how the array looks like testarray[] = {["test-key"]=2,["hotlink"]=1} Thanks

    Read the article

  • PHP-How to choose XML section based on an attribute?

    - by Vincent
    All, I have a config xml file in the following format: <?xml version="1.0"?> <configdata> <development> <siteTitle>You are doing Development</siteTitle> </development> <test extends="development"> <siteTitle>You are doing Testing</siteTitle> </test> <production extends="development"> <siteTitle>You are in Production</siteTitle> </production> </configdata> To read this config file to apply environment settings, currently I am using, the following code in index.php file: $appEnvironment = "production"; $config = new Zend_Config_Xml('/config/settings.xml', $appEnvironment ); To deploy this code on multiple environments, as user has to change index.php file. Instead of doing that, is it possible to maintain an attribute in the xml file, "say active=true". Based on which the Zend_Config_Xml will know which section of the xml file settings to read? Thanks

    Read the article

  • How to count how many items for distinct items in mysql?

    - by Vincent Duprez
    Imagine a have a table with a column named status: status ------ A A A B C C D D D How can I count how many rows have A, how many rows have B etc? this kind of output: A |B |C |D |E ------------------ 3 |1 |2 |3 |0 As for E = O , this will always be A,B,C,D and E Output should be one row (thus 1 query). When doing a distinct count (most returning answer on my searches, it does return how many different elements there are, 4 in this case...)

    Read the article

  • using html text in as3

    - by vincent
    Hello, i'm having a bit of a question, I have some newspost from my database. But there are tags in it and some tags aswell. My questiion is how i should go about it to get the newspost showing as it should be. The images should get shown instead of the tags etc. I know i'll have to work with a loader to use the images but how would as3 recognize them? Is there anyway i could use htmltext or something so as3 knows automaticly where the imagetags are? Also, if i add the image would it be possible to wrap the text around it? So i dont have an empty space next to the image?

    Read the article

  • creating object according to the switch case value

    - by vincent
    hello, i have the following switch case: switch (appModel.currentPage){ case "Programma": case "Winkelwagen": case "Films": case "Contact": if (page){ removeChild(page); } //here i would like to create a new object page that has the type of the switch. i mean this: var page: getDefinitionByName(appModel.currentPage+"Page"); this doesnt work thou but it should be something like: "FilmsPage or ContactPage or ...". addChild(page); break; Does anyone know how to do this?

    Read the article

  • What time function do I need to use with pthread_cond_timedwait?

    - by Vincent
    The pthread_cond_timedwait function needs an absolute time in a time timespec structure. What time function I'm suppose to use to obtain the absolute time. I saw a lot of example on the web and I found almost all time function used. (ftime, clock, gettimeofday, clock_gettime (with all possible CLOCK_...). The pthread_cond_timedwait uses an absolute time. Will this waiting time affected by changing the time of the machine? Also if I get the absolute time with one of the time function, if the time of the machine change between the get and the addition of the delta time this will affect the affect the wait time? Is there a possibility to wait for an event with a relative time instead?

    Read the article

  • Zend Namespace - Check if Session Exists

    - by Vincent
    All, I am using Zend Framework and Zend_Session to do global session management for my application. I plan to clear all sessions on logout and hence am using the following code: if($this->sessionExists()) { $this->destroy(); } But it seems like it's not doing a good job.. I am getting an error: PHP Warning: session_destroy() [<a href='function.session-destroy'> function.session-destroy</a>]: Trying to destroy uninitialized session How can I get rid of this error? Is there an alternative to sessionExists()?

    Read the article

  • model.matrix() with na.action=NULL?

    - by Vincent
    I have a formula and a data frame, and I want to extract the model.matrix(). However, I need the resulting matrix to include the NAs that were found in the original dataset. If I were to use model.frame() to do this, I would simply pass it na.action=NULL. However, the output I need is of the model.matrix() format. Specifically, I need only the right-hand side variables, I need the output to be a matrix (not a data frame), and I need factors to be converted to a series of dummy variables. I'm sure I could hack something together using loops or something, but I was wondering if anyone could suggest a cleaner and more efficient workaround. Thanks a lot for your time! And here's an example: dat <- data.frame(matrix(rnorm(20),5,4), gl(5,2)) dat[3,5] <- NA names(dat) <- c(letters[1:4], 'fact') ff <- a ~ b + fact # This omits the row with a missing observation on the factor model.matrix(ff, dat) # This keeps the NA, but it gives me a data frame and does not dichotomize the factor model.frame(ff, dat, na.action=NULL) Here is what I would like to obtain: (Intercept) b fact2 fact3 fact4 fact5 1 1 0.7266086 0 0 0 0 2 1 -0.6088697 0 0 0 0 3 NA 0.4643360 NA NA NA NA 4 1 -1.1666248 1 0 0 0 5 1 -0.7577394 0 1 0 0 6 1 0.7266086 0 1 0 0 7 1 -0.6088697 0 0 1 0 8 1 0.4643360 0 0 1 0 9 1 -1.1666248 0 0 0 1 10 1 -0.7577394 0 0 0 1

    Read the article

  • JQuery URL Validator

    - by Vincent
    All, I am trying to use JQuery's URL Validator plugin. http://docs.jquery.com/Plugins/Validation/Methods/url I have a text box that has a URL. I want to write a function which takes the textbox value, uses the jquery's validator plugin to validate urls and returns true or false. Something like Ex: function validateURL(textval) { // var valid = get jquery's validate plugin return value if(valid) { return true; } return false; } I wanted this to be a reusable function.. Thanks

    Read the article

  • JavaScript Regex question

    - by Vincent
    All, I have following function to check for invalid symbols entered in a text box and return true or false. How can I modify this function to also check for occurrences like http:// and https:// and ftp:// return false if encountered ? function checkURL(textboxval) { return ! (/[<>()#'"]|""/.test(textboxval)); } Thanks

    Read the article

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