Search Results

Search found 2051 results on 83 pages for 'james dude'.

Page 8/83 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • curl halts script execution

    - by Funky Dude
    my script uses curl to upload images to smugsmug site via smugsmug api. i loop through a folder and upload every image in there. but after 3-4 uploads, curl_exec would fail, stopped everything and prevent other images from uploading. $upload_array = array( "method" => "smugmug.images.upload", "SessionID" => $session_id, "AlbumID" => $alb_id, "FileName" => zerofill($n, 3) . ".jpg", "Data" => base64_encode($data), "ByteCount" => strlen($data), "MD5Sum" => $data_md5); $ch = curl_init(); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POSTFIELDS, $upload_array); curl_setopt( $ch, CURLOPT_URL, "https://upload.smugmug.com/services/api/rest/1.2.2/"); $upload_result = curl_exec($ch); //fails here curl_close($ch); updated: so i added logging into my script. when it does fail, the logging stops after fwrite($fh, "begin curl\n"); fwrite($fh, "begin curl\n"); $upload_result = curl_exec($ch); fwrite($fh, "curl executed\n"); fwrite($fh, "curl info: ".print_r(curl_getinfo($ch,true))."\n"); fwrite($fh, "xml dump: $upload_result \n"); fwrite($fh, "curl error: ".curl_error($ch)."\n"); i also curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60*60);

    Read the article

  • Logs overwritten in CruiseCControl.NET when there is multiple MSBuild Tasks.

    - by James Poulose
    I have two MSBuild tasks in my CC.NET config. In the end of the execution, i can see two blocks of warnings/errors in the log and published email. But the problem is that the contents of both the blocks are the same and that is from the second MSBuild task!! In another way, the second MSBuild task overwrites the first log, and then creates another one for itself effectively creating two exactly identical block!!! Do anybody have any thoughts on this? I am happy to provide more information if you require about the environment and configuration. Thanks, James Poulose

    Read the article

  • Regular Expression find a phrase not inside an HTML tag

    - by James Buckingham
    Hi there, I'm struggling a bit with this regular expression and wondered if anyone was about to help me please? What I need to do is isolate the 1st phrase inside a string which is NOT inside an HTML tag. So the examples I have at the moment are: This is some test text about ITS for the ITS department. Also worth mentioning ABS as well I guess.ITS, ... and ... This is some ITS test text about ITS for the ITS department. Also worth mentioning ABS as well I guess So in the first example I want it to ignore the wrapped ITS and give me the ITS at the end of the 1st sentence. In the second example I want it to return the ITS at the start of the 2nd sentence. The aim is to replace these with my own custom wrapped acronym tags in a ColdFusion application I'm writing. Thanks a lot, James

    Read the article

  • Sending email from Drupal contact form, but GMail marks it as "Forged"

    - by James Shields
    Hi, My Drupal site sends email to a GMail account, but the emails sent all go into the Spam folder, and GMail puts up a bar with the message "This message was likely forged and did not originate from your account." Although I can create a filter to prevent them going to Spam, I want to start sending newsletters, and I suspect they'll have the same problem. I suspect the problem is with the way I've set up either PHP or Drupal to send mail. As far as I know it's just using the sendmail function. I've set the from address to "info@..." where ... is the site domain. Any tips on how I can make set up my outgoing mail so it won't be refused by GMail (and presumably other major mail providers)? Thanks, James

    Read the article

  • android separate view on button press

    - by Funky Dude
    i am developing an android todo list app to learn. right now in my main layout xml file, i list all to-do list items. i created a menu button called add to add a new to-do. the problem is that i want to show a different view when add button is pressed. in that view i will have an editbox and 2 buttons. anyone have any suggestion on how that can be accomplished?

    Read the article

  • Getting a variable out of a Public Void (Android)

    - by James Rattray
    I have this code: hubSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) { final MediaPlayer mp2 = MediaPlayer.create(Textbox.this, R.raw.hero); mp2.start(); } public void onNothingSelected(AdapterView<?> parentView) { } }); (The code basically runs when a new item is selected of a spinner and then plays a song, -which later will be a variable based on what was picked, but i'm fine as it is for now) Problem: And I want to be able to use 'mp2' out of this public void, (I want a button which pauses it) How can I do this? Please explain/show... Thanks alot James

    Read the article

  • Facebook canvas app showing wordpress blog in iframe - how to link to specific pages?

    - by James Olney
    Sorry for the cumbersome title. I have a Facebook canvas app that is call up a Wordpress site in an iFrame. This is fine and works as hoped but is there a way to link directly to a page within it? For example the page I want to reach is actually: www.blog.com/monkeys/ But I want to be able to use a link like this: www.facebook.com/monkeyblogapp/app_243495067635997/monkeys/ So that I can give out that URL and get people to see the right bit of content but within the Facebook environment. I have seen people mention callback urls (like this one which as far as I can tell just means having the app addresses match the website Direct links to pages in Facebook iFrame application?) but that doesn't work. Any suggestions? many thanks James

    Read the article

  • objective-c releasing uninitialized class members in dealloc method

    - by Dude Man
    Regarding over-releasing. Say I have a instance variable defined in Test.h NSString *mystring; In my implementation Test.m I do not initialize the variable mystring anywhere. But I release it in dealloc: -(void)dealloc { [mystring release]; } Is this now over-released? I've been doing the following in dealloc to avoid any issues, however, is this really necessary? -(void)dealloc { if (mystring) [mystring release]; } It seems that [nil release] shouldn't do anything, can someone verify this with class members?

    Read the article

  • Should I stick only to AWS RDS Automated Backup or DB Snapshots?

    - by James Wise
    I am using AWS RDS for MySQL. With it comes on backup, I understand that amazon provides two types of backup - automated backup and database (DB) snapshot. The difference is explain in here - http://aws.amazon.com/rds/faqs/#23. However, I am still confuse if should I stick to automated backup only or both automated and manual (db snapshots). What do you think guys? What's the setup of your own? I heard to others that automated backup is not reliable due to some unrecoverable database when the DB instance is crashed so the DB snapshots are the way to rescue you. If I will do daily DB snapshots as similar settings to automated backup, I have gonna pay much bunch of bucks. Hope anyone could enlighten me or advise me the right set up. Thanks. James

    Read the article

  • Where to observe application deployed by Jenkins?

    - by James
    Question from a first-time Jenkins user. So I hope you wouldn't mind if the question is too silly. I have installed jenkins on a Ubuntu machine, and is accessible at localhost:8080. I have successfully configured it to work with Maven2 and Git as well. Next, I created a job/project (A Java/Spring application), and got it to build without error on Jenkins as well. Now my question is, where do I see this application running? :) Best Regards James

    Read the article

  • Scala's lazy arguments: How do they work?

    - by python dude
    In the file Parsers.scala (Scala 2.9.1) from the parser combinators library I seem to have come across a lesser known Scala feature called "lazy arguments". Here's an example: def ~ [U](q: => Parser[U]): Parser[~[T, U]] = { lazy val p = q // lazy argument (for(a <- this; b <- p) yield new ~(a,b)).named("~") } Apparently, there's something going on here with the assignment of the call-by-name argument q to the lazy val p. So far I have not been able to work out what this does and why it's useful. Can anyone help?

    Read the article

  • strtotime fails for valid date

    - by Funky Dude
    i am doing a project where i need to output date of orders. and i do the following inside a for loop <?php echo date('M d, Y g:i A',strtotime($order['Order']['created']));?> for some strange reason, sttotime returns false. (Dec 31, 1969 7:00 PM appears instead.) i made sure $order['Order']['created'] is not empty and is valid. even stranger, that exact same piece of code works fine on the other page, only different is that, that one is not in a loop. but that cant be the reason right? i set timezone to America/New_York and $order['Order']['created'] is mysql timestamp. var_dump on said variable string(27) "2010-06-16 20:12:51"

    Read the article

  • Update Params in Python During Infinite Loop

    - by python Dude
    Hello, I was hoping to get some help on a question. I have an infinite loop that I need run and I need to update a set of variables (x in this case) at random times from the command-line. Is there any way to do this? For example: x = 0 while True: x = x + 1 if x < 30: do something and I need to update x's value from the command-line periodically

    Read the article

  • Optimum php.ini and my.cnf settings for a small Drupal 7 site on a virtual server

    - by the other dude
    I looking for advice on how to set up the default configuration of php.ini and my.cnf for a small site (100 pages) with very little traffic (300 visitors per day). All pages have a bit of text, some images, no video, no audio, no flash/silverlight, very little javascript and jquery. For tracking I'm using GA and Piwik. The main site database is around 50MB. The site is hosted on a virtual server with 20GB RAM and 6 vCPUs so there's hopefully a lot of muscle to make it run very fast. I don't know much about tweaking php and mysql settings and would appreciate it if your answers can be as detailed as possible. Thanks

    Read the article

  • unset in Varnish - syntax error

    - by Dude
    I'm trying to hide the "Server" header returned by Apache on every request, from Varnish. Using in sub vcl_fetch: unset obj.http.Server; on Varnish start I get: Expected action, 'if' or '}' (/etc/varnish/default.vcl Line 43 Pos 9) unset obj.http.Server; --------#####----------------- Any ideas?

    Read the article

  • Outer product using CBLAS

    - by The Dude
    I am having trouble utilizing CBLAS to perform an Outer Product. My code is as follows: //===SET UP===// double x1[] = {1,2,3,4}; double x2[] = {1,2,3}; int dx1 = 4; int dx2 = 3; double X[dx1 * dx2]; for (int i = 0; i < (dx1*dx2); i++) {X[i] = 0.0;} //===DO THE OUTER PRODUCT===// cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasTrans, dx1, dx2, 1, 1.0, x1, dx1, x2, 1, 0.0, X, dx1); //===PRINT THE RESULTS===// printf("\nMatrix X (%d x %d) = x1 (*) x2 is:\n", dx1, dx2); for (i=0; i<4; i++) { for (j=0; j<3; j++) { printf ("%lf ", X[j+i*3]); } printf ("\n"); } I get: Matrix X (4 x 3) = x1 (*) x2 is: 1.000000 2.000000 3.000000 0.000000 -1.000000 -2.000000 -3.000000 0.000000 7.000000 14.000000 21.000000 0.000000 But the correct answer is found here: https://www.sharcnet.ca/help/index.php/BLAS_and_CBLAS_Usage_and_Examples I have seen: Efficient computation of kronecker products in C But, it doesn't help me because they don't actually say how to utilize dgemm to actually do this... Any help? What am I doing wrong here?

    Read the article

  • Python profiler and CPU seconds

    - by dude
    Hey, I'm totally behind this topic. Yesterday I was doing profiling using Python profiler module for some script I'm working on, and the unit for time spent was a 'CPU second'. Can anyone remind me with the definition of it? For example for some profiling I got: 200.750 CPU seconds. What does that supposed to mean? At other case and for time consuming process I got: -347.977 CPU seconds, a negative number! Is there anyway I can convert that time, to calendar time? Cheers,

    Read the article

  • Usage examples of binary search

    - by python dude
    I just realized that in my 4+ years of Java programming (mostly desktop apps) I never used the binary search methods in the Arrays class for anything practical. Not even once. Some reasons I can think of: 100% of the time you can get away with linear search, maps or something else that isn't binary search. The incoming data is almost never sorted, and making it sorted requires an extra sorting step. So I wonder if it's just me, or do a lot of people never use binary search? And what are some good, practical usage examples of binary search?

    Read the article

  • Where does the 'method' implementation go? (I'm a newbie)

    - by Spokane-Dude
    I have this code: #import "SQLiteDB.h" @implementation SQLiteDB @synthesize db, dbPath, databaseKey; @end //-------------- check for database or create it ----------------| - (void)checkForDatabase { NSFileManager *filemanager = [NSFileManager defaultManager]; NSString *databasePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingString:@"/ppcipher.s3db"]; if(![filemanager fileExistsAtPath:databasePath]) { //Database doesn't exist yet, so we create it... NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/ppcipher.s3db"]; sqlite3 *db; if(sqlite3_open(databasePath, db) == SQLITE_OK) { } } } It's complaining that "method definition not in @implementation context". So where does it go? (I tried in the .h file, but still get the error)

    Read the article

  • Can ping IP address and nslookup hostname but cannot ping hostname

    - by Puddingfox
    I have a DNS server set up on one of my machines using BIND 9.7 Everything works fine with it. On my Windows 7 desktop, I have statically-assigned all network values. I have one DNS server set -- my DNS server. On my desktop, I can ping a third machine by IP fine. I can nslookup the hostname of the third machine fine. When I ping the hostname, it says it cannot find the host. / C:\Users\James>nslookup icecream Server: cake.my.domain Address: xxx.xxx.6.3 Name: icecream.my.domain Address: xxx.xxx.6.9 C:\Users\James>ping xxx.xxx.6.9 Pinging xxx.xxx.6.9 with 32 bytes of data: Reply from xxx.xxx.6.9: bytes=32 time<1ms TTL=255 Reply from xxx.xxx.6.9: bytes=32 time<1ms TTL=255 Reply from xxx.xxx.6.9: bytes=32 time<1ms TTL=255 Reply from xxx.xxx.6.9: bytes=32 time<1ms TTL=255 Ping statistics for xxx.xxx.6.9: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms C:\Users\James>ping icecream Ping request could not find host icecream. Please check the name and try again. I have also specified the search domain as my.domain xxx.xxx and my.domain substituted for security Why can I not ping by hostname? I also can not ping using the FQDN. The problem is that this problem is shared by all applications that resolve hostnames. I cannot use PuTTY to SSH to my machines by hostname; only by IP

    Read the article

  • A bounce-rate attack to manipulate SEO ?

    - by Denis Volovik
    This is a question to experienced people that might help us shed some light on the issue. We noticed a very strange behavior on our site, in Google Analytics. Some dude from Finland, namely, from Kouvola city is hitting one of our pages - only one page on our site, 'bout a hundred times per day, all with an average bounce rate of 90%+... This is causing our overall bounce rate to go up by 1 to 3% per day... which is very disturbing.. since we're trying to do our best in order to keep it as low as possible. And obviously having it jumped from ~24% to 27%, just because of that crazy dude is not making us happy at all... We tried implementing a geo-targeted script in order to catch this particular visitor and deliver him a juicy message, and it seemed like it helped in the beginning, it has stopped for a day or two, but now he's back... The geo-targeted script was also logging all IP addresses for page requests originating from Finland in order to find out more details and (in order to block them on the server level, later).. but thing is, it was all mainly cable or DSL connections with various, but not constantly repeating IPs... we are all wondering what is he up to really ? I think that this page should be kept updated with ideas on how to combat this and perhaps someone could also shed light on what it might be ? What is the reason for doing this "bounce-rate attack", as I call it? There was a similar question asked on stackoverflow earlier, with no meaningful answer - here - How to stop bounce rate manipulation.

    Read the article

  • Docker vs ESXi for Startup Projects - Deploying Code for Dev Testing

    - by JasonG
    Why hello there little programmer dude! I have a question for you and all of your experience and knowledge. I have an ESXi whitebox that I built which is an 8 dude that sits in the corner. I made a mistake recently and took the key that had ESXi, formatted it and used it for something else. No big deal because the last project I worked on had stalled out. I'm about to pick up another project and now I need to spin up a whole bunch of stuff for CI, qa + db, ticket tracker, wikis etc etc. I've been hearing a lot about Docker recently and as this is just a consumer grade machine, I'm wondering if it may make more sense for me to use Docker on OpenOS and then put everything there - bamboo or hudson, jira, confluence, postgress for the tools to use, then a qa env. I can't really seem to find any documents that directly compare traditional VM infrastructure vs docker solutions and I'm wondering if it is fair to compare. Is there any reason why CoreOS w/ containers would be a strictly worse solution? Or do you have any insight into why I may want to stick with ESXi? I've looked on multiple occasions and can't find a good reason not to. I'm not going to run a production env on the server so I don't need to have HA if updating security or OS for example where esxi would allow me to restart one vm at a time. I can just shut the thing down and bring it back up if I need a reboot no problem. So what's up with this container stuff? Is it a fair replacement for ESXi? I'm guessing the atlassian products would run much better and my ram would go a lot farther using docker. Probably the CPU would run much cooler too and my expensive HDD space would be better utilized.

    Read the article

  • Making sense of S.M.A.R.T

    - by James
    First of all, I think everyone knows that hard drives fail a lot more than the manufacturers would like to admit. Google did a study that indicates that certain raw data attributes that the S.M.A.R.T status of hard drives reports can have a strong correlation with the future failure of the drive. We find, for example, that after their first scan error, drives are 39 times more likely to fail within 60 days than drives with no such errors. First errors in re- allocations, offline reallocations, and probational counts are also strongly correlated to higher failure probabil- ities. Despite those strong correlations, we find that failure prediction models based on SMART parameters alone are likely to be severely limited in their prediction accuracy, given that a large fraction of our failed drives have shown no SMART error signals whatsoever. Seagate seems like it is trying to obscure this information about their drives by claiming that only their software can accurately determine the accurate status of their drive and by the way their software will not tell you the raw data values for the S.M.A.R.T attributes. Western digital has made no such claim to my knowledge but their status reporting tool does not appear to report raw data values either. I've been using HDtune and smartctl from smartmontools in order to gather the raw data values for each attribute. I've found that indeed... I am comparing apples to oranges when it comes to certain attributes. I've found for example that most Seagate drives will report that they have many millions of read errors while western digital 99% of the time shows 0 for read errors. I've also found that Seagate will report many millions of seek errors while Western Digital always seems to report 0. Now for my question. How do I normalize this data? Is Seagate producing millions of errors while Western digital is producing none? Wikipedia's article on S.M.A.R.T status says that manufacturers have different ways of reporting this data. Here is my hypothesis: I think I found a way to normalize (is that the right term?) the data. Seagate drives have an additional attribute that Western Digital drives do not have (Hardware ECC Recovered). When you subtract the Read error count from the ECC Recovered count, you'll probably end up with 0. This seems to be equivalent to Western Digitals reported "Read Error" count. This means that Western Digital only reports read errors that it cannot correct while Seagate counts up all read errors and tells you how many of those it was able to fix. I had a Seagate drive where the ECC Recovered count was less than the Read error count and I noticed that many of my files were becoming corrupt. This is how I came up with my hypothesis. The millions of seek errors that Seagate produces are still a mystery to me. Please confirm or correct my hypothesis if you have additional information. Here is the smart status of my western digital drive just so you can see what I'm talking about: james@ubuntu:~$ sudo smartctl -a /dev/sda smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF INFORMATION SECTION === Device Model: WDC WD1001FALS-00E3A0 Serial Number: WD-WCATR0258512 Firmware Version: 05.01D05 User Capacity: 1,000,204,886,016 bytes Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 8 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Thu Jun 10 19:52:28 2010 PDT SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 3 Spin_Up_Time 0x0027 179 175 021 Pre-fail Always - 4033 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 270 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0 9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 1468 10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 262 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 46 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 223 194 Temperature_Celsius 0x0022 105 102 000 Old_age Always - 42 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0

    Read the article

  • TXT File or Database?

    - by Ruth Rettigo
    Hey folks! What should I use in this case (Apache + PHP)? Database or just a TXT file? My priority #1 is speed. Operations Adding new items Reading items Max. 1 000 records Thank you. Database (MySQL) +----------+-----+ | Name | Age | +----------+-----+ | Joshua | 32 | | Thomas | 21 | | James | 34 | | Daniel | 12 | +----------+-----+ TXT file Joshua 32 Thomas 21 James 34 Daniel 12

    Read the article

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