BitShift's Q&A profile
Gadgets any examples of a gadget call a web service that returns json?
I'm hoping to find an example of a sidebar gadget that will call a web service with some parameters and return a json object. I'm hoping it calls it on a timer and is done in javascript. Thanks, Peter Kellner http://peterkellner.net ASP.NET, MVP Accessing data from a web service in a gadget with a JSON service is no different than doing so in Javascript on a regular HTML page. Are you really just looking for a JSON client or is there something specific about the sidebar gadget you'd like to understand -SANDY ...Show All
Software Development for Windows Vista Problem with Workflowdefinition??
Hi all I seem to be having a problem with the workflowdefinition. If I add a branch to a parrallel activity to a workflow at runtime from a host, The workflow runs but when I try to retrieve the workflowdefinition to show it in the designer I get the following error: Unexpected end of file while parsing Name has occurred. Line 19, position 16. Could somone help me with this Thanks Mario Hi Tom Thanks for your interest. I am using Beta 2.2 but it is hard to give an example here as it includes a predefined workflow. I am creating a workflow from my application and then changing it from the host at runtime in order to reflect changes in the environment. When I add a custom activity, I seem to ...Show All
Visual Studio 2008 (Pre-release) What should be the return type?
Hi I want to create one method like this public [Some returntype] SomeMethod(NorthwindDatacontext db) { var q = from c in db.Customers where c.City=="London" select new {c.CompanyName , c.ContactName}; return q; } I tried to use IEnumerable<customer> as well as IQuearyable<customer> as return type, but both throws error. So what should be the return type Thanks in advance Maulik Hi, I have also tried to use "var" as return type but it throws an error and says "Invalid token 'var' in class, struct, or interface member declaration" and "Method must have return type". What should I do ...Show All
SharePoint Products and Technologies Copy page to another page library
Hi i have created a page with some webparts. Now i want to use this same page as basic for other pages so i want to use this page as a sort of template. I tried copy & paste from sharepoint designer. The page is copied but the webpart is not. I also tried using the explorer view in Sharepoint but that also did not do the job ( i can't copy to the same pages library) tnx for any help On the page you want to make a template of, select Site Actions - Site Settings , then select Save site as template . When the Save site as template page appears you should see a checkbox to " include content ". If you check this, any list, libraries, or web parts will be saved in the new template. Hope this helps. ...Show All
Visual C++ Strange problem with a c file with subroutines
Hi everyone, I have a very weird problem with this program: with Visual C++ compiler it isn't compiled (the compiler says " missing ';' before 'type'" ) and with another IDE it works, but the return value is always 0.0. Could anyone help me Thanks #include <stdio.h> #include <stdlib.h> #include <math.h> int inCylinder_1( double , double , double ); double distance( double , double , double , double , double , double , double , double , double ); int main() { double x,y,z; printf( "%s" , "Insert point coordinates: " ); //scanf("%f%f%f",&x,&y,&z); x = 1.0 ; y = 1.5 ; z = 0.5 ; int inCylinder = inCyl ...Show All
Smart Device Development Problem to install CF 1.0 automatically.
Hi everybody, I need to get some help with CF 1.0 automatic installation on device. I have bat file with the script: ECHO Installing COMPACT FRAMEWORK... \Windows\wceload /noaskdest /delete 0 /noui \TEMP\netcf.all.wce4.ARMV4.cab When we cold boot device, installation begin,but it is asking for overwriting framework dll files (Yes, Yes to all and so on). I need to install framework without any questions. Is there some way to do that Thanks for help, Iouri. None I'm aware off – WCELOAD produces these messages and it seems they can not be suppressed. You might try /silent switch but it probably won't work. Possible solution would be to write an application (native) to detect the ...Show All
Visual Studio PackageLoad failure - SetSite
I am getting this error trying to create a new project of my type in the machine where I have installed my package. SetSite failed for package [Idea.Xgen.Package.XgenPackage, Idea.Xgen.Package, Version=1.0.2403.23830, Culture=neutral, PublicKeyToken=null] Does anyone have any ideas Thanks, Mike I realized that my vpc image had team edition installed and not professional for VS 2005. Could this be the cause of the error message Thanks, Mike ...Show All
Game Technologies: DirectX, XNA, XACT, etc. ExternalReference from custom ContentImporter
I'm writing a custom Importer in which I have a number of references to textures. It seems I must reference the built files (xnb files) in my ContentWriter; how can I build the textures in the import-stage of the pipeline (in ContentImporter.Import()), and how do I get a reference to the built files Aha, but how do I create the ExternalReference<> It complaints that... Building content threw ArgumentException: External reference "F:\dev\Lidgren\XNA\Lidgren.Xna.Render\RenderTestApp\Content\Skybox\0001" is not a compiled .xnb file. ... I assume I could use context.BuildAsset<>() but i'd prefer not to hardcode the processor used into this processor - i'd rather just reference the ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Image Zoom with Sprite Draw
Hi, I stopped using Sprite.Draw2D with the October SDK (which I still use), replacing it with Sprite.Draw. However, I believe with Draw2D I could zoom my jpg image simply by specifying a different size for my source rectangle while leaving my destination rectangle unchanged. My question is how can I do this using Sprite.Draw Or should I download a later SDK (perhaps the Sprite.Draw2d bug is now fixed) and revert back to Sprite.Draw2D Many Thanks for your help. Jim ...Show All
SharePoint Products and Technologies SP Gugu: How to Programmatically change a list item's ContentType by WSS WebService?
Please, help! I can't find any information on MSDN under WSS3 webservices List.UpdateListItems topics how to programmatically change a list item ContentTypeId Calling SharePoint list service like: (adding a list item) XmlElement elBatch = doc.CreateElement("Batch"); elBatch.SetAttribute("OnError", "Continue"); elBatch.SetAttribute("ListVersion", "2"); XmlElement el1 = doc.CreateElement("Method"); el1.SetAttribute("ID", "1"); el1.SetAttribute("Cmd", "New"); XmlElement field1 = doc.CreateElement("Field"); field1.SetAttribute("Name", "ID"); field1.InnerText = "New"; XmlElement field2 = doc.CreateElement("Field"); field2.SetAttribute("Name", "emp_no"); ...Show All
SQL Server Advice???
hellooo I have an Accounting system(vb.net 2003, SQL server 2000), every new year data is cleared, but i may use some data from previous years (such as liabilities) whats the best way to that -Shall I create programmatically a new clone DB every year (new DB with same structure as previous year) OR -Shall I add a "year field" for tables in DB knowing that data will keep growing every year whats the best solution, knowing that i dont want the end user of my application to do anything manually, such as creating DB ...... Thank you I dont wanna delete anything, I want at each beginning year to create a new DB(same structure as previous year) and may use some Data from pre ...Show All
.NET Development test if string is number
Is any function of .NET that can test if a string is number incuding intergers and decimals "6,087" // is number "1a,5" // is not number "9,6,335" // is not number you could use the Char.IsNumber function, going through each character in the string and checking if the char is a number, it will return a boolean value. Or you could try to do a try parse: Int16.TryParse( string , out Short ) Decimal.TryParse( string, out decimal ) example: Decimal theResult = 0 if (Decimal.TryParse("1890.7", ref theResult)) { //it was successfully able to parse the result and store the value into theResult variable } does this h ...Show All
.NET Development Objects consuming memory, but that memory never gets returned.
Hi all, I have an Inspections application that consists of a structural hierarchy of Question Objects that are built up in memory when the user selects an Inspection. Now to build up this Question Object structure the application uses around 5-6 mb. But, when I leave/close the last Form that makes use of these Objects that 5-6 mb is never returned back to me - however, when I go back to the Form and load another Inspection, it seems to use the same memory that was consumed the first time, and DOESN'T eat any more memory. But, how can I make my application free up this memory when I leave the Inspection Form My Questions Class doesn't override the Dispose() method, but should it Should I call the GC.Collect when the Form Deactivates() Hop ...Show All
Visual Studio Express Editions mouse simulation
i was wondering if someone could give me an example of mouse simulation in visual basic express. i was wondering if its specificly possible to move the mouse to integers x and y, or a point, and left click. Thanks! for the Code, Now if I want to Right Click do I just Change the Left to Right so it looks like this mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, New IntPtr) mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, New IntPtr) And one more thing what about the The middle Button, the Roller ...Show All
SQL Server dbcc showcontig impact
I would like to examine the fragmentation on a decent size database (120GB- largest table about 25 GB). dbcc showcontig appears to be the command to run, howvere, I would like to understand what it does and how it impacts the database when it is running. Does it place locks for the duration of the run What sort of overhead (on average) does it place on the server In short, I'm trying to see if it is safe to run on a production system. I know to try and avoid high usage times. Let's say I can identify a period of relatively low activity - can I run it then Thanks According to Books Online: " The operation typically requires a shared (S) table lock that prevents up ...Show All
