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.
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?
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')),
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.
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.)
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 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.
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
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)."
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?"
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?
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?
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
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?
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 ??!?!?!?
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 ?
I want to make some 2d games that I may want to submit to a game site, such as newgrounds.com. Even if I decide not to submit, I'd still like to know which is a better choice.
Which has a faster startup time?
Which performs faster in a 2d game?
Which IDE should I use?
Thanks in advance!
I know there's a way to capture a bitmap of a window in Windows without anything that may be obscuring it (e.g. you have a window with a dialog in front, but the dialog is not captured as it would be if you did a simple pixel grab), but I can't remember how to do so.
Also I believe this is only possible in Windows Vista and above, with the introduction of the compositing window manager?
I was attempting to open a raw data file (.asc) format with Notepad and am getting gibberish like the following:
1A120090900007 01Piedmont Federal Savings Bank 16 W 3rd St
00 02 1F120090900007 CCR134 +0000000000CCR180
Now, I tried searching around as to what this formatting might be but haven't been able to find anything (thought it might be ActionScript but I doubt it).
Does anyone recognize this formatting or know why it may not be opening properly?
Hi,
I'm interested in developing web application and networking application. For that what
is the best script language to learn. Which one is effective for this two. So for, i don't
know even a single syntax of any scripting language. Which is the best script for
understanding, maintainable, effective and simple (may not).
Please don't say what are all you know. Please tell me the best
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.
I have an interface named PropertyFilter which used to take a Propertyand decide if accepts it or not. And the world was good.
But now the interface changed, so that implementations may choose to add additional Propertys. For example a Customer property might get expanded into Name and Address properties.
I think it is obvious this is not a Filter anymore, but how would you call such a thing?
my string style like this:
expression1/field1+expression2*expression3+expression4/field2*expression5*expression6/field3
a real style mybe like this:
computer/(100)+web*mail+explorer/(200)*bbs*solution/(300)
"+" and "*" represent operator
"computer","web"...represent expression
(100),(200) represent field num . field num may not exist.
I want process the string to this:
/(100)+web*+explorer/(200)bbs/(300)
rules like this:
if expression length is more than 3 and its field is not (200), then add brackets to it.
When tabbing through controls in an ActiveX control hosted in IE, once I get to the last control the tab key no longer does anything. I would like it to move the focus outside the ActiveX control to the next html control.
This works fine when the ActiveX control is hosted in a WinForms app, does anybody know how to make this work in the browser?
It may also be relevant that the ActiveX control is a simple wrapper around a WPF control.