We think about whether we should convert a quite large python web application to Python 3 in the near future.
All experiences, possible challenges or guidelines are highly appreciated.
Just wanted to see what tools for SVN people use, perhaps i can find some new cool ones. Im pretty much standard right now, ankh and tortoise.
See also http://stackoverflow.com/questions/372687/good-visual-studio-svn-tool
Hi, I've developed a few arcade games so far and have the following structure in almost all of them: I have 1 file which contains a class called kernel with the following functions:
init()
welcome_screen()
menu_screen()
help_Screen()
play_game()
end_screen()
And another file, called Game, which basically calls all these functions and controls the flow of the game. Also, I have classes for different characters, whenever required.
Is this a good code structure, or should I try having different files(classes) for different functions like welcome screen, playing, help screen, etc? As in, instead of including all the code for these things in 1 file, should I be having different classes for each one of them? The only problem I think it might cause is that I would need certain variables like score, characters, etc which are common to all of them, that's why I have all these functions in a Kernel class so that all these functions can use these variables.
I'm currently working on building a RESTful web api with ruby on rails. I haven't bothered putting a proper authentication scheme into the API yet as I'm ensuring that tests and the basic behavior of the API is working all locally first. Upon testing non-HTTP GET type requests such as HTTP POST/DELETE/PUT, stuff chokes because protect_from_forgery is on by default.
How does this work when I'm working in practice since essentially the idea is in a RESTful API that there is no state. The client does not have a session or a cookie associated with the server. Each request is an atomic, self-executed request. The user will supply some credentials to ensure they are who they say they are, but other than that, does protect_from_forgery make sense at this point? Should it remain enabled?
Hi there,
I am currently building a webshop for my own where I want to increment the product-stock when the user fails to complete payment within 10 minutes after the customer placed the order. I want to gather information from this thread to make a design decision.
I am using SQL Server 2008 and ASP.NET 3.5. Should I use a SQL Server Job who intervals check the orders which are not payed yet or are there better solutions to do this.
Thanks in advance!
Martijn
I am using CPLEX for solving huge optimization models (more than 100k variables) now I'd like to see if I can find an open source alternative, I solve mixed integer problems (MILP) and CPLEX works great but it is very expensive if we want to scale so I really need to find an alternative or start writing our own ad-hoc optimization library (which will be painful)
Any suggestion/insight would be much appreciated
Hi :)
I'm looking for a nice newsletter management solution.
I tried CCmail a good script but whaere I can't imort usernames !!!
I would like to find a system that is able to import Opt-in lists in the following format :
John Smith;[email protected];other paramaeters...;[like] ;Male;Age...
I will develop my own module if I could find another emailing manager
Are you already satisfied with a similar application with a trusted (spam-prevention) emailer ?
Thank you :)
Problem Constraints
Size of the data set, but not the data itself, is known.
Data set grows by one data point at a time.
Trend line is graphed one data point at a time (using a spline/Bezier curve).
Graphs
The collage below shows data sets with reasonably accurate trend lines:
The graphs are:
Upper-left. By hour, with ~24 data points.
Upper-right. By day for one year, with ~365 data points.
Lower-left. By week for one year, with ~52 data points.
Lower-right. By month for one year, with ~12 data points.
User Inputs
The user can select:
the type of time series (hourly, daily, monthly, quarterly, annual); and
the start and end dates for the time series.
For example, the user could select a daily report for 30 days in June.
Trend Weight
To calculate the window size (i.e., the number of data points to average when calculating the trend line), the following expression is used:
data points / trend weight
Where data points is derived from user inputs and trend weight is 6.4. Even though a trend weight of 6.4 produces good fits, it is rather arbitrary, and might not be appropriate for different user inputs.
Question
How should trend weight be calculated given the constraints of this problem?
I have a View that renders something like this:
"Item 1" and "Item 2" are <tr> elements from a table.
After the user change "Value 1" or "Value 2" I would like to call a Controller and put the result (some HTML snippet) in the div marked as "Result of...".
I have some vague notions of JQuery. I know how to bind to the onchange event of the Select element, and call the $.ajax() function, for example.
But I wonder if this can be achieved in a more efficient way in ASP.NET MVC2.
how many files in a diretory will be decrease server performance? I have a website that contain hundreds thousand of images ( a million in separated directory). I wonder if it will effect the performance.
server detail:
centos, apache, php 5
I'm creating class library with some commonly used classes like persons, addresses etc. This library will be used in an multilingual application, and I am looking for the most convenient way to represent a persons gender.
Ideally I would like to be able to code like this:
Person person = new Person { Gender = Genders.Male,
FirstName = "Nice",
LastName = "Dude" }
if (person.Gender == Genders.Male)
Console.WriteLine("person is Male");
Console.WriteLine(person.Gender); //Should output: Male
Console.WriteLine(person.Gender.ToString("da-DK"));
//Should output the name of the gender in the language provided
List<Gender> genders = Genders.GetAll();
foreach(Gender gender in genders)
{
Console.WriteLine(gender.ToString());
Console.WriteLine(gender.ToString("da-DK"));
}
What would you do? An enumeration and a specialized Gender class, but what about the localization then?
Regards
Jesper Hauge
Hello,
I am looking for qa tools for php. I am used to pmd, findbugs and checkstyle in the java world. Do you know some similar tools for php doing code analysis ?
So far I have found but not tested yet :
phplint
pmd's cpd module
PHP_CodeSniffer
Thanks in advance for your help
I'm looking for something that runs in a terminal and allows me to track time. I'd like it to be open source but that isn't necessary.
Most time tracking apps I've found are either web or gui based and there for take longer to enter data then I'd like.
Someone suggested moving a table full of settings, where each column is a setting name(or type) and the rows are the customers & their respective settings for each setting.
ID | IsAdmin | ImagePath
------------------------------
12 | 1 | \path\to\images
34 | 0 | \path\to\images
The downside to this is every time we want a new setting name(or type) we alter the table(via sql) and add the new (column)setting name/type. Then update the rows(so that each customer now has a value for that setting).
The new table design proposal. The proposal is to have a column for setting name and another column for setting.
ID | SettingName | SettingValue
----------------------------
12 | IsAdmin | 1
12 | ImagePath | \path\to\images
34 | IsAdmin | 0
34 | ImagePath | \path\to\images
The point they made was that adding a new setting was as easy as a simple insert statement to the row, no added column.
But something doesn't feel right about the second design, it looks bad, but I can't come up with any arguments against it. Am I wrong?
According to the Python 2.6.5 docs [1], the bsddb module has been deprecated for removal in Python 3.0.
What module/wrapper should I be using instead?
[1] http://docs.python.org/library/bsddb.html
Hey fellows,
I'm working on a large web application that includes many modules (CRM, Inventory, Administration, etc.) What I want to accomplish is to be able develop each of these modules independently (the UI, Core Logic, DataAccess Logic, and all) and then integrate them all together into a core module (this integration should only be a change in the configuration file). For example, if I have a core module named Host, I should be able to add the CRM module to the host module by simply adding this line to the host's configuration file:
<module name="CRM" />
I did some reading on the WCSF, and found that it can help integrate some modules together, but it really doesn't offer so much help in terms of integrating those UI elements.
Some friends suggested MEF for the job, but I haven't looked at that yet.
What do you guys think?
Is it possible to achieve this level of modularity, and how much work do I have to put into it to get it working?
I know how to create .po files and how to generate .mo files and then use them for translation on my Codeigniter powered site. However, I'm not quite sure on how to change language from the site GUI. I want to stick to codeigniter's default url calling schema: www.domain.com/controllername/method/param1/param2.
Calling the server like this is a no-brainer: www.domain.com/controllername?lang=en
Doing that for every controller using the default url schema, requires me to implement the same method in every controller, just to pass the lang parameter to the setlocale() function and then bind to my .po domain name. Feels awkward...
ANy ideas how you guys work with gettext in codeigniter? And yes, I do want to work with gettext.
Hi guys,
i have installed TFS 2010 in a 2 server setup with an App Tier server and a SQL Server and am not 100% happy with the performance.
Both are running in VM's on SAN disks and have been given the following virtual hardware each:
Windows 2008 R2
1 CPU @ 2.8Ghz
2gb RAM
what should i lift - neither machine is hammered but both do go up to 80% when people are doing things on them - should i add another CPU to each - usually this is now required in a VMWARE setup but i don't know if TFS 2010 takes advantage of an extra core???
thank you in advance :-)
Hello, i have 4 digital cams, the distance between every cam is 30 CM, i need a software or a programing library that works on c++ or Java, that can take videos from these 4 cams, and put them in one video showing only one image that is gathered from the 4 cams,, any hints would be helpful, Thanks anyway .
Normally when you have a application configuration file in your application and your application is expected to read from it.
Is it good to check initially at start up if this file exists and raise an error and not to proceed at all ? (Worse case senarios)
Or leave it to the unhandled exception manager to handle it and shut down the application? (WPF/Winforms etc)
Hi, I have a web service which returns the following XML:
<Validacion>
<Es_Valido>NK7+22XrSgJout+ZeCq5IA==</Es_Valido>
</Validacion>
<Estatus>
<Estatus>dqrQ7VtQmNFXmXmWlZTL7A==</Estatus>
</Estatus>
<Generales>
<Nombre>V4wb2/tq9tEHW80tFkS3knO8i4yTpJzh7Jqi9MxpVVE=</Nombre>
<Apellido>jXyRpjDQvsnzZz+wsq6b42amyTg2np0wckLmQjQx1rCJc8d3dDg6toSdSX200eGi</Apellido>
<Ident_Clie>IYbofEiD+wOCJ+ujYTUxgsWJTnGfVU+jcQyhzgQralM=</Ident_Clie> <Fec_Creacion>hMI2YyE5h2JVp8CupWfjLy24W7LstxgmlGoDYjPev0r8TUf2Tav9MBmA2Xd9Pe8c</Fec_Creacion>
<Nom_Asoc>CF/KXngDNY+nT99n1ITBJJDb08/wdou3e9znoVaCU3dlTQi/6EmceDHUbvAAvxsKH9MUeLtbCIzqpJq74e QfpA==</Nom_Asoc>
<Fec_Defuncion />
</Generales>
The text inside the tags in encrypted, I need to decrypt the text, I've come up with a regular expressions solution but I don't think it's very optimal, is there a better way to do this? thanks!
The twitter API site lists 3 java twitter libaries.
Twitter4j
java-twitter
jtwitter
Do you know others? What are your experiences in support, ease of use, stability, community, etc.