Daily Archives

Articles indexed Saturday May 29 2010

Page 29/76 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • How to enable and use HTTP PUT and DELETE with Apache2 and PHP?

    - by Andreas Jansson
    Hi, It should be so simple. I've followed every tutorial and forum I could find, yet I can't get it to work. I simply want to build a RESTful API in PHP on Apache2. In my VirtualHost directive I say: <Directory /> AllowOverride All <Limit GET HEAD POST PUT DELETE OPTIONS> Order Allow,Deny Allow from all </Limit> </Directory> Yet every PUT request I make to the server, I get 405 method not supported. Someone advocated using the Script directive, but since I use mod_php, as opposed to CGI, I don't see why that would work. People mention using WebDAV, but to me that seems like overkill. After all, I don't need DAV locking, a DAV filesystem, etc. All I want to do is pass the request on to a PHP script and handle everything myself. I only want to enable PUT and DELETE for the clean semantics. Thanks, Andreas

    Read the article

  • Getting started with Qt4: which book to read?

    - by Pieter
    I'm trying to learn Qt4. I have written code in C, C#, Python, PHP, Java and JavaScript before, but not in C++. Is there a book on Qt4 that you can recommend me? I've found some books I might like, but they're a little on the expensive side. I'm not ready to commit to Qt before I've played with it for a while, so I'd prefer to keep it under 30 bucks. I will accept the answer that gets the most up votes.

    Read the article

  • Android Cannot execute setListAdapter() user thread.

    - by Ameya
    I got a class class MyClass extends ListActivity implements Runnable{ ArrayList array; onCreate(){ Thread thread = new Thread(this); hread.start(); } @Overriding void run(){ addAnElement(); } void addAnElement(){ if(null==array) array=new ArrayList(); array.add("Some junck string"); this.setListAdapter(.....,array); } } on executing in emulator get error ERROR/AndroidRuntime(288): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. I know we cannot access UI calls from user thread. Can anyone help.

    Read the article

  • Select multiple records from sql database table in a master-detail scenario

    - by Trex
    Hello, I have two tables in a master-detail relationship. The structure is more or less as follows: Master table: MasterID, DetailID, date, ... masterID1, detailID1, 2010/5/1, .... masterID2, detailID1, 2008/6/14, ... masterID3, detailID1, 2009/5/25, ... masterID4, detailID2, 2008/7/24, ... masterID5, detailID2, 2010/4/1, ... masterID6, detailID4, 2008/9/16, ... Details table: DetailID, ... detailID1, ... detailID2, ... detailID3, ... detailID4, ... I need to get all the records from the details table plus the LAST record from the master table (last by the date in the master table). Like this: detailID1, masterID1, 2010/5/1, .... detailID2, masterID5, 2010/4/1, ... detailID3, null, null, ... detailID4, masterID6, 2008/9/16, ... I have no idea how to do this. Can anybody help me? Thanks a lot. Jan

    Read the article

  • Applying a style to border on items in the gallery view

    - by iTom
    Hello World! Is their any way to apply a style resource to customize the Item Border in the Gallery Class with Android? I'm trying to hide or change the color of the default Grey border but by the looks of things this isn't possible? Any help or tips you can provide would be fantastic. Appreciated, Tom

    Read the article

  • jQuery form check - iframe content check empty

    - by Henry
    Please check out the comment field at the bottom on http://tinyurl.com/3xow97t in Firefox - it works pretty well - the red warning gets added if empty and the submit gets disabled - once there is text inside, the submit gets re-enabled. the problem i have now, it does not work in IE. i really hope somebody can help. the iframe contents checks are inside: modules/editor/scripts/global.js

    Read the article

  • Specifying Language for a grammar

    - by darkie15
    Hi All, Is there any specific methodology followed to specify a language for given grammar ?? i.e. Is it necessary to run all the production rules given in a grammar to determine the language it represents? I don't have an example as such since the one I am working on is a homework question. Regards, darkie15

    Read the article

  • Opening a file in c++ by using a string array of adress

    - by muhammad-aslam
    Hello guYz plz help me out in making it possible to open the files by the adress provided in an array of strings......... a way to open file is as given below... ifstream infile; infile.open("d:\aslam.txt"); but how can i open file providing an array of string as an adress of file..... like this infile.open(arr[i]); (but its not working) plz help me.........

    Read the article

  • WPF DataGrid button style

    - by imekon
    If I have a DataGrid in a XAML form, and add the following style: <Style TargetType="Button"> <Setter Property="Margin" Value="2"/> </Style> The data grid locks up the application. I found if I put the style into a resource block that isn't seen by any data grid, then it seems to be happy. However, if I want to have the style above applied to all buttons on my window, I have to put it in various resource blocks that cannot be seen by the data grid. Is there any way to avoid this?

    Read the article

  • SVN : how to change hostname?

    - by elon
    I'd like to sep up SVN repo on local machine. But we already have apache running under localhost. When I use instalator form subversion site with apache option it installs another apache and when I type "localhost" in browser I see this new apache (not the old one). Question is how to run this new apache under other host name. When installing it asks about it, so I set different name, but it still works under localhost (nothing happens). I'd like to have access to svn via URL e.g. "svnrepo" not "localhost". What can I do about it? Which lines of config should be changed (and/or what's more should be changed?) Another way I'm thinking of to solve this problem is to integrate this svn-apache module with mine apache. But still I don't really know how to do it (my apache is 2.2.6)

    Read the article

  • Javascript and Twitter API rate limitation? (Changing variable values in a loop)

    - by Pablo
    Hello, I have adapted an script from an example of http://github.com/remy/twitterlib. It´s a script that makes one query each 10 seconds to my Twitter timeline, to get only the messages that begin with a musical notation. It´s already working, but I don´t know it is the better way to do this... The Twitter API has a rate limit of 150 IP access per hour (queries from the same user). At this time, my Twitter API is blocked at 25 minutes because the 10 seconds frecuency between posts. If I set up a frecuency of 25 seconds between post, I am below the rate limit per hour, but the first 10 posts are shown so slowly. I think this way I can guarantee to be below the Twitter API rate limit and show the first 10 posts at normal speed: For the first 10 posts, I would like to set a frecuency of 5 seconds between queries. For the rest of the posts, I would like to set a frecuency of 25 seconds between queries. I think if making somewhere in the code a loop with the previous sentences, setting the "frecuency" value from 5000 to 25000 after the 10th query (or after 50 seconds, it´s the same), that´s it... Can you help me on modify this code below to make it work? Thank you in advance. var Queue = function (delay, callback) { var q = [], timer = null, processed = {}, empty = null, ignoreRT = twitterlib.filter.format('-"RT @"'); function process() { var item = null; if (q.length) { callback(q.shift()); } else { this.stop(); setTimeout(empty, 5000); } return this; } return { push: function (item) { var green = [], i; if (!(item instanceof Array)) { item = [item]; } if (timer == null && q.length == 0) { this.start(); } for (i = 0; i < item.length; i++) { if (!processed[item[i].id] && twitterlib.filter.match(item[i], ignoreRT)) { processed[item[i].id] = true; q.push(item[i]); } } q = q.sort(function (a, b) { return a.id > b.id; }); return this; }, start: function () { if (timer == null) { timer = setInterval(process, delay); } return this; }, stop: function () { clearInterval(timer); timer = null; return this; }, empty: function (fn) { empty = fn; return this; }, q: q, next: process }; }; $.extend($.expr[':'], { below: function (a, i, m) { var y = m[3]; return $(a).offset().top y; } }); function renderTweet(data) { var html = ''; html += ''; html += twitterlib.ify.clean(data.text); html += ''; since_id = data.id; return html; } function passToQueue(data) { if (data.length) { twitterQueue.push(data.reverse()); } } var frecuency = 10000; // The lapse between each new Queue var since_id = 1; var run = function () { twitterlib .timeline('twitteruser', { filter : "'?'", limit: 10 }, passToQueue) }; var twitterQueue = new Queue(frecuency, function (item) { var tweet = $(renderTweet(item)); var tweetClone = tweet.clone().hide().css({ visibility: 'hidden' }).prependTo('#tweets').slideDown(1000); tweet.css({ top: -200, position: 'absolute' }).prependTo('#tweets').animate({ top: 0 }, 1000, function () { tweetClone.css({ visibility: 'visible' }); $(this).remove(); }); $('#tweets p:below(' + window.innerHeight + ')').remove(); }).empty(run); run();

    Read the article

  • Visual NHibernate Update

    - by Ricardo Peres
    I have previously talked about Visual NHibernate. It has grown since last time, now offering support for multiple databases (SQL Server, Oracle, MySQL, PostgreSQL, Firebird), generates projects from existing databases or from existing Visual Studio projects and produces XML or Fluent mappings, to name just a few. To me it is by far the most interesting tools for working with NHibernate I know of (granted, I haven't tried NHibernate Profiler). For a limited period, Slyce Software is offering a 30% discount, until the final version is released, so you may want to have a look. Please note that I am in no way related to Slyce, but made some feature requests which have been implemented (thanks, Gareth!).

    Read the article

  • Writing the tests for FluentPath

    - by Latest Microsoft Blogs
    Writing the tests for FluentPath is a challenge. The library is a wrapper around a legacy API (System.IO) that wasn’t designed to be easily testable. If it were more testable, the sensible testing methodology would be to tell System.IO to act against Read More......(read more)

    Read the article

  • SQL03070: This statement is not recognized in this context

    - by prash
    Recently I have started working with VS2010 and Fx4. There have been various challenges. We also introduced a new Database Project in our solution. And found this error. The reason for this error is: the project system expects the stored procedure as a create statement only.  The additional statements to drop if existing are not necessary within the project system.  Project deployment takes care of detecting if the sproc already exists and if it needs to be updated. To resolve this error you can simply remove the additional statements other then your create SP, Function etc. OR Exclude the file from build. Right Click on your file in Solution Explorer, Click Properties > Build Action > Not in Build

    Read the article

  • Does AutoSproc Scale Well?

    - by nickyt
    We use AutoSproc as our DAL, not my choice, but it was there when I started working at my job. I was wondering if any one had any experience using AutoSproc with large web applications? I'm just curious if it would scale well as our application is growing and we might need to pop it into a web farm at some point. If it doesn't scale well, what would you suggest then since there are several options out there. Any info is greatly appreciated.

    Read the article

  • jquery slide toggle divs without creating multiple classes, functions, etc... ui accordion

    - by SPE
    Greetings, based on the jquery ui accordion I'm using, I have added a slide toggle to my accordion list items. so what happens is I click on an li and a div slides down underneath to reveal more content. The issue I'm having is that I find myself having to create multiple id's to reference the slidetoggle. example of the div id css: #panel, #panel2, #panel3, #panel4, etc.... the Is there a way I can use the slide toggle without having to adding another number so it will slide? I have 50 list items I'm using: Here's a sample of the js (as you can see where I'm going with this): $(".btn-slide").click(function(){ $("#panel").slideToggle("slow"); $(this).toggleClass("active"); return false; }); $(".btn-slide2").click(function(){ $("#panel2").slideToggle("slow"); $(this).toggleClass("active"); return false; }); sample html: <li><div class="slide"><a href="#" class="btn-slide">One</a></div><div id="panel"></div></li> <li><div class="slide"><a href="#" class="btn-slide2">Two</a></div><div id="panel2"></div></li>

    Read the article

  • Nonblocking texture upload on iPhone and other OpenGL ES platforms

    - by spurserh
    Hello, I am doing some work which involves drawing video frames in real time in OpenGL ES. Right now I am using glTexImage2D to transfer the data, in the absence of Pixel Buffer Objects and the like. A below answer suggests that glTexImage2D is always blocking, even if texture object referenced does is not used for any drawing. Is there a way to do a nonblocking texture upload with OpenGL ES (any version)? Thank you very much, Sean

    Read the article

  • PHP & MySQLi timeout

    - by Dt7
    Whenever I try to create a mysqli object, as in; $mysqli = new mysqli(host, user, pass, table); ...the page just loads for around a minute, then stops, showing all the content of the page up until that line. info() says that MySQLi (and MySQL if that matters) are enabled, and I can access the MySQL CLI. I'm also working on a local machine, not a remote server. I feel like I've missed something obvious. Can anyone shed some light on it? Edit: just for clarification, I am actually putting real values into the mysqli constructor :)

    Read the article

  • Update gridview from code behind in asp.net

    - by Zerotoinfinite
    Hi Experts, I have gridview in my asp.net 3.5 application [C#]. Which looks like this: AutoGenerateDeleteButton="true" DataKeyNames="studentId" runat="server" OnRowEditing="GridView1_RowEditing" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowUpdating="GridView1_RowUpdating" onpageindexchanging="GridView1_PageIndexChanging" onrowupdated="GridView1_RowUpdated" <EmptyDataTemplate> <asp:Label ID="lblNoRecord" runat="server" Text="No Record Found" ForeColor="Red"></asp:Label> </EmptyDataTemplate> </asp:GridView> Now, In rowUpdating event, I am writing the below code: protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { int mytext = Convert.ToInt16(GridView1.Rows[e.RowIndex].Cells[1].Text); string cConatiner = GridView1.Rows[e.RowIndex].Cells[4].Text; } In this, myText is giving me the correct value, i.e. of the 1st column but when I am changing the cell value to 1,2,3,4,5,6 I am getting empty. Am I doing it incorrectly ? Please help me. Thanks in advance.

    Read the article

  • Linux - specific API reference

    - by Goofy
    Hello! Where can I find centralized and complete documentation aboput Linux - specific API? I'm preparing Linux port of my application and i want to use as much Linux - specific features as it's possible. So far I found that Linux provide epoll and inotify API, which are great news for me, because my program works as network server and monitor local file systems.

    Read the article

  • problem in using while loop in php&mysql

    - by Mac Taylor
    hey guys im using a while loop to show my latest forum topics now i need to count some fields either I'm trying to do it in one query and here is my code : $result = $db->sql_query("SELECT t.*,p.*, SUM(t.topic_approved='1') AS Amount_Of_Topics, SUM(t.topic_views) AS Amount_Of_Topic_Views, SUM(t.topic_replies) AS Amount_Of_Topic_Replies, SUM(p.post_approved ='1') AS Amount_Of_Posts FROM bb3topics t left join bb3posts p ON t.topic_id=p.topic_id ORDER BY t.topic_last_post_id DESC LIMIT 10 " ); while( $row = $db->sql_fetchrow($result) ) { problem : this code shows only one forum topic and not the rest , but if i remove sum() part from it , then it shows the rest is there anything wrong with my query code ?!

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >