Hi Experts,
I am looking for examples of share calendar and share event using google calendar API in any programming language java, .net, java script.
Thanks,
Aqeel
I want to know how, from a controller action, I could identify the area in which the controller is in via the MVC framework (I mean, without making all controllers in a given area inherit from a base controller with that info).
I'm particularly interested in the case of child actions (controller actions rendered via RenderAction), the area of the calling parent controller for instance.
I'm using ASP .NET MVC 2.0 RTM
Hey,
I have an input text :
<input name="Email" type="text" id="Email" value="[email protected]" />
I want to put a default value like "What's your programming question ? be specific." in StackOverFlow, and when the user click on it the default value disapear.
Is there any easy way to create at least a template XML file using XML Schema? My main interest is bounded by C++, but discussions of other programming languages are also welcome.By the way I also use QT framework.
Hi,
Am new in Qt Programming and i would like to develop a program which i want to run in Windows, Linux(ubuntu), and Mac.
I heard that Qt support mutli-platform application development,
but my Question is that,
would any Qt library need to run these appilication in Ubuntu after i depolyed or compiled. Or
My first few attempts at creating a self hosted service. Trying to make something up which will accept a query string and return some text but have have a few issues:
All the documentation talks about endpoints being created automatically for each base address if they are not found in a config file. This doesn't seem to be the case for me, I get the "Service has zero application endpoints..." exception. Manually specifying a base endpoint as below seems to resolve this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Description;
namespace TestService
{
[ServiceContract]
public interface IHelloWorldService
{
[OperationContract]
string SayHello(string name);
}
public class HelloWorldService : IHelloWorldService
{
public string SayHello(string name)
{
return string.Format("Hello, {0}", name);
}
}
class Program
{
static void Main(string[] args)
{
string baseaddr = "http://localhost:8080/HelloWorldService/";
Uri baseAddress = new Uri(baseaddr);
// Create the ServiceHost.
using (ServiceHost host = new ServiceHost(typeof(HelloWorldService), baseAddress))
{
// Enable metadata publishing.
ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
smb.HttpGetEnabled = true;
smb.MetadataExporter.PolicyVersion = PolicyVersion.Policy15;
host.Description.Behaviors.Add(smb);
host.AddServiceEndpoint(typeof(IHelloWorldService), new BasicHttpBinding(), baseaddr + "SayHello");
//for some reason a default endpoint does not get created here
host.Open();
Console.WriteLine("The service is ready at {0}", baseAddress);
Console.WriteLine("Press to stop the service.");
Console.ReadLine();
// Close the ServiceHost.
host.Close();
}
}
}
}
I still think I'm doing something wrong as I don't get the normal "This is a web service...etc..." page when I load up the url
How would I go about setting this up to return the value of name in SayHello(string name) when requested thusly: localhost:8080/HelloWorldService/SayHello?name=kyle
Do I have to create an endpoing for the SayHello contract as well?
I'm trying to walk before running, but this just seems like crawling...Service has zero application endpoints...
Hi,
Could anyone tell me how to implement a marquee style progress bar in wxPyhon? As stated on MSDN:
you can animate it in a way that shows
activity but does not indicate what
proportion of the task is complete.
Thank you.
Hello everybody!
I have a Hudson CI system set up and for the moment it is used for building a project and running some unit tests. My next step is to integrate the memory leak detector Purify into the build cycle.
Now I want to start the unit tests also inside purify and for this I have created a new batch task which runs following command:
purify.exe /SaveTextData MyExecutable.exe --test TestLibrary.dll --output xml
As I read in the Purify documentation the /SaveTextData option is used in order to run purify not in GUI mode. If I run this command on my local workstation in the command line it works perfectly. But in case it is started by Hudson, nothing happens. Unfortunetly there are no logs of purify...
Has someone ever tried to start purify either by Hudson or any other CI system?
Thanks in advance.
Best regards
Martin
EDIT:
I forgot to tell you, that I have Hudson running as master and slave on different computers. On the master I have configured a task which should start the unit tests within purify on the slave. I am running the slave via JNLP.
EDIT 18.03.2010:
Ok, so finally I am a bit closer the source of the problem.
I have discovered, that running my unit tests in purify locally the log file EngineCmdLine.log contains three commands.
I am starting purify with following command:
purify.exe /SaveTextData TestRunnerConsoleWD.exe --test TestDemoWD.dll
Output of EngineCmdLine.log when starting purify manually:
File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestRunnerConsoleWD.exe
File: C:\WINDOWS\system32\ws2_32.dll
File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestDemoWD.dll
Output when starting via Hudson:
File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestRunnerConsoleWD.exe
File: C:\WINDOWS\system32\ws2_32.dll
File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestDemoWD.dll
File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestDemoWD.dll
The error output of purify:
Instrumenting:
BtcTestDemoWD.dll 313856 bytes
Purify: While processing file D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TESTFWWD.DLL:
Error: Cannot replace file c:\Programme\IBM\RationalPurifyPlus\PurifyPlus\cache\BTCTESTFWWD$Purify_D_workspace_hudson_workspace_Purify_TestFW_CommonsCoreTest_Cpp_msvs9.DLL.
Is it in use?
TESTFWWD.DLL 505344 bytes
Unable to instrument D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestDemoWD.dll (0x1)
Question is, why is purify starting twice a command with the TestDemoWD.dll library?
Hi Guys,
For some reason my Visual Studio debugger has started to show me my integers in Hex. I am programming ASP.net using C#.
Does anyone have an idea how can I convince the debugger to display integers in decimal again?
Thanks a lot,
Assaf.
Hello,
I've been programming in JAVA and C all my years at Uni, but now I'm learning C# and building a small application, and I've found troubles with this:
if (taxonType.Equals(null) ¦¦ taxonID == -1)
I get a red underline for this conditional, and I don't really know why, because according to what I've seen that should be ok, but it is not. Is there something I'm missing?
thank you all in advance,
Victor
I'm trying to make a scheduled task, and its just not working for me.
This is the command I type in CMD:
schtasks /create /sc minute /mo 1 /tn test /tr calc.exe /st 19:17:00 /sd 12/14/2009
I'm trying to tell the computer to run calculator every minute starting at 7:09 PM. Although I get a success message after I type this in and hit enter, nothing happens at 7:09. What gives?
Thanks in advance.
The Manual for Clang seems to be work in progress, so could you help me formulate the definitive command line options for compiling ANSI-C (AKA C89, C90) with maximum strictness and relevant/helpful warnings?
Clang is a compiler front end for the
C, C++, and Objective-C programming
languages. It uses the Low Level
Virtual Machine (LLVM) as its back
end. It is still under development.
Its goal is to offer a replacement to
the GNU Compiler Collection (GCC)
I want to know if we can create builds using ant's build.xml and when i'm trying to do this an error is displayed SDK location not mentioned and besides that I'm unable to find local.properties file to mention the SDK Location
My aim is that I want to use my exiting code and make a build for new Android SDK's with changes in the resources and and some constant values is this task Possible with making a build using Ant and if by some other way.
I have no idea about Ant and its functioning so it would very appreciable if minute details are also provided.
What's a good way to get into F# programming?
What's a good "Hello world" example and what simple examples can show me why I want to use it over C#.
Also what tools do I need? I have WindowsXP, Visual Studio 2008 etc.
I think I'm missing something very obvious and its making my brain hurt.
class User < ActiveRecord::Base
has_one :profile
class Profile < ActiveRecord::Base
has_one :user
belongs_to :team
I have a partial that loops through the users and print some basic info, I'm using this partial in my team show page.
I had originally written this to return users who's profiles were a member of a team.
def show
@team = Team.find_by_id(params[:id])
@profiles= Profile.find(:all, :conditions => ['team_id = ?', @team.id])
@users = User.find_by_id(@profiles.user_id)
end
But quickly realized @profiles was an array, and it looks messy as hell. Stuck as to what my find should look like to select all User who have a profile that is a member of a team.
The partial that is working elsewhere for displaying users looks like this
<% for user in @users%>
<table>
<tr>
<td>
<%= image_tag user.profile.picture.url %>
</td>
<td>
<a href="/users/<%= user.id %>"><%= user.login %></a>
</td>
<td>
<%= user.profile.first_name %> <%= user.profile.second_name %>
</td>
<td>
<%= user.profile.status %>
</td>
</tr>
</table>
<% end %>
Development log output with updated show and relationships
Processing TeamsController#show (for 127.0.0.1 at 2010-03-30 22:06:31) [GET]
Parameters: {"id"=>"1"}
User Load (1.3ms) SELECT * FROM "users" WHERE ("users"."id" = 3) LIMIT 1
Team Load (1.0ms) SELECT * FROM "teams" WHERE ("teams"."id" = 1)
Rendering template within layouts/main
Rendering teams/show
Completed in 75ms (View: 11, DB: 2) | 200 OK [http://localhost/teams/1]
Hello everyone!
I have the following regexp:
(?P<question>.+(?<!\[\[))
It is designed to match hello world! in the string hello world! [[A string typically used in programming examples]]
Yet I just matches the whole string, and I can't figure out why. I've tried all flavors of lookaround, but it just won't work...
Anyone knows how to fix this problem?
Thanks,
CFP.
What books would you recommend to a CS undergraduate that did mostly web programming all his life, in order to pick up signal processing ?
I am looking for something at a grad level and more geared toward an average (or below average) programmer.
I've created a performance counter that shows a fraction of an incremeted value (RawFraction type) over a base value (RawBase). Unfortunately, when monitoring this value, it only shows the percentage when one of the counters is incremented. At all other times it it is sampled, it shows 0. Is there some way to tell the counter to hold onto the last value until the next time it needs to recalculate the fraction?
I have an outdated computer, that currently will not run certain XNA components. I am a beginner at this stuff, so I'm looking to get some other programming stuff done before I get a new computer that can run XNA and everything else. But is Tetris easy to make without XNA?
I have a code base where developers use @author annotations on their class definitions. Is there a way for me to be able to programmatically count how many classes are authored by each developer using those annotations?
During the following months I'll have some spare time so I thought of picking up a new programming language.I've been reading some articles about Go and Io and both of them look interesting and very promising so I'm stuck making a decision about which one to pick up next.
I'm mainly interested in distributed systems and concurrency.
Any help is greatly appreciated. Thanks.
Hello this is similar to http://stackoverflow.com/questions/2620165/how-to-access-a-named-element-of-a-derived-user-control-in-silverlight with the difference is inheriting from a templated control, not a user control.
I have a templated control called MyBaseControl
<Style TargetType="Problemo:MyBaseControl">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Problemo:MyBaseControl">
<Grid x:Name="LayoutRoot" Background="White">
<Border Name="HeaderControl" Background="Red" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
public class MyBaseControl : Control
{
public UIElement Header { get; set; }
public MyBaseControl()
{
DefaultStyleKey = typeof(MyBaseControl);
}
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
var headerControl = GetTemplateChild("HeaderControl") as ContentPresenter;
if (headerControl != null)
headerControl.Content = Header;
}
}
I have another control called myControl which inherits from MyBaseControl Control
<me:MyBaseControl x:Class="Problemo.MyControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:me="clr-namespace:Problemo"
d:DesignHeight="300" d:DesignWidth="400">
<me:MyBaseControl.Header>
<TextBlock Name="xxx" />
</me:MyBaseControl.Header>
</me:MyBaseControl>
public partial class MyControl : MyBaseControl
{
public string Text { get; set; }
public MyControl(string text)
{
InitializeComponent();
Text = text;
Loaded += MyControl_Loaded;
}
void MyControl_Loaded(object sender, RoutedEventArgs e)
{
base.ApplyTemplate();
xxx.Text = Text;
}
}
The issue is xxx is null. How do I access the xxx control in the code behind ?
Hi
I have a model
class Gift < ActiveRecord::Base
validates_uniqueness_of :giver_id, :scope => :account_id
end
add_index(:gifts, [:account_id, :giver_id], :uniq => true)
Action
def create
@gift= Gift.new(params[:gift])
if @gift.save
...
else
...
end
end
In the "production" mode, I sometimes get an error
ActiveRecord::StatementInvalid: Mysql::Error: Duplicate entry '122394471958-50301499' for key 'index_gifts_on_account_id_and_user_id'
What the problem?
Hi
I have a model
class Gift < ActiveRecord::Base
validates_uniqueness_of :giver_id, :scope => :account_id
end
add_index(:gifts, [:account_id, :giver_id], :uniq => true)
Action
def create
@gift= Gift.new(params[:gift])
if @gift.save
...
else
...
end
end
In the "production" mode, I sometimes get an error
ActiveRecord::StatementInvalid: Mysql::Error: Duplicate entry '122394471958-50301499' for key 'index_gifts_on_account_id_and_giver_id'
What the problem?