How do you convert an existing project into an Android project in Eclipse?
In particular, I want to convert a plain old Java project into an Android Library project.
Thanks.
I know how to reference an existing .dll to IronPython, but is there any way to add my project as a reference like I can between Visual Studio projects?
Or is it best practice to create a separate class library?
I've read the documentation here:
http://msdn.microsoft.com/en-us/library/ms776420(VS.85).aspx
I'm stuck on this parameter:
lpMultiByteStr
[out] Pointer to a buffer that receives the converted string.
I'm not quite sure how to properly initialize the variable and feed it into the function
I'm trying to run through this msdn article:
http://msdn.microsoft.com/en-us/library/dd723645.aspx
One of the steps is:
In the class file for the page, change the base class from UserControl to EntityTemplateUserControl.
Nowhere is it made clear what page is being referenced. Can someone help me? I don't see any relevant class in the pages I have, so I assumed maybe they were talking about the ascx and didn't really mean page, but I'm not seeing an option there either.
In Windows the Dropbox client uses python25.dll and the MS C runtime libraries (msvcp71.dll, etc). On OS X the Python code is compiled bytecode (pyc).
My guess is they are using a common library they have written then just have to use different hooks for the different platforms.
What method of development is this? It clearly isn't IronPython or PyObjC. This paradigm is so appealing to me, but my CS foo and Google foo are failing me.
I want to create 2 bits per pixel GIF files in VC environment from a TIFF file.
Is there any free library or maybe source that could help me?
Or how can I do it myself?
I could write myself a helper class that does this when given a functor, but I was wondering if there's a better approach, or if there's something already in the standard library (seems like there should be).
Answers I've found on StackOverflow are all for C# which doesn't help me.
Thanks
My main solution is using code from a utiliy class library, that I wrote myself, but is part from an other solution.I want to set a breakpoint in the referenced .dll. How can I do that?
So I know that C++ is strongly typed and was just wondering if there was any library (or any thing for that fact of the matter) that would allow you to make a variable that has no initial specific type like var in Python.
Is there anyway I can make the process of adding references to C# projects less painfull?
Every time I create a new C# class library project. I have to use the Add Reference dialog for 5 times at least.
Hi
I've used the "Reduce XAP size by using Application library caching" setting. I see that some dlls are now excluded from the .xap file but some aren't, specifically
System.Reactive.dll
System.Windows.Controls.DataVisualization.Toolkit.dll
System.Windows.Controls.Theming.Toolkit.dll
System.Windows.Controls.Toolkit.dll
Any idea why this is the case?
thanks
Hi Guys, hows it going?
I'm in my first time with DDD, so I'm begginer! So, let's take it's very simple :D
I developed an application using asp.net mvc 2 , ddd and nhibernate. I have a domain model in a class library, my repositories in another class library, and an asp.net mvc 2 application. My Repository base class, I have a construct that I inject and dependency (my unique ISessionFactory object started in global.asax), the code is:
public class Repository<T> : IRepository<T>
where T : Entidade
{
protected ISessionFactory SessionFactory { get; private set; }
protected ISession Session
{
get { return SessionFactory.GetCurrentSession(); }
}
protected Repository(ISessionFactory sessionFactory)
{
SessionFactory = sessionFactory;
}
public void Save(T entity)
{
Session.SaveOrUpdate(entity);
}
public void Delete(T entity)
{
Session.Delete(entity);
}
public T Get(long key)
{
return Session.Get<T>(key);
}
public IList<T> FindAll()
{
return Session.CreateCriteria(typeof(T)).SetCacheable(true).List<T>();
}
}
And After I have the spefic repositories, like this:
public class DocumentRepository : Repository<Domain.Document>, IDocumentRepository
{
// constructor
public DocumentRepository (ISessionFactory sessionFactory) : base(sessionFactory)
{ }
public IList<Domain.Document> GetByType(int idType)
{
var result = Session.CreateQuery("from Document d where d.Type.Id = :IdType")
.SetParameter("IdType", idType)
.List<Domain.Document>();
return result;
}
}
there is not control of transaction in this code, and it's working fine, but, I would like to make something to control this repositories in my controller of asp.net mvc, something simple, like this:
using (var tx = /* what can I put here ? */) {
try
{
_repositoryA.Save(objA);
_repositoryB.Save(objB);
_repositotyC.Delete(objC);
/* ... others tasks ... */
tx.Commit();
}
catch
{
tx.RollBack();
}
}
I've heared about NHibernateUnitOfWork, but i don't know :(, How Can I configure NHibernateUnitOfWork to work with my repositories ? Should I change the my simple repository ? Sugestions are welcome!
So, thanks if somebody read to here! If can help me, I appretiate!
PS: Sorry for my english!
bye =D
Does anybody know the VB or C# code to programmatically download a video from YouTube?
I have gone through all related questions on this site and the only code I have found (which uses the WebClient Class webclient.DownloadFileAsync) returns the text source of the video, but not the Flash video (.flv) file that needs to be downloaded?
Do you know any SDK or library which can help?
I have also downloaded the GoogleAPI (YouTube DLL) but have not found a way of doing it.
I found email composer sample code from iphone OS Ref Library. Here is a code-
Code:
NSArray *toRecipients = [NSArray arrayWithObject:@"[email protected]"];
NSArray *ccRecipients = [NSArray arrayWithObjects:@"[email protected]", @"[email protected]", nil];
NSArray *bccRecipients = [NSArray arrayWithObject:@"[email protected]"];
My question is how to take user's input? Here all email address are predefined in code. so what are the IDs of to, CC, Bcc, subject and body fields?
I would like to access a bazaar repository and pull code from it with either a Python or PHP script.
How is this done? Is there a Python module / PEAR library that makes this easy?
If it helps, the repository is on Launchpad.
Hi, This is more a design question... You can't do a decorate design pattern if:
1) The object is marked "sealed" meaning you can't extend from it.
2) or you want to override a method but its not virtual.
What can you do then? Taken that you can't change the class source code if you don't have the source code (like a 3rd party library).
Is there a good way to get Facebook Connect onto a Silverlight page? All I really need is simple authorization/registration. I've looked into the facebook developer toolkit, but the documentation is more or less non-existent for Silverlight, and I didn't really get anywhere with it.
Is there a good tutorial or a working library for adding Facebook Connect into a Silverlight app? Or is the best way to run Silverlight in Windowwless mode with HTML overlayed on top?
The DataContractJsonSerializer is not able to serialize Dictionaries properly.
Whereas JavaScriptSerializer serializes Dictionaries as {"abc":"xyz","def":42}
for example,
the DataContractJsonSerializer gives [{"Key":"abc","Value":"xyz"},{"Key":"def","Value":42}] instead.
This is really problematic and I want to know how can I serialize Dictionary objects correctly in my WCF service. I am looking for a solution that would require least amount of effort.
ref: http://msdn.microsoft.com/en-us/library/bb412170.aspx
Hello,
in my app I have 49 points with x,y and I wnat to display them on the screen. I've seen a lot of library that can help me (core plot, s7graphview, etc.). But since I'm doing very basic stuff (just draw points), what is the simplest way do to that ?
Thanks !
sudo gem install ruby-mbox
then I run this
require "rubygems"
require "ruby-mbox"
mbox = Mbox.new("Inbox")
and I get this
$ ruby mbox_read.rb
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- ruby-mbox (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from mbox_read.rb:2
gem server says this
ruby-mbox 0.0.2 [rdoc] [www]
A simple library to read mbox files.
Executables are mbox-daemon, mbox-do.
Thanks in advance
I would like to write my own LDAP client under Linux, specific to our local environment. Most probably I will use QT4 to provide a shiny frontend without much hassle.
I found that there seems to be no standard C++ library for this. OpenLDAP provides a C API and there should also be a C++ API (experimental?) somewhere..
Do I need to use the C stuff or is there a C++ API out there worth of recommendation?
First of all, maybe literals is not the right term for this concept, but its the closest I could think of (not literals in the sense of functions as first class citizens).
The idea is that when you make a conventional function call, it compiles to something like this:
callq <immediate address>
But if you make a function call using a function pointer, it compiles to something like this:
mov <memory location>,%rax
callq *%rax
Which is all well and good. However, what if I'm writing a template library that requires a callback of some sort with a specified argument list and the user of the library is expected to know what function they want to call at compile time? Then I would like to write my template to accept a function literal as a template parameter. So, similar to
template <int int_literal>
struct my_template {...};`
I'd like to write
template <func_literal_t func_literal>
struct my_template {...};
and have calls to func_literal within my_template compile to callq <immediate address>.
Is there a facility in C++ for this, or a work around to achieve the same effect? If not, why not (e.g. some cataclysmic side effects)? How about C++0x or another language?
Solutions that are not portable are fine. Solutions that include the use of member function pointers would be ideal. I'm not particularly interested in being told "You are a <socially unacceptable term for a person of low IQ>, just use function pointers/functors." This is a curiosity based question, and it seems that it might be useful in some (albeit limited) applications.
It seems like this should be possible since function names are just placeholders for a (relative) memory address, so why not allow more liberal use (e.g. aliasing) of this placeholder.
p.s. I use function pointers and functions objects all the the time and they are great. But this post got me thinking about the don't pay for what you don't use principle in relation to function calls, and it seems like forcing the use of function pointers or similar facility when the function is known at compile time is a violation of this principle, though a small one.
I would like to be able to upload a vcard and have it parsed into my application's Model.
I am thinking that Paperclip would be a way to upload, but I have no idea how to do the parse.
I did a search on google, the only library that seems related is vpim, with mixed commentary.
Wanted to see what brilliant ideas might be out there to solve this...thanks.