It may not be a pure programming question but I'm looking for information about enCapsa. Do you know what it is, have you ever used it? I'm reading some papers about it but I can't really see how it works and what it can be used for in an IT company (and this is what i am supposed to find out).
Hello,
Recently I stumbled upon this curious question: What is importing for yourself when programming: process or result?
I found myself that I love outcome, when everything is done! So I tried to ask some colleagues at work, but all of them responded that they like the development process the most. Myself I like process too, but not as much as outcome. So to which people category you belong too? And if there is a reason, could you express why?
Hey,
I have an input text :
<input name="Email" type="text" id="Email" value="[email protected]" />
I want to put a default value like "What's your programming question ? be specific." in StackOverFlow, and when the user click on it the default value disapear.
Consider a very seasoned programmer that doesn't require any teaching of programming concepts, at all, what would be the best resource, dead trees or otherwise, to learn Flash?
I don't do windows batch programming, nor do I need to go that far down the rabbit hole.
I have directory structures as such:
dir1000000/file.txt
dir2000000_1/file.txt
dir2000000_2/file.txt
I need to select the file.txt from the path with the lexicographically greatest value, i.e. dir2000000_2/file.txt. How do I go about doing this?
I know it's not a programming question but I'm in a hurry to choose a netbook like this and I haven't been able to find the minimum system requirements for an R installation (e.g. minimum RAM). I am interested in a small netbook so as to be able to use it in class. Has anybody used R in a netbook that would recommend for that use?
Just wondering what your comments are regarding the current trend as everything is moving to the web or even the cloud. The significance of an OS or desktop application is getting less attention than web application. So to those folks out there who still develop windows applications, such as WPF. Why still do it? Why not move to web programming? Silverlight instead for example...
I found this question, and it mentions the FlashDevelop wiki. However, I couldn't find anything there at all.
Where is a good place to start? I have done some work with MXML projects using the Flex SDK, but never any ActionScript programming.
I'm starting work on some simulations using MPI and want to do the programming in Python/scipy. The scipy site lists a number of mpi libraries, but I was hoping to get feedback on quality, ease of use, etc from anyone who has used one.
Hello,
I'm stuck with "Programming Clojure" on page 37 on a Windows 7
machine. After downloading the "examples" dir into "C:/clojure", I
typed:
user (require 'examples.introduction)
and I got
; Evaluation aborted.
java.io.FileNotFoundException: Could not locate examples/
introduction__init.class or examples/introduction.clj on classpath:
(NO_SOURCE_FILE:0)
My .emacs file looks like this:
(setq swank-clojure-extra-classpaths
(list "C:/Clojure"))
The files in C:/Clojure are there (I triplechecked)
Any help will be appreciated.
<tl;dr>
In source version control diff patch generation, would it be worth it to use the optimizations listed at the very bottom of this writing (see <optimizations>) in my Ruby implementation of diff for making diff patches?
</tl;dr>
<introduction>
I am programming something I have never done before and there might already be tools out there to do the exact thing I am programming but at this point I am having too much fun to care so I am still going to do it from scratch, even if there is a tool for this.
So anyways, I am working on a Ruby on Rails app and need a certain feature. Basically I want each entry in a table of mine, let's say for example a table of video games, to have a stored chunk of text that represents a review or something of the sort for that table entry. However, I want this text to be both editable by any registered user and also keep track of different submissions in a version control system. The simplest solution I could think of is just implement a solution that keeps track of the text body and the diff patch history of different versions of the text body as objects in Ruby and then serialize it, preferably in human readable form (so I'll most likely use YAML for this) for editing if needed due to corruption by a software bug or a mistake is made by an admin doing some version editing.
So at first I just tried to dive in head first into this feature to find that the problem of generating a diff patch is more difficult that I thought to do efficiently. So I did some research and came across some ideas. Some I have implemented already and some I have not. However, it all pretty much revolves around the longest common subsequence problem, as you would already know if you have already done anything with diff or diff-like features, and optimization the function that solves it.
Currently I have it so it truncates the compared versions of the text body from the beginning and end until non-matching lines are found. Then it solves the problem using a comparison matrix, but instead of incrementing the value stored in a cell when it finds a matching line like in most longest common subsequence algorithms I have seen examples of, I increment when I have a non-matching line so as to calculate edit distance instead of longest common subsequence. Although as far as I can tell between the two approaches, they are essentially two sides of the same coin so either could be used to derive an answer. It then back-traces through the comparison matrix and notes when there was an incrementation and in which adjacent cell (West, Northwest, or North) to determine that line's diff entry and assumes all other lines to be unchanged.
Normally I would leave it at that, but since this is going into a Rails environment and not just some stand-alone Ruby script, I started getting worried about needing to optimize at least enough so if a spammer that somehow knew how I implemented the version control system and knew my worst case scenario entry still wouldn't be able to hit the server that bad. After some searching and reading of research papers and articles through the internet, I've come across several that seem decent but all seem to have pros and cons and I am having a hard time deciding how well in this situation that the pros and cons balance out. So are the ones listed here worth it? I have listed them with known pros and cons.
</introduction>
<optimizations>
Chop the compared sequences into multiple chucks of subsequences by splitting where lines are unchanged, and then truncating each section of unchanged lines at the beginning and end of each section. Then solve the edit distance of each subsequence.
Pro: Changes the time increase as the changed area gets bigger from a quadratic
increase to something more similar to a linear increase.
Con: Figuring out where to split already seems like you have to solve edit distance
except now you don't care how it is changed. Would be fine if this was solvable by
a process closer to solving hamming distance but a single insertion would throw this
off.
Use a cryptographic hash function to both convert all sequence elements into integers and ensure uniqueness. Then solve the edit distance comparing the hash integers instead of the sequence elements themselves.
Pro: The operation of comparing two integers is faster than the operation of comparing
two strings, so a slight performance gain is received after every comparison, which
can be a lot overall.
Con: Using a cryptographic hash function takes time to convert all the sequence
elements and may end up costing more time to do the conversion that you gain back from
the integer comparisons. You could use the built in hash function for a string but
that will not guarantee uniqueness.
Use lazy evaluation to only calculate the three center-most diagonals of the comparison matrix and then only calculate additional diagonals as needed. And then also use this approach to possibly remove the need on some comparisons to compare all three adjacent cells as desribed here.
Pro: Can turn an algorithm that always takes O(n * m) time and make it so only worst
case scenario is that time, best case becomes practically linear, and average case is
somewhere between the two.
Con: It is an algorithm I've only seen implemented in functional programming languages
and I am having a difficult time comprehending how to convert this into Ruby based on
how it is described at the site linked to above.
Make a C module and do the hard work at the native level in C and just make a Ruby wrapper for it so Ruby can make all the calls to it that it needs.
Pro: I have to imagine that evaluating something like this in could be a LOT faster.
Con: I have no idea how Rails handles apps with ruby code that has C extensions and it
hurts the portability of the app.
This is an optimization for after the solving of edit distance, but idea is to store additional combined diffs with the ones produced by each version to make a delta-tree data structure with the most recently made diff as the root node of the tree so getting to any version takes worst case time of O(log n) instead of O(n).
Pro: Would make going back to an old version a lot faster.
Con: It would mean every new commit, the delta-tree would get a new root node that
will cost time to reorganize the delta-tree for an operation that will be carried out
a lot more often than going back a version, not to mention the unlikelihood it will be
an old version.
</optimizations>
So are these things worth the effort?
The book Beginning Linux Programming (3rd ed) says
"Note that fread and fwrite are not recommended for use with structured data. Part of the problem is that files written with fwrite are potentially nonportable between different machines."
What does that mean exactly? What calls should I use if I want to write a portable structured data reader or writer? Direct system calls?
Hi,
We were given an assignment to develop a prototype for a customer community. It was suggested PHP as the programming language. (but we're not supposed to actually code it, just a prototype with documentation is required)
I'm wondering what are the best practices/ tools used in Unit testing, Integration Testing and System testing for such a php app
Thanks
I followed "iPad Programming Guide" from Apple to try to upgrade one of my iPhone project for iPad. But I cannot find the menu item of "upgrade current target for ipad" even after I selected one of the Targets.
What is the reason? My SDK version is 3.1.3.
Thank you.
The screenshot is here
I am a newbie in socket programming. I am developing a server client application.
And I am using Asynchronous tcp ip socket. But now I am facing a problem. In my client side I am receiving my data by a 2kb byte array by beginReceive method. Its working perfectly if data size below or equals to 2 kb, but problem occurring when data size exceeding 2kb range. Please give me some solution.
Hi, I'd like to know how to convert a file into PDF when I'm programming in VB. Do you have the script or if there is a pre-defined function, what is it's name?
Thanks
Hi (first of all, thanks for your attention & sorry for my bad english hahaha also this is not a programming error, or thats what I think, I think this is an error in some configuration of the server or something else but I dont know what)
I have a php script (is running like a process of linux, its not running on the web browser) that send SMS via SMPP on the port 2055 (using sockets in php) & then inserts like 10,000 rows into a dababase on MySQL, the script gets the data from a XML file; firts it was running in a shared server (Hostgator is our hosting provider) & at the begining it worked fine, with no trouble, but 5 months later an error appear, the process just die with no reason, the script only sent & inserted 700 rows in the table of the database & the process didnt show any warning or error, nothing appears in the error logs, & I didnt make any change in the script
Hostgator never helped us hahaha so we decided to move the script from the shared server to a dedicated server; I thought it was a memory problem or something like that, but when we move the script to the dedicated server the problem just get worse, the script die when has just sent & inserted 40 to 50 rows to the database
the information about this error:
the shared server is on Red Hat 4.1.2-46 & the dedicated server is on CentOS 5.4
I have commented the line that sends the SMS, & the problem remains
in the shared server, at the begining the script was fine, but then the script started to die when has just inserted 700 aprox. in the database, & now the script is dying when has inserted 2500 rows, its better but we didnt change anything
in the dedicated server, the script dies when has just inserted like 40 row in the table
the script, before it dies, change to a zombie process & we dont know why
the usage of memory appears to be 0.3%, and of the cpu appears to be 0.7% to 1%
I have changed the max memory limit of php to 128Mb, and even to -1 (so php wont have any limit) but the problem remains
we have the limit of 50 connections of mysql at the same time, so I think this is not the problem
Im using mysqli to connect from php to mysql
Hostgator report that they haven't made any change or update in the servers
what could be the problem?? what should I do??? what should I search??? is something in the logic Im missing?? what steps do I have to follow when managing & searching problems of process on Linux???
thank you very much, I think this is not a programming problem, but you have more experience than me, you can tell me
thanks!!! bye!!! :)
I currently use visual studio 2008 for creating projects that can run on windows. Can you recommend me of other tools that can be used to develop applications for other operating systems?(Linux, Mac, Solaris)
The most prominent programming languages will do(C++, C#, F#)
And scripting languages(PHP, Perl, etc)
I'm looking for texts that give detailed treatment of assembly programming principles and don't use x86 as the target architecture. I haven't found any recent books like that, but I would expect that there were some good ones written in the 1970s and 1980s, when whole applications were still written in assembly. The architecture used should also be one of the cleaner designs, such as the 6502 or VAX.
I want to get a new laptop and not sure what display size is the optimal. I need it for programming while I'm traveling. So the balance is between portability and usability.
My old laptop is 15.4" and I think it's big and heavy for travel.
I'd like to display a photo on an Android Activity screen with doing gradual and continual fade-in from pale monotone sepia to the final full color. I know how to do it on a Java Image/BufferedImage for the Graphic object but unfortunately I know nothing for the Android programming environment. Could anyone help?