Daily Archives

Articles indexed Friday June 1 2012

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

  • How we can perform Action on Sequence UIButtons?

    - by Prince Shazad
    As My Screen shot show that i am working on word matching game.In this game i assign my words to different UIButtons in Specific sequence on different loctions(my red arrow shows this sequence)and of rest UIButtons i assign a one of random character(A-Z).when i Click on any UIButtons its title will be assign to UILabel which is in Fornt of Current Section:i campare this UILabel text to below UILabels text which is in fornt of timer.when it match to any of my UILabels its will be deleted.i implement all this process already. But my problem is that which is show by black lines.if the player find the first word which is "DOG". he click the Two UIButtons in Sequence,but not press the Third one in Sequence.(as show by black line).so here i want that when player press the any UIButtons which is not in Sequence then remove the previous text(which is "DO") of UILabel and now the Text of UILabel is only "G" . Here is my code to get the UIButtons titles and assign it UILabel. - (void)aMethod:(id)sender { UIButton *button = (UIButton *)sender; NSString *get = (NSString *)[[button titleLabel] text]; NSString *origText = mainlabel.text; mainlabel.text = [origText stringByAppendingString:get]; if ([mainlabel.text length ]== 3) { if([mainlabel.text isEqualToString: a]){ lbl.text=@"Right"; [btn1 removeFromSuperview]; score=score+10; lblscore.text=[NSString stringWithFormat:@"%d",score]; words=words-1; lblwords.text=[NSString stringWithFormat:@"%d",words]; mainlabel.text=@""; a=@"tbbb"; } else if([mainlabel.text isEqualToString: c]){ lbl.text=@"Right"; [btn2 removeFromSuperview]; score=score+10; lblscore.text=[NSString stringWithFormat:@"%d",score]; words=words-1; lblwords.text=[NSString stringWithFormat:@"%d",words]; mainlabel.text=@""; c=@"yyyy"; } else if([mainlabel.text isEqualToString: d]){ lbl.text=@"Right"; [btn3 removeFromSuperview]; score=score+10; lblscore.text=[NSString stringWithFormat:@"%d",score]; words=words-1; lblwords.text=[NSString stringWithFormat:@"%d",words]; mainlabel.text=@""; d=@"yyyy"; } else { lbl.text=@"Wrong"; mainlabel.text=@""; } }} Thanx in advance

    Read the article

  • jQuery function execute on Button Click and Enter/Return (key)

    - by Alvin Jones
    I'm trying to create a little search box that allows you to search Twitter based on the keyword you enter in the input field. While it's work, it only works if you press the Submit button. I would also like to be able to press the Enter or Return key to initiate the search. I've tried using the .sumbit function and wrapping my input around a form element with no success. Any insight would be greatly appreciate! Live example: http://tinyurl.com/84axyym <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(document).ready(function(){ function(data) { $('#startSearch').click(function(){ $('#tweets .results').remove(); var searchTerm = 'http://search.twitter.com/search.json?q=' + $('#twitterSearch').val() + '&callback=?' $.getJSON(searchTerm, function(data) { $.each(data.results, function() { $('<div class="results"></div>') .hide() .append('<a class="userPicLink" href="http://twitter.com/' + this.from_user + '">' + '<img class="userImg" src="' + this.profile_image_url + '">' + '</a>') .append('<span class="userName">' + '<a href="http://twitter.com/' + this.from_user + '">' + this.from_user + '</span>') .append('<span class="userText">' + this.text + '</span>') .append('<time class="textTime">' + relTime(this.created_at) + '</time>') .appendTo('#tweets') .fadeIn(); }); }); </script> <body> <label id="searchLabel" for="twitterSearch">Search</label> <input type="search" list="searchSugg" id="twitterSearch" placeholder="css3 animation" required aria-required="true"> <input id="startSearch" type="submit"> <datalist id="searchSugg"> <option value="css3 mulitple backgrounds"> <option value="html5 video"> <option value="responsive web design"> <option value="twitter api"> </datalist> <div id="tweets"> </div> </body>

    Read the article

  • 2 dimensional arrays passed to a function in c++

    - by John Marcus
    I'm working on doing calculations in a two dimensional array but keep getting a nasty error. i call the function by : if(checkArray(array)) and try to pass it in like this: bool checkArray(double array[][10]) //or double *array[][10] to no avail the error is error: cannot convert ‘double ()[(((unsigned int)(((int)n) + -0x00000000000000001)) + 1)]’ to ‘double’ for argument ‘1’ to ‘bool checkArray(double*)’ code snippet //array declaration int n = 10; double array[n][n]; //function call to pass in array while(f != 25) { cout<<endl; cout<<endl; if(checkArray(array)) //this is the line of the error { cout<<"EXIT EXIT EXIT"<<endl; } f++; } //function declaration bool checkArray(double *array)//, double newArray[][10]) { double length = sizeof(array); for(int i = 0; i < length; i++) for(int j = 0; j < length;j++) { double temp = array[i][j]; } }

    Read the article

  • Bad value for type timestamp on production server

    - by Juan Javaloyes
    I'm working with: seam 2.2.2 + hibernate + richfaces + jboss 5.1 + postgres I have an module which needs to load some data from the database. Easy. The problem is, on development it works fine, 100%, but when I deploy on my production server and try to get the data, an error rise: could not read column value from result set: fechahor9_504_; Bad value for type timestamp : [C@122e5cf SQL Error: 0, SQLState: 22007 Bad value for type timestamp : [C@122e5cf javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute query [more errors] Caused by: org.postgresql.util.PSQLException: Bad value for type timestamp : [C@122e5cf at org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:232) [more errors] Caused by: java.lang.NumberFormatException: Trailing junk on timestamp: '' at org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:226) I can't understand why it works on my machine (development) and why not on production. Any clues? Anyone gone through the same problem? Is exactly the same compilation

    Read the article

  • Can I use meteor for this?

    - by nitelord
    I'm looking for a way to create an app which has a realtime web interface as well as an API which can be called by a node.js client while sharing most of its code. I'd like to be able to manage data, monitor and execute tasks inside of my app via browser, but also have an automation/scheduling program which connects to my web app and tells it to run various tasks and get results of each task. Unfortunately it doesn't look like I can connect to Meteor from the server, so I'm wondering if there's another approach? Is what I described even possible using Meteor? I have done some testing using socket.io and I think I may be able to do it this way, but Meteor seems like it'd be really great for the realtime user interface.

    Read the article

  • I have a parse error in my php code

    - by user1421767
    I have a piece of code which I am struggling on. I want the onclick function to display the "Question" row in the function but when I place '$questionrow['QuestionContent']' within the brackets, it is giving me an error stating: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /xxx7/Mobile_app/previousquestions.php on line 119 How do I place the QuestionContent within the brackets correctly in function below: onclick='parent.addwindow('$questionrow['QuestionContent']');'>Add</button> Below is whole code: <?php $output = ""; while ($questionrow = mysql_fetch_assoc($questionresult)) { $output .= " <table> <tr> <td class='questiontd'>{$questionrow['QuestionContent']}</td> <td class='addtd'><button type='button' class='add' onclick='parent.addwindow('$questionrow['QuestionContent']');'>Add</button></td> </tr>"; } $output .= " </table>"; echo $output; ?>

    Read the article

  • python - from matrix to dictionary in single line

    - by Sanich
    matrix is a list of lists. I've to return a dictionary of the form {i:(l1[i],l2[i],...,lm[i])} Where the key i is matched with a tuple the i'th elements from each list. Say matrix=[[1,2,3,4],[9,8,7,6],[4,8,2,6]] so the line: >>> dict([(i,tuple(matrix[k][i] for k in xrange(len(matrix)))) for i in xrange(len(matrix[0]))]) does the job pretty well and outputs: {0: (1, 9, 4), 1: (2, 8, 8), 2: (3, 7, 2), 3: (4, 6, 6)} but fails if the matrix is empty: matrix=[]. The output should be: {} How can i deal with this?

    Read the article

  • C# private (hidden) base class

    - by Loadmaster
    It is possible to make a C# base class accessible only within the library assembly it's compiled into, while making other subclasses that inherit from it public? For example: using System.IO; class BaseOutput: Stream // Hidden base class { protected BaseOutput(Stream o) { ... } ...lots of common methods... } public class MyOutput: BaseOutput // Public subclass { public BaseOutput(Stream o): base(o) { ... } public override int Write(int b) { ... } } Here I'd like the BaseOutput class to be inaccessible to clients of my library, but allow the subclass MyOutput to be completely public. I know that C# does not allow base classes to have more restrictive access than subclasses, but is there some other legal way of achieving the same effect?

    Read the article

  • Build error with variables and url_for in Flask

    - by Rob
    Have found one or two people on the interwebs with similar problems, but haven't seen a solution posted anywhere. I'm getting a build error from the code/template below, but can't figure out where the issue is or why it's occurring. It appears that the template isn't recognizing the function, but don't know why this would be occurring. Any help would be greatly appreciated - have been pounding my against the keyboard for two nights now. Function: @app.route('/viewproj/<proj>', methods=['GET','POST']) def viewproj(proj): ... Template Excerpt: {% for project in projects %} <li> <a href="{{ url_for('viewproj', proj=project.project_name) }}"> {{project.project_name}}</a></li> {% else %} No projects {% endfor %} Error log: https://gist.github.com/1684250 EDIT: Also wanted to include that it's not recognizing the variable "proj" when building the URL, so it's just appending the value as a parameter. Here's an example: //myproject/viewproj?projname=what+up Last few lines: [Wed Jan 25 09:47:34 2012] [error] [client 199.58.143.128] File "/srv/www/myproject.com/myproject/templates/layout.html", line 103, in top-level template code, referer: xx://myproject.com/ [Wed Jan 25 09:47:34 2012] [error] [client 199.58.143.128] {% block body %}{% endblock %}, referer: xx://myproject.com/ [Wed Jan 25 09:47:34 2012] [error] [client 199.58.143.128] File "/srv/www/myproject.com/myproject/templates/main.html", line 34, in block "body", referer: xx://myproject.com/ [Wed Jan 25 09:47:34 2012] [error] [client 199.58.143.128] , referer: xx://myproject.com/ [Wed Jan 25 09:47:34 2012] [error] [client 199.58.143.128] File "/usr/lib/python2.7/dist-packages/flask/helpers.py", line 195, in url_for, referer: xx://myproject.com/ [Wed Jan 25 09:47:34 2012] [error] [client 199.58.143.128] return ctx.url_adapter.build(endpoint, values, force_external=external), referer: xx://myproject.com/ [Wed Jan 25 09:47:34 2012] [error] [client 199.58.143.128] File "/usr/lib/pymodules/python2.7/werkzeug/routing.py", line 1409, in build, referer: xx://myproject.com/ [Wed Jan 25 09:47:34 2012] [error] [client 199.58.143.128] raise BuildError(endpoint, values, method), referer: xx://myproject.com/ [Wed Jan 25 09:47:34 2012] [error] [client 199.58.143.128] BuildError: ('viewproj', {'proj': '12th'}, None), referer: xx://myproject.com/

    Read the article

  • customise jQuery totemticker plugin

    - by Don
    I'm using the totemticker jQuery plugin, but need to be able to stop it programatically. It doesn't seem to provide this feature, so I had a look at the source code to see if I could add it myself. It seems that all I need to do is figure out how to call base.stop_interval() However, I can't seem to make the object that is stored in base accessible to callers. I've made a couple of unsuccesful atttempts, but hopefully someone who knows a bit more about how jQuery plugins work can point me in the right direction.

    Read the article

  • Django and ajax image file upload errors and csrf

    - by sharkfin
    I tried out Alex Kuhl's ajax script to upload images to Django 1.4. My first question is why I'm getting an empty page with firebug telling me I have two errors: fileuploader.js (line 4): syntax error <!DOCTYPE html> In my template html: qq is not defined var uploader = new qq.FileUploader( { Here is my entire html file for it: http://pastebin.com/NjbV5gMn This post suggests that either some script has 404'd or the src attribute is empty, which would cause the doctype error. But that doesn't seem to be the case here. As for why qq is not defined, I'm not sure what is wrong. Django can clearly find the fileuploader.js just fine from my static folder. My second question is why the ajax code uses {{ csrf_token }} instead of {% csrf_token %}. But if I use {% csrf_token %}, I get the firebug error: missing } after property list 'csrf_token': '<div style='display:none'<input type='hidden' name='csrfmiddlewaretoken' value='Cx0zFFak6OLgrHiAnFa3k4BPDmn4BgoT' /</div',

    Read the article

  • Fancybox The requested content cannot be loaded. Please try again later

    - by user964836
    <link rel="stylesheet" href="<?php echo $this->getSkinUrl(''); ?>js/fancybox/source/jquery.fancybox.css?v=2.0.6" type="text/css" media="screen" /> <script type="text/javascript" src="<?php echo $this->getSkinUrl(''); ?>js/fancybox/source/jquery.fancybox.pack.js?v=2.0.6"></script> <script type="text/javascript"> $(document).ready(function() { $("a#image").fancybox(); $("a#image").trigger('click'); $("a#image").hide(); }); <a id="image" href="banner-about-cart.png"><img src="<?php echo $this->getSkinUrl() ?>images/banner-about-cart.png" alt=""/></a> any idea? the image loding i test whitout fancy plugin i can see image in site, i usind magento as well

    Read the article

  • Sending JSON content type in from JavaScript objects ( jQuery ajax )

    - by smartnut007
    I am having trouble sending JavaScript objects as a http request that only accepts json content-type. i.e "application/json" or "text/json" But, I am not sure why data2 ( stringified json ) works fine But, data1 ( json object ) does throws 400 ( Bad Request ). i.e I am not sure jQuery does not serialize the json object to a valid json string for the server to process. var data1 = ({ rating : 3 }); //does not work var data2 = '{ "rating" : 3}'; //works fine $.ajax({ url : "/rate", data : data1, type : "POST", contentType: "application/json", success: function(json){ console.log("Ajax Return :"+json); } });

    Read the article

  • Javascript function with PHP throwing a "Illegally Formed XML Syntax" error

    - by Joe
    I'm trying to learn some javascript and i'm having trouble figuring out why my code is incorrect (i'm sure i'm doing something wrong lol), but anyways I am trying to create a login page so that when the form is submitted javascript will call a function that checks if the login is in a mysql database and then checks the validity of the password for the user if they exist. however I am getting an error (Illegally Formed XML Syntax) i cannot resolve. I'm really confused, mostly because netbeans is saying it is a xml syntax error and i'm not using xml. here is the code in question: function validateLogin(login){ login.addEventListener("input", function() { $value = login.value; if (<?php //connect to mysql mysql_connect(host, user, pass) or die(mysql_error()); echo("<script type='text/javascript'>"); echo("alert('MYSQL Connected.');"); echo("</script>"); //select db mysql_select_db() or die(mysql_error()); echo("<script type='text/javascript'>"); echo("alert('MYSQL Database Selected.');"); echo("</script>"); //query $result = mysql_query("SELECT * FROM logins") or die(mysql_error()); //check results against given login while($row = mysql_fetch_array($result)){ if($row[login] == $value){ echo("true"); exit(0); } } echo("false"); exit(0); ?>) { login.setCustomValidity("Invalid Login. Please Click 'Register' Below.") } else { login.setCustomValidity("") } }); } the code is in an external js file and the error throws on the last line. Also from reading i understand best practices is to not mix js and php so how would i got about separating them but maintaining the functionality i need? thanks!

    Read the article

  • Doing a roll-in/roll-out slideshow in jQuery

    - by erizias
    I am trying to create a roll-in / roll-out slideshow in jQuery/JavaScript. My problem is, that it needs to be repeated. And right now when it's starting over, the pictures doesnt come from the right side anymore :( The reason for which I have created the slideLeft function, is that afterwards I need to create 2 functions, where the user can interrupt the slideshow manually pressing a left or right button. This is what I've got: <script class="jsbin" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <div style='background: #c4c4c4; border: 1px solid #7b7b7b; height: 220px; overflow: hidden; padding: 5px; position: absolute; width: 590px;'> <div id='slider-image-1' style='left: 5px; background: red; height: 216px; padding: 2px; position: absolute; top: 5px; width: 586px;'></div> <div id='slider-image-2' style='left: 600px; background: yellow; height: 216px; padding: 2px; position: absolute; top: 5px; width: 586px;'></div> <div id='slider-image-3' style='left: 600px; background: green; height: 216px; padding: 2px; position: absolute; top: 5px; width: 586px;'></div> <div id='slider-image-4' style='left: 600px; background: blue; height: 216px; padding: 2px; position: absolute; top: 5px; width: 586px;'></div> </div> <script type='text/javascript'> $(document).ready(function() { var amount = 0; var nextamount = 1; setInterval(function() { amount++; nextamount++; if (nextamount === 5) nextamount = 1; if (amount === 5) amount = 1; slideLeft(amount, nextamount); }, 2000); }); function slideLeft(i, j) { var $theItem = $('#slider-image-' + i); $theItem.animate({ left: parseInt($theItem.css('left'), 10) == 5 ? -$theItem.outerWidth() : 5 }, 500); var $theItem = $('#slider-image-' + j); $theItem.animate({ left: parseInt($theItem.css('left'), 10) == 5 ? $theItem.outerWidth() + 10 : 5 }, 500); }; </script>

    Read the article

  • Speaker Notes...

    - by wulfers
    At a .Net User Group meeting this week, I experienced two poorly prepared speakers floundering through presentations….  As a Lead Technologist at the company I work for, I have experience training technical staff and also giving presentations at code camps.  Here are a few guidelines for aspiring speakers you might find helpful…   1.       Do not stand in front of your audience and read your slides.  This is  offensive to your audience and not what they came for...  Your slides are there to reinforce the information you are presenting and to give the audience a little clarification on some terms you may use and as a visual aid for some complicated issues. 2.       Have someone review your presentation (slides, notes, …) who speaks the language you will be presenting in fluently.  Also record at least ten minutes of your presentation and have that same person review that.  One of the speakers this week used the word “Basically” fifty times in less than thirty minutes…  I started to flinch every time he used the term. 3.       Be Prepared  -  before the presentation begins.  Don’t make any last minute changes to your presentation or demo code the night before.  Don’t patch your laptop or demo servers the night before.  If possible create a virtual image that you only use for presentations and use that (refreshed before every presentation). 4.       Know the level of expertise of your audience.  Speaking above or below their abilities will make or break your presentation. 5.       Deliver what you promise. The presentation this week was supposed to be on BDD (Behavior Driven Develpment).  The presenter completely ran off track and 90% of the discussion was how his team mistakenly used TDD (Test Driven Development), and was unhappy with the results.  Based on his loss of focus we only heard a rushed 10 minute presentation on DBB which was a disservice to the audience. 6.       Practice your presentation with your own small team before you try this on a room full of people you don’t know.  A side benefit of doing this with your own team is that you can get candid feedback from your team and also get kudos for training your own team.  I find I can also turn my presentations into technical white papers and get a third benefit from the work I’ve put into a presentation. 7.       Sharpen your own saw.  Pick a topic that is fairly current.  Something you would like to learn about and would benefit your current career path. 8.       Have fun doing it.

    Read the article

  • Review&ndash;Build Android and iOS apps in Visual Studio with Nomad

    - by Bill Osuch
    Nomad is a Visual Studio extension that allows you build apps for both Android and iOS platforms in Visual Studio using HTML5. There is no need to switch between .Net, Java and Objective-C to target different platforms - write your code once in HTML5 and build for all common mobile platforms and tablets. You have access to the native hardware functions (such as camera and GPS) through the PhoneGap library, UI libraries such as jQuery mobile allow you to create an impressive UI with minimal work. Nomad is still in an early access beta stage, so the documentation is a bit sparse. In fact, the only documentation is a simple series of steps on how to install the plug-in, set up a project, build and deploy it. You're going to want to be a least a little familiar with the PhoneGap library and jQuery mobile to really tap into the power of this. The sample project included with the download shows you just how simple it is to create projects in Visual Studio. The sample solution comes with an index.html file containing the HTML5 code, the Cordova (PhoneGap) library, jQuery libraries, and a JQuery style sheet: The html file is pretty straightforward. If you haven't experimented with JQuery mobile before, some of the attributes (such as data-role) might be new to you, but some quick Googling will fill in everything you need to know. The first part of the file builds a simple (but attractive) list with some links in it: The second part of the file is where things get interesting and it taps into the PhoneGap library. For instance, it gets the geolocation position by calling position.coords.latitude and position.coords.longitude: ...and then displays it in a simple span: Building is pretty simple, at least for Android (I'm not an iOS developer so I didn't look at that feature) - just configure the display name, version number, and package ID. There's no need to specify Android version; Nomad supports 2.2 and later. Enter these bits of information, click the new "Build for Android" button (not the regular Visual Studio Build link...) and you get a dialog box saying that your code is being built by their cloud build service (so no building while away from a WiFi signal apparently). After a couple minutes you wind up with a .apk file that can be copied over to your device. Applications built with Nomad for Android currently use a temporary certificate, so you can test the app on your devices but you cannot publish them in the Google Play Store (yet). And I love the "success" dialog box: Since Nomad is still in Beta, no pricing plans have been announced yet, so I'll be curious to see if this becomes a cost-effective solution to mobile app development. If it is, I may even be tempted to spring for the $99 iOS membership fee! In the meantime, I plan to work on porting some of my apps over to it and seeing how they work. My only quibble at this time is the lack of a centralized documentation location - I'd like to at least see which (if any) features of JQuery and PhoneGap are limited or not supported. Also, some notes on targeting different Android screen sizes would be nice, but it's relatively easy to find jQuery examples out on the InterWebs. Oh well, trial and error! You can download the Nomad extension for Visual Studio by going to their web site: www.vsnomad.com. Technorati Tags: Android, Nomad

    Read the article

  • Stackify featured in the KC Business Journal

    - by Matt Watson
    Very excited to be in the KC Business Journal today. Stackify is focused on giving limited production access to developers to help them do application troubleshooting. We about ready to launch our product and we are looking for beta testers!Ex-VinSolutions exec pours sale proceeds into Stackify, other tech startupsRead the entire article on their website:http://www.bizjournals.com/kansascity/print-edition/2012/06/01/ex-vinsolutions-exec-pours-sale.html

    Read the article

  • Understanding RewriteCond in .htacces files

    - by Paulo Bu
    I'm having problems understanding how RewriteCond directive works. So far, it's pretty clear that it compares to strings to apply a RewriteRule. I have this file: <IfModule rewrite_module> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ app_dev.php </IfModule> This works for me but I don't know why it works. So far in the RewriteCond directive I understand: if the value of REQUEST_FILENAME is NOT a file in the hard drive then allow the rule This doesn't have sense becouse app_dev.php after substituting is a file in the hard drive. Anyways, could someone enlighten me with this issue? I am having a very harsh time figuring out how this works.

    Read the article

  • Exchange server listening on port 25 but clients dont recieve emails

    - by Josh R
    My exchange server is listening on port 25, that is I can telnet into it and send an email but Outlook 2010/2007, OWA, and ActiveSync are not pulling down emails. Outlook 2010 specifically says Connected To Exchange Server and Updating Inbox but it never updates the inbox. Also, OWA shows some of the newer mail messages, but when I double click on one to open it up in OWA, it times out. Any idea what could be causing this? Also Exchange Transport and Information Store are started. Thanks!

    Read the article

  • PSKill does not run from VbScript

    - by David
    We have a site on our local IIS6 Windows 2003 server that occasionally locks up, and we would like a VbScript to kill the process. It is located in the system32 folder. I'm running these tests on the local machine. For simplicity, my VbScript file simply has lines such as these: WScript.Echo "PSKill.exe " & W3WP.ProcessId WshShell.Run "PSKill.exe " & W3WP.ProcessId WScript.Echo "Killed Process" Obtained earlier in the script, W3WP.ProcessId contains the correct process ID. The script outputs to the screen: PSKill.exe 6884 But the line that is supposed to execute the command does nothing. If I type the command in, it works fine. Why does PsKill work fine when I type it, but not from VbScript?

    Read the article

  • Where is org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory for tomcat?

    - by Omnifarious
    On this page: http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html it describes how to set up a JNDI name for a DataSource resource. It tells you that Tomcat's standard data source factory is org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory, but I've searched every single jar file on my system after installing Tomcat on Fedora 17 and I cannot find one that contains this class. Where is it?

    Read the article

  • mod_cache not working

    - by Pistos
    I have a PHP site that has many dynamically generated pages. I'm trying to turn to mod_cache to help boost performance, because in most cases, content does not change in a given day. I have configured mod_cache as best I could, following examples around the web, including the mod_cache page on apache.org. When I set LogLevel debug, I see a bit of information about the caching that is [not] happening. There are plenty of pairs of lines like this: [Fri Jun 01 17:28:18 2012] [debug] mod_cache.c(141): Adding CACHE_SAVE filter for /foo/bar [Fri Jun 01 17:28:18 2012] [debug] mod_cache.c(148): Adding CACHE_REMOVE_URL filter for /foo/bar Which is fine, because I've set CacheEnable disk /foo, to indicate that I want everything under /foo cached. I'm new to mod_cache, but my understanding about these lines is that it just means that mod_cache has acknowledged that the URL is supposed to be cached, but there are supposed to be more lines indicating that it is saving the data to cache, and then later retrieving them on subsequent hits to the same URL. I can hit the same URL till I'm blue in the face, whether with F5 refreshing, or not, or with different browsers, or different computers. It's always that pair of lines that shows in the logs, and nothing else. When I set CacheEnable disk /, then I see more activity. But I don't want to cache the entire site, and there are many, many different subpaths to the site, so I don't want to have to modify code to set no-cache headers in all the necessary places. I'll mention that mod_rewrite is in use here, rewriting /foo/bar to something like index.php?baz=/foo/bar, but my understanding is that mod_cache uses the pre-rewrite URL, not the post-rewrite URL. As far as I can tell, I have the response headers not getting in the way of caching. Here's an example from one hit: Cache-Control:must-revalidate, max-age=3600 Connection:Keep-Alive Content-Encoding:gzip Content-Length:16790 Content-Type:text/html Date:Fri, 01 Jun 2012 21:43:09 GMT Expires:Fri, 1 Jun 2012 18:43:09 -0400 Keep-Alive:timeout=15, max=100 Pragma: Server:Apache Vary:Accept-Encoding mod_cache config is as follows: CacheRoot /var/cache/apache2/ CacheDirLevels 3 CacheDirLength 2 CacheEnable disk /foo What is getting in the way of mod_cache doing its job of caching?

    Read the article

  • Bind9 Debian Not responding

    - by Marc
    Im trying to set up a webserver with Bind9, apache2 on Debian 6. I am trying to learn to do it manualy so I do not have any control panels or anything just the command line. I have a domain name lets call it www.example.com I want a virtual host setup so that I can have multiple websites with different names on my server. I have ns1.example.com and ns2.example.com registered at my servers IP (123.456.789.12). Below is my Bind9 named.conf.options options { directory "/var/cache/bind"; // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. // forwarders { // 0.0.0.0; // }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; }; This is the default I'm not sure if i was supposed to edit it. I didn't. Here is my named.conf.default-zones: // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; }; // be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912 zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; zone "example.com.com" { type master; file "etc/bind/example.com.db"; }; named.conf.local Is an empty file with a comment saying to do local configuration here. example.com.db looks like this: ; BIND data file for mywebsite.com ; $ORIGIN example.com. $TTL 604800 @ IN SOA ns1.example.com. [email protected]. ( 2009120101 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; IN NS ns1.example.com. IN NS ns2.example.com. IN MX 10 mail.example.com. localhost IN A 127.0.0.1 example.com. IN A 123.456.789.12 ns1 IN A 123.456.789.12 ns2 IN A 123.456.789.12 www IN A 123.456.789.12 ftp IN A 123.456.789.12 mail IN A 123.456.789.12 boards IN CNAME www These are all settings I've found from various tutorials. Now when i go to intodns I get: You should already know that your NS records at your nameservers are missing, so here it is again: ns1.example.com ns2.example.com Can someone help me? I'm not sure what Im doing wrong.

    Read the article

  • Puppet: Conditional file source based on naming convention

    - by thinice
    I'm getting the ball rolling on puppet for my environment - and I'd like to have a conditional file resource based on whether or not the module itself contains a file based on a naming convention. So visually, assume a module named 'mysql' and it's layout: mysql/ /files /etc/ my.cnf my.hostname1.cnf my.hostname2.cnf /manifests init.pp ... So I'd like the block to verify if the resource for the module exists or not, and take action accordingly, in pseudo-terms: file { '/etc/my.cnf': if -f 'puppet:///mysql/etc/my.$hostname.cnf' { source => 'puppet:///mysql/etc/my.$hostname.cnf' } else { source => 'puppet:///mysql/etc/my.cnf' } } This way one wouldn't have to manage a csv file or the .pp file with a host specific case statement - is this possible?

    Read the article

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