Daily Archives

Articles indexed Friday November 18 2011

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

  • 403 error on index file

    - by John L.
    When I try to access index.py in my server root through http://domain/, I get a 403 Forbidden error, but when I can access it through http://domain/index.py. In my server logs it says "Options ExecCGI is off in this directory: /var/www/index.py". However, my httpd.conf entry for that directory is the same as the ones for other directories, and getting to index.py works fine. My permissions are set to 755 for index.py. I also tried making a php file and naming it index.php, and it works from both domain/ and domain/index.php. Here is my httpd.conf entry: <Directory /var/www> Options Indexes Includes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all AddHandler cgi-script .cgi AddHandler cgi-script .pl AddHandler cgi-script .py Options +ExecCGI DirectoryIndex index.html index.php index.py </Directory> Thanks

    Read the article

  • Should I Open Source? [closed]

    - by Howdy_McGee
    My company recently created a full javascript, html & css Virtual Tour. Since it is html based there is no real way of securing our information/code so selling it could be flimsy. We are an extremely small company, barely on the map so I was thinking that by making this an open source project it could give us a chance to jump start our SEO by page views alone, especially if we provide documentation. Not to mention hopefully bring a community following on our blog. On the other hand though could this possibly hurt our sales as a web development company? If we are handing out this cool "plugin" we made what keeps people from making it commercial somehow? So I'm trying to weigh the options on whether I should make this Open Source or not and the pros / cons of each especially for a small business. What do you guys think about making things Open Source? How do I know if this product is the right thing to make Open Source? What are some pros and cons to going Open Source?

    Read the article

  • dynamic urls and links on one web page

    - by John
    I am trying to figure out how to create dynamic links and urls on a static webpage. What I want to do is the following: I have a single webpage for example: MYWEBPAGEdotCOM/INDEX.HTML that will always look the same, except for one link on the page. the link would be on the page for example: LINK TO AFFILIATE: affiliatedotCOM/my-affiliate_code_here_DYNAMIC_REFERER the only thing would change is the "DYNAMIC_REFERER" with every dynamic url on this page: MYWEBPAGEdotCOM/INDEX.PHP_id=test1 MYWEBPAGEdotCOM/INDEX.PHP_id=test2 MYWEBPAGEdotCOM/INDEX.PHP_id=test3 MYWEBPAGEdotCOM/INDEX.PHP_id=test4 which would only hange the dynamic link on the page to: affiliatedotCOM/my-affiliate_code_here_test1 affiliatedotCOM/my-affiliate_code_here_test2 affiliatedotCOM/my-affiliate_code_here_test3 affiliatedotCOM/my-affiliate_code_here_test4 Can someone tell me how I could go about doing this? I just dont want to have to make 100's of pages, as this would prevent me from having to do so.

    Read the article

  • Temporarily share/deploy a python (flask) application

    - by Jeff
    Goal Temporarily (1 month?) deploy/share a python (flask) web app without expensive/complex hosting. More info I've developed a basic mobile web app for the non-profit I work for. It's written in python and uses flask as its framework. I'd like to share this with other employees and beta testers (<25 people). Ideally, I could get some sort of simple hosting space/service and push regular updates to it while we test and iterate on this app. Think something along the lines of dropbox, which of course would not work for this purpose. We do have a website, and hosting services for it, but I'm concerned about using this resource as our website is mission critical and this app is very much pre-alpha at this point. Options I've researched / considered Self host from local machine/network (slow, unreliable) Purchase hosting space (with limited non-profit resources, I'm concerned this is overkill) Using our current web server / hosting (not appropriate for testing) Thanks very much for your time!

    Read the article

  • intermittent DNS problems

    - by jemminger
    How would I go about tracking this issue down? One of my websites has been up for years without issue. We're using Godaddy's nameservers for our domain. Lately in the past two weeks, I've noticed that once from home on my Cox cable connection, I could not connect to the site... it said the domain could not be resolved. I checked downforeveryoneorjustme.com, and it said it was fine. The "outage" lasted maybe five minutes (through a reboot too, and I'm on a mac FWIW) and then it started working again. Then it happened again this week, but from our office on a different Cox connection. Then it happened again from the office, but for a different domain. I called Cox during one outage, and the tech there could resolve the domain without a problem. When these outages are occurring, I can issue "host mydomain.com" and get "domain not found", but using "host mydomain.com 8.8.8.8" will resolve normally. Where do I start? We're getting reports now that our customers are experiencing it too.

    Read the article

  • planar shadow matrix and plane b value

    - by DevExcite
    I implemented planar shadows with the function D3DXMatrixShadow. As you know, we need plane and light factor to calculate a shadow matrix. The problem is that when I set the plane as D3DXPLANE p(0, -1, 0, 0.1f), the shadows by directional light are correctly rendered, but the shadows by point light are not rendered. However, if I use D3DXPLANE p(0, 1, 0, 0.1f), the situation is reversed, shadows by directional light are not drawn, the shadows by point light are ok. I cannot understand why it happens. Is it normal or am i missing something? Please explain to me why this happens. Thanks in advance.

    Read the article

  • Rails 3.1 assets not recognizing new images uploaded by rmagick until server restart

    - by Mr_Nizzle
    I have my Rails 3.1.0 application running with passenger in production environment and I have a section where the application allows the user to change his profile picture so I upload the image using an ajax uploader and in my controller I upload the file and generate different sizes for the image with rmagick then I render the new image with an image_tag but the application won't show the image till I restart the server. What I get is No route matches [GET] "assets/path/to/image.png" If I restart the server It will show the image, but obviously I can't be restarting the server every once a user uploads a new image. How can I solve the keeping the assets working the right way?

    Read the article

  • How to echo if field is not found?

    - by Fahad
    Hi I'm trying to figure out how to echo back if the value entered does not match when a database lookup is done. I'm using ajax to run the request and php to do the lookup ajax.js: function showResult(str) { if (str=="") { document.getElementById("description").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("description").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","getuser.php?voucher="+str,true); xmlhttp.send(null); } and getuser.php: <?php $q=$_GET["voucher"]; $con = mysql_connect('localhost', 'root', ''); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test", $con); $sql="SELECT * FROM redemption WHERE voucher = '".$q."'"; $result = mysql_query($sql); echo "<table> <tr> <th>Name</th> <th>Product</th> <th>Address</th> <th>Status</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['name'] . "</td>"; echo "<td>" . $row['product'] . "</td>"; echo "<td>" . $row['address'] ." ".$row['city'] ." ".$row['province'] ." ".$row['postal'] . "</td>"; echo "<td>" . $row['status'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> What I would like to do is that once the person enters an invalid or a voucher number that is not found I would like to return an error that "Voucher number is not found". There is also a column in the db that stores the status such as "redeemed" or "not redeemed". How could I check for both whether the voucher number exists and if it has already been redeemed? I assume it'd have to be a syntax such as $sql="SELECT * FROM redemption WHERE voucher = '".$q."'" AND status = 'not redeemed' and then use an else or case statement perhaps? Thanks in advance

    Read the article

  • generate php classes in bash

    - by Derek
    i have this script: #!/bin/bash if [[ -z "$1" ]] ; then echo "Class is required" exit 1; fi if [[ -z "$2" ]] ; then package="Default" else package=$2; fi echo "<?php /** * $1.class.php * * Vcard class file. * @name Project * @author Author * @link http://www.domain.com * @copyright Copyright © 2011 * @package $package * @version 1.0 */ /** * The main $1 class * @package $package */ class $1 { /** * Constructor setup. */ public function __construct() { } /** * Destructor setup. */ public function __destruct() { } } " > $1.class.php php -l $1.class.php echo "Done"; if i do: ./generate.sh my_class it creates everything with my_class. how can i modify this to: MyClass? i need to use MyClass for the filename, and the class name etc... later in the code i use the argument (in this case my_class) for some other purposes. thanks

    Read the article

  • Hero Class, php classes

    - by John
    I am going to have different classes for a character that a user play. Like "Mage, Warrior" etc. I am thinking of a method like have some CharacterBase class (abstract?) and then I have a child class which is like WarriorClass or something like that. I think the approach is called Factory pattern or something like that. Anyone got a clue of what I'm trying to achieve here, and are there perhaps any better way to do this?

    Read the article

  • I get an `Cannot read property 'slice' of undefined` message when I use the scrollTo jQuery plugin inside this function

    - by alexchenco
    I'm using the jQuery scrollTo plugin. I get this error in my JS Console: 16827Uncaught TypeError: Cannot read property 'slice' of undefined d.fn.scrollToindex.html.js:16827 jQuery.extend.eachindex.html.js:662 d.fn.scrollToindex.html.js:16827 jQuery.extend.eachindex.html.js:662 jQuery.fn.jQuery.eachindex.html.js:276 d.fn.scrollToindex.html.js:16827 popupPlaceindex.html.js:18034 (anonymous function)index.html.js:17745 jQuery.extend._Deferred.deferred.resolveWithindex.html.js:1018 doneindex.html.js:7247 jQuery.ajaxTransport.send.script.onload.script.onreadystatechange When I place $(".menu").scrollTo( $("li.matched").attr("id"), 800 ); inside it. function popupPlace(dict) { $popup = $('div#dish-popup'); $popup.render(dict,window.dishPopupTemplate); if(typeof(dict.dish) === 'undefined') { $popup.addClass('place-only'); } else { $popup.removeClass('place-only'); } var $place = $('div#dish-popup div.place'); var place_id = dict.place._id; if(liked[place_id]) { $place.addClass('liked'); } else { $place.removeClass('liked'); } if(dict.place.likes) { $place.addClass('has-likes'); } else { $place.addClass('zero-likes'); } var tokens = window.currentSearchTermTokens; var tokenRegex = tokens && new RegExp($.map(tokens, RegExp.escape).join('|'), 'gi'); $.each(dict.place.products, function(n, product) { $product = $('#menu-item-'+product.id); if(liked[place_id+'/'+product.id]) { $product.addClass('liked'); } if(tokens && matchesDish(product, tokens)) { $product.addClass('matched'); $product.highlight(tokenRegex); } else { $product.removeClass('matched'); $product.removeHighlight(); } if(product.likes) { $product.addClass('has-likes'); } else { $product.addClass('zero-likes'); } }); $('#overlay').show(); $('#dish-popup-container').show(); // Scroll to matched dish //$("a#scrolll").attr("href", "#" + $("li.matched").attr("id")); //$("a#scrolll").attr("href", "#" + $("li.matched").attr("id")); //$("a#scrolll").trigger("click"); $(".menu").scrollTo( $("li.matched").attr("id"), 800 ); // Hide dish results on mobile devices to prevent having a blank space at the bottom of the site if (Modernizr.mq('only screen and (max-width: 640px)')) { $('ol.results').hide(); } $(".close-dish-popup").click(function() { $("#overlay").hide(); $("#dish-popup-container").hide(); $('ol.results').show(); changeState({}, ['dish', 'place', 'serp']); }); showPopupMap(dict.place, "dish-popup-map"); } Any suggestion to fix this?

    Read the article

  • Custom string formatting in Grails JSON marshaller

    - by ethaler
    I am looking for a way to do some string formatting through Grails JSON conversion, similar to custom formatting dates, which I found in this post. Something like this: import grails.converters.JSON; class BootStrap { def init = { servletContext -> JSON.registerObjectMarshaller(String) { return it?.trim() } } def destroy = { } } I know custom formatting can be done on a per domain class basis, but I am looking for a more global solution.

    Read the article

  • Paypal - DoExpressCheckoutPayment null pointer

    - by user969894
    String nvpstr = "&TOKEN=" + token + "&PAYERID=" + payerID + "&PAYMENTREQUEST_0_PAYMENTACTION=" + paymentType + "&PAYMENTREQUEST_0_AMT=" + finalPaymentAmount + "&PAYMENTREQUEST_0_CURRENCYCODE=" + currencyCodeType + "&IPADDRESS=" + serverName; Having done an earlier call to SetExpressCheckout, I had to change a few parameter names because Paypal had changed it in the documentation but not in the code from the integration wizard. Now for DoExpressCheckoutPayment I've modified a few but I get a null pointer at strAck: HashMap nvp = httpcall("DoExpressCheckoutPayment", nvpstr); String strAck = nvp.get("ACK").toString(); if (strAck.equalsIgnoreCase("Success")) { return nvp; } Not sure what is wrong, any suggestions for debugging this or possible solutions?

    Read the article

  • Remove the period and everything after it using jQuery

    - by veryserious
    Is there a way to remove the period and everything after it using jQuery? The numbers following the period vary in length, so it's not as simple as finding the length. For example: <span class="changethis">505.234</span> <span class="changethis">23.93</span> Thanks for your help! P.S. (bonus) If there is a way to round up if it's x.5 or higher that would be awesome. Not essential though.

    Read the article

  • Is there a cap on the number of modules WinDbg can see?

    - by Bethor
    Does anyone know if there is a cap on the number of DLLs WinDbg can see ? I believe Visual Studio was once capped at 500 but I can't find a source for this claim outside of some second hand accounts at work. I'm trying to debug a hairy scenario and WinDbg's stack trace is incomplete. According to Process Explorer, the module I'm interested in is loaded but it doesn't show up in the output of 'lm' in WinDbg. Suspiciously, said output is exactly 500 modules long, even though I know there are many more than that loaded, leading me to believe WinDbg isn't seeing DLLs beyond the first 500. Can anyone confirm ? Or suggest some other reason why a loaded module might not show up in 'lm' ?

    Read the article

  • What is the best way to create related types at runtime?

    - by SniperSmiley
    How do I determine the type of a class that is related to another class at runtime? I have figured out a solution, the only problem is that I ended up having to use a define that has to be used in all of the derived classes. Is there a simpler way to do this that doesn't need the define or a copy paste? Things to note: both the class and the related class will always have their respective base class, the different classes can share a related class, and as in the example I would like the control class to own the view. #include <iostream> #include <string> class model; class view { public: view( model *m ) {} virtual std::string display() { return "view"; } }; #define RELATED_CLASS(RELATED)\ typedef RELATED relatedType;\ virtual relatedType*createRelated(){\ return new relatedType(this);} class model { public: RELATED_CLASS(view) model() {} }; class otherView : public view { public: otherView( model *m ) : view(m) {} std::string display() { return "otherView"; } }; class otherModel : public model { public: RELATED_CLASS(otherView) otherModel() {} }; class control { public: control( model *m ) : m_(m), v_( m->createRelated() ) {} ~control() { delete v_; } std::string display() { return v_->display(); } model *m_; view *v_; }; int main( void ) { model m; otherModel om; model *pm = &om; control c1( &m ); control c2( &om ); control c3( pm ); std::cout << c1.display() << std::endl; std::cout << c2.display() << std::endl; std::cout << c3.display() << std::endl; }

    Read the article

  • PHP reporting error. DB verify how to?

    - by iamfab
    Error reporting Notice: Undefined variable: random_chars in wamp\www\php_sandbox\idgen.php on line 21 Call Stack: # Time Memory Function Location 1 0.0045 678928 {main}( ) ..\idgen.php:0 GPB7446 How do I fix this error? Using this code like an automatic unique id generator. How do I connect to DB to verify code is truly unique before allowing it to be assigned to a user creating a new account? Thanks <?php $characters = array( "A","B","E","F","G","H","J","K","M","N","P","R","S","T","W","X","Y","Z"); $keys = array(); while(count($keys) < 3) { $x = mt_rand(0, count($characters)-1); if(!in_array($x, $keys)) { $keys[] = $x; } } foreach($keys as $key){ $random_chars .= $characters[$key];} $randNum = rand(2327,9987); $randLet = rand(2327,9987); echo $random_chars . $randNum; ?>

    Read the article

  • Web development scheme for staging and production servers using Git Push

    - by ServAce85
    I am using git to manage a dynamic website (PHP + MySQL) and I want to send my files from my localhost to my staging and development servers in the most efficient and hassle-free way. I am currently convinced that the best way for me to approach this problem is to use this git branching model to organize my local git repo. From there, I will use the release branches to push to my staging server for testing. Once I am happy that the release code works on the staging server, I can then merge with my master branch and push that to my production server. Pushing to Staging Server: As noted in many introductory git posts, I could run into problems pushing into a non-bare repo, so, as suggested in this response, I plan to push the release branch to a bare repo on the server and have a post-receive hook that clones the bare repo to a non-bare repo that also acts as the web-hosted directory. Pushing to Production Server: Here's my newest source of confusion... In the response that I cited above, it made me curious as to why @Paul states that it's a completely different story when pushing to a live, development server. I guess I don't see the problem. Would it be safe and hassle-free to follow the same steps as above, but for the master branch? Where are the potential pit-falls? Config Files: With respect to configuration files that are unique to each environment (.htaccess, config.php, etc), it seems simplest to .gitignore each of those files in their respective repos on their respective servers. Can you see anything immediately wrong with this? Better solutions? Accessing Data: Finally, as I initially stated, the site uses MySQL databases to store data. How would you suggest I access that data (for testing purposes) from the staging server and localhost? I realize that I may have asked way too many questions for a single post, but since they're all related to the best way to set up this development scheme, I thought it was necessary.

    Read the article

  • Error adding certificate to cacerts. Unknown key spec

    - by Alvaro Villanueva
    I am using jdk 1.6 in Windows. I have a .der file (DER Encoded X509 Certificate) that will like to add to my cacerts file... so I tried the following: keytool -import -keystore "C:\Program Files\Java\jdk1.6.0_27\jre\lib\security\cacerts" -trustcacerts -alias openldap -file "C:\cacert.der" I got the following error: java.security.cert.CertificateParsingException: java.io.IOException: subject key, java.security.spec.InvalidKeySpecException: Unknown key spec At first, I thoght it was a problemen with the der certificate, but then doing the following I got exactly the same error: keytool -list -keystore "C:\Program Files\Java\jdk1.6.0_27\jre\lib\security\cacerts" Any ideas why is this problem appearing? I have not found anything in the Web. Thanks in advance.

    Read the article

  • Setting the correct height of a UITableViewCell

    - by iOS explorer
    I'm trying to return the height of the detailTextLabel in the heightForRowAtIndexPath delegate method. This way my table view cells should be the same height as my detailTextLabel. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; NSString *text = cell.detailTextLabel.text; CGSize size = cell.detailTextLabel.bounds.size; UIFont *font = cell.detailTextLabel.font; CGSize labelSize = [text sizeWithFont:font constrainedToSize:size lineBreakMode:UILineBreakModeWordWrap]; return labelSize.height; } However I'm getting a EXC_BAD_ACCESS on the following line: UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; Wats wrong with the above piece of code?

    Read the article

  • php explode() delimiter issue

    - by mumis2012
    I am new to php so this may be a simple fix. I have a text file named 'textt.txt' that looks like this: South East asia,2222,code1 winter break,3333,code2 my php code looks like this: <?php $x = file_get_contents('textt.txt'); $y = explode("\r\n", $x); $z = $y[0]; echo $z; ?> the outcome of this is: South East asia,2222,code1 I would like it to return only: South East Asia. How can I make this happen? Thanks!

    Read the article

  • Hibernate - how to delete bidirectional many-to-many association

    - by slomir
    Problem: I have many-to-many association between two entities A and B. I set A entity as an owner of their relationship(inverse=true is on A's collection in b.hbm.xml). When i delete an A entity, corresponding records in join table are deleted. When i delete an B entity, corresponding records in join table are not deleted (integrity violation exception). -- Let's consider some very simple example: class A{ Set<B> bset=new HashSet<B>(); //... } class B{ Set<A> aset=new HashSet<A>(); //... } File a.hbm.xml [m-to-m mappings only]: <set name="bset" table="AB"> <key name="a_id"/> <many-to-many column="b_id" class="B"/> </set> File b.hbm.xml [m-to-m mappings only]: <set name="aset" table="AB" inverse="true"> <key name="b_id"/> <many-to-many column="a_id" class="A"/> </set> Database relations: A(id,...) B(id,...) AB(a_id,b_id) Suppose that we have some records in AB joint table. For example: AB = {(1,1),(1,2)} where AB= { (a_id , b_id) | ... ... } -- Situation 1 - works probably because A is owner of AB relationship: A a=aDao.read(1); //read A entity with id=1 aDao.delete(a); //delete 'a' entity and both relations with B-entities Situation 2 - doesn't work: B b=bDao.read(1); //read B entity with id=1 bDao.delete(b); //foreign key integrity violation On the one hand, this is somehow logical to me, because the A entity is responsible for his relation with B. But, on the other hand, it is not logical or at least it is not orm-like solution that I have to explicitly delete all records in join table where concrete B entity appears, and then to delete the B entity, as I show in situation 3: Situation 3 - works, but it is not 'elegant': B b=bDao.read(1); Set<A> aset=b.getA(); //get set with A entities Iterator i=aset.iterator(); //while removes 'b' from all related A entities //while breaks relationships on A-side of relation (A is owner) while(i.hasNext()){ A a=i.next(); a.bset.remove(b); //remove entity 'b' from related 'a' entity aDao.update(a); //key point!!! this line breaks relation in database } bDao.delete(b); //'b' is deleted because there is no related A-entities -- So, my question: is there any more convenient way to delete no-owner entity (B in my example) in bidirectional many-to-many association and all of his many-to-many relations from joint table?

    Read the article

  • SQL Server Bulk Insert failing when called from .NET SqlCommand

    - by Nick Wright
    I have a stored procedure which does bulk insert on a SQL server 2005 database. When I call this stored procedure from some SQL (passing in the name of a local format file and data file) it works fine. Every time. However, when this same stored procedure gets called from C# .NET 3.5 code using SqlCommand.ExecuteNonQuery it works intermittently. When it fails a SqlException is generated stating "Cannot bulk load. Invalid column number in the format file "c:\bulkinsert\MyFile.fmt" I don't think this error message is correct. Has anyone experienced similar problems with calling bulk insert from code? Thanks.

    Read the article

  • PHP - Calling function inside another class -> function

    - by Kolind
    I'm trying to do this: class database { function editProvider($post) { $sql = "UPDATE tbl SET "; foreach($post as $key => $val): if($key != "providerId") { $val = formValidate($val); $sqlE[] = "`$key`='$val'"; } endforeach; $sqlE = implode(",", $sqlE); $where = ' WHERE `id` = \''.$post['id'].'\''; $sql = $sql . $sqlE . $where; $query = mysql_query($sql); if($query){ return true; } } // }//end class And then use this function * INSIDE of another class *: function formValidate($string){ $string = trim($string); $string = mysql_real_escape_string($string); return $string; } // .. on $val. Why doesn't this work? if I write in a field of the form, it's not escaping anything at all. How can that be? * UPDATE * handler.php: if(isset($_GET['do'])){ if($_GET['do'] == "addLogin") { $addLogin = $db->addLogin($_POST); } if($_GET['do'] == "addProvider") { $addProvider = $db->addProvider($_POST); } if($_GET['do'] == "editProfile") { $editProfile = $db->editProfile($_POST); } if($_GET['do'] == "editProvider") { $editProvider = $db->editProvider($_POST); } } //end if isset get do ** The editProvider function works fine except for this :-) **

    Read the article

  • C++ boost.asio server and client connection undersanding

    - by Edgar Buchvalov
    i started learning boost.asio and i have some problems with undersanding tcp connections. There is example from official boost site: #include <ctime> #include <iostream> #include <string> #include <boost/asio.hpp> using boost::asio::ip::tcp; std::string make_daytime_string() { using namespace std; // For time_t, time and ctime; time_t now = time(0); return ctime(&now); } int main() { try { boost::asio::io_service io_service; tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v4(), 13)); for (;;) { tcp::socket socket(io_service); acceptor.accept(socket); std::string message = make_daytime_string(); boost::system::error_code ignored_error; boost::asio::write(socket, boost::asio::buffer(message), boost::asio::transfer_all(), ignored_error); } } catch (std::exception& e) { std::cerr << e.what() << std::endl; } return 0; } there is question, why if i want to connet to this server via client i have t write: boost::asio::io_service io_service; tcp::resolver resolver(io_service); tcp::resolver::query query(host_ip, "daytime"); //why daytime? tcp::resolver::iterator endpoint_iterator = resolver.resolve(query); tcp::resolver::iterator end; why daytime?, what it meant and where it is inicialized in server, or i just doesn't missed somefing? there is full client code : www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/tutorial/tutdaytime1.html thanks for explanation in advance

    Read the article

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