I have seen that SL4 support drag and drop from the desktop to the application, but is it possible to drag and drop from the application to the desktop ?
Thanks,
I'm developing a Rails application and within that application I developed a Rake task that will read entries from a file and store them into the DB. Producing the code was no problem, but I'd like to know, where do I place the file that is read? Is there a convention for that, if yes, what is it?
I know I could have used the seed.rb file but is it ok, by the standards, to load and read a file from there?
Thanks in advance!
Hi there,
I have a php site that lets registered users login (with a valid passord) and sets up a session based on their UserID. However I'm pretty sure thisis being hijacked and I've found "new" files on my server I didn't put there. My site cleans all user input for SQL injections and XSS but this keeps happening. Has anyone got any ideas on how to solve this?
I have built PHP based "health check" scripts for several projects, but they were always custom-made for the occasion and not written for abstraction as an independent product. I would like to know whether such a solution exists.
What I meam by "health check" is a protected web page that functions much like a suite of unit tests, but on a more operational level, showing red/yellow/green statuses for things like
Are the cache directories writable?
Is the PHP version correct, are required extensions installed?
Is the configuration file protected from writing?
Is the database server reachable?
Do the key tables exist in the database?
Is there enough disk space available?
Is the site's front page reachable and renders fully ( = no PHP errors)?
Do the project's libraries' MD5 checksums match the original ones?
Do you do this - or parts of it - in your applications and web sites?
Are there any standardized tools for this that bring along all the functionality to perform the tests (ideally as plugins), and just need to be configured accordingly?
Is there a way to set this up using one of the Unit Testing frameworks available for PHP (preferably PHPUnit)? If so, do you know any resources / tutorials outlining how?
I have:
L1 = ['11', '10', '13', '12', '15', '14', '1', '3', '2', '5', '4', '7', '6', '9', '8']
this is a list of strings, right?
I need to make it a list of integers as follows:
L2 = [11, 10, 13, 12, 15, 14, 1, 3, 2, 5, 4, 7, 6, 9, 8]
finally I will sort it like below:
L3 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] by L2.sort()
please let me know how I can get to L3 from L1
If I have systems that are based on realtime data, how can I ensure that all the information that is current is redundantly stored in a file? So that when the program starts again, it uses this information to initialize itself back to where it was when it closed.
I know of xstream and HSQLDB. but wasn't sure if this was the best option for data that needs to be a literal carbon copy.
Hello there,
As you may know, res.sendRedirect(url) on the servlet side does not work because the GWT client does not process it.
Does anybody knows how to do this?
Thanks you.
Daniel
I don't understand what problem these frameworks solve. Are they replacements for a HTTP server like Apache HTTPD, Tomcat, Mongrel, etc? Or are they more? Why might I use them... some real world examples? I've seen endless examples of chat rooms and broadcast services, but don't see how this is any different than, for instance, setting up a Java program to open sockets and dispatch a thread for each request.
I think I understand the non-blocking I/O, but I don't understand how that is any different than a multi-threaded web server.
Is there a way to have models for each module? I have 3 modules, one is a "contacts" module.
I created a model for it in modules/contacts/models/Codes.php
Codes Controller
class Contacts_CodesController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
$this->view->messages = $this->_helper->flashMessenger->getMessages();
}
public function indexAction()
{
$codesTable = new Contacts_Model_Codes();
}
Codes Model:
class Contacts_Model_Codes extends Zend_Db_Table
{
protected $_name = 'codes';
}
The error I get:
Fatal error: Class 'Contacts_Model_Codes' not found in /Applications/MAMP/htdocs/zf_site/application/modules/contacts/controllers/CodesController.php on line 26
thanks
Hey
is there any way to send whats in a text view (im trying to make a suggestion box) to my email address?
example
user types in the box " I think you should add twitter support"
then that is sent in the background to my email address [email protected]
then a message is popped up on the screen saying "suggestion sent"
just an example of what i mean
Any ideas, tutorial links would be greatly appreciated guys
Thanks
Seems a great C++ unit testing framework. I'm just wanting something a bit more sophisticated than the console output for running the test, also something that makes it really easy to run specific tests (since gtest supports all kinds of test filtering)
If there is nothing, I'll probably roll my own
I've got an team (eveningRoster) that I'm making a button add employees to.
The team is really a relationship to that night's event, but it's represented with an AC.
I wanted to make sure an employee did not belong to the team before it adds, so I added a method to MyDocument to check first. It seems to work, the error logs complete, but after I've added a member, the next time I click anything, the program crashes. Any guesses why? Here's the code:
-(IBAction)playsTonight:(id)sender
{
NSArray *selection = [fullRoster selectedObjects];
NSArray *existing = [eveningRoster arrangedObjects];
//Result will be within each loop.
BOOL result;
//noDuplicates will stay YES until a duplicate is found.
BOOL noDuplicates = YES;
//For the loop:
int count;
for (count = 0; count < [selection count]; count++){
result = [existing containsObject:[selection objectAtIndex:count]];
if (result == YES){
NSLog(@"Duplicate found!");
noDuplicates = NO;
}
}
if (noDuplicates == YES){
[eveningRoster addObjects:[fullRoster selectedObjects]];
NSLog(@"selected objects added.");
[eveningTable reloadData];
NSLog(@"Table reloaded.");
}
[selection release];
[existing release];
return;
}
From the documentation of UITableView / UITableViewController:
If you decide to use a
UIViewController subclass rather than
a subclass of UITableViewController to
manage a table view, you should
perform a couple of the tasks
mentioned above to conform to the
human-interface guidelines.
To clear
any selection in the table view before
it’s displayed, implement the
viewWillAppear: method to clear the
selected row (if any) by calling
deselectRowAtIndexPath:animated:.
After the table view has been
displayed, you should flash the scroll
view’s scroll indicators by sending a
flashScrollIndicators message to the
table view; you can do this in an
override of the viewDidAppear: method
of UIViewController.
So lets say I do my custom stuff here and I do not flash the scroll indicator, and I do not reset the selection (which I think is wrong anyways, the user wants to know from where he came from). Will they reject it?
Hi, this is a pretty basic question but I'm not entirely clear how to do this.
I am trying to use a third-party service that has RESTful service. The service is called Postful. But I'm not clear what exactly to do?
http://www.postful.com/service/mail is one of the services, but to upload an image I have to post the following (but I'm not sure how I actually do this?). Thanks!
> http://www.postful.com/service/upload
>
> Be sure to include the Content-Type
> and Content-Length headers and the
> image itself as the body of the
> request.
>
> POST /upload HTTP/1.0 Content-Type:
> application/octet-stream
> Content-Length: 301456
>
> ... file content here ...
>
> If the upload is successful, you will
> receive a response like the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <upload>
> <id>290797321.waltershandy.2</id>
> </upload>
I tried to upload files via FTP but ran into problems. Are modern day browsers no longer supporting FTP "write" capability? I managed to use Dreamweaver to FTP the files successfully.
I'm wondering if anyone has insight into this... when releasing an update of an iPhone application, should I expect the approval process to take longer if I submit something that's declared as a major version update (as compared to a minor version)?
Last time around (about the time the big Facebook-update was released) our wait time for a minor version review was 21 days (16 working days).
I am planning the implemention an Inheritance Mapper pattern for an application component
http://martinfowler.com/eaaCatalog/inheritanceMappers.html
One feature it needs to have is for a domain object to reference a large list of aggreageted items (10,000 other domain objects)
So I need some kind of lazy loading collection to be passed out of the aggregate root domain object to other domain objects.
To keep my (php) model scripts organised i am storing them in two folders:
MyComponent\
controllers\
models\
domain\ <- domain objects, DDD repository, DDD factory
daccess\ <- PoEAA data mappers, SQL queries etc
views\
But now I am racking my brains wondering where my lazy loading collection sits.
Any suggestions / justifications for putting it in one place over another another?
DDD = Domain Driven Design Patterns, Eric Evans - book
PoEAA = Patterns of Application Architecture Patterns, Martin Fowler - book
I have a class library(DLL) which has a web reference, its dynamic.
I have copied the setting into the applicationSettings of the web.config but still it keeps referring to the old URI I had set during develoment.
any idea how i can make it take the URI of the web-service from the web.config?
If you have a handle to a Spinner object in an Android activity, can you programmatically pop open the spinner options - thereby forcing the user to choose an option even though they did not click on the spinner themselves?
Here's my requirement:
I often receive calls from unidentified numbers on my mobile phones. I would like an application which would use a reference list like this, and show me the carrier name and the area of origin along with the number on screen.
Mobile make : Sony Ericsson
Model : C902
Operating System: Propreitary
J2ME: MIDP 2.0
Here are my questions:
Is it possible to do something like this? I have installed a lot of java apps on my mobile, and all of them have to be launched seperately, can be run in the background, but they never seem to access anything native.
If it is possible, which area of J2Me should I start with, for creating an application that achieves the above requirement?
If it is not possbile, what are my alternatives?
I was running myapp on an iPod touch and I noticed it missed some libraries. Is that the reason?
[Session started at 2010-03-19 15:57:04 +0800.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1128) (Fri Dec 18 10:08:53 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys007
Loading program into debugger…
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-237-78
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running…
[Switching to thread 11779]
[Switching to thread 11779]
sharedlibrary apply-load-rules all
(gdb) continue
warning: Unable to read symbols for "/Library/MobileSubstrate/MobileSubstrate.dylib" (file not found).
2010-03-19 15:57:18.892 myapp[2338:207] MS:Notice: Installing: com.yourcompany.myapp [myapp] (478.52)
2010-03-19 15:57:19.145 myapp[2338:207] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Backgrounder.dylib
warning: Unable to read symbols for "/Library/MobileSubstrate/DynamicLibraries/Backgrounder.dylib" (file not found).
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/usr/lib/libsubstrate.dylib" (file not found).
MS:Warning: message not found [myappAppDelegate applicationWillResignActive:]
MS:Warning: message not found [myappAppDelegate applicationDidBecomeActive:]
2010-03-19 15:57:19.550 myapp[2338:207] in FirstViewController
2010-03-19 15:57:20.344 myapp[2338:207] in load table view
2010-03-19 15:57:20.478 myapp[2338:207] in loading splash view
2010-03-19 15:57:22.793 myapp[2338:207] in set interface
Program received signal: “0”.
warning: check_safe_call: could not restore current frame
Which model should I use, if my First view in Login view (NO Tab required) and then all other views are under Tab Bar.
So as a rule should I create Navigation based template coz First view uses only Navigation not Tab Bar or is there any other way around?
Please suggest
First Screen with Nav bar in Top (MUST Needed)
Second Screen Tab Bar view:
The tutorial that I'm trying to figure out is this:
http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/
The username field looks like this:
<input value="" class="validate[required,custom[noSpecialCaracters],length[0,20],ajax[ajaxUser]]" type="text" name="user" id="user" />
That <input> field has a class item named ajax[ajaxUser] which has its rules contained in this script (jquery.validationEngine-en.js).
The snippet for that item looks like this:
"ajaxUser":{
"file":"validateUser.php",
"extraData":"name=eric",
"alertTextOk":"* This user is available",
"alertTextLoad":"* Loading, please wait",
"alertText":"* This user is already taken"},
What I can't figure out at all is how its PHP page is working which is validateUser.php. Where are all those post fields coming from? I looked around and can't find a field with those names.
Thanks