what is the current state of user authentication? is it good to go with openid or another alternative, or we still have to write our own user/password?
From what time I've spent with threads in Java, I've found these two ways to write threads.
public class ThreadA implements Runnable {
public void run() {
//Code
}
}
//with a "new Thread(threadA).start()" call
public class ThreadB extends Thread {
public ThreadB() {
super("ThreadB");
}
public void run() {
//Code
}
}
//with a "threadB.start()" call
Is there any significant difference in these two blocks of code?
I don't have access to my dev environment, but when I write the below:
interface IExample
void Test (HtmlControl ctrl);
class Example : IExample
{
public void Test (HtmlTextArea area) { }
I get an error stating the methods in the class implementation don't match the interface - so this is not possible. HtmlTextArea is a child class of HtmlControl, is there no way this is possible? I tried with .NET 3.5, but .NET 4.0 may be different (I am interested in any solution with either framework).
Thanks
I'm used to handle graphics with old-school libraries (allegro, GD, pygame), where if I want to copy a part of a bitmap into another... I just use blit.
I'm trying to figure out how to do that in android, and I got very confused.
So... we have these Canvas that are write-only, and Bitmaps that are read-only? It seems too stupid to be real, there must be something I'm missing, but I really can't figure it out.
I have a string which is like this:
this is "a test"
I'm trying to write something in Python to split it up by space while ignoring spaces within quotes. The result I'm looking for is:
['this','is','a test']
PS. I know you are going to ask "what happens if there are quotes within the quotes, well, in my application, that will never happen.
Hi, I want to send the username and password values which user types in html input elements to server to check if the username and password is valid or not when user click login button, using post request in $.ajax(options) method in jquery, but I don't know how to send those username and password to server. What option should I write in $.ajax(options) method to get those values from server?
From the number of questions posted here, it's clear that people have some pretty fundemental issues when getting their heads around pointers and pointer arithmetic.
I'm curious to know why. They've never really caused me major problems (although I first learned about them back in the Neolithic). In order to write better answers to these questions, I'd like to know what people find difficult.
So, if you're struggling with pointers, or you recently were but suddenly "got it", what were the aspects of pointers that caused you problems?
Please advise a php framework for fast developing and for don't digress to write often using code(auth, db/orm,etc..).
Requrements:
Active community
Easy to use
simple many to many and many to one relations
auth. mechanism
RoR like
Please sorry for english.
This is a pretty basic question but... How do you write a url in Latex? The subscripts and everything else make the font look very strange when it compiles.
URL url = new URL("http://www.example.com/comment");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestMethod("POST");
Is
connection.setRequestProperty(key, value);
same as
OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());
writer.write("key=" + value);
writer.close();
if not please correct me .
This is the query to update table in one database that is of other
Update
test.temp a,
test2.temp b
Set a.name=b.name
Where a.no=b.no;
Now I don't want to write every field i.e a.name=b.name
Is there any solution?
In debug | Immediate window, why do i get this error:
szTemp is a local variable at
{,,Util.dll}MySock.Write("%s",szTemp)
CXX0017: Error: symbol "szTemp" not
found
int SomeFunction( ..)
{
char* szSQL = new char[1024];
.
.
---> Breakpoint.. Trying to run the expression here..
.
.
}
Hi, all.
I read django.contrib.sessions.backend.file today, in the save method of SessionStore there is something as the following that's used to achieve multi-threaded saving integrity:
output_file_fd, output_file_name = tempfile.mkstemp(dir=dir,
prefix=prefix + '_out_')
renamed = False
try:
try:
os.write(output_file_fd, self.encode(session_data))
finally:
os.close(output_file_fd)
os.rename(output_file_name, session_file_name)
renamed = True
finally:
if not renamed:
os.unlink(output_file_name)
I don't quite understand how this solve the integrity problem.
I have a package that extends hibernate-default and I would like to use json plugin too, but if I write extends="hibernate-default,json-default" I cannot use hibernate anymore because my session is always null. Why is my session null? If my package extends only hibernate-default session is not null.
How to I redirect to 404 page ("page not found") at preDispatch?
Normally within action I can simply write:
throw new Zend_Controller_Action_Exception('Page is not found!', 404);
And it forwards to the appropriate page. How do I make it work for preDispatch?
I am from a windows background (VC++), and moved to Linux (Ubuntu) about a year ago.
I would like to be able to write simple make files to build the following types of binaries:
A shared library
An executable that links into third party libraries (static and shared libraries)
Create an install section in my makefile (which can then be used my checkinstall)
Hi.
I want to retrieve all hashtags from a tweet using a PHP function.
I know someone asked a similar question here, but there is no hint how exactly to implement this in PHP. Since I'm not very familiar with regular expressions, don't know how to write a function that returns an array of all hashtags in a tweet.
So how do I do this, using the following regular expression:
#\S*\w
I have two variable TO_DATE and FROM_DATE. My table has two fields DOJ and DOL. I want to select all the records whose DOJ < TO_DATE and DOL FROM_DATE.
How can i write an SQL query in for this??
Reading online about this topic is confusing. Is there a way to cut around the history, politics and technicalities to answer the question: Which standard should I refer to when I write code to generate feeds?
I want to use UTF-8 encoding, which may affect the choice. Otherwise I'm most interested in compatibility with a decent range of readers.
Write an iterative program that finds the largest number of McNuggets that cannot be bought in exact quantity. Your program should print the answer in the following format (where the correct number is provided in place of n):
"Largest number of McNuggets that cannot be bought in exact quantity: n"
There is a single WCF connection using TCP. Two threads on the server write to this connection consecutively. Is it always guaranteed that the first message gets processed by the client first? According to my understanding it should be guaranteed.
Since there is for almost everything a module and it is repeatedly said that we should not reinvent the wheel and since I do not write modules for cpan I have no need to use OO.
But my question is, is professional Perlcode mainly written in OO-style?
So, I would like to write something like this:
var d = new ImmutableDictionary<string, int> { { "a", 1 }, { "b", 2 } };
(using ImmutableDictionary from System.Collections.Immutable). It seems like a straightforward usage as I am declaring all the values upfront -- no mutation there. But this gives me error:
The type 'System.Collections.Immutable.ImmutableDictionary<TKey,TValue>' has no constructors defined
How I am supposed to create a new immutable dictionary with static content?
I remember when I was developing in C++ or Java, the compiler usually complains for unused methods, functions or imports. In my Django project, I have a bunch of Python files which have gone through a number of iterations. Some of those files have a few lines of import statement at the top of the page and some of those imports are not used anymore. Is there a way to locate those unused imports besides eyeballing each one of them in each file?
All my imports are explicit, I don't usually write from blah import *