Is there anyway to batch two different select queries to either SQLite or SQLCE and get the two result sets back in C#? If not, is there an embedded database that handles this?
Is RDF still used widely for content syndication? Specifically, I know only of Slashdot as a large scale website syndicating content in that format (say versus RSS).
Understandably this might seem vague to answer so more specifically:
Can anyone list any larger sites similar in scale to Amazon or CNN using it?
Any web based publishing platforms (Wordpress, Joomla, etc...) that generate syndication feeds with this xml vocabulary.
Any other more quantifiable evidence that it is used for syndication online.
I understand that RDF may be a parent specification but in this case I'm talking about sites that syndicate content using <rdf as a root element and heavily leveraging elements from the RDF namespace:
http://www.w3.org/1999/02/22-rdf-syntax-ns#
When I do something like the following:
$site = ORM::factory('site')->where('name', '=', 'Test Site')->find();
$users = $site->users;
$deletedusers = $users->where('deleted', '=', '1')->find_all();
$nondeletedusers = $users->where('deleted', '=', '0')->find_all();
The contents of $deletedusers is correct, but the $nondeletedusers contains every non-deleted user, not just the ones in the loaded $site.
What am I doing wrong?
After tracing the DB activity from a DNN 5.2.3 site I noticed that there are 15 calls to the "dbo.GetPortalAliasByPortalID @PortalID=0" sproc, all one after the other.
What is the reason for this? I am looking at performance problems and need to try and tie issues like these up.
Hello,
I'm having trouble with a query written in Linq and Lambda. So far, I'm getting allot of errors here's my code:
int id = 1;
var query = database.Posts.Join(database.Post_Metas,
post => database.Posts.Where(x => x.ID == id),
meta => database.Post_Metas.Where(x => x.Post_ID == id),
(post, meta) => new { Post = post, Meta = meta });
I'm new to using Linq, so I'm not sure if this query is correct.
I am trying to apply css on the first A element inside .Outer,
.Outer > a:first-child {font-weight:bold}
doesn't work. Why?
<div class="Outer">
<img src='image123.jpg' />
<a href="Default.aspx?ID=4083" id="ctl00_CPH_Main_Rep_List2_ctl03_HyperLink1">John Johnsson</a>
<a href="../Users/ViewList.aspx?module=Occupation&ID=70">Doctor</a>
<a href="../Workplaces/Default.aspx?ID=31">Mayo Clinica>
</div>
Hi, I'm working on how my company does documentation (especially programming documentation). I'd like to be able to synchronize sections of different Word documents, such that if a section in one document changes, the change is reflected in the other document, and vice versa. Is there a way to do this with Word, and if not, is there some word processing program that is good at this?
Is there a way to queue file uploads without resorting to Flash or Silverlight, just with cleverly used forms and JavaScript? Note that the upload should be executed asynchronously.
By "queuing" uploads I mean that if the user tries to upload multiple files, they should not be transferred simultaneously, but rather one at a time, in a single HTTP connection.
When a UITextField with custom frame (200 × 54 px) loses focus, the text looks a little bit blurry.
example screenshot
Is this a common problem? Any workaround / solution or am I doing something wrong?
Is this a bad idea?
Private Class GH_DataStructureEnumerator(Of Q As Types.IGH_Goo)
Implements IEnumerable(Of Q)
Implements IEnumerator(Of Q)
....
....
'Current, MoveNext, Reset etc.'
....
....
Public Function GetEnumerator_Generic() As IEnumerator(Of Q) _
Implements IEnumerable(Of Q).GetEnumerator
Return Me
End Function
End Class
This class is only visible as an IEnumerable(Of T) readonly property, and it saves me an additional class that wraps IEnumerator(Of T). But somehow it just seems wrong. Is there a better way?
Hi Everyone,
I'm creating a subclass of UIImageView that detects touches, and will move, rotate and scale the image based on the touches. However, I really feel like I'm reinventing the wheel here, and it's driving me nuts. Shouldn't this already exist somewhere?
Does anyone have any examples, or links to a class that is already doing this? Or if you have a class you've written, that'd be helpful too.
Thanks a lot in advance.
How have you like minded individuals tackled the basic challenge of filtering profanity, obviously one can't possibly tackle every scenario but it would be nice to have one at the most basic level as a first line of defense.
In Obj-c I've got
NSString *tokens = [text componentsSeparatedByString:@" "];
And then I loop through each token to see if any of the keywords (I've got about 400 in a list) are found within each token.
Realising False positives are also a problem, if the word is a perfect match, its flagged as profanity otherwise if more than 3 words with profanity are found without being perfect matches it is also flagged as profanity.
Later on I will use a webservice that tackles the problem more precisely, but I really just need something basic. So if you wrote the word penis it would go yup naughty naughty, bad word written.
I'd like to add the XSLT 2 schema to Visual Studio 2010 to provide intellisense. I've added the schema to C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas (removing the XSLT 1 schema), but to no avail. The schema seems to have been parsed by Visual Studio, as I can hover my cursor over the namespace declaration in the stylesheet (xmlns:xsl="http://www.w3.org/1999/XSL/Transform") and see the comments from the new schema, however, intellisense still refers to the XSLT 1 implementation. For example the element has a warning that 'xsl:function is not yet available'.
Do I need to register the schema in some way? Any suggestions welcome.
Having four columns in advance datagrid like company,contact_person,product and date. In this, first i want to sort by product followed by company and followed by date. how can i do it in Advance datagrid.
Anybody knows please reply me asap. Advance thanks to u.
Are there good reasons why it's a better practice to have only one return statement in a function?
Or is it okay to return from a function as soon as it is logically correct to do so, meaning there may be many return statements in the function?
The XML schema spec seems vague on how to interpret an xs:time value when no time zone is specified. (See section 3.2.8.) Is there a common consensus on this (e.g. UTC or the local time zone)?
I can use the following codes to trim a string:
-(void) aMethod {
// myStr from a text box
NSString *trimedStr = [mystr stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
...
// should I release trimedStr?
}
Not sure if the result trimedStr is an autorelease string? How can I find out that?
Why is it that the mx.core.Container uses its contentPane sometimes, but doesn't at other times?
Or, in other words, how come the children of Container are only put into the contentPane if some complex logic decides that they should be put there? Why not simply always put all children in the contentPane?
Hi, I am a recent graduate and am looking to start a career in web development. Its kind of a catch 22 at the moment as I have a fair bit of programming experience from university but not really in web development and to get a job in web development a portfolio is typically required.
So, I am looking to start a building a few application in order to have something to show potential employers. Im more into the backend stuff although am just as comfortable with front end development.
Does anyone have any thoughts on some potential projects that would be both relatively quick (as i need to get a job soon!) to build but show off enough programming knowlege / skills to be impressive to employers.
At the moment i am also learning to use the zend framework and I would hope to find work using such a framework (mvc).
My initial thoughts would be things like a webmail app or maybe a custom CMS.
Any ideas would be greatley appreciated.
Hi, running Sinatra 1.0, I wanted to add a database table to my program. In my Rakefile I have a task
task :environment do
ActiveRecord::Base.establish_connection(YAML::load(File.open('config/database.yml'))["development"])
end
I have a migration task in my namespace that calls the migration code:
namespace :related_products do
desc "run any migrations we may have in db/migrate"
task :migrate => :environment do
ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil )
end
My console pukes out an error when the call to ActiveRecord::MIgrator.migrate() is made.
rake aborted!
undefined method `info' for nil:NilClass
The migration code itself is pretty simple... and presents me with no clues as to what this missing info class is.
class CreateStores < ActiveRecord::Migration
def self.up
create_table :stores do |t|
t.string :name
t.string :access_url
t.timestamps
end
end
def self.down
drop_table :stores
end
end
I am a little mystified here and am looking for some clues as to what might be wrong. Thanks!
Hi,
since the new SDK 1.1 is missing the tutorial for "ASPProviders", i am currently asking myself how i would implement a "azure session state provider" ( this is the path in the "old" SDK: C:\Program Files\Windows Azure SDK\v1.0\Samples\AspProviders )
Related threads:
http://stackoverflow.com/questions/1023108/how-does-microsoft-azure-handle-session-state
http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/2d1340ed-0ad0-456a-b069-aa6b85672102/
Has anyone an idea or even the old example project and could post some snippets of the config here?
I'm working through O'Reilly's "Learning Python" and having a problem with classes. I think I understand the concept, but in practice have stumbled upon this problem.
Fron page 88-89:
>>> class Worker:
def __innit__(self, name, pay):
self.name=name
self.pay=pay
def lastName(self):
return self.name.split()[-1]
def giveRaise(self, percent):
self.pay*=(1.0+percent)
Then the book says "Calling the class like a function generates instances of a new type ...etc" and gives this example.
bob = Worker('Bob Smith', 50000)
This gives me this error:
TypeError: this constructor takes no arguments.
And then I start muttering profanities. So what am I doing wrong here?
Thanks for the help.