A non-programmer friend will be starting the Computer Science college course in a few months. I'd like her to try her hand at some programming before she starts her studies (the course itself expects one to know C, but it's an horrible language to learn to program at). What language would be the best to do so?
Related question: Best ways to teach a beginner to program?
I have a web application, that will log some information to a file. I am looking for a simple thread-safe non-blocking file logger class in c#. I have little experience with threading. I known there are great logging components out there like log4Net, Enterprise Library Logging Block, ELMAH, but I do not want an external dependence for my application. I was thinking about using this queue implementation http://www.codeproject.com/KB/cpp/lockfreeq.aspx
Is there any nice and simple way to access non QObject-based classes, such as QXmlQuery, QDateTime etc. from Qt Script?
The only way I see is to wrap QXmlQuery in another class that inherits QObject and declare as slot every function which I need to access from Qt Script:
void MyXmlQuery::setQuery ( const QString & sourceCode, const QUrl & documentURI )
{
realxmlquery_.setQuery(sourceCode, documentURI);
}
How can a static property reference a nonstatic method?
Example:
public static int UserID
{
get
{
return GetUserID();
}
}
private int GetUserID()
{
return 1;
}
When I try to compile this, I get the error: "An object reference is required for he non-static field, method or property "GetUserID()"
I am investigating for a tool that allows a user to perform in a user friendly way queries to database for extracting datas and creating reports.
Primary requirement is that we can't know queries users are going to do. So we need to design a flexible UI allowing them to specify in a non technical way.
My question is: do you know any tool that does something similar? Have you some inspiring user interface?
I keep getting 'warning: control reaches end of non-void function' with this code:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section ==0)
{
return [comparativeList count];
}
if (section==1)
{
return [generalList count];
}
if (section==2)
{
return [contactList count];
How can I get rid of this warning?
Thanks.
I am trying to get logging via the application.ini file going and I am getting stuck with an error.
resources.log.db.writerName = "Db"
resources.log.db.writerParams.db.adapter = "PDO_SQLITE"
resources.log.db.writerParams.db.dbname = ROOT "/data/tmp.db3"
resources.log.db.writerParams.db.table = "logs"
resources.log.db.writerParams.db.columnMap.priority = "priority"
resources.log.db.writerParams.db.columnMap.message = "message"
Fatal error: Call to a member function insert() on a non-object in /var/www/libs/zend/library/Zend/Log/Writer/Db.php on line 137
IE has WinInet API, such as GetUrlCacheEntryInfo, to read and manipulate IE browser cache.
Is there a similar API for non IE browsers such as Firefox or Chrome? If so where can I get more info?
Thanks
Update:
According to following (http://stackoverflow.com/questions/61453/accessing-firefox-cache-from-an-xpcom-component) the WinInet function GetUrlCacheEntryInfo() can be accomplished by nsICacheSession.openCacheEntry() to get nsICacheEntryDescriptor. Is there an equivalent WinInet function CreateUrlCacheEntry() which will create a cache entry?
CCK for Drupal has the handy feature of allowing a single CCK field to accept multiple values via a "add another item" button that results in an array of data in the node.
I'm wondering if there's any easy way of adapting this for a non-CCK form that I'd be calling by drupal_get_form. I'd rather not have to re-invent the wheel with multi-step form techniques.
Anyone done this?
Is it possible to use a UINavigationController in such a way that it doesn't use the full window?
I've tried setting it's view's frame as well as adding it's view to another (non-fullscreen) view instead of the window, and neither seems to work.
Hi,
I have some non well-formed xml (HTML) data in JAVA, I used JAXP Dom, but It complains.
The Question is :Is there any way to
use JAXP to parse such documents ??
I have a file containing data such as :
<employee>
<name value="ahmed" > <!-- note, this element is not closed, So it is not well-formed xml-->
</employee>
Hi all,
I have a CherryPy server with a Django application running as a Windows service, inside a controller I need to make a call to wmic, the problem is, so far I have only been able to implement a blocking operation.
Does anyone have any recommendation for a non blocking operation so, at least more then one person at a time can access this controller and extract information from wmic?
Thanks in advance,
Anders
I select a number of non-clustered indexes from my database with the following:
SELECT sys.objects.name tableName,
sys.indexes.name indexName
FROM sys.indexes
JOIN sys.objects ON sys.indexes.object_id = sys.objects.object_id
WHERE sys.indexes.type_desc = 'NONCLUSTERED'
AND sys.objects.type_desc = 'USER_TABLE'
I'd like to run the following over each of the results:
ALTER INDEX indexName ON tableName DISABLE
How would I go about doing this? Is there a better way?
I'm writing all sorts of multi lingual text to .txt files using AIR's
fileStream.writeUTFBytes()
For english characters everything works perfectly. But as soon as there are chinese, arabic or any other non-english characters the sentences are totally messed up.
For example:
???????????....
becomes
ÂØpÁùħßÂèîÊëÑÂO±Â?àÁöÑÁ°ÆÊ=°Áà±....
How can this be fixed?
I am experiencing an issue where the string drawn on an image is putting non-letter characters in the wrong place, i.e. Hello World! draws on the jpg !Hello World
anyone else seen this?
Hi,
What is best pratices for inject and manage Session/Transaction for NHibernate using StructureMap for a Non Web Application like an Windows Service ?
In a web context, we use PerRequest Session management lifecycle using the Hybrid Lifecycle of StructureMap but for a Windows Service, i can't handle IDisposable UnitOfWork ...
Thanks.
Hello,
Am struggling a bit with this.
Am declaring:
BYTE *pImage = NULL;
Used in call:
m_pMyInterface-GetImage(i, &imageSize, &pImage);
Visual C++ 2003 compiler error:
error C2664: 'CJrvdInterface::GetImage' : cannot convert parameter 3 from 'BYTE **__w64 ' to 'BYTE **& '
A reference that is not to 'const' cannot be bound to a non-lvalue
The method called is defined as:
void CMyInterface::GetImage(const int &a_iTileId, ULONG *a_pulImageSize, BYTE** &a_ppbImage)
{
(...)
Any help much appreciated,
Bert
I need to write a sql statement to select all users ordered by lastname, firstname. This is the part I know how to do :) What I don't know how to do is to order by non-null values first. Right now I get this:
null, null
null, null
p1Last, p1First
p2Last, p2First
etc
I need to get:
p1Last, p1First
p2Last, p2First
null, null
null, null
Any thoughts?
Hi -
My company makes DVRs that specialize in streaming live and recorded video. The video is encoded using standard MPEG-4 codecs so the codecs in Android should have no trouble with them. However, the video is recorded using non-standard file formats and is streamed using our proprietary protocol (among other things we embed additional data such as watermarks with each frame of video). Is there any way I can take my stream pull out the frames and have it play on an Android device?
Thanks!
The relationship 'FK_EXTERNAL_ISMARKETI_MARKETIN' has columns that are not part of the key of the table on the primary side of the relationship. The relationship was excluded.
USE [Instruments.UnitTest]
GO
ALTER TABLE [Instr].[ExternalIdentification] WITH CHECK ADD CONSTRAINT [FK_EXTERNAL_ISMARKETI_MARKETIN] FOREIGN KEY([InstrumentID], [MarketInstrumentID])
REFERENCES [Instr].[MarketInstrument] ([InstrumentID], [MarketInstrumentID])
GO
ALTER TABLE [Instr].[ExternalIdentification] CHECK CONSTRAINT [FK_EXTERNAL_ISMARKETI_MARKETIN]
GO
I'm using an association for NON-PRIMARY KEY columns, is this possible in the EF4?
How would you describe and explain Cocoa in non-technical terms, with lots of analogies to common, everyday things. For example, imagine you are describing it to a 5-year-old who keeps asking why? at the end if each explanation. This would invariable delve into the theory of OO so it could get lengthy, but the concept is important to the 'why' of Cocoa.