Hi,
I am writing a custom installer in C#.
Can you tell me an easy way to check if the machine has .NET version installed [even 2.0].
In cases where it is not installed, my app doesn't even start.
Thanks
I was wondering if there is easy solution to this or I'm stuck with following:
When updating DB:
dti.Pass = Crypter.Encrypt(dti.Pass);
_db.SubmitChanges();
When selecting from DB:
Data.DbTableItem dti = _db.Single(a=a.Id == id);
dti.Pass = Crypter.Decrypt(dti.Pass);
Meaning - I am not really into writing repetitive code and this seems like logical thing to be supported by LINQ; so I'm wondering if it is.
I made a Home application and I'd like to offer the ability to exit it and unset it as the default application.
Exit is easy (just starting an intent) but the problem is I don't want my program to be launched again the next time the user click the Home button.
I know that this can be done by going in the parameters / Applications / my app / erase default actions but I would like to do it from my program so that the user doesn't have to search this function.
How can it be done ?
I would like to use the F# interactive console with the projects in the currently open solution in Visual Studio 2010. Is there a quick and easy way to add a reference in the F# interactive console to reference projects in the currently open solution?
I'm writing an external merge sort. It works like that: read k chunks from big file, sort them in memory, perform k-way merge, done. So I need to sequentially read from different portions of the file during the k-way merge phase. What's the best way to do that: several ifstreams or one ifstream and seeking? Also, is there a library for easy async IO?
If I'm returning ["foo"] from a RESTful web query, Which of these is more proper? Will pedantic REST parsing die on the newline?
["foo"]\n (with newline, Content-Length=8)
["foo"] (no newline, Content-Length=7)
For easy regression testing I like the form with the newline, but I want to make sure I won't be breaking any application frameworks that might have a more strict view of the REST format.
The .NET framework makes it easy to get information about various locales; the Win32 C++ APIs are a bit harder to figure out.
Is there an equivalent function in Win32 to get the two-letter ISO language name given an integer locale ID?
In C# I'd do:
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(1034);
string iso = ci.TwoLetterISOLanguageName;
// iso == "es" now.
Just wondering if there are any good tutorials on PHP/MySQL on the web that's free. I looked at youtube and the tutorials they have there are a bit too easy.
Coming from J2ME programming are there any similarities that would make it easy to adapt to Android API. Or is Andorid API completely different from the J2ME way of programming mobile apps.
I'm trying to change the custom accessoryView of a uitableviewcell immediately after the user clicks on the cell. How would I do this?
For the record, I'm using Matt Gallagher' custom table view tutorial:
http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html
Download link for source: http://projectswithlove.com/projects/EasyCustomTable.zip
Has anyone managed to get HolyGrail (http://github.com/mynyml/holygrail) to work with RSpec. It is currently TestCase centric, but I was hoping for an easy way to extend into RSpec/Rails
I like the look of the group rows in the nstableview. In apple mail, the group sections like mailboxes and rss with that style too.
Is there an easy way to make a group row or root item in an nsoutlineview to look like that? I think I have to override the willDisplayCell method...
Hi, everyone
I'm looking for an easy way of packing/unpacking data structures for sending over the network:
on client just before sending:
a = ((1,2),(11,22,),(111,222))
message = pack(a)
and then on server:
a = unpack(message)
Is there a library that could do pack/unpack magic?
Thanks in advance
The MSDN documentation doesn't generally specify the assembly a namespace is in, so there's no easy way to add the necessary assembly reference.
NOTE: I am using MonoDevelop, so right-click, resolve is not an option.
Hi still stuck with the ugly scheme
the problem this time is to get the median of three values (easy)
I did all these :
(define (med x y z) (car(cdr(x y z)))
and it was accepted but when testing it
(med 3 4 5)
I will get this error
Error: attempt to call a non-procedure
(2 3 4)
and when entering letters inetead of number i got
(md x y z)
Error: undefined varia
y
(package user)
using somthin else than x y z i got
(md d l m)
Error: undefined variable
d
(package user)
so what is wronge ?!
Questions on calling web services from iPhone?
Anyone have any recommended tutorials on doing this?
Anyone have any best practices on implementing security with these calls?
Has anyone made or seen any shared libraries or wrappers for easy web service calls from the iPhone?
Mocking a concrete class with Rhino Mocks seems to work pretty easy when you have an empty constructor on a class:
public class MyClass{
public MyClass() {}
}
But if I add a constructor that takes parameters and remove the one that doesn't take parameters:
public class MyClass{
public MyClass(MyOtherClass instance) {}
}
I tend to get an exception:
System.MissingMethodException : Can't
find a constructor with matching
arguments
I've tried putting in nulls in my call to Mock or Stub, but it doesn't work.
Can I create mocks or stubs of concrete classes with Rhino Mocks, or must I always supply (implicitly or explicitly) a parameter-less constructor?
Hello
I use the directory listing function in IIS to upload a bunch of files for friends and family to easy access and download.
My problem is that .mkv files it lists but when you click it i get a 'The page cannot be found'.
Ive tried relocating the file and renaming it but i get the same error each time. Why does it do this? Its only my .mkv files everything else works perfectly.
Thanks in advance.
Hi,
in one of our applications we're using alocal RDLC-report (displaying using a ReportViewer control) to print some tables and text entered by the user.
We'd like to give the user the ability of formatting the text. I thought I might use the respective WPF controls (embedded into the Windows Forms application) to make things easy.
Question is: how do I print the resulting FlowDocument within the local report? Is this possible at all?
Thanks for any advice,
Thorsten
I'm working on as small game for class and was wondering what is a easy way to handel level configuration files. Like object placements , names, etc.
I'm new to C# but fluent in Java, Ruby.
so XML? YML? text, serialized objects?
I am a Junior CS Major at a Javaschool and I find myself having an easy time and thought there may be some good project or a language to learn or research in this newfound free time. What would you recommend so as to increase my ability to find a good job(somewhere that allows for continuous learning and treats its programmers well)after college?
My thoughts were learning Scheme, making a working Zelda-like game(the original), find some open source project to help with.
Hello.
This may sound easy, but I've been trying - in vain, apparently - to figure out how I can make a query with MySQL that checks if the value (string $haystack ;) ) in a certain column contains certain data ( $needle ;) ), like this:
mysql_query("
SELECT *
FROM `table`
WHERE `column`.contains('{$needle}')
");
In PHP, the function is called substr($haystack, $needle), so maybe:
WHERE substr(`column`, '{$needle}')=1
Thanks in advance!
Is there a simple way to export the subversion logs to a CSV file?
I want to use them to approximate my hours spent on a project and doing so in an spreadsheet would be easy.
Thanks.
Hi All,
In eclipse when you click on a method name a variable, or an object for example, the same ones are highlited in a specific color elsewhere in the code for easy finding.
Is there a similar feature in Xcode?