This is a simple question and I am sure you C Sharp Pros know it.
If you want to grab the contents of a directory on a hard drive (local or otherwise) in a C Sharp program, how do you go about it?
If I have flash media server and apache installed on windows, How do I go about implementing this? I have built my own player to handle http and rtmp streaming. I've searched all over and have not been able to find a solution.
I'm looking for some advice on how to go about reading the online documentation of various packages classes and methods for java.
i mean all this stuff: http://java.sun.com/javase/6/docs/api/
I have a PHP script which takes a value from a row in my MySQL database, runs it through a function, and if it determines it's true returns one value, and if it's false, it needs to go to the next value in the database and check that one until eventually one returns true.
I think I need to use mysql_fetch_assoc, but I'm not really sure in what way to use it... I wish I could post my code to be more specific, but it's a lot of code and most of it has no bearing on this issue...
I'm in the process of learning C++. But there's so much more that I want to do online - web apps, iphone apps, websites.
So I'm thinking of learning another language, one that would allow me to make (or at least attempt to make) useful applications.
Now, what language should I look into learning? And, how do you recommend I go about learning it?
Hi folks. On the comment of my old form needing a CAPTHA, I felt I share my problem, perhaps you recognize it and find its time we had better solutions:
FACTUAL PROBLEM
I know most of my clients (typical age= 40~60) hate CAPTCHA things.
Now, I myself always feel like a robot, when I have to sueeze my eyes and fill in the strange letters from the Capcha... Sometimes I fail! Go back etc. Turnoff.
I mean comon its 2011, shouldnt the forms have better A.I. by now?
MY NEW IDEA (please dont laugh)
Ive thought about it and this is my idea's to tell difference between human and robot:
My idea is to give credibility points. 100 points = human 0% = robot.
require real human mouse movements
require mousemovements that dont follow any mathematical pattern
require non-instantaneous reading delays, between load and first input in form
when typing in form, delays are measured between letters and words
approve as human when typical human behaviour measured (deleting, rephrasing etc)
dont allow instant pasting or all fields
give points for real keyboard pressures
retract points for credibility when hyperlinks in form
Test wether fake email field (invisible by human) is populated (suggested by Tomalak)
when more than 75% human cretibility, allow to be sent without captcha
when less than 25% human crecibility, force captcha puzzle to be sure
Could we write a A.I. PHP that replaces the human-annoying capthas, meanwhile stopping most spamservers filing in the data? Not only for the fun of it, but also actually to provide a 99% better alternative than CAPTHCA's.
Imagine the userfriendlyness of your forms!
Your site distinguishing itself from others, showing your audience your sites KNOWS the difference between a robot and a human. Imagine the advangage. I am trying to capture the essense of that distinguishing edge.
PROGRAMMING QUESTION:
1) Are such things possible to programm?
2) If so how would you start such programm?
3) Are there already very good working solutions available elsewhere?
4) If it isn't so hard, your are welcome to share your answer/solutions below.
5) upon completion of hints and new ideas, could this page be the start of a new AI captcha, OR should I forget about it and just go with the flow, forget about the whole AI dream, and use captcha like everyone else.
How would I go about making a simple IRC client with these things
What I am using:
Nickname TextBox
Connect Button
Message TextBox
Send Message Button
Refresh Button
ListBox
Restrictions:
No commands at all just being able to send messages
I am using a listbox for recieving messages
1.Is there a difference between Sprint and an Iteration or one can have Iterations within a Sprint or Sprint is just the terminology used instead of Iteration in SCRUM? It will be helpful if someone can throw some light on this.
2.Suppose there are 4 sprints and you have decided the first sprint will go up to 10days is it required that other 3 sprints should have the same length of the 1st decided sprint's length??.
We recently went into private beta on our flagship product and had a small launch event. Unfortunately the venue had a terrible wireless connection and packets were being dropped left right and centre causing havoc with out system, basically it wasn't able to work at all! Luckily we were able to switch to a different network and rescue the demo. This highlighted something that I knew was already an issue but hadn't appreciated quite how much of an issue it could be. Our system relies heavily on BOSH and has a rather large JavaScript code base which now works rather well under good network conditions. However we need to make it work well under bad network conditions as well.
Due to the way that XMPP works, a fire and forget system, it's not easy to tell if a message you sent, or were supposed to receive, was actually sent or received. For instance, we have an offer system, one user will send an offer to another over BOSH. When this message is received by the server a message is published to the offering users offers_sent PEP node and a similar message to the receiving users offers_received PEP node. While the sending user is able to tell if their offer was send (relatively) easily, if the notification to the receiving user is never received that user will never know it missed a message.
A little about out JavaScript setup, it has 4 main layers:
StropheJS
An MVC framework for dealing with low level tasks and to build on top of
An application layer which contains the app logic routes, controllers models etc. as well as a browser cache of the model data
A UI layer that receives events and publishes events to and from the application layer
One way to solve the missing messages issue would be to periodically check the PEP nodes for new data that the browser doesn't know about. If a new message was discovered the browsers cache would be invalidated and all new data would be requested from the server. I'm not sure this is the best way to go and it also doesn't cover all situations. We certainly don't want to get into the situation where we are sending messages to confirm the previous message was received at it's destination as this would double the network traffic.
With the number of real time websites growing daily this is an issue that must have been encountered by other developers, it would be interesting to see how it's been solved by others. As far as I can see there are two situations in which messages go missing:
On poor connections messages are not sent or received due to the packets being dropped
Involving navigating between pages, a message is received by the browser but is not fully processed and stored in the local cache before the page is unloaded. Or a message is added to the send queue but never sent before the page is unloaded
I suspect the hardest issue to solve will be number 2. Any thoughts on the subject would be much appreciated.
I am trying to put a "Contract" on a method call. My web application is in Spring 3.
Is writing customs Annotations the right way to go. If so, any pointers( I didn't find anything in spring reference docs).
Should I use tools like "Modern Jass", JML ...? Again any pointers will be useful.
Thanks
Is there a way to implement your own BindAttribute. Preferably by deriving from BindAttribute, but if you need to impliment it in your own ModelBinder how would you go about doing this?
I am new to ASP.NET having some basic doubts.
1) The public assemblies are deployed in GAC.Even when i go for "Add Reference ", I can
not point to c:\windows\assembly ( i hope it is not possible) .Still i need to refer the
assembly from ..\Bin folder of the source project ( custom assembly).Is there any consideration behind it?
2 ) Why exe is not allowed in GAC ?
Hello evryone
I have some codes to use ASINetworkQueue as multi thread download
ASINetworkQueue *networkQueue;
NSURL *url = [NSURL URLWithString:s];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[networkQueue addOperation:request];
[networkQueue go];
if I try to use the code below to cancel the thread with index k
[[[networkQueue operations] objectAtIndex:k] cancel];
I notice all requests in ASINetworkQueue were cancelled and stop working.
Welcome any comment
Thanks
interdev
I have a Git repo that I have deleted four files from using rm (not git rm), and my Git status looks like this:
# deleted: file1.txt
# deleted: file2.txt
# deleted: file3.txt
# deleted: file4.txt
How do I remove these files from Git without having to manually go through and add each file like this:
git rm file1 file2 file3 file4
Ideally, I'm looking for something that works in the same way that git add . does, if that's possible.
I'm having an issue trying to parse the ascii part of a file, and once I hit the end tag, IMMEDIATELY start reading in the bytes from that point on. Everything I know in Java to read off a line or a whole word creates a buffer, which ruins any chance of getting the bytes immediately following my stop point. Is the only way to do this read in byte-by-byte, find new-lines, reconstruct everything prior to the new-line, see if it's my end tag, and go from there?
Hi!
I'm interested in using unicode characters (like \apha) in function/varaible names in my c++ program which I will compile with clang++ on linux. Does anyone know of a good guide / list of rules to go by for making sure that everything ends up compiling fine / aoiding linking errors / ...
Thanks!
I have developed a number of departmental client-server applications, and am now ready to begin working on moving one of these applications to a SaaS model. I have done some basic web development, but I'm a newbie when it comes to SaaS architectures.
One of the first questions that comes to mind as I try to design the architecture is the question of single vs. multi tenancy. The pros and cons of each vary significantly depending on the type of application and scale required, so I'd like to describe my application and scale needs below, and hope others can comment on how I should get started with the architecture.
The client-server application currently consists of a Firebird database and a Windows application. The database contains about 20 tables containing a few thousand records in 4 primary tables, and a few hundred records in various lookup and related tables. Although the number of records is small, the size can get large, as the database can contain large BLOBS. Each customer sets up their own database and has a handful of users within the organization connected to it. When I update the db schema, a new windows application is released, and it checks the db schema and then applies the updates as needed.
For the SaaS application, I am designing for 100's (not 1000's or millions) of new customers per year. My first thought was to go with a multi tenancy model to make updates easy (shut down apply the updates to one database, and then start up). On the other hand, a single tenancy model would provide a means to roll updates out to a group of customers at a time, and spread the risk of data corruption - i.e. if something goes wrong with a database, it will impact one customer instead of all customers. With this idea, I was thinking of having a single web front-end which would connect to a single customer database upon login. Thus, when a new customer creates an account, a new database would be created (each customer would have their own db with multiple users as needed for the customer).
In this model, a db update would require either a process to go through each db to apply schema changes, or a trigger upon logging in to initiate a schema update similar to the client-server model currently in use.
Can anyone point me to information for similar applications which have been ported from client-server to SaaS? Or provide any pointers to consider? Basically I'm looking for architecture examples of taking a departmental application and making it available as a self service website for multiple customers. Thanks for any suggestions, resources, etc.
If I had a N lists each of length M, how could I write a nice clean function to return a single list of length M, where each element is the sum of the corresponding elements in the N lists?
(starting to learn lisp - go easy!)
Hi all,
I am trying to draw custom shapes in iPad application. I am using UIBezierPath for drawing which is available for 3.2 onwards. My question is whether it is good to use this class or should I go to the core graphics? Is there any difference between uibezierpath and core graphics drawing related to performance?
I'm having trouble debugging a segmentation fault. I'd appreciate tips on how to go about narrowing in on the problem.
The error appears when an iterator tries to access an element of a struct Infection, defined as:
struct Infection {
public:
explicit Infection( double it, double rt ) : infT( it ), recT( rt ) {}
double infT; // infection start time
double recT; // scheduled recovery time
};
These structs are kept in a special structure, InfectionMap:
typedef boost::unordered_multimap< int, Infection > InfectionMap;
Every member of class Host has an InfectionMap carriage. Recovery times and associated host identifiers are kept in a priority queue. When a scheduled recovery event arises in the simulation for a particular strain s in a particular host, the program searches through carriage of that host to find the Infection whose recT matches the recovery time (double recoverTime). (For reasons that aren't worth going into, it's not as expedient for me to use recT as the key to InfectionMap; the strain s is more useful, and coinfections with the same strain are possible.)
assert( carriage.size() > 0 );
pair<InfectionMap::iterator,InfectionMap::iterator> ret = carriage.equal_range( s );
InfectionMap::iterator it;
for ( it = ret.first; it != ret.second; it++ ) {
if ( ((*it).second).recT == recoverTime ) { // produces seg fault
carriage.erase( it );
}
}
I get a "Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address..." on the line specified above. The recoverTime is fine, and the assert(...) in the code is not tripped.
As I said, this seg fault appears 'randomly' after thousands of successful recovery events.
How would you go about figuring out what's going on? I'd love ideas about what could be wrong and how I can further investigate the problem.
I downloaded the .NET 4 framework from miscrosoft here: http://www.microsoft.com/downloads/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992&displaylang=en
I installed and rebooted.
When I go to compile options -- target framework... .NET 4 isn't on the list.
Is .net 4 not compatible with VS2008? It would be nice if Microsoft stated that somewhere...
Well basically I've got a vb.net script connecting to IRC, and I'm working on making it a basic chat system, but I've run into a problem.
Say I receive this:
:[email protected] PRIVMSG #channel :message
I want to grab specific information to output to the user.
I want to grab nickname and message
How can I go about doing this?
I thought about using regex, but I can't figure out how to make regex grab message since there's nothing after it.
Does anyone know of a script that can select all text references to URLs and automatically replace them with anchor tags pointing to those locations?
For example:
http://www.google.com
would automatically turn into
<a href="http://www.google.com">http://www.google.com</a>
Note: I am wanting this because I don't want to go through all my content and wrap them with anchor tags.
I am creating a website that is to have a book style layout. So you turn the pages and they fold over. I have this working in JQuery for images.
What I am looking to do is have clickable links on the pages so that I can jump to a page further in the "book" or even to another site.
Does anyone know the best way to go about this or have any examples to help out?
Thanks