Twisted has a "non-blocking" event loop.
I understand what a blocking event loop does (sort of, from the Wikipedia page) but can't figure out how a non-blocking one does.
I got a pdf viewer in a uiwebview, from Daniel Barry http://github.com/danberry/PDF-Viewer and it works really well, it displays a pdf doc that you can scroll up and down.
Now I would like to display just one page at the time and also have a menu underneat the pdf page with a prev and next button. Can anybody help a newbe to figure out how?
Thanks!
I have a table like
Employee
==================
name salary
==================
a 10000
b 20000
c 5000
d 40000
i want to get all the employee whose salary is greater than A's salary.
I don't want to use any nested or sub query.
It has been asked in an interview and hint was to use self join. I really can't figure out how to achieve the same.
Well basically I've got a vb.net script connecting to IRC, and I'm working on making it a basic chat system, but I've run into a problem.
Say I receive this:
:[email protected] PRIVMSG #channel :message
I want to grab specific information to output to the user.
I want to grab nickname and message
How can I go about doing this?
I thought about using regex, but I can't figure out how to make regex grab message since there's nothing after it.
In my MySQL database, I have the following column type.
Field | Type | Null |
----------------------------------
Column_priv | set('Select','Insert','Update','References') | No |
And I cannot figure out what to map this to.
Can anyone tell me how I can map this to something?
When at the pdb console, entering a statement which causes an exception results in just a single line stack trace, e.g.
(Pdb) someFunc()
*** TypeError: __init__() takes exactly 2 arguments (1 given)
However I'd like to figure out where exactly in someFunc the error originates. i.e. in this case, which class __init__ is attached to.
Is there a way to get a full stack trace in Pdb?
I'm trying to use the Html.DropDownList extension method but can't figure out how to use it with an enumeration.
Let's say I have an enumeration like this:
public enum ItemTypes
{
Movie = 1,
Game = 2,
Book = 3
}
How do I go about creating a dropdown with these values using the Html.DropDownList extension method? Or is my best bet to simply create a for loop and create the html elements manually?
Hi,
I have the following repository layout:
master branch (production)
integration
working
What I want to achieve is to cherry pick a range of commits from the working branch and merge it into the integration branch. I pretty new to git and I can't figure out how to exactly do this (the cherry picking of commit ranges in one operation not the merging) without messing the repository up. Any pointers or thoughts on this? Thanks!
I've read this question to figure out how to set float:none on an element which already has float:right set with class.
I used element.style.cssFloat = "none", but this just added a new style property cssFloat which didn't over-ride the existing float:right. I've now fixed it using the adding/removing classes method.
But is there a way of over-riding existing float rules in ie without having to use classes?
Hello,
I'd like to rewrite:
www.example.com/file.html?username=john&number=1234
To:
www.example.com/users/john
But I can't figure out how to extract the "username" value from the query string. I've been Googling this all morning and reading the official docs but no luck. I need to solve this problem with a rewrite, rather than changing the application.
Any help much appreciated!
Rangi
i noticed there are a bunch of test_case.rb files delivered in the rails components:
./actionmailer-2.3.5/lib/action_mailer/test_case.rb
./actionpack-2.3.5/lib/action_controller/test_case.rb
./actionpack-2.3.5/lib/action_view/test_case.rb
./activerecord-2.3.5/lib/active_record/test_case.rb
./activesupport-2.3.5/lib/active_support/test_case.rb
i am wondering how to execute these files. I cant seem to figure out how to do it?
Windows 7 computer running SQL Server Express 2008 (sp1).
When I try to run net start mssql$sqlexpress I receive an error:
System error 5 has occurred.
Access is denied
The SQL service is running under "Network Service" account
The service starts fine if I use the services window. Could somebody help me figure out why I am receiving this error?
On win32, using winapi, is there anyway to know which comports (from com0 upwards) actually exist as devices?
At the moment I am just attemping to open them all (0 to 9), but I can't figure out the difference of failure between one not existing, and one not simply being available for use because someone else is using it. Both situations seem to return the same last error, so I was wondering if I could list all the comports available on the system.
I'm trying to figure out how to use HTTPClient (org.eclipse.jetty.client.HttpClient) so it will pipeline HTTP Request.
I've tried to create some HttpExchange instances and applying the send() method for each, in an asynchronous mode, but each HTTP request has waited for it response before the next request was sent.
Can you please supply a code snippet for this case?
I know this seems to be a very basic questions but I can't figure out how to give the textbox the focus on PageLoad.
Since this is a Login Control, I have no individual control over each textbox thru code the way I am used to it.
Does anyone happen to know how to give focus to the control please.
Steve
I'm updating my website at the moment and figure that if I am to update my login/security mode, now is a good time.
I have looked through the Membership model which is included in ASP.NET but I'm convinced that it will provide any benefit apart from being familiar to other .NET deevlopers.
There seems to be quite a lot of documentation for it, but little discussion for why its worth the effort.
Can anybody shed some light upon this?
I recently encountered with this question: How to reduce this expression: s73?61:60;.
The hint given was that Instead of using conditional operator we could use a simple comparison which will work fine.
I am not sure but I think it is possible with some GCC extension,although I am unable to figure it out myself.
EDIT:The whole expression is this : s-=s73?61:60
My problem is, i have a 1 axis gyroscope and a 3 axis acellerometer in my device. I managed to get the quaternion through the accelerometer but i cant figure out how to do it with the gyroscope.
I want to be able to, through my gyroscope ( angular rate information) get a quaternion out of it.
I need to insert mutiple data in the field and then to retrieve it as an array.
For example I need to insert "99999" into table item_details , field item_number, and the following data into field bidders associated with item_number :
userx
usery
userz
Can you please let me know what sql query should I use to insert the info and what query to retrieve it ?
I know that this may be a silly question but I just can't figure it out .
thank you in advance,
Michael .
Hey everyone, I would like to wrap the String.format() method with in my own Logger class. I can't figure a way how to pass arguments from my method to String.format().
public class Logger
{
public static void format(String format, Object... args)
{
print(String.format(format, args)); // <-- this gives an error obviously.
}
public static void print(String s)
{
System.out.println(s);
}
}
I cant understand why Gems fetching failed, it was always working fine, i can't figure out how to solve this, hopefully somebody can help. Its driving me Crazy.
Error:
See troubleshooting section in http://wiki.netbeans,org/RubyGems for hep.
Follows output of the gem tool:
Error: while executing gem.....(Gem::RemoteFetcher::FetchError)
bad response Forbidden 403
(http://production.s3.rubygems.org/quick/Marshal.4.8/yard-defaultreturn-1.0.0.gemspec.rz)
I'm trying to figure out how much overlap there is between the different languages of the .NET framework, and what the real differences are. Is there an overlap of libraries/methods/functions...? If I'm googling a question for, say, VB .NET, and C# answers come up, what can I take from the C#-relevant info and what differences/incompatibilities should I look out for?
Hello all
I got this question which asks me to figure out why is it foolish to write a regular expression for the language that consists of strings of 0's and 1's that are palindromes( they read the same backwards and forwards).
part 2 of the question says using any formal mechanism of your choice, show how it is possible to express the language that consists of strings of 0's and 1's that are palindromes?
Most people with a degree in CS will certainly know what Big O stands for.
It helps us to measure how (in)efficient an algorithm really is and if you know in what category the problem you are trying to solve lays in you can figure out if it is still possible to squeeze out that little extra performance.*
But I'm curious, how do you calculate or approximate the complexity of your algorithms?
*: but as they say, don't overdo it, premature optimization is the root of all evil, and optimization without a justified cause should deserve that name as well.
Hey guys,
I'm working on a basic DBMS as a pet project and planning to prototype in Python.
I figure there's a reason there are only a few Python databases, and my gut agrees that my favorite language will be too slow to act as an honest performing database, but I'm looking forward to using it to learn what I need quickly.
Would someone please contradict me? Is Python as ill-suited right now for this sort of thing as I think?