Using EF we can use LINQ to read data which is rather simple (especialy using fluent calls), but we have less control unless we write eSQL on our own.
Is writing eSQL database actually data store independant code?
So if we decide to change data store, can the same statements still be used?
Is writing eSQL strings in your code pose any serious…
Hello everyone.
I began studying Java Regular Expression recently and I found some really intersting task.For example,I now need to dig out "Product Name","Product Description" and "Sellers for this product" out of the following HTML code.(I am sorry for the big chunck of code,but it is very straightforward)
<td class="sr-check">…
I have a text file that looks like this:
adapter 1: LPe11002
Factory IEEE: 10000000 C97A83FC
Non-Volatile WWPN: 10000000 C93D6A8A , WWNN: 20000000 C93D6A8A
adapter 2: LPe11002
Factory IEEE: 10000000 C97A83FD
Non-Volatile WWPN: 10000000 C93D6A8B , WWNN: 20000000 C93D6A8B
Is there a way to get this information into an anonymous…
I'm working on a WPF app and I understand the command pattern pretty well, but I've found that there are several different implementations of the command pattern for MVVM. There's Josh Smith's implementation in his WPF sample app, the DelegateCommand from Prism, and the CommandBindings implementation.
My question is, what is the…
Is there a resource on the web that describes various form scenarios in ASP.NET MVC, and gives example solutions within a sensible, consistent design philosophy?
Examples of such scenarios might be:
One-to-many forms, like invoice data-entry forms.
Foreign-table forms such as Add New User in a form that requires specifying a…
I have written a small app and put it on facebook. I got an application ID and secret. Then I wrote the following script to access my app (just as told on the facebook page).
<?php
require './src/facebook.php';
$facebook = new Facebook(array(
'appId' => 'xxxx',
'secret' => 'xxxx',
'cookie' => true, //…
My company is switching from Subversion to Mercurial. We're using .NET for our product. We have a solution with about a dozen projects that are separate modules with no dependencies on each other. We're using a central repo on a server with push/pull for our integration build.
I'm trying to figure out if I should create…
Can somebody tell me, why does Linq to Entities translate many to 1 relationships to left outer joins instead of inner joins? It relation was many to 0..1. There's referential constraint on DB itself, that ensures there's a record in the right table, so inner join should be used instead.
Is it possible to write LINQ in…
I have some code which takes a few minutes to process, it has to connect to the web for each string in a long array, each string is a url. I want to make it so that everytime it connects, it should refresh the jtextarea so that the user is not staring into a blank page that looks frozen for 20 min. or however long it…
I'm trying to limit the number of connections my server will accept using semaphores, but when running, my code doesn't seem to make this restriction - am I using the semaphore correctly? eg. I have hardcoded the number of permit as 2, but I can connect an unlimited number of clients...
public class EServer…
During testing I have a mock object which sets errno = ETIMEDOUT; The object I'm testing sees the error and calls strerror_r to get back an error string:
if (ret) {
if (ret == EAI_SYSTEM) {
char err[128];
strerror_r(errno, err, 128);
err_string.assign(err);
} else {
…
Laying out the verticies in a DAG in a tree form (i.e. verticies with no in-edges on top, verticies dependent only on those on the next level, etc.) is rather simple without graph drawing algorithms such as Efficient Sugimiya. However, is there a simple algorithm to do this that minimizes edge crossing?…
I want a build rule to be triggered by an include directive if the target of the include is out of date or doesn't exist.
Currently the makefile looks like this:
program_NAME := wget++
program_H_SRCS := $(wildcard *.h)
program_CXX_SRCS := $(wildcard *.cpp)
program_CXX_OBJS :=…
Im using Microsoft SQL Server which I think is T-SQL or ANSI SQL.
I want to search a database with a string. The matches that fit the begging of the string should come first then sort alphabetically.
I.e. If the table contains FOO, BAR and RAP
a search for the string 'R'…
Hi, I'm planing to build some database project.
One of the tables have a lot of attributes.
My question is: What is better, to divide the the class into 2 separate tables or put all of them into one table. below is an example
create table User { id, name, surname,...…
How do I display an image of arbitrary size without OOMing or downscaling the image.
I dont want to downscale due to zooming and dragging of the picture?
If it isnt possible to display an image of arbitrary size, how do I determine the maximum possible size of the…
I have some code that returns unique elements in my dictionary, but I would also like to return the count of the duplicate elements. Basically change dictionary[key, uniqueelement] to dictionary[uniqueelement, count]. Here is my code that just returns the unique…
A question to maybe some who have worked extensively with WinUSB APIs or use mode USB drivers - Does anyone know if the WinUSB API or a user mode driver can be used as a passive observer of USB connections, capturing notification of interrupts, control requests,…
I find them a very natural way to extend existing classes, especially when you just need to "spot-weld" some functionality onto an existing class.
Microsoft says, "In general, we recommend that you implement extension methods sparingly and only when you have…
I am using Tuscany 1.6 and am trying to set the Delivery Mode JMS Binding to NON_PERSISTENT.
I've tried using uri="jms:MyService?deliveryMode=1" (which is what the spec (PDF) says to do)
but, I ended up getting the following exception:
Unknown token…
Hello there.
I have a question on the java applet.I've created a java applet,which is a board game,that can have a 2*2 array with row number and column number both set to 9 by default.
Now I want to extend my applet a bit,that the user can specify the…
I ran across the error Socket operation on non-socket in some of my networking code when calling connect and spent a lot of time trying to figure out what was causing it. I finally figured out that the following line of code was causing the problem:
…
I am looking for a PHP class that can parse an ICalendar (ICS) file and correctly handle timezones.
I already created an ICS parser myself but it can only handle timezones known to PHP (like 'Europe/Paris').
Unfortunately, ICS file generated by…