In FTP, when I mget *, it only gets file with extension *.xxx and ignores those files without any extension, e.g. file name ACC001.
How can I get those files without extension?
I have a select and query like below...
$sql = "SELECT *
FROM notifications
WHERE to_id='".$userid."'
AND (alert_read != '1' OR user_read != '1')
ORDER BY alert_time DESC";
$result = mysql_query($sql);
how do I test how long the query took to run?
Hi,
I am doing some unit testing for a DAO that works with postgresql. Some of the SQL queries that my DAO uses involve the DATE function. Is there an in-memory database that supports functions similar to the ones that postgresql does?
Currently I am looking for support for the DATE function however, I obviously can see myself using other…
Let's consider a WPF client-server application.
What is the best practice to create the client, so that every time it is launched, it checks for updates and if any available, update the client application?
I have a VS 2008 web application project that is getting large. My structure looks like:
- WebRoot
- Common/
- Foo/
- Bar/
- Baz/
so I end up with a single Webroot.dll that contains the code for common, foo, bar, and baz. Is it possible to set it so that I end up with common/ in webroot.dll, and code in foo ends up in foo.dll,…
Some of my AngularJS routes are to pages which require the user to be authenticated with my API. In those cases, I'd like the user to be redirected to the login page so they can authenticate. For example, if a guest accesses /account/settings, they should be redirected to the login form.
From brainstorming I came up with listening for the…
So I have a subclass of UITableViewController that loads some data from the internet and uses MBProgressHUD during the loading process. I use the standard MBProgressHUD initialization.
HUD = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:HUD];
HUD.delegate = self;
HUD.labelText = @"Loading";
…
How to sort a map(?,B) on the values in Java with google collections ordering function, if B is a class, which has a field of type double, which should be used for ordering.
I am currently designing a forum as a personal project. One of the recurring issues I've come across is database queries in loops. I've managed to avoid doing that so far by using table joins or caching of data in arrays for later use.
Right now though I've come across a situation where I'm not sure how I can write the code in such a…
I'm trying to set up custom UITableViewCells. I can set the backgroundView no problem, but if I set selectedBackgroundView, the cell's background becomes white and only the selected background is seen:
- (void) createCell: (UITableViewCell*)cell onRow: (NSUInteger)row
{
UIImageView* bgImage = [[UIImageView alloc]…
Hello,
Lets assume i have 2 methods 1 that places a element on the array and one that removes it.
const int Max = 10;
int[] table= new int[Max];
I would like to call it up like this:
s1.Place(5); // 5 0 0 0 0 0 0 0 0 0 0
s1.Place(9); // 5 9 0 0 0 0 0 0 0 0 0
s1.Remove(9); // 5 0 0 0 0 0 0 0 0 0 0
I…
Currently I'm creating an web based (= JavaScript) application thata is using a lot of "points" (= small, fixed size vectors). There are basically two obvious ways of representing them:
var pointA = [ xValue, yValue ];
and
var pointB = { x: xValue, y: yValue };
So translating my point a bit would look like:
…
I've been looking into JOIN, subqueries and other ways of doing this, but I can't work out the best way to do this is...
I have a table (ps_category_product):
id_product, id_category
I want to perform a query on it like:
SELECT id_product FROM ps_category_product WHERE id_category='$this_cat'
BUT, I only want…
I am trying to create a UIImageView called theImageView in the touchesBegan method that I can then then move to a new location in touchesMoved. Currently I am receiving an "undeclared" error in touchesMoved where I set the new location for theImageView.
What can I do to keep theImageView in memory between these…
I have a ListView in WPF, and I want to hide the headers for the ListView when the List the ItemsSource is bound to is null, and display the headers when the ItemsSource is not null and has at least 1 item in the collection. I have found the code online to hide the ListView headers like this:
…
I cannot figure out what is wrong with the XPATH when trying to extract a value from a webpage table. The method seems correct as I can extract the page title and other attributes, but I cannot extract the third value, it always returns an empty list?
from lxml import html
import requests
…
What is the best way to queue background processes in PHP...
Zend's job queue seems very nice but I am not able to switch to zend server what are the alternatives for doing this?
Say I have a Sinatra route ala:
put '/data' do
request.body.read
# ...
end
It appears that the entire request.body is read into memory. Is there a way to consume the body as it comes into the system, rather than having it all buffered in Rack/Sinatra beforehand?
I see I can do this…
So basically, the print functionality does not work by default in Joomla but I've fixed that with some code modifications. However, this functionality is only available in the articles. I have a blog component and I need to make the print button available in the blog entries too
Does…
All the recent VisualSVN Server posts made me want to check it out. I have SVN running right now through Apache, but I'd like to try out VisualSVN Server, mostly for the active directory integration. Their docs don't describe whether you can easily migrate an existing repository. …
How can I do this better (so it actually works : )
I have a LINQ Query that includes an order by that is based on a user preference. The user can decide if they would like the results ordered asc or desc.
If fuserclass.SortOrder = "Ascending" Then
Dim mydat = (From c In…
I have a database project that goes through iterations (only one so far) and I need to deploy a testing version to a live server. I'm not sure how to go about this.
I can make all the changes in a copy and then remake those changes in the live version. That doesn't make…
I'd like to create a simple webservice in scala similar to:
http://www.artima.com/lejava/articles/threeminutes.html
Is there an easy way to do this?
EDIT: I found a tutorial for lift http://wiki.liftweb.net/index.php/HowTo_do_Web_Services. However this seems to be way…
If you could remove one feature from PHP so as to discourage, prevent or otherwise help stop newer programmers develop bad habits or practices, or, to stop them falling into traps that might hinder their development skills what would it be and why?
Now, before the votes…