I am starting my first "programming" project in PHP making some sort of web application that give the linux program, Motion, a decent web interface.
Anyways, I was curious as to how when real applications are programmed, do y'all go for a class for each view or one single class for the application altogether? I know this is more of a preference thing, I was just curious as to how it happens in real software.
Hi,
given a plain text file, how can I do, using bash, awk, sed, etc, to, at the line number NLINE, add the string STR, just n spaces after the end of the line?
So, for instance, if this is the line NLINE:
date march 13th
for 5 spaces, we get
date march 13th STR
and one gets the modification in a new file.
Thanks
I'm using a PHP framework which redirect all URL to the index.php file using the following rule:
RewriteRule ^(.*)$ /index.php/$1 [L]
However, I want to be able to use index.html IF ANY ONLY IF users hit the home page. For instance, if users hit http:// website.com it will render the index.html file. Any other URL will use index.php. Could someone help?
ThankS
Hi,
I've seen iphone related open source library which says something like,
"You need 4.0+ iOS build environment but the code will run on 3.0+ iOS device."
I wonder how those two requirements can differ and how can I tell a minimum 'device' iOS version which a certain api would need.
For instance I want to use UIGestureRecognizer but the apple doc says it's 3.2+, but I want my app run on 3.12+.
Is there a difference between build os requirement and device os requirement to run an app?
Thank you
Hi,
In the constructor of an object i need to create a WPF mediaElement object:
m_videoMedia = new MediaElement();
but the class can also be instantiated from a other thread so i need to use
Dispatcher.Invoke(DispatcherPriority.Normal,
(Action)(() => { m_videoMedia = new MediaElement(); }));
But how can I get the right dispatcher instance in that constructor :s
I have the following 2 macros:
#define SCOPED_ENUM_HEADER(NAME) struct NAME{ enum _NAME{
#define SCOPED_ENUM_FOOTER(NAME) };}; typedef NAME::_NAME NAMEtype;
Only the first instance of NAME get replaced by the passed NAME. What's wrong with it?
Is is to be used in such a way:
SCOPED_ENUM_HEADER(LOGLEVEL)
UNSET,
FILE,
SCREEN
SCOPED_ENUM_FOOTER(LOGLEVEL)
Thanks you
Hi All
I'm looking for any website(s) devoted and/or related to Operating System Development, and would love for you to kindly share any links you may have.
I have searched myself, but keep winding up at the same old sites, and am wondering if there are others that just don't get noticed by the major search engines or something.
I've put this as a community wiki, simply because I don't think it's very fair to judge an answer based on a single link.
Thank you.
Delete every 't'th (t1) node of a single linked list. In the resultant linked list, again delete 't'th node. Repeat this till only t-1 nodes remains.
For this i have come up with:
Traverse until you reach 't'th node, delete all the nodes till the end.
Is there any efficient way other than this?. Can any one please help me out. Thanks.
We have two installations of DB2.
When defining a foreign key with a long name, it works fine on one instance, but not on the other (we get a SQL0107N Name too long - max length is 18).
What is causing this different behaviour? Is there a parameter we can change or is it version dependant?
How to display the data of tables that are linked by a primary key and foreign key where the foreign key of the data repeats?
For ex. I have two tables, ParentTable and Childtable.
The primary key of ParentTable acts as the foreign key of ChildTable.
There are more than one record with same ParentId in ChildTable. How to retrieve them and display in a single Grid or List or any type of view?
I'm trying to create a program in C# that lists the content of a library in Windows Media Center (for instance the video library).
Is this possible using the Windows Media Center SDK, without having to create it as an addin for WMC, but as an "external" program, running on the same machine as WMC?
Hello guys,
I would like to ask what is the ideal folder structure for a MVC framework that should be able to support multiple installations. For example, I install xyz framework and i run two or more sites based on this single installation of xyz framework rather than installing the framework for each site.
This is probably done in Codeigniter too but i don't know much about CodeIgniter, so i need your suggestions. I know some of you might even have better idea than what is done by CodeIgniter, so please share.
I have a simple two vector dataframe (length=30) that looks something like this:
> mDF
Param1 w.IL.L
1 AuZgFw 0.5
2 AuZfFw 2
3 AuZgVw 74.3
4 AuZfVw 20.52
5 AuTgIL 80.9
6 AuTfIL 193.3
7 AuCgFL 0.2
8 ...
I'd like to use each of the rows to form 30 single value numeric vectors with the name of the vector taken from mDF$Param1, so that:
> AuZgFw
[1] 0.5
etc
I've tried melting and casting, but I suspect there may be an easier way??
Thanks in advance
BT
I would like to obtain all the versions of a given file in my SVN repository. For instance, let's say that the file ThirdPartyAssembly.dll was checked 3 times, is there a command that will get me all the version on my HD (e.g. ThirdPartyAssembly.dll.v1, ThirdPartyAssembly.dll.v2, ThirdPartyAssembly.dll.v3, etc.)?
Thanks!
I have a timer which helps me to move a point in a line, and I want to pause the animation, then resume it from paused time?
How can I capture the current time of a javax.swing.Timer instance?
I have a text file containing a number of records. Each record is stored on a single line that is 100 characters long.
Let's say I want to directly access the nth record. I could do it using a for loop, reading in n lines until I get to the record.
But how could I access it directly?
I've started a new iPhone app that needs to remember a single, 40-char string. That's it. I've hooked into Core Data, and am reading about it now, but it really seems like overkill. Is there an easier way to do something so simple?
I am willing to build an email application which runs on the server side.
Not being familiar with any particular server I wonder if I can get some recommendations based on experience.
I have seen many great startups which built some neat apps on the email platform (for instance, friendfeed's notification mechanism, or surely posterous which mail is at the heart of their business logic), and wonder about which mail server have they found easy to learn and integrate with.
PS:
MS Exchange or any other not open-source are not an option
Must run on linux
If I have the string hello world , how can I modify the regex world|wo|w so that it will match all of "world", "wo" and "w" rather than just the single first match of "world" that it comes to ?
If this is not possible directly, is there a good workaround ? I'm using C# if it makes a difference:
Regex testRegex = new Regex("world|wo|w");
MatchCollection theMatches = testRegex.Matches("hello world");
foreach (Match thisMatch in theMatches)
{
...
}
I have an application which uses UDP connection, now when i try to run the app more than once its throwing me an exception
java.net.BindException: Address already in use: Cannot bind
but in my another app, which uses tcp connection, i can open two instance of the same app and its working fine. why this error only with UDP connection?
<a href="index.html"><img src="image.png"/></a>
IE8 highlights the image with a blue border. I'm not sure what CSS is relevant here, is it just border? Can I use a single CSS style to turn it off, like:
a img
{
...
}
Hi
Which is best book to learn HTML, CSS, Javascript, ASP.NET 3.5 & Ajax? I would like to have a single book covering all the above topics.
Thanks
Satyaprakash
I just wrote a custom progress bar, it's single buffered and will remain so. How many frames per second are desirable for something like this? I don't want to waste too much CPU updating the screen unnecessarily.
Hello,
I am trying to use this query to return every instance where the variable $d['userID'] is equal to the User ID in a separate table, and then echo the username tied to that user ID.
Here's what I have so far:
$uid = $d['userID'];
$result = mysql_query("SELECT u.username
FROM users u
LEFT JOIN comments c
ON c.userID = u.id
WHERE u.id = $uid;")$row = mysql_fetch_assoc($result);
echo $row['username'];