I am programming in C, using the Windows API, and would like to know how I could draw separators.
I'm a total noob when it comes to writing GUI applications, so I may need a code example.
Hello Guys!
I've two MS SQL tables: Category, Question. Each Question is assigned to exactly one Category. One Category may have many subcategories.
Category
Id : bigint (PK)
Name : nvarchar(255)
AcceptQuestions : bit
IdParent : bigint (FK)
Question
Id : bigint (PK)
Title : nvarchar(255)
...
IdCategory : bigint (FK)
How do I recursively count all Questions for a given Category (including questions in subcategories). I've tried it already based on several tutorials but still can't figure it out :(
Is it better to return a null value or throw an exception from an API method?
Returning a null requires ugly null checks all over, and cause a major quality problem if the return is not checked.
Throwing an exception forces the user to code for the faulty condition, but since Java exceptions bubble up and force the caller code to handle them, in general, using custom exceptions may be a bad idea (specifically in java).
Any sound and practical advice?
Would someone please explain to me what the below paragraph means? This is a snippet from "Design Patterns: Elements of Reusable OO software"
Part of an object's interface may be characterized by one type, and other parts by other types. Two objects of the same type need only share parts of their interfaces. Interfaces can contain other interfaces as subsets. - Design Patterns - Elements of Reusable OO software, pg 13
Hello All
I have a class ClientState
Class ClientState
{
Public int ID{get;set;}
public string State{get;set;}
}
List<ClientState> listClientState which contain all states of USA, Now may problem is listClientState contain some objects which have duplicates states.
How can i filter listClientState to remove duplicate record
Hi,
I have a value as '05/17/2010'
I would like to get it as May 17, 2010 by using dojo.date.locale.I have tried using the dojo.date.locale.parse as follows :
x = '05/17/2010'
var x= dojo.date.locale.parse(x, {datePattern: "MM/dd/yyyy", selector: "date"});
alert(x)
This doesnt give me the desired date pattern
I also tried replacing the pattern as datePattern : "MMMM d, yyyy" but it returns me null.
Any help highly appreciated.
Thanks
Silverlight provides only Touch.FrameReported event and doesnt provide any events for the UIElements like it does for mouse events(ex: MouseDown, MouseUp). Is there any touch library available for the silverlight which provides these touch events and supports gestures.
Google did not help me much or may be my search terms are not correct. Any pointers will be appreciated.
Basically i want to do this. ee causes a bad cast exception.
NOTE: o can be ANYTHING. It may not be B, it can be C, D, E, F etc.
var b = (B)"sz";
var e = (A)b;
object o = b;
var ee = (A)o;
can anyone see why this wouldn't be working. Fairly new to django so any help would be much appreciated
actual url:
http://127.0.0.1:8000/2010/may/12/my-second-blog-post/
urls.py:
(r'(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/(?P<slug>[-w]+)/$', 'object_detail', dict(info_dict, slug_field='slug',template_name='blog/detail.html')),
I'm new to rails so it may sound quite naive.I'm getting this error
No route matches {:controller=>"welcome", :action=>"contact"}
Here is my routes.rb
root :to => 'welcome#index'
Here is my controller
class WelcomeController < ApplicationController
def index
redirect_to :action => :contact
end
end
And i have a contact.html.erb in my app/view/.What am i doing wrong?
I am curious if there is any history behind why the ^ character is used to escape the special characters <, , |, &, and ^ in environment variable names in Windows instead the '\' character that is typically used to escape special characters.
Please note that I realize there may be no reason for this, but I'd be interested to hear if there is a reason.
[Participant Table [1994]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "I:\My Documents\Flamm Consulting\Migrations.accdb" failed with error code 0xC0209303. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Frankly, I'm confused about how SSIS should connect to Access 2007 - the UI just isn't very friendly - there's no file browser, for example. I'm wondering if there's something wrong with my install - missing drivers, etc.
As the title implies how can I create a new log file each day in C#? Now the program may not necessarily run all day and night but only get invoked during business hours. So I need to do two things.
How can I create a new log file each day? The log file will be have the name in a format like MMDDYYYY.txt
How can I create it just after midnight in case it is running into all hours of the night?
Using .Net, I need to generate a response based on only the checkboxes on my form that have had there states changed. So how do I know if the check box has changed from its previous value before submission. I can't use the onchange event because the user may check multiple boxes before submitting.
I have a C# user control project which causes intermittent .NET run time error, a generic error, and wondering if there is any code analysis tool that I can point at my .sln file which would tell me what may be causing my error
Does psycopg2 have a function for escaping the value of a LIKE operand for Postgres?
For example I may want to match strings that start with the string "20% of all", so I want to write something like this:
sql = '... WHERE ... LIKE %(myvalue)s'
cursor.fetchall(sql, { 'myvalue': escape_sql_like('20% of all') + '%' }
Is there an existing escape_sql_like function that I could plug in here?
(Similar question to How to quote a string value explicitly (Python DB API/Psycopg2), but I couldn't find an answer there.)
The Java manual says:
The locks held on a particular file by a single Java virtual machine do not overlap. The overlaps method may be used to test whether a candidate lock range overlaps an existing lock.
I guess that if I lock a file in a tomcat web application I can't be sure that every call to this application is done by a different JVM, can I? So how can I lock files within my tomcat application in a reliable way?
related Questions didn't help !
i have a problem loading php_curl.dll under following circumstances:
XAMPP for windows 1.7.2
Apache 2.2.12
PHP 5.3.0
mod_ssl enabled in http.conf
php_curl.dll enabled in php/ext
copied ssleay32.dll and libeay32.dll in system32
checked the extension by php: if (extension_loaded('curl'))- FALSE !
and all i got in apache errors.log is:
[Sat May 22 15:13:20 2010] [error] an unknown filter was not added: DEFLATE
can you tell me what do i have to do ??!?!?!?
I'm trying to use feedparser to get some data from yahoos weather rss. It looks like feed parser strips out the yweather namespace data:
http://weather.yahooapis.com/forecastrss?w=24260013&u=c
<yweather:condition text="Fair" code="34" temp="23" date="Wed, 19 May 2010 5:55 pm EDT" />
looks like feedparser is completely ignoring that. is there away to get it?
What's the best way to get the current PowerShell Cmdlet from another object? If I create a helper object that is not a Cmdlet but will be called by Cmdlets, the helper methods may want to call WriteVerbose, WriteDebug etc. What's the best way to get access to that? Is there a static PowerShell method that will return the current Cmdlet or do I need to have the Cmdlet pass itself to the helper?
I am using smartgwt,when i tried to load huge data my explorer is not running.getting an error message that "A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?"
Hi,
How can i find decimal(dot) in a given number in java.
I am getting input from user, he may give integer or float value.
I need to find he entered integer or float , is it possible?
if yes could u tell me please.
--
Thanks
when i run exe(MFC Dialog based application) in Win 2k3 Fails to run(MSJAVA.dll Missing error).but the same exe runs successfully in WIN xp
Edit:
As per the solution by Goz ,I have downloaded the MSJAVA.dll and tried to run the exe,but am getting the below error,
"The Side-by-Side configuration information for "f:\test\TESTCSDATACHANGEEVENTS.EXE" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001)."
Hello,
When I add new event handler for any event, VS creates method like Button_Click.
But ReSharper underlines this method as Warning, because all methods should not have any delimeters such as "_".
How can I customize rules of ReSharper so that it doesn't underline such methods? Or may be I should rename such methods?
Thanks in advance.
So I just tried excluding String[] args from the main method
It compiled alright !
But JVM is showing an exception
Why did it compile when String[] args HAS to be included every time ?
What is going on here ? Why won't it show a compilation error ?
typing this made me think that may be compiler did not see it as THE main method ..is that so ?