Search Results

Search found 128 results on 6 pages for 'tristan'.

Page 4/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • mysql : Recieve data only per months

    - by Tristan
    Hello, few times ago, i asked how to do to display datas per month, i must told a bad explanation because i just figured out that it's not what i want : Here's what I got : $req1 = ... AND v.date > (DATE_SUB(CURDATE(), INTERVAL 2 MONTH)) AND v.date < (DATE_SUB(CURDATE(), INTERVAL 1 MONTH)) $req2= ... AND v.date > (DATE_SUB(CURDATE(), INTERVAL 3 MONTH)) AND v.date < (DATE_SUB(CURDATE(), INTERVAL 2 MONTH)) But the problem, imagine that today you are the 10th june, it's going to calculate ALL the data between the 10 june to the 10 may then the 10 may until the 10 april... But what i want is data : from 1st may to 1 st june, from 1st june to 1st july... do you see what i mean ? thank you ;)

    Read the article

  • Type problem with Observable.Create from Boo

    - by Tristan
    I'm trying to use Reactive Extensions from Boo and am running into type problems. Here's the basic example: def OnSubscribe(observer as IObservable[of string]) as callable: print "subscribing" def Dispose(): print "disposing" return Dispose observable = System.Linq.Observable.Create[of string](OnSubscribe) observer = System.Linq.Observer.Create[of string]({x as string | print x}) observable.Subscribe(observer) The Subscribe here gives a System.InvalidCastException: Cannot cast from source type to destination type. The issue appears to be with how I'm creating the observable, but I've struggled to see where the type problem arises from. Ideas?

    Read the article

  • jQuery replaceWith(data) is not correctly doing his job

    - by Tristan
    Hello, i did a small ajax div refresh, but instead of replacing the values with the new ones, jquery adds the new data before the old ones. What possibily causes that please ? <script type="text/javascript"> $(document).ready(function(){ $('#AJAX').click(function(e){ e.preventDefault(); var hebergeur = $('#hebergeurJQUERY').val(); $.post("/statistiques/maj-bloc-commentaires.php", { hebergeur : hebergeur }, function(data){ // déclenchée seulement si succès $("#TOREPLACE").replaceWith(data).val( ); }); }); }); </script> The HTML : print '<div id="a_remplacer"> <div class="detail_commentaires"> <table class="tableau_detail_commentaires"> <tr> <td class="tab_space">Serveur <strong>'.$row['type'].'</strong></td> <td>Qualite</td> <td style="color:'.$c_vote.'">'.htmlentities($row['vote']).'</td> </tr> </div> </div> The PHP ajax echo : print '<div id="a_remplacer"><div class="detail_commentaires" > <table class="tableau_detail_commentaires"> <tr> <td class="tab_space">Serveur <strong>'.$row['type'].'</strong></td> <td>Qualite</td> <td style="color:'.$c_vote.'">'.htmlentities($row['vote']).'</td> </tr></div></div> Thanks

    Read the article

  • Delayed computation as DAG in .NET

    - by Tristan
    I'm playing around with declarative / delayed computation, where expressions are built up into a directed acyclic graph. Microsoft's GPU Accelerator does something similar. Are there any libraries available for .Net languages that makes it easier to build a representation of the computation?

    Read the article

  • a code to track clicks on outgoing links

    - by Tristan
    Hello, I found this on the web: $('a[href^=http]:not("[href*=://' + document.domain + ']")').click(function() { pageTracker._trackPageview('/outgoing/' + $(this).attr('href')); }); But it's not working. In my Google Analytics account there are no /outgoing/ links showing (it's been 24+ hours since I implemented it). What's wrong with this code? I'm using jQuery of course ;)

    Read the article

  • php is not recognized as an intern command (using windows)

    - by Tristan
    Hello, I want to develop using a framework called symfony BUT, i do not have a MAC and i don't want to dual boot with Debian. I tryed virtual hosts via Virtual Box but it's too crappy. So i decided to stay on windows So when the tutorial tells me to do php lib/vendor/symfony/data/bin/check_configuration.php i do in the windows cmd : php lib\vendor\symfony\data\bin\check_configuration.php and it tells me : 'php' is not recognized as an internal or external command I use UwAmp (php 5.2.12 + mysql + apache) which is stored in E:\logiciels\UwAmp\ inside i have buch of file, but i guess that is important : E:\logiciels\UwAmp\apache\php_5.2.11 How to make the cmd PHP in the windows cmd work propely please?

    Read the article

  • PHP is not returning me a number type

    - by Tristan
    Hello, i tryed to follow that great tutorial (STAR rating with css : http://stackoverflow.com/questions/1987524/turn-a-number-into-star-rating-display-using-jquery-and-css) but i've just a big problem : When i do <span class="stars">1.75</span> or $foo='1.75'; echo '<span class="stars">'.$foo.'</span> the stars is correctly shown, but as soon as i do : while($val = mysql_fetch_array($result)) { $average = ($val['services'] + $val['serviceCli'] + $val['interface'] + $val['qualite'] + $val['rapport'] ) / 5 ; <span class="stars">.$average.</span> } the stars stops working i double checked the data type in mysql : they're all TINYINT(2) and i tryed that : $average = intval($average); but it's still not working, Thank you

    Read the article

  • mysqli returns only one row instead of multiple rows

    - by Tristan
    Hello, i'm totally new to mysqli and i took a generated code and adapted it for my need. public function getServeurByName($string) { $stmt = mysqli_prepare($this->connection, "SELECT DISTINCT * FROM $this->tablename where GSP_nom=?"); $this->throwExceptionOnError(); mysqli_stmt_bind_param($stmt, 's', $string); $this->throwExceptionOnError(); mysqli_stmt_execute($stmt); $this->throwExceptionOnError(); mysqli_stmt_bind_result($stmt, $row->idServ, $row->timestamp, ........... ........... $row->email); if(mysqli_stmt_fetch($stmt)) { $row->timestamp = new DateTime($row->timestamp); return $row; } else { return null; } } the problem, this example i took the template on returns only one row instead of all the records. how to fix that please ?

    Read the article

  • Problem with acceding in DOM with jQuery

    - by Tristan
    Hello, I changed the tree of my JSON-P output, and i cannot access to my object DOM anymore : Here's my output : jsonp1271634374310( {"Inter-Medias": {"name":"Inter-Medias","idGSP":"14","average":"80","services":"8.86"} }); And here's my jQuery script : success: function(data, textStatus, XMLHttpRequest){ widget = data.name; widget += data.average ; .... I know one level is missing, but if I try to do : data.Inter-Medias.name or data.name.name it's still not working. Any idea please ? I will have case where i'll have multiple Ojbect, so i want to display all of them, how to do that ? for (i=0;i < data.length;i++) Does it look right ? Bonus question : i understand function(data, textStatus, XMLHttpRequest) that in case of success this function is triggered, the data is what the script recieved from his request, but i have no idea what textStatus or XMLHttpRequest are here too and why ?! Thank you.

    Read the article

  • MySQL enters another value that the one given by PHP

    - by Tristan
    Hello, The big problem : mysql does not stores the information i told him to via PHP Example (this req is an echo just before the query) : INSERT INTO serveur (GSP_nom , IPserv, port, tickrate, membre, nomPays, finContrat, type, jeux, slot, ipClient, email) VALUES ( 'ckras', '88.191.88.57', '37060', '100' , '', 'Allemagne','20110519', '2', '4','99' ,'82.220.201.183','[email protected]'); But on the MySQL i have : 403 ckras 88.191.88.57 32767 100 Allemagne 20110519 1 2010-04-25 00:51:47 2 4 99 82.220.201.183 [email protected] port : 37060 (right value) //// 32767 (MySQL's drug?) Any help would be appreciated, i'm worse than stuck and i'm ** off PS: *There is no trigger on the mysql as far as i know / there is no controll on the port which means that nowhere i modify the "port" value and this script works for 80% of the time ( it seems that as soon as the users enters a port = 30000 it causes that bug), an user first reported to me this error today and the script was running since 3 months* Thanks

    Read the article

  • Decorators vs. classes in python web development.

    - by Tristan
    I've noticed three main ways Python web frameworks deal request handing: decorators, controller classes with methods for individual requests, and request classes with methods for GET/POST. I'm curious about the virtues of these three approaches. Are there major advantages or disadvantages to any of these approaches? To fix ideas, here are three examples. Bottle uses decorators: @route('/') def index(): return 'Hello World!' Pylons uses controller classes: class HelloController(BaseController): def index(self): return 'Hello World' Tornado uses request handler classes with methods for types: class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") Which style is the best practice?

    Read the article

  • mySQL query : working with INTERVAL and CURDATE

    - by Tristan
    Hello, i'm building a chart and i want to recieve data for each months Here's my first request which is working : SELECT s.GSP_nom AS nom, timestamp, AVG( v.vote + v.prix ) /2 AS avg FROM votes_serveur AS v INNER JOIN serveur AS s ON v.idServ = s.idServ WHERE s.valide =1 AND v.date > CURDATE() -30 GROUP BY s.GSP_nom ORDER BY avg DESC But, in my case i've to write 12 request to recieve datas for the 12 previous months, is there any trick to avoid writing : // example for the previous month AND v.date > CURDATE() -60 AND v.date < CURDATE () -30 I heard about INTERVAL, i went to the mySQL doc but i didn't manage to implement it. Any ideas / example of using INTERVAL please ? Thank you

    Read the article

  • Looking for a jQuery plugin : sort of bar rating

    - by Tristan
    Hello, i own a website where users can vote/rate things and i want to improve the poor inputbox (from 1 to 10) to improve visual rendering. I was thinking of a bar, which have 10 ' | ' you can move the cursor from one to ten (it doesn't have to be AJAX because the rating is only added at the end of the form) I'm sure you already seend this king of thing but i actually can't find any plugin of it. Any ideas please ?

    Read the article

  • Rails table inheritance issue

    - by Tristan O'Neil
    I've setup some models in the table inheritance fashion and everything seems to be all fine and dandy. But, when I use a collection select field to select values from one of the models it saves it but it saves the ID of the data and not the actual value of the data. So when I try to display the value on the show view it just shows the corresponding ID and not the actual value. Here is my setup. I'm using formtastic as a side note. View <%= show_field "County", @company.county %> Form <%= f.input :county, :label => 'County', :as => :select, :collection => County.find(:all) %> Base Model class Tag < ActiveRecord::Base before_create :set_type before_update :set_type attr_accessible :type, :name, :category belongs_to :company def set_type self.type = self.category end end Inherited Model class County < Tag end

    Read the article

  • Combing a symlink to an external folder with a Rewrite Rule?

    - by Tristan
    I've created a symlink in an account to an folder external to that user account (although with the same ownership). The symlink works but I'd like to combine it with a RewriteRule, and I'm having problems with that. For instance I create the symlink with: ln -s /home/target shortcut And I add the following RewriteRule to .htaccess: RewriteRule ^shortcut/([a-zA-Z0-9_-]+) shortcut/index.php?var=$1 This however fails. Yet if instead of being located in an external folder, the target folder is in the same folder as the shortcut address, then the RewriteRule will work. i.e. it works if the symlink is: ln -s ./target shortcut How might I get the RewriteRule working for the case where the target folder is an external folder?

    Read the article

  • SQL, problem with OrderBy / GroupBy

    - by Tristan
    Hi, In my table I have two fields among others : article_id and *version* *example: article_id : 5 // version 1 aricle_id: 5 // version 2 article_id: 6 // version 1* What i want to do is to retrieve the latest version for each article id (in my example i want to retrieve the article 5 version 2 object and article 6 and version 1 object). The problem is that mysql is doing the groupBy instead of the OrderBy so it returns to me the FIRST version of each article, but i want the opposit. Do you have an idea please ?

    Read the article

  • How to test if a user has SELECTED a file to upload ?

    - by Tristan
    Hello, on a page, i have : if (!empty($_FILES['logo']['name'])) { $dossier = 'upload/'; $fichier = basename($_FILES['logo']['name']); $taille_maxi = 100000; $taille = filesize($_FILES['logo']['tmp_name']); $extensions = array('.png', '.jpg', '.jpeg'); $extension = strrchr($_FILES['logo']['name'], '.'); if(!in_array($extension, $extensions)) { $erreur = 'ERROR you must upload the right type'; } if($taille>$taille_maxi) { $erreur = 'too heavy'; } if(!empty($erreur)) { ....................... } The problem is, if the users wants to edit information WITHOUT uploading a LOGO, it raises an error : 'error you must upload the right type' So, if a user didn't put anything in the inputbox in order to upload it, i don't want to enter in these conditions test. i tested : if (!empty($_FILES['logo']['name']) and if (isset($_FILES['logo']['name']) but both doesn't seems to work. Any ideas? edit : maybe i wasn't so clear, i don't want to test if he uploaded a logo, i want to test IF he selected a file to upload, because right now, if he doesn't select a file to upload, php raises an error telling he must upload with the right format. thanks.

    Read the article

  • jQuery code to track clicks on outgoing links (google analystics)

    - by Tristan
    Hello, I found this on the web: $('a[href^=http]:not("[href*=://' + document.domain + ']")').click(function() { pageTracker._trackPageview('/outgoing/' + $(this).attr('href')); }); But it's not working. In my Google Analytics account there are no /outgoing/ links showing (it's been 24+ hours since I implemented it). What's wrong with this code? I'm using jQuery of course ;) (PS : i already have : <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA MY CODE"); pageTracker._trackPageview(); } catch(err) {}</script>)

    Read the article

  • Can we only use the back-end of wordpress without any front-end ?

    - by Tristan
    Hello, i just asked a question few minutes ago which led me to this one : I want to know if there is any chance to use only the back-end of wordpress ? I mean, link my admin interface to post news link my visitor interface on my website to the wordpress news so the visitor can access the news So the visitor never find out that i'm using wordpress to generate the news and handle their comments and write my news ? Maybe it's possible but there is no point by doing so ? Thank you

    Read the article

  • What should I do with an over-bloated select-box/drop-down

    - by Tristan Havelick
    All web developers run into this problem when the amount of data in their project grows, and I have yet to see a definitive, intuitive best practice for solving it. When you start a project, you often create forms with tags to help pick related objects for one-to-many relationships. For instance, I might have a system with Neighbors and each Neighbor belongs to a Neighborhood. In version 1 of the application I create an edit user form that has a drop down for selecting users, that simply lists the 5 possible neighborhoods in my geographically limited application. In the beginning, this works great. So long as I have maybe 100 records or less, my select box will load quickly, and be fairly easy to use. However, lets say my application takes off and goes national. Instead of 5 neighborhoods I have 10,000. Suddenly my little drop-down takes forever to load, and once it loads, its hard to find your neighborhood in the massive alphabetically sorted list. Now, in this particular situation, having hierarchical data, and letting users drill down using several dynamically generated drop downs would probably work okay. However, what is the best solution when the objects/records being selected are not hierarchical in nature? In the past, of done this with a popup with a search box, and a list, but this seems clunky and dated. In today's web 2.0 world, what is a good way to find one object amongst many for ones forms? I've considered using an Ajaxifed search box, but this seems to work best for free text, and falls apart a little when the data to be saved is just a reference to another object or record. Feel free to cite specific libraries with generic solutions to this problem, or simply share what you have done in your projects in a more general way

    Read the article

  • Problem with accessing in DOM with jQuery

    - by Tristan
    Hello, I changed the tree of my JSON-P output, and i cannot access to my object DOM anymore : Here's my output : jsonp1271634374310( {"Inter-Medias": {"name":"Inter-Medias","idGSP":"14","average":"80","services":"8.86"} }); And here's my jQuery script : success: function(data, textStatus, XMLHttpRequest){ widget = data.name; widget += data.average ; .... I know one level is missing, but if I try to do : data.Inter-Medias.name or data.name.name it's still not working. Any idea please ? I will have case where i'll have multiple Ojbect, so i want to display all of them, how to do that ? for (i=0;i < data.length;i++) Does it look right ? Bonus question : i understand function(data, textStatus, XMLHttpRequest) that in case of success this function is triggered, the data is what the script recieved from his request, but i have no idea what textStatus or XMLHttpRequest are here too and why ?! Thank you.

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >