Hi,
I would like to know how kernel programmer thinks about memory vs user mode programmer. I would also like to know few more differences between kernel programming and user mode programming.
Thanks & Regards,
Mousey.
I am creating a rounded rectangle GraphicsPath (see red outline image below), and then using this as a clip region both when drawing graphics, and as the Region of a Form.
Unfortunately, although the path looks good, it doesn't work well as a region (see solid black image below)
Is there a way that I can generate a clipping region from the path that includes all the 'outline' pixels of the path? Do I need to generate a bitmap and then process this to create a region?
The rounded rectangle path:
When used as a clip region:
The discrepancy (red pixels are in the path outline, but outside the region. blue pixels are in both):
So, what is a best approach to implement silverlight localization with Reactive Framework (Rx) to achive on-the-fly UI changing? I would be very much obliged for examples.
Here is an example of on-the-fly UI changing. But I can't figure out how it works.
I need a simple way of checking how much ram and fast the CPU of the host PC is. I tried WMI however the code I'm using
private long getCPU()
{
ManagementClass mObject = new ManagementClass("Win32_Processor");
mObject.Get();
return (long)mObject.Properties["MaxClockSpeed"].Value;
}
Throws a null reference exception. Furthermore, WMI queries are a bit slow and I need to make a few to get all the specs. Is there a better way?
I have some options for pricing using radio buttons.
When a user selects the radio button with no value my checkbox form must not be validated.
here is my code:
Options:
<input type="radio" name="pricing_option_rect" id="pricing_imp_rect1" checked="checked" value="100">100
<input type="radio" name="pricing_option_rect" id="pricing_imp_rect2" value="200">200
<input type="radio" name="pricing_option_rect" id="pricing_imp_rect3" value="300">300
<input type="radio" name="pricing_option_rect" id="pricing_imp_rect4" value="0" />0
Checkboxes:
<input type="checkbox" value="check1" name="rectcat[]" class="{validate:{required:true, minlength:1, maxlength:5}}" />One
<input type="checkbox" value="check2" name="rectcat[]" />Two
<input type="checkbox" value="check3" name="rectcat[]" />Three
<input type="checkbox" value="check4" name="rectcat[]" />Four
<input type="checkbox" value="check5" name="rectcat[]" />Five
<input type="checkbox" value="check6" name="rectcat[]" />Six
<input type="checkbox" value="check7" name="rectcat[]" />Seven
<input type="checkbox" value="check8" name="rectcat[]" />Eight
<div class="container"><label for="rectcat[]" class="error">Please Select a Minimum of ONE and a Maximum of FIVE categories!</label></div>
I need to log information about how much RAM the user has. My first approach was to use GlobalMemoryStatusEx but that only gives me how much memory is available to windows, not how much is installed. I found this function GetPhysicallyInstalledSystemMemory but its only Vista and later. I need this to work on XP. Is there a fairly simple way of querying the SMBIOS information that GetPhysicallyInstalledSystemMemory was using or is there a registry value somewhere that I can find this out.
Hi there,
Chef from Opscode seems to be really useful for configuring servers and such, but trying to follow their documentation is a little difficult. Some terms are defined after they are used, and definitions sometimes reference new terms that you haven't yet encountered.
Anyone know of any GOOD tutorials/walk-throughs for getting a good understanding of Chef, Chef-Server and Chef-Client?
I remember seeing one video presentation online, but it barely scratched the surface.
My question here is similar to the question here, except that I am working with C#.
I have two colors, and I have a predefine steps. How to retrieve a list of Colors that are the gradients between the two?
This is an approach that I tried, which didn't work:
int argbMax = Color.Chocolate.ToArgb();
int argbMin = Color.Blue.ToArgb();
var colorList = new List<Color>();
for(int i=0; i<size; i++)
{
var colorAverage= argbMin + (int)((argbMax - argbMin) *i/size);
colorList.Add(Color.FromArgb(colorAverage));
}
If you try the above code, you will find that a gradual increase in argb doesn't correspond to a visual gradual increase in the color.
Any idea on this?
I have been trying to access the below code
DECLARE
N_DEPTNO DEPT.DEPTNO %TYPE :=&DEPT_NUM;
V_DNAME DEPT.DNAME %TYPE;
NOT_ENOUGH_VALUES EXCEPTION;
PRAGMA
EXCEPTION_INIT(NOT_ENOUGH_VALUES,-06502);
BEGIN
SELECT DNAME,LOC INTO DNAME FROM DEPT
WHERE DEPTNO = N_DEPTNO;
DBMS_OUTPUT.PUT_LINE('Successfully Fetched !!');
EXCEPTION
WHEN NOT_ENOUGH_VALUES THEN
DBMS_OUTPUT.PUT_LINE('No Enough Values ... ');
END;
It is still showing error message after specified it in EXCEPTION block.
Can i handle these type of errors using PRAGMA EXCEPTION_INIT
i.e not providing enough values in the select statement...
If not what type of errors can be handled in System Defined Unnamed Exception
using PRAGMA EXCEPTION_INIT.
Planning to buy a laptop(reasonable budget).
I want to know the basic requirement to run VS2010 and SQL Server 2008 smoothly with Adobe Photoshop CS4 and Dreamweaver CS4 in Windows 7 Home.
Can Pentium Processor do the job?
If not please Suggest me.
Thank you.
Hi all,
Scenario:
- A out-of-the-box DataFormWebPart on masterpage connected to a top-level site List.
- A subsite using that same masterpage from top-level site.
- Error happens when accessing the sub site as below
Stack Trace
[InvalidOperationException: Operation is not valid due to the current state of the object.]
Microsoft.SharePoint.SPFolder.get_ContentTypeOrder() +488
Microsoft.SharePoint.SPContext.get_ContentTypes() +898
Microsoft.SharePoint.SPContext.get_ContentType() +472
Microsoft.SharePoint.SPContext.get_Fields() +271
Microsoft.SharePoint.WebControls.FormComponent.get_Fields() +44
Microsoft.SharePoint.WebControls.FieldMetadata.get_Field() +419
Microsoft.SharePoint.WebControls.FormField.CreateChildControls() +596
System.Web.UI.Control.EnsureChildControls() +87
Microsoft.SharePoint.WebControls.BaseFieldControl.OnLoad(EventArgs e) +176
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.AddedControl(Control control, Int32 index) +265
System.Web.UI.ControlCollection.Add(Control child) +80
System.Web.UI.Control.AddParsedSubObject(Object obj) +41
Microsoft.SharePoint.WebPartPages.WebPart.AddParsedSubObject(Object obj) +1149
Microsoft.SharePoint.WebPartPages.DataFormWebPart.CreateChildControls() +1267
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
I have tried the solution from this site to enable the subsite to access top level site list.
Is this a bug? Any help would be appreciated.
Hi,
Not 100% sure how to frame this question but here goes...
I currently work as a Rails developer but want to work on more substancial / "meaty" projects and have always been very interested in embedded systems, especially systems that run on aircraft and especially submarines.....I know strange combination.
I have been doing some searching & found lockheed martin produces a lot of underwater systems for various navys around the world e.g. http://www.naval-technology.com/projects/nssn/
However, there is very little information about what software is used within these systems, what OS's they use or anything else "technical", presume there is a lot of C / C++ involved but that is just a guess... so its hard to know where to even begin learning what is required to potential work in these areas.
Just wondering if anyone has any experiance working with or more information about embeddeed systems in either the airline (onboard flight systems) or especially submarine systems?
Thanks!
I work near some PeopleSoft guys and they asked how to change a link in an email notification sent by PeopleSoft so that it is friendly, basically they just wanted the use of an HTML anchor.
After sitting down with them and looking through the code I found that the default mime type for all email notifications is text/plain and there does not seem to be any kind of an email API that is called which would allow setting the mime type of the body to text/html. Furthermore, there seems to be no general email configuration in PeopleSoft to, for example, set the default mime type for all emails.
Do you know how to change the mime type of an email in PeopleSoft?
I have an application that must check a folder and read any files that are copied into it.
How do I test if a file in that folder is currently being written to? I only want to read files
that have had all their data written to them and are closed.
How can I count nested list elements in prolog?
I have the following predicates defined, which will count a nested list as one element:
length([ ], 0).
length([H|T],N) :- length(T,M), N is M+1.
Usage:
?- length([a,b,c],Out).
Out = 3
This works, but I would like to count nested elements as well i.e.
length([a,b,[c,d,e],f],Output).
?- length([a,b,[c,d,e],f],Output).
Output = 6
Does anybody know of a managed programming language implemented on .NET that contains a specialized data type that is not mapped through to the Common Type System/FCL/BCL or one that does not have a shipped .NET equivalent (e.g. shipped standard types like System.String, System.Int32)?
This question would likely come from the perspective of someone porting a compiler (although I'm not doing that).
Is it as simple as the language creating a new data type outside the BCL/FCL for its specialized type? If so does this hinder interoperability between programming languages that are otherwise accustomed to mapping all their built-in data types to what's in the BCL/FCL, like Visual Basic and C#?
I can imagine this situation might come about if an obscure language compiler of some kind is ported to .NET for which there is no direct mapping of one of its implicit data types to the shipped Framework.
How is this situation supported or allowed in general? What would be the expectation of the compiler and the Common Language Runtime?
I am developing a time management tool for my personal use. I prefer using keyboard over mouse, and on the interface have a general purpose text box which will act like a command line. I have just started thinking about what commands I need, what to use for the command names, how to pass in switches and parameters, and so forth.
I wonder if some of you have come across a good read along these lines; something that describes the choices you have for designing a cli, and how those affect the complexity of the interpreter, and extendability of the commands. It makes no difference if the descriptions are language-specific or in general terms. However, my implementation will be with javascript.
Thank you.
I have a doubt in context switching.
In multi threading, when the context switching occurs, what will be the time between two context switches? Is it fixed time interval?
Is there a quick way to check whether a path I have is on a local disk or somewhere on the network? I can't just check to see if it's a drive letter vs. UNC, because that would incorrectly identify mapped drives as local. I assumed it would be a boolean in the DirectoryInfo object, but it appears that it's not.
I've found classic VB code to do this check (through an API), but nothing for .NET so far.
Why did DOS/Windows and Mac decide to use \r\n and \r for line ending instead of \n? Was it just a result of trying to be "different" from Unix?
And now that Mac OS X is Unix (-like), did Apple switch to \n from \r?