I can think of lots of ways to do this on my own, but I was hoping to find some sort of best practice and have been having trouble finding other's experiences. I want to create easily themed HTML and provide a real-time selector for the user to experiment with themes.
I want to do something like the "Change Appearance" tab at http://my.yahoo.com…
So here is what I have: a PDF form (job application) that a client is requesting to put on their website as a form and the data gets sent to them when an applicant on the site fills the form out. My idea is as follows: dissecting the PDF, taking its fields and making the HTML form, then processing on the server side, creating the new PDF and…
Hi all.
Problem:
I have CaretListener and DocumentListener listening on a JTextPane.
I need an algorithm that is able to tell which line is the caret at in a JTextPane, here's an illustrative example:
Result: 3rd line
Result: 2nd line
Result: 4th line
and if the algorithm can tell which line the caret is in the JTextPane, it…
Hi,
I need to retrieve data from a specific time period.
The query works fine until I specify the time period. Is there something wrong with the way I specify time period? I know there are many entries within that time-frame.
This query returns empty:
SELECT stop_times.stop_id, STR_TO_DATE(stop_times.arrival_time, '%H:%i:%s') as…
To begin with, I LOVE LINQ TO SQL. It's so much easier to use than direct querying.
But, there's one great problem: it doesn't work well on high loaded requests. I have some actions in my ASP.NET MVC project, that are called hundreds times every minute.
I used to have LINQ to SQL there, but since the amount of requests is…
I've seen it happen reasonabley often: I write an application in Delphi and when I compile it, the virus-scanner tells me that I've created a virus and thus immediately deletes the executable again. It's annoying but reasonable easy to fix by doing a full rebuild, deleting the *.dcu files first and sometimes by simply…
I am using CastleProject ActiveRecord and I use lazy load feature of this ORM. In order to make lazy load work, it is required to create SessionScope. I do this in Program.cs:
public static SessionScope sessionScope;
private static void InitializeActiveRecord()
{
ActiveRecordStarter.Initialize();
sessionScope =…
How can I escape ContainsTable control keywords (such as NEAR or ISABOUT) so that Full Text Search will actually look for those words, and not treat them as control keywords?
#mydiv {
position:absolute;
left:0px;
top:0px;
width:83px;
height:83px;
}
<div id="mydiv"></div>
That's my style for my DIV, which sits on the top left corner of my page.
I want this div to be click-able and go to a link.
I have a website, its content is in English. I want to access my website in two languages (or more) English and Arabic.
In this case, how do I build my website with these two languages?
Can anyone give an example for this or any reference?
This is the most peculiar thing.
It is from an old in house CMS.
When I attempt to submit my changes, it prompts to save the file linked in the action attribute of the form.
Headers
Request
POST /~site/edit/articles/article_save.php?id=54 HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0…
What would be possible/best practice for a Photo Contest app?
Saving photos to a database and refreshing the contents with an "infinite session"? Exporting photos to my site getting written consent from my user?
I've gathered that it won't be possible to present users with a number of…
When unhandled exception is handled in wxWidgets application in Windows, program shows Abort-Retry-Ignore message produced by Widgets exception handler. I want to get normal unhandled exception behavior: program should terminate with standard Windows unhandled exception dialog. Can I…
In trying to learn JavaScript closures, I've confused myself a bit.
From what I've gathered over the web, a closure is...
Declaring a function within another function, and that inner function has access to its parent function's variables, even after that parent function has…
I have a class that basically stores files in amazon s3.
Here is what it looks like (simplified)
public class S3FileStore
{
public void PutFile(string ID, Stream content)
{
//do stuff
}
}
In my client app, I want to be able to call:
var s3 = new()…
In my 2nd ASP.NET MVC project I'm facing a very weird problem: when I call the SubmitChanges method of the DataContext class, nothing updates in the database. It's weird because everything works fine with my first project.
I'm using a remote database created in Sql Server…
I discovered somewhat by accident that if you make a UIButton in Interface Builder and type in Plus in the image field, a + image appears for the button. A similar result comes from typing Minus.
I am wondering if this is a bug, or if there is some way the poor…
I'm building a web site that needs to stream video and be friendly for handheld devices (especially the iPhone). Some handhelds don't support Flash so I'm avoiding the use of a Flash player. How does Youtube stream its videos so that they play on both desktops…
I'm trying to get the result of a COUNT as a column in my view.
Please see the below query for a demo of the kind of thing I want (this is just for demo purposes)
SELECT
ProductID,
Name,
Description,
Price,
(SELECT COUNT(*) FROM ord…
I deleted files in my SVN, and dragged new files into it over WINSCP.
Now, I try to add all the files and commit, but it won't let me.
$ svn add *
svn: '.' is not a working copy
svn: Can't open file '.svn/entries': No such file or directory
Hi:
I am using
myXmlDataDoc.DataSet.ReadXml(xml_file_name, XmlReadMode.InferSchema);
to populate the tables within the dataset created by reading in a xml schema using:
myStreamReader = new StreamReader(xsd_file_name);…
Hello,
HttpContext.Current.Request.IsLocal is not available in Global.Asax (Request is not available in the context).
How else could I safely determine if my ASP.NET MVC application is started locally or not?
Thank you!
In another Q I saw someone mention LOGO and it reminded me of some programming language from the past, mostly used for educational purposes. Basically, you would have to program a turtle with a pen through it's back. By…