Is there a resource that i can find different variations of searching, sorting and graph algorithm questions ?
I have studied CLRS and Algorithm Design by Kleinberg. and solved some set of questions.
I have also, checked SO for algorithms questions.
Curious, if there is a resource you would highly recommend.
EDIT: There is also this free ebook with many questions, that i was able to solve some of them.
One of my custom developed ASP.NET sites was hacked today: "Hacked By Swan (Please Stop Wars !.. )"
It is using ASP.NET and SQL Server 2005 and IIS 6.0 and Windows 2003 server.
I am not using Ajax and I think I am using stored procedures everywhere I am connecting to the database so I dont think it is SQL injection.
I have now removed the write permission on the folders.
How can I find out what they did to hack the site and what to do to prevent it from happening again?
The server is up to date with all Windows updates.
What they have done is uploading 6 files (index.asp, index.html, index.htm,...) to the main directory for the website.
What log files should I upload?
I have log files for IIS from this folder: c:\winnt\system32\LogFiles\W3SVC1.
I am willing to show it to some of you but don't think it is good to post on the Internet. Anyone willing to take a look at it?
I have already searched on Google but the only thing I find there are other sites that have been hacked - I haven't been able to see any discussion about it.
I know this is not strictly related to programming but this is still an important thing for programmers and a lot of programmers have been hacked like this.
Howdy, I am trying to run matlab remotely on windows via OpenSSH installed with Cygwin, but launching matlab in windows without the GUI seems to be impossible.
If i am logged in locally, I can launch matlab -nodesktop -nodisplay -r script, and matlab will launch up a stripped down GUI and do the command.
However, this is impossible to do remotely via ssh, as, matlab needs to display the GUI.
Does anyone have any suggestions or work arounds?
Thanks,
Bob
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.
Dear all,
I have decided to develop a native iPhone apps as a compliment to our webapps. Now I am wondering what are my options to send data remotely from the iPhone apps - since the database is online - to our online database. What I can think of on top of my head - since I come from web dev background - is JSON. My webapps is built using Rails, so I figure it would not be difficult to accept JSON request from the iPhone apps. But the next question is, is it difficult to send JSON data remotely from the iPhone apps? If JSON is not recommendable, what are my other options?
Thank you so much for the assistance. Really appreciate it.
I have the following configuration of servers:
1 central linux server, a VPS
8 satellite linux servers, "crappy shared hostings"
I have a bunch of files that I need to have in all servers. Right now i'm copying them everywhere manually, but I want to be able to copy them to the central server, and then have a scheduled process that runs every now and then and synchronizes them (only outwardly, no need to try to find "new" files in the satellite servers).
There are a couple of catches though:
I can't have any custom software in the satellite servers, or do strange command line things that'll auto connect to them and send the files directly. I know this is the way these kinds of things are normally done, but the satellite servers are crappy shared hosting ones where I have absolutely no control over anything. I need to send the files over FTP
I also need to have, in my central server, a list of the files that are available in each of the satellite servers, to make sure they are ready before I send traffic to them.
If I were to do this manually, the steps would be:
get the list of files in a satellite server
compare to my own, and send the files that are missing
get the list of files again, and store it in my central database.
I'd like to know what tools are out there that can alleviate as much of this as possible, first the syncing, and then the "getting the list of files available in the other server".
I'm going to be doing everything from PHP, not sure if there are good tools to "use FTP from PHP", which i'm pretty sure i'll have to do for step 3 at least.
Thanks in advance for any ideas!
Daniel
Hi everyone, I'm not sure how to ask my question in a succinct way, so I'll start with examples and expand from there. I am working with VBA, but I think this problem is non language specific and would only require a bright mind that can provide a pseudo code framework. Thanks in advance for the help!
Example:
I have 3 Character Arrays Like So:
Arr_1 = [X,Y,Z]
Arr_2 = [A,B]
Arr_3 = [1,2,3,4]
I would like to generate ALL possible permutations of the character arrays like so:
XA1
XA2
XA3
XA4
XB1
XB2
XB3
XB4
YA1
YA2
.
.
.
ZB3
ZB4
This can be easily solved using 3 while loops or for loops. My question is how do I solve for this if the # of arrays is unknown and the length of each array is unknown?
So as an example with 4 character arrays:
Arr_1 = [X,Y,Z]
Arr_2 = [A,B]
Arr_3 = [1,2,3,4]
Arr_4 = [a,b]
I would need to generate:
XA1a
XA1b
XA2a
XA2b
XA3a
XA3b
XA4a
XA4b
.
.
.
ZB4a
ZB4b
So the Generalized Example would be:
Arr_1 = [...]
Arr_2 = [...]
Arr_3 = [...]
.
.
.
Arr_x = [...]
Is there a way to structure a function that will generate an unknown number of loops and loop through the length of each array to generate the permutations? Or maybe there's a better way to think about the problem?
Thanks Everyone!
Hi,
My name is Gautam. I come from India. I really want to join Management Information Systems course in USA. COuld you help me with the schools that offer this course in Spring 2010.
Looking forward for your reply
Gautam
I am trying to connect to my webserver via ssh but I can't. When I insert the password then the terminal is blocked. This is what I see:
# ssh [email protected][email protected]'s password:
Why ?
In iptables there are no rules.
Please help :(
I am writing a program that will need to communicate to a server through a TS connection. Virtual Channels seems to be exactly what I need but Microsoft's documentation leaves very much to be desired.
Does anyone know of good tutorials or just some examples I could use to help me. Preferred language is C# but C++ examples are fine too.
So I have real time video stream. With 1 (one) person on It . It Is Black and White, I need to be able to capture this persons eyes and mouth (direction (at least X,Y), state (at least opened or closed) )
So Is there any fast library(s) for finding human eyes and mouth in Flash in such case? (pure Actionscript or Haxe\Java\C++\C port in SWC form...)
I'm reviewing my old algorithms notes and have come across this proof. It was from an assignment I had and I got it correct, but I feel that the proof certainly lacks.
The question is to prove that the distance values taken from the priority queue in Dijkstra's algorithm is a non-decreasing sequence.
My proof goes as follows:
Proof by contradiction. Fist, assume
that we pull a vertex from Q with
d-value 'i'. Next time, we pull a
vertex with d-value 'j'. When we
pulled i, we have finalised our
d-value and computed the shortest-path
from the start vertex, s, to i. Since
we have positive edge weights, it is
impossible for our d-values to shrink
as we add vertices to our path. If
after pulling i from Q, we pull j with
a smaller d-value, we may not have a
shortest path to i, since we may be
able to reach i through j. However,
we have already computed the shortest
path to i. We did not check a
possible path. We no longer have a
guaranteed path. Contradiction.
Can anybody provide simple steps of "Skeleton Pruning by Contour Partitioning with Discrete Curve Evolution" Algorithm
or c++ code i have document if some one is familiar simple steps of the algorithm
I can not figure out why this won't work. Please help me
from math import sqrt
pN = 0
numPrimes = 0
num = 1
def checkPrime(x):
'''Check\'s whether a number is a prime or not'''
prime = True
if(x==2):
prime = True
elif(x%2==0):
prime=False
else:
root=int(sqrt(x))
for i in range(3,root,2):
if(x%i==0):
prime=False
break
return prime
n = int(input("Find n number of primes. N being:"))
while( numPrimes != n ):
if( checkPrime( num ) == True ):
numPrimes += 1
pN = num
print("{0}: {1}".format(numPrimes,pN))
num += 1
print("Prime {0} is: {1}".format(n,pN))
Most books explain the reason the algorithm doesn't work with negative edges as nodes are deleted from the priority queue after the node is arrived at since the algorithm assumes the shortest distance has been found. However since negative edges can reduce the distance, a future shorter distance might be found; but since the node is deleted it cannot be updated.
Wouldn't an obvious solution to this be to not delete the node? Why not keep the node in the queue, so if a future shorter distance is found, it can be updated? If I am misunderstanding the problem, what is preventing the algorithm from being used with negative edges?
I know that the job would be simpler if I use Google Plugin for Eclipse.
However, in my situation, I heavily adapted Maven and thus, the plugin cannot suit me. (In fact, it gave me the whole week of headache).
Rather, I relied on a ant script that I learned from http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html
The document was very clear; I follow the article and successfully invoked DevMode using ant devmode. However, the document didn't tell me about debugging GWT (like Google Plugin for Eclipse can do).
Basically, I want to add some parameter to an ant task that expose a debug port (something like (com.google.gwt.dev.DevMode at localhost:58807)) so that I can connect my eclipse to.
How can I do that?
As most people know, P = NP is unproven and seems unlikely to be true. The proof would prove that P <= NP and NP <= P. Only one of those is hard, though.
P <= NP is almost by definition true. In fact, that's the only way that I know how to state that P <= NP. It's just intuitive. How would you prove that P <= NP?
Stephen Wolfram gave a fascinating talk at TED about his work with Mathematica and Wolfram Alpha. Amongst other things, he pointed out how very simple computations can yield extremely complex behaviors. (He goes on to discuss his ambition for computing the entire physical universe. Say what you will, you gotta give the guy some credit for his wild ideas...)
As an example he showed several cellular automata.
What other examples of simple computations do you know of that yield fascinating results?
How can a dynamic programming solution for the unbounded knapsack decision problem be used to come up with a dynamic programming solution to the subset-sum decision problem? This limitation seems to render the unbounded knapsack problem useless.
In the unbounded knapsack, we simply store true or false for if some subset of integers sum up to our target value. However, if we have a limit on the frequency of the use of these integers, the optimal substructure at least appears to fail. How can this be done?
Is there an easy way to generate a labeled bitmap image for each glyph contained in a given bitmap font file?
I'm trying to convert a collection of Japanese .bdf fonts into a format usable in MATLAB and C++, where each glyph is used as the OCR classification key for the character it represents.
Hi, I'm in a confusion. For our course (1 year ago) I used Stallings. I read it. It was fine. But I don't own any operating system's book. I want to buy a book on operating systems. I'm confused!! which one to pick?
Modern Operating Systems (3rd
Edition) ~ Andrew S. Tanenbaum
(Author)
Operating System Concepts
~ Abraham Silberschatz
, Peter B. Galvin,
Greg Gagne
Operating Systems: Internals and Design Principles (6th Edition) ~ William Stallings
I've plans of getting into development of realworld operating systems : Linux, Unix & Windows Driver Development. I know that for each of these there are specific books available. But I feel one should have a basic book on the shelf.
So, which one to go for?
Hi,
I am supposed to implement Dynamic programming algorithm for Stereo matching problem. I have read 2 research papers but still haven't understood as to how do I write my own c++ program for that !
Is there any book or resource that's available somewhere that I can use to get an idea as to how to start coding actually ?
Internet search only gives me journal and conference papers regarding Dynamic Programming but not how to implement the algorithm step by step.
Thanks
Varun
Are there any objective measures for measuring the power of programming languages? Turing-completeness is one, but it is not particularly discriminating. I also remember there being a few others measures of power which are more limited versions (like finite-state-autonoma), but is there any objective measure that is more powerful?