I'm a little out of date, before HTML4 and javascript got AJAXy. Does anyone have opinions about the best tools for web site design? I'd rather avoid ASP and .NET, since I've got a limited budget. This seems like a good time to start fresh.
Please keep the replies on the coding recommendations, as I already know how to register a domain name, redirect it, set up Apache. (I could use some opinions on the various Apache flavors)
Question:
Is there any such thing as a programming language (other than an esoteric language such as BrainF@#$, or the languages PHP or VB) that you can "compile" into non-obfuscated PHP source code?
Rationale:
Swip wants to generate ordinary PHP code because it is so ubiquitous for the types of projects swip wants to do. Unfortunately swip would like to actually avoid writing PHP -- strange but true! Swip is crazy enough to want to generate PHP source code without having to type any PHP into Swip's editor.
Is there a way to remove the attribute '_moz_resizing="true"' added by
Firefox from to avoid giving user the possibility to
resize table in design mode (when contentEditable=true).
In trying to learn how to work with the LAMP stack, I've hit a wall with MySQL. I can't seem to find a good reference for the first time setup of MySQL to be used with Apache and python. So, my question is four-fold:
1) Under what circumstances should I create my first database. That is, what user do I use (Apache's http user? root?)
2)How do permissions work?
3) Do I have to do anything on the MySQL side to make MySQL talk to Apache, or MySQL to talk to Python/Django?
4) Is there a good resource online that describes setting all of this up? I've found a bunch for using a database once it's in place, but none for the initial setup?
Notes: I'm trying to run my LAMP stack on a dedicated little box for testing/learning purposes only, so I don't have access to any DBA that could help me, as much as I'd like one.
Hi everyone,
Is it possible to split a web service in to multiple classes and still provide a single path to the web service?
I know this isn't possible because of the duplicate url-pattern values. It sort of illustrates where we're wanting to go :)
<endpoint name="OneBigService"
implementation="SmallImpl1"
url-pattern="/OneBigService"/>
<endpoint name="OneBigService"
implementation="SmallImpl2"
url-pattern="/OneBigService"/>
Basically, how do avoid having one monolithic @WebService class?
Thanks!
Rob
In a Django template, how could I refer to the URL. I want to use it in static pages, to avoid having live links to the current page. Is there a way to do this with the Django template language or do I have to use JavaScript to do it?
I would like to do something like
{% if current_url == "/about/" %}
About
{% else %}
<a href='/about/'>About</a>
{% endif %}
I'm using it for a simple blog, so there are no views written for those pages.
I was experimenting with Netbeans 6.8 (I'm currently an Eclipse user) because I like having a profiler built into the IDE. It seems that for maven projects, netbeans does a full compile (it invokes process-classes) every time I try to run the project, as opposed to Eclipse, which uses the incremental Java compiler. Is there a way to avoid having netbeans run mvn process-classes every time I want to run the main class?
thanks,
Jeff
Can anyone help me on how can I validate transaction
example:
transaction = mySqlConn.BeginTransaction(IsolationLevel.ReadCommitted)
If there's still an opened transaction, then the code above will ignore.. How do I know if there was a transaction not yet committed before opening new transaction to avoid Nested Transaction?
Hello,
I have designed a trading application that handles customers stocks investment portfolio.
I am using two datastore kinds:
Stocks - Contains unique stock name and its daily percent change.
UserTransactions - Contains information regarding a specific purchase of a stock made by a user : the value of the purchase along with a reference to Stock for the current purchase.
db.Model python modules:
class Stocks (db.Model):
stockname = db.StringProperty(multiline=True)
dailyPercentChange=db.FloatProperty(default=1.0)
class UserTransactions (db.Model):
buyer = db.UserProperty()
value=db.FloatProperty()
stockref = db.ReferenceProperty(Stocks)
Once an hour I need to update the database: update the daily percent change in Stocks and then update the value of all entities in UserTransactions that refer to that stock.
The following python module iterates over all the stocks, update the dailyPercentChange property, and invoke a task to go over all UserTransactions entities which refer to the stock and update their value:
Stocks.py
# Iterate over all stocks in datastore
for stock in Stocks.all():
# update daily percent change in datastore
db.run_in_transaction(updateStockTxn, stock.key())
# create a task to update all user transactions entities referring to this stock
taskqueue.add(url='/task', params={'stock_key': str(stock.key(), 'value' : self.request.get ('some_val_for_stock') })
def updateStockTxn(stock_key):
#fetch the stock again - necessary to avoid concurrency updates
stock = db.get(stock_key)
stock.dailyPercentChange= data.get('some_val_for_stock') # I get this value from outside
... some more calculations here ...
stock.put()
Task.py (/task)
# Amount of transaction per task
amountPerCall=10
stock=db.get(self.request.get("stock_key"))
# Get all user transactions which point to current stock
user_transaction_query=stock.usertransactions_set
cursor=self.request.get("cursor")
if cursor:
user_transaction_query.with_cursor(cursor)
# Spawn another task if more than 10 transactions are in datastore
transactions = user_transaction_query.fetch(amountPerCall)
if len(transactions)==amountPerCall:
taskqueue.add(url='/task', params={'stock_key': str(stock.key(), 'value' : self.request.get ('some_val_for_stock'), 'cursor': user_transaction_query.cursor() })
# Iterate over all transaction pointing to stock and update their value
for transaction in transactions:
db.run_in_transaction(updateUserTransactionTxn, transaction.key())
def updateUserTransactionTxn(transaction_key):
#fetch the transaction again - necessary to avoid concurrency updates
transaction = db.get(transaction_key)
transaction.value= transaction.value* self.request.get ('some_val_for_stock')
db.put(transaction)
The problem:
Currently the system works great, but the problem is that it is not scaling well… I have around 100 Stocks with 300 User Transactions, and I run the update every hour. In the dashboard, I see that the task.py takes around 65% of the CPU (Stock.py takes around 20%-30%) and I am using almost all of the 6.5 free CPU hours given to me by app engine. I have no problem to enable billing and pay for additional CPU, but the problem is the scaling of the system… Using 6.5 CPU hours for 100 stocks is very poor.
I was wondering, given the requirements of the system as mentioned above, if there is a better and more efficient implementation (or just a small change that can help with the current implemntation) than the one presented here.
Thanks!!
Joel
I am using the following code as part of an autocomplete script to avoid hammering the server with every keystroke:
var that = this;
textInput.bind("keyup", function() {
clearTimeout(that.timer);
that.timer = setTimeout (that.doStuff(), 2000);
});
Unfortunately, this does not clear the old timers. They still all execute.
Does anyone know what I'm missing?
Thanks!
Hello,
I normally hang out over on SO but wanted to ask this question in a more appropriate forum. I have, for the sheer fun of learning how to do (as I'm sick of GHOST and dd images) set up WDS and captured a reference WIM file.
One of the things that I remember being promised was the ability to do offline servicing of WIM files. I'm just wondering what the actual procedure is for this?
I have the full SP1 ISO down (covers 7 and 2008R2) and was wondering about next steps. If someone could point me in the right direction I'd appreciate it greatly.
Thanks
- Derek
The Go language creators write:
Go doesn't provide assertions. (...) Programmers use them as a crutch to
avoid thinking about proper error
handling and reporting.
What is your opinion about this?
I am using the EnableCdn=true in my ScriptManager so that WebResource.axd and ScriptResource.axd are overridden with static links to JS libraries at the MS CDN service as follows:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableCdn="true" />
How do I override the CDN URLs or service so that I can retrieve the scripts over HTTPS from the MS CDN service rather than HTTP to avoid the browser mixed mode message? or for that matter a different or my own CDN service entirely.
We want to run selenium backed jwebunit tests from our hudson server. We have a couple of selenium rc servers already on our network which I'd like to reuse.
However how can I configure jwebunit to use those servers as I would like to avoid installing a slenium rc server on the hudson. Building is already work enough without starting/stopping firefoxes.
I am trying to make a macro in Outlook that will scan the To: list for a certain text string, and spit out a message if all but one (or two, etc) addresses have it. Is there a simple way to do this?
Essentially, I am trying to write something that'll avoid being able to send a restricted message to a bunch of people with the string 'xyz' in the address, if one or more do not have it. AutoComplete makes this difficult, without checking through one-by-one.
As you see from the title, I want to ask that the case of in maven3 there is no support for $version in pom.xml anymore. Do we have to really write a constant every time in each project in every pom.xml and related configuration files again and again? How can we avoid doing this? How can we use a versioning method like $version?
Many thanks in advance,
Baris
I would like to obtain the diagram design of a sqlite DB by reverse engineering it, so I can avoid the study of the schema by myself and have an approximate idea of what I am dealing with quite quickly.
Do you know of some tool that has this feature?
I have a power function call inside of a sql function. What is the correct way to handle overflow and underflow conditions since I cannot use a Try Catch inside of a function. I am also trying to avoid modifying the ARITHABORT, ANSI_WARNINGS, and ARITHIGNORE settings in the calling code.
GO
CREATE FUNCTION TestPow()
RETURNS DECIMAL(30, 14)
AS
BEGIN
DECLARE @result FLOAT
SET @result = POWER(10.0, 300)
RETURN @result
END
GO
SELECT dbo.TestPow()
I have a table which may contains other inner tables (it's not possible to edit generated markup). I want to create a delegate function for row mouseenter and mouseleave which only triggers for the associated main table rows (and not inner tables rows), as following:
$("#tableid").delegate("tr", "mouseenter mouseleave", function(e) {
//do stuff here
});
But with this selector it selects also the inner table rows, so how can I modify the selector to avoid selecting inner table rows?
I am trying to create something on a webpage that allows my users to create a desktop shortcut. Because my users are NOT technically savvy, I would like to avoid having them try to drag and drop. Is there a way that I could create a button on a webpage (either using JavaScript or .Net) that automatically creates a desktop shortcut for the user?
If you have follow up questions, please let me know. Thanks
This question is not about what is a cross-thread operation, and how to avoid it, but why internal mechanics of .NET framework does not allow a cross-thread operation.
I can`t understand why a SerialPort DataReceived event cannot update a simple text box on my form and why using delegates this is possible?
Hi, i need to comunicate with a smartcard from an ASP.NET site. I've create a dll(using Winscard.dll and MCSCM.dll that is the SCM Micro Reader's dll) that work with the cardreader on windows but i'm not able to use it with ASP.NET. The project will run only on IE and i must avoid Javascript.
Thank you for the help.
In RIA, especially very complicate such as google WAVE. For browser's DOM object recycle system is not smart, I think put all DOM object into an object pool maybe a good idea to avoid create too much useless DOM node.
Can anyone give me some advice?
Any ideas how i can best drive a USB POS printer from c#.
POS printers are usually serial, TCP/IP or USB based.
I know how to accomplish serial and TCP/IP but have no idea about communications through USB in C#.
I know that there is a layer available from Microsoft called POS.NET, but I want to try and avoid using this.
Any ideas or any C# libraries that people can recomend would be really appreciated. Thanks