instruction stringlengths 0 30k ⌀ |
|---|
|gps| |
I'm just starting to design some embedded devices, and am looking for resources.
What I want to be able to do is to connect a GPS receiver to a lightweight SBC or mini-ITX, x86-based computer, and track a remote-controlled vehicle's location/progress.
Ideally, this could morph into building some hobby, semi-auton... |
Although I use emacs when I have to (ie. when I'm at the command line), I use [Eclipse][1] for all my real development work. If you get the [Web Standards Toolkit][2] plug-in for it, it can do syntax coloring, tag auto-completion, and other fun stuff.
Alternatively, if Eclipse is to "heavy" for you, [jEdit][3] is a... |
If you are calling SelectNodes on the XmlDocument itself and it really is an XmlDocument and not a derived class than SelectNodes won't return null.
If you create a descendant class and override the CreateNavigator(XmlNode) method then SelectNodes could return null.
Similarly, if you call SelectNodes on an Entity... |
The eye-fi card relies on image files being written to a specific directory in the card before they'll transfer them. Beyond that it works exactly like a memory card.
Write a file to it as if you're writing a regular memory card, and as long as it's a jpg image file of reasonable size, and in an appropriate directo... |
Silverlight is coming to windows mobile 6, its in super elite beta right now, maybe get in on that action. |
There are many solutions. You could also keep your original query layout by simply adding table aliases and joining on the column names, you would still only have DEPTNO = 20 and JOB = 'CLERK' in the query once.
SELECT
*
FROM
scott.emp emptbl
WHERE
emptbl.DEPTNO = 20
AN... |
What if you save the file as an xlsx, the extension for XML-Excel? |
Another option is the [ServiceLoader](http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html) added in Java 1.6. |
The Flex SDK ships with a set of ant tasks. More info at:
<http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html>
Here is an example of compiling Flex SWCs with ant:
<http://www.mikechambers.com/blog/2006/05/19/example-using-ant-with-compc-to-compile-swcs/>
mike chambers |
I would use a Union query, very roughly:
Dim db As Database
Dim tdf As TableDef
Set db = CurrentDb
Set tdf = db.TableDefs("SO")
strSQL = "SELECT ID, Species, """ & tdf.Fields(2).Name _
& """ AS Country, [" & tdf.Fields(2).Name & "] AS CountryValue FROM SO "
... |
Yes, I've tried doing things with Java on Windows Mobile. I tried really hard. The best advise I can give you is: Stop right now, and start using .NET Compact Framework.
Anyway, the two 'good' JVMs for WM are <a href="http://www-01.ibm.com/software/wireless/weme/">IBM-J9</a> and NSICom Creme, which still are both te... |
If you wanted to use [basetype].Invoke("Dispose"...) then you could implement the function call without the debugger complaining. Then later when the base type actually implements the IDisposable interface it will execute the proper call. |
Ecma-335 specifies some more CompilationRelaxations for relaxed exception handling (so-called e-relaxed calls) in Annex F "Imprecise faults", but they have not been exposed by Microsoft.
Specifically CompilationRelaxations.RelaxedArrayExceptions and CompilationRelaxations.RelaxedNullReferenceException are mentioned ... |
One thing to keep in mind with your drop/create scripts in SQL Server is that object-level permissions will be lost. We changed our standard to use ALTER scripts instead, which maintains those permissions.
There are a few other caveats, like the fact that dropping an object drops the dependency records used by sp_d... |
Advantages of Visual Studio 2008 over Visual C++ 6.0:
- Much more standards compliant C++ compiler, with better template handling
- Support for x64 / mobile / XBOX targets
- Improved STL implementation
- Support for C++0x TR1 (smart pointers, regular expressions, etc)
- Secure C runtime library
- ... |
There are some hacks you can use in the CSS to target only Safari, such as putting a hash/pound (#) after the semi-colon, which causes Safari to ignore it. For example
.blah { color: #fff; }
.blah { color: #000;# }
In Safari the colour will be white, in everything else it will be black.
However, you ... |
This is not the expected behaviour. I was going to suggest reporting this as a bug on lighthouse, but I see you've [already done so](http://rails.lighthouseapp.com/projects/8994/tickets/1021-rake-dbmigrate-doesnt-detect-new-migration)! If you provide some more information (including OS/database/ruby version) I will t... |
Yes - we had a problem in that many of the administrators of our software found it too difficult to use. To solve this we used Microsoft's WinForms IUI framework build a new configuration and management tool for our software.
User feedback has been extremely positive, particularly with everything being task driven ... |
Do you mean:
public class MyServlet extends HttpServlet {
public void init(final ServletConfig config) {
final String context = config.getServletContext();
...
}
...
}
Or something more complex? |
I think he wants to send files to it while its in another device, not plug it in and use it to transmit files like an antena directly connected to the machine. |
An answer for experts only:
List<Integer> ints = ...;
String all = new ArrayList<Integer>(ints).toString();
String[] split = all.substring(1, all.length()-1).split(", ");
List<String> strs = Arrays.asList(split);
|
Handles vs. AddHandler |
|vb.net|.net-3.5|garbage-collection| |
Is there an advantage to dynamically attaching/detaching event handlers?
Would manually detaching handlers help ensure that there isn't a reference remaining to a disposed object? |
Most of the the time the framwork takes care of that for you. Do you have an example of what you're trying to achieve? |
Check the DocType. Here is what I have found useful
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >
Place this in your user control (or the page that uses it) and all should be well. I had a similar problem with a collapsible extender and this worked for me... |
The comma operator combines the two expressions either side of it into one, evaluating them both in left-to-right order. The value of the right-hand side is returned as the value of the whole expression.
- <code>(expr1, expr2)</code> is like <code>(expr1 && expr2)</code> but both <code>expr1</code> and <code>expr... |
|c|pointers|nested| |
Is there a way to access web.xml properties from a Java Bean? |
|java|design-patterns|servlet| |
Is there any way in the Servlet API to access properties specified in web.xml (such as initialization parameters) from within a Bean or Factory class that is not associated at all with the web container?
For example, I'm writing a Factory class, and I'd like to include some logic within the Factory to check a hierar... |
|java|design-patterns|servlets| |
Tomcat doFilter() invoked with committed response |
|java|tomcat|servlet| |
I have a Tomcat Filter that delegates requests to the a handling object depending on the URL. This is the only filter in the FilterChain. I have an Ajax app that hammers this filter with lots of requests.
Recently I noticed an issue where the filter's doFilter method is often called with a committed response as a pa... |
|java|tomcat|servlets| |
Sharepoint: executing stsadm from a timer job + SHAREPOINT\System rights |
|sharepoint|timer|job|impersonation|privileges|stsadm| |
|sharepoint|jobs|timer|privileges|impersonation|stsadm| |
I have an unusual situation in which I need a sharepoint timer job to both have local administrator windows privileges and to have SHAREPOINT\System sharepoint privileges.
I can get the windows privileges by simply configuring the timer service to use an account which is a member of local administrators. I understan... |
If you want simple, then use a dictionary where the keys are the usernames and the values are the passwords (encrypted with something like SHA256). [Pickle][1] it to/from disk (as this is a desktop application, I'm assuming the overhead of keeping it in memory will be negligible).
For example:
import pickle
... |
To read user input you can try [the cmd module][1] for fancy stuff and [raw_input][2] for less fancy stuff.
Command line inputs are in sys.argv. Try this in your script:
import sys
print sys.argv
There are two modules for parsing command line options: [optparse][3] and [getopt][4]. If you just want to... |
Implements several interfaces with conflict in signatures |
|java|collections|implementation| |
Lasty, I tried to implements an hybrid structure in Java, something that looks like:
public class MapOfSet<K, V extends HasKey<K>> implements Set<V>, Map<K, Set<V>>
Where HasKey is the following interface:
public interface HasKey<K> {
public K getKey();
}
Unfortunately, there are some ... |
Lasty, I tried to implements an hybrid structure in Java, something that looks like:
public class MapOfSet<K, V extends HasKey<K>> implements Set<V>, Map<K, Set<V>>
Where HasKey is the following interface:
public interface HasKey<K> {
public K getKey();
}
Unfortunately, there are some ... |
What workarounds/coping-strategies have you implemented to deal with multiple tabs v. two connection limit issues? |
|ajax|tabs|two-connection-limit| |
The two connection limit can be particularly troublesome when you have multiple tabs open simultaneously. Besides "ignore the problem," what coping mechanisms have you seen used to get multiple tabs both doing heavily interactive Ajax despite the two connection limit? |
How to fix a corrupt Delphi 2009 Install |
|delphi| |
I installed both the Delphi 2009 trial and actual release via the web installer when I received them and experienced the same errors when installing both.
Both times it appears that the core web installer failed when it went to spawn the additional install packages for boost, documentation and dbtools. (It brought ... |
You should look at the [Quartz library][1] from OpenSymphony. Very easy to use and perfect for this kind of thing.
Also, there's a fantastic abstraction for Quartz in the Spring framework.
[1]: http://www.opensymphony.com/quartz/ |
You should look at the open-source [Quartz library][1] from OpenSymphony. Very easy to use and perfect for this kind of thing.
TimerTasks are best suited for running something in a short time in the future. But for a repeated execution in a large timeframe such as this, Quartz excels. You can even keep your list of ... |
This MSDN page walks through enumerating the available classes: [How to: List the Classes in a WMI Namespace][1]
for retrieving properties from a class:
ManagementPath l_Path = new ManagementPath(l_className);
ManagementClass l_Class = new ManagementClass(myScope, l_ManagementPath, null);
fore... |
**From the PHP install.txt doc for PHP 5.2.6:**
Server modules provide significantly better performance and additional
functionality compared to the CGI binary.
<br /><br />
**For IIS/PWS:**
Warning
By using the CGI setup, your server is open to several possible
attacks. Please read our CG... |
Magento is pretty good, and really powerful, but getting to grips with how to go about extending/replacing things is pretty tricky. The codebase is massively flexible, and just about anything can be replaced or extended, but there's very little documentation on how to go about doing it.
There are plenty of 3rd-part... |
visually customize autocomplete in Wicket |
|autocomplete|wicket| |
How can I visually customize autocomplete fields in Wicket (change colors, fonts, etc.)? |
MVC Preview 4 - No route in the route table matches the supplied values. |
|asp.net-mvc| |
I have a route that I am calling through a RedirectToRoute like this:
return this.RedirectToRoute("Super-SuperRoute", new { year = selectedYear });
I have also tried:
return this.RedirectToRoute("Super-SuperRoute", new { controller = "Super", action = "SuperRoute", id = "RouteTopic", year = selectedYe... |
|asp.net|mvc| |
I have a route that I am calling through a RedirectToRoute like this:
return this.RedirectToRoute("Super-SuperRoute", new { year = selectedYear });
I have also tried:
return this.RedirectToRoute("Super-SuperRoute", new { controller = "Super", action = "SuperRoute", id = "RouteTopic", year = selectedYe... |
|asp.net|asp.net-mvc|mvc| |
|asp.net|asp.net-mvc|mvc|routing| |
Confronted with this situation last year, I wrote a small wrapper (in java) that read the inputs from a temp file, invoked the jar and placed the output in anther temp file. The .NET project would create the input file, call the JVM and start the wrapper, wait for it to finish and read the output file. Quick and Dirty.... |
IQueryable and IEnumerable both work. But you want to use a type specific version, IQueryable<T> or IEnumerable<T>.
So you'll want to create a type to keep the data.
var myData = from a in db.MyTable
where a.MyValue == "A"
select new MyType
{
... |
IQueryable and IEnumerable both work. But you want to use a type specific version, IQueryable`<`T`>` or IEnumerable `<`T`>`.
So you'll want to create a type to keep the data.
var myData = from a in db.MyTable
where a.MyValue == "A"
select new MyType
{
... |
How to I merge XML from distinct DomDocuments. |
|.net|xml| |
What is the easiest way to merge Xml from two distinct Dom Documents? Is there a way other than using the Canonical [DataReader][1] approach and then messing with the outputted DOM. What I basically want is to AppendChild to XmlElements without getting: "The node to be inserted is from a different document context." ... |
You might want to look at <A HREF="http://fetchmail.berlios.de/">Fetchmail</A>, as this sounds like the problem it was designed to solve. Fetchmail retrieves mail from POP/IMAP/etc servers and forwards it to SMTP/LMTP/etc servers. Fetchmail has the advantage of a few years and lots of users ironing out problems with va... |
Rails BLOB support |
|ruby-on-rails|blob| |
I'm going to be starting a project soon that requires support for BLOBs (Binary Large OBjects: basically big binary files stored within the database). I'd like to use Ruby on Rails for the webapp, but I'm concerned with the BLOB support. In my experience with other languages, frameworks, and databases, BLOBs are often ... |
Use 'raw_input' for input from a console/terminal.
if you just want a command line argument like a file name or something e.g.
$ python my_prog.py file_name.txt
then you can use sys.argv...
import sys
print sys.argv
sys.argv is a list where 0 is the program name, so in the above example ... |
Execute program from within a C program |
|c|linux| |
How do I run another program from within my C program, I need to be able to write data into STDIN of the programed launched (and maybe read from it's STDOUT)
Not sure if this is likley to be a standard C function, but I need the solution to work under Linux.
Thanks
Simon |
I don't believe so, although you can upload standard ASPX files into SharePoint and have them operate I'm pretty sure that the URL rewritting is where it would come unstuck. |
The best way to process command line arguments is the [`optparse` module.][1]
Use `raw_input()` to get user input. If you import the [`readline module`][2] your users with have line editing and history.
[1]: http://docs.python.org/lib/module-optparse.html
[2]: http://docs.python.org/lib/module-readline.ht... |
The best way to process command line arguments is the [`optparse` module.][1]
Use `raw_input()` to get user input. If you import the [`readline module`][2] your users will have line editing and history.
[1]: http://docs.python.org/lib/module-optparse.html
[2]: http://docs.python.org/lib/module-readline.ht... |
You want to use <pre>popen</pre> It gives you a unidirectional pipe with which you can access stdin and stdout of the program.
popen is standard on modern unix and unix-like OS, of which Linux is one :-)
Type
<pre>man popen</pre>
in a terminal to read more about it.
Cheers,<br/>
Steve |
I am not sure there really is a difference. The traditional BODMAS (brackets, orders, division, multiplication, addition, subtraction) or PEDMAS (parentheses, exponents, division, multiplication, addition, subtraction) are just subsets of all the possible operations and denote the order that such operations should be ... |
Well, WCF is designed to be consumed by non-browsers, so there really is no way to expect that a WCF response can contain Javascript that will be automatically executed by the client. |
Forget lazy initialization, it's too problematic. This is the simplest solution:
public class A {
private static A singleton = new A();
private A() {}
public A getInstance() {
return singleton;
}
} |
How to read/write dBase III files using C#/.NET ODBC or OLE? |
|c#|.net|dbf|dbase| |
I have searched for various techniques on how to read/write dBase III (dbf) files using OLEDB or ODBC with C#/.NET. I have tried almost all of the tecniques posted, but without success. Can someone point me in the right direction?
Thanks for your time. |
There's no general answer. It depends on how the temp table is being used.
The temp table may reduce IO by caching rows created after a complex filter/join that are used multiple times later in the batch. This way, the DB can avoid hitting the base tables multiple times when only a subset of the records are needed.
... |
i'd look into MSBuild or ANT |
I found this blog to be an amazing resource about the arcanes of C++ : [C++ Truths][1]
[1]: http://cpptruths.blogspot.com/ |
WPF Can't Databind to an Interface? |
|wpf| |
I'm trying to bind controls in a WPF form to an interface and I get a runtime error that it can't find the interface's properties.
Here's the class I'm using as a datasource:
public interface IPerson
{
string UserId { get; set; }
string UserName { get; set; }
string Email { get... |
Public Shared ReadOnly Property rubrique_id() As Nullable(Of Integer)
Get
If Current.Request.QueryString("rid") <> "" Then
Return CInt(Current.Request.QueryString("rid"))
Else
Return Nothing
End If
End Get
End Property
|
Poster, please clarify your question.
Almost all responses seem to think you're asking for a sockets tutorial; I read your question to mean you need to create a raw socket capable of sending arbitrary IP packets.
As I said in my previous answer, some OSes restrict the use of raw sockets.
http://linux.die.net/man... |