I'm having an issue with updating the database. The app shows the updated value, but the database does not. No errors returned. My table has a PK. Using DotConnect for Oracle, but the LINQ syntax is the same.
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
DataCon...
Is it a violation of the Persistance igorance to inject a repository interface into a Entity object Like this. By not using a interface I clearly see a problem but when using a interface is there really a problem? Is the code below a good or bad pattern and why?
public class Contact
{
private readonly IAddressRepository _addressRepo...
I have seen these terms used interchangebly on the web for objects (.Net). Could someone explain the difference between them.
POCO
Entity
Model
Domain Object
Active Record
Are Entities and POCO the same/similar?
I normally think as Model objects as being part of the UI layer of an N-Tier architecture, is this correct?
Are there ...
I want to escape HTML tags to entity names, taking text from a textarea and putting the result in a second textarea such that:
<mytag> becomes <mytag>
I'm using .html() and .text() going back and forth OK. My problem is dealing with the textarea element, which acts a little different....
It works fine if I first place the text ...
i use jquery.ajax to save a rich text area .
corr=some.innerHTML(); /* corr='< some text <' */
$.ajax({
type:"POST", url:"flatplan/save_corr.php",
data:"corr="+corr+"&IDFS="+IDFILES,
success: function(msg){
},
error:function(x,e){
ajax_errors(x,e);
}
});
The problem is that the corr variable can...
I am refactoring an old procedural PHP website into a tasty OOP application with a light sprinkling of Domain Driven Design for added flavour.
I keep stumbling upon cases where I have a need for classes that can have subclasses which are either entities or value objects.
An url object, for example. There are a zillion urls out there an...
I have a simple XML file like so:
<?xml version="1.0" encoding="UTF-8"?>
<foo attr="blah ° blah"/>
When I load it into the .NET XmlDocument and issue a Save, i.e.:
xmlDoc = New XmlDocument()
xmlDoc.Load("c:\temp\bar.xml")
xmlDoc.Save("c:\temp\bad.xml")
the new XML file contains the resolved amp 176 (a degree sign). This then b...
Hi there. I am writing a fairly basic GreaseMonkey script that locates text in a specific element and then uses that text to do things later. The relevant bits of code are as follows:
In the HTML there is a span with the class 'someclass', which contains a small string of text:
<span class="someclass">some text</span>
Then in the Jav...
I have a problem with entity versioning. Here's what I want to archive:
Let's say that I have entity class A (POJO with javax.persistance.* annotations). It's in relations with other entities. Then I need to insert new version of A. All rows should still reffer to old one, but it should be marked as archived and new version should be in...
Imagine two tables: Shifts, RANK_S_DAY. Shifts contains a ShiftDate column which is DateTime and RANK_S_DAY has a DayOfWeek column. I need to join (int)ShiftDate.DayOfWeek equals DayOfWeek. I understand why it won't work, but I'm not quite sure how I can change it. The Exception is:
The specified type member 'DayOfWeek' is not su...
I am evaluating hundreds of thousands of html files. I am looking for particular parts of the files. There can be small variations in the way the files were created
For example, in one file I can have a section heading (after I converted it to upper and split then joined the text to get rid of possibly inconsistent white space:
u'KEY...
i was wondering if the crawlers and robots can decode html entities for example in my html i have something like:
salariés
do they read it like that? or something like:
salariés
which option is better for SEO?
...
I keep searching the web for examples of the new fluent API syntax in Microsoft's Entity Framework technology previews ... I come up with bits and pieces here and there.
Is there any reliable place to go to find ALL the possibilities? And maybe something that explains them a bit ("HasRequired", "WithMany", etc.)?
FYI, I am specifically...
Hey,
I was wondering what should I do with my entities? For example, a class named Articles, with a few datamembers (name/title/date) and getters & setters. I could add these to my Articles datamember, but it's better practice to seperate those. So what do you think?
Thanks!
...
I'm tryng to download a web page in java with the following:
URL url = new URL("www.jksfljasdlfas.com");
FIle to = new File("/home/test/test.html");
Reader in = new InputStreamReader(url.openStream(), "UTF-8");
Writer out = new OutputStreamWriter(new FileOutputStream(to), "UTF-8");
int c;
while((c = in.read()) != -1){
out.write(c)...
I have this function to ensure every img tag has absolute URL:
function absoluteSrc($html, $encoding = 'utf-8')
{
$dom = new DOMDocument();
// Workaround to use proper encoding
$prehtml = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset={$encoding}\"></head><body>";
$posthtml = "</body></html>...
I'm working with ASP.NET 3.5 SP1 and I have a question that I've been stuck on.
I have an ASPX page on which I have 2 repeater controls, 1 nested inside the other.
From the code behind I have a simple LINQ To Entities query which retrieves the data and I then bind this data to the repeater controls.
The ASPX page is shown below:
<asp:Re...
What I'm trying to build is an application that allows users to add a category to the first entity (CategoryItem) and then add feeds to that via a second entity (FeedItem).
So far, the CategoryItem entity has *action attribute which is used as the naming of the category (String). The FeedItem entity has two attributes, *feedName and *f...
Hello!
I am working on a school-project with two classmates. Our task is to make a dynamic gallery for web.
So we got the whole gallery up and running perfect, except chrome is acting mighty weird about it.
We have our pictures uploaded in blob, as well as our thumbnails. We load them from the database through php.
<div id="content_righ...
Good day,
I'm stuck with a problem this morning. I found out that content property which is nice but I can't use HTML entities in it.
More specifically, I would like to use the é
This is what I tried: content: 'test with eacute \233'; but the result is test with eacute ÿ
I've also tried \0233, \0233c, \233c
I don't want to ch...