Search Results

Search found 2447 results on 98 pages for 'alex larsen'.

Page 7/98 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Putting links into text in Django

    - by Dane Larsen
    I have a notifications app that generates notifications for users. The notification class has to be really general, because notifications are generated by all sorts of different things. My question is this: How do I insert links into the text of the notifications? What I tried was this: note = Notification(..., notification="""%s %s has accepted the task: <a href="/tasks/%d/">%s</a>.""" % (request.user.first_name, request.user.last_name, task.id, task.name), ...) In retrospect, it's obvious this wouldn't work. How should I go about this? Thanks in advance!

    Read the article

  • Tkinter change all color when variable change

    - by Morten Larsen
    hi i have a simpel tkinter window. consists of a small window, a timer, and a button for set timer. dont want to go in details with the code... Now all the widgets in my windows eg. button, Label Ect. will have to change color. EG. i Have a global variabel wich i will set as color "red" fx... All the widgets BACKGROUND option is associated with the global variabel. Now on button press i will change the global variable to "green" so that the background of all widgets ect. will change color, but they DONT. i thought the .mainloop() sort of UPDATED the window. how can i have the widgets to change background color when my variable change WITHOUT restarting my application??? ty Xanthar

    Read the article

  • Type-safe generic data structures in plain-old C?

    - by Bradford Larsen
    I have done far more C++ programming than "plain old C" programming. One thing I sorely miss when programming in plain C is type-safe generic data structures, which are provided in C++ via templates. For sake of concreteness, consider a generic singly linked list. In C++, it is a simple matter to define your own template class, and then instantiate it for the types you need. In C, I can think of a few ways of implementing a generic singly linked list: Write the linked list type(s) and supporting procedures once, using void pointers to go around the type system. Write preprocessor macros taking the necessary type names, etc, to generate a type-specific version of the data structure and supporting procedures. Use a more sophisticated, stand-alone tool to generate the code for the types you need. I don't like option 1, as it is subverts the type system, and would likely have worse performance than a specialized type-specific implementation. Using a uniform representation of the data structure for all types, and casting to/from void pointers, so far as I can see, necessitates an indirection that would be avoided by an implementation specialized for the element type. Option 2 doesn't require any extra tools, but it feels somewhat clunky, and could give bad compiler errors when used improperly. Option 3 could give better compiler error messages than option 2, as the specialized data structure code would reside in expanded form that could be opened in an editor and inspected by the programmer (as opposed to code generated by preprocessor macros). However, this option is the most heavyweight, a sort of "poor-man's templates". I have used this approach before, using a simple sed script to specialize a "templated" version of some C code. I would like to program my future "low-level" projects in C rather than C++, but have been frightened by the thought of rewriting common data structures for each specific type. What experience do people have with this issue? Are there good libraries of generic data structures and algorithms in C that do not go with Option 1 (i.e. casting to and from void pointers, which sacrifices type safety and adds a level of indirection)?

    Read the article

  • Network Management Cable Labeling Techniques and their alternatives [closed]

    - by Alex
    Possible Duplicate: What is the most effective solution you used to label cables? Yes i know there are a lot of howtos and already answered questions about this topic, like this one: How do you organise the cables in your racks? Currently i am searching the web for different techniques (alternatives) for labeling the cables at the server racks and/or data centers. Unfortunately i do not have any experience with labeling/documentation of network cables in a large scale. As far as I could lookup by now the current labeling techniques are coloring and a self defined print-labeling technique (numbering, text) maybe also according to a standard which are usually used. I want to know if QR, RFID (ok RFID in a data center would be stupid due to the radio frequency wouldn't it be?), Barcodes or similar (??) have already been used by some administrators or why they did not consider such techniques at all? Too complicated (with QR scanner etc..) if you are in front of the cables and want to get quick feedback for what the cable is? What alternatives are out there? Advantages/Disadvantages? Best-Practice? I would appreciate any help on this topic, thank you! Regards, Alex

    Read the article

  • Windows Server 2008 SMTP & POP3 Configuration

    - by Alex Hope O'Connor
    This is the first time I have ever configured a VPS server without 3rd party applications such as Plesk control panel. I have got most functionality working in all my websites except I am very unsure as to how I can setup my email functionality on this new server. Basically I want the standard POP3 functionality, a bunch of accounts with private boxes, all able to send and receive emails using their individual usernames and passwords. My server setup is pretty simple, its a VPS with IIS & DNS Server running. What I have tried to do to setup SMTP & POP3 is adding the SMTP Server feature through the Server Manager Console (very unsure of the configuration as guides I found did not explain), I then installed a 3rd party application called Visdeno SMTP Extender as it claims to be a POP3 service providing accounting and the ability to communicate with email clients. That is as far as I have gotten as I can not seem to find too much information on the subject. So can someone please tell me how to go about configuring these services in order to provide standard SMTP & POP3 functionality? Thanks, Alex.

    Read the article

  • How does enterprise failover, such as with google.com, actually work?

    - by Alex Regan
    We have a few fedora systems that are configured for web, FTP, and email services. We'd like to mirror these services, so that we can provide near 100% reliability for our users. I'm a fairly experienced Linux administrator, but don't have much experience with redundant systems. What is the best way to do this? How does google and amazon do it? Google.com resolves to multiple IP addresses, but if my local desktop caches one of the IPs that are unreachable, I'm going to get a failed connection message. How do they prevent that from happening? If one of their servers goes down, how is it automatically redirected to another system, without the end-user ever knowing it? I understand there are failover devices, but they're only for failing over the system itself, not a complete network. Let's say we have the worst-case scenario, such as my primary system becomes inaccessible. What are the fundamental components that are used on Linux systems to provide this capability? I'm looking for concepts, or approaches, not answers like "check out openstack". What are the actual pieces that make up the solution? What has to be done to implement this capability? Hopefully my question is clear. I'd like to know what the pieces are that make up a failover system and what approach is taken by successful organizations that implement it. Thanks again, Alex

    Read the article

  • Exchange 2010 Mail Enabled Public Folder Unable to Recieve External (anon) e-mail.

    - by Alex
    Hello All, I am having issues with my "Public Folders" mail enabled folders receiving e-mails from external senders. The folder is setup with three Accepted Domains (names changed for privacy reasons): 1 - domain1.com (primary & Authoritative) 2 - domain2.com (Authoritative) 3 - domain3.com (Authoritative) When someone attempts to send an e-mail to [email protected] from inside the organization, the e-mail is received and placed in the appropriate folder. However, when someone tries to send an e-mail from outside the organization (such as a gmail account), the following error message is received: "Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 Recipient address rejected: User unknown (state 14)." When I try to send an e-mail to the same folder, using the same e-mail address above ([email protected]), but with domain2.com instead of domain3.com, it works as intended (both internal & external). I have checked, double checked, and triple checked my DNS settings comparing those from domain2 & domain3 with them both appearing identical. I have tried recreating the folders in question with the same results. I have also ran Get-PublicFolderClientPermission "\Web Programs\folder" with the following results for user anonymous: RunspaceId : 5ff99653-a8c3-4619-8eeb-abc723dc908b Identity : \Web Programs\folder User : Anonymous AccessRights : {CreateItems} Domain2.com & Domain3.com are duplicates of each other, but only domain2.com works as intended. All other exchange functions are functioning properly. If anyone out there has any suggestions, I would love to hear them. I've just hit a brick wall. Thanks for all your help in advance! --Alex

    Read the article

  • Forward Apache to Django dev server

    - by Alex Jillard
    I'm trying to get apache to forward all requests on port 80 to 127.0.0.1:8000, which is where the django dev server runs. I think I have it forwarding properly, but there must be an issue with 127.0.0.1:8000 not being run by apache? I'm running the django dev server in an ubuntu vmware instance, and I'd other people in the office to see the apps in development without having to promote anything to our actual dev/staging servers. Right now the virtual machine picks up an IP for itself, and when I point a browser to that url with the defualt apache config, I get the default apache page. I've since changed the httpd.conf file to the following to try and get it to forward the requests to the django dev server: ServerName localhost <Proxy *> Order deny,allow Allow from all </Proxy> <VirtualHost *> ServerName localhost ServerAdmin [email protected] ProxyRequests off ProxyPass * http://127.0.0.1:8000 </VirtualHost> All I get are 404s with this, and in error.log I get the following (192.168.1.101 is the IP of my computer 192.168.1.142 is the IP of the virtual machine): [Mon Mar 08 08:42:30 2010] [error] [client 192.168.1.101] File does not exist: /htdocs

    Read the article

  • Odd behavior in Django Form (readonly field/widget)

    - by jamida
    I'm having a problem with a test app I'm writing to verify some Django functionality. The test app is a small "grade book" application that is currently using Alex Gaynor's readonly field functionality http://lazypython.blogspot.com/2008/12/building-read-only-field-in-django.html There are 2 problems which may be related. First, when I flop the comment on these 2 lines below: # myform = GradeForm(data=request.POST, instance=mygrade) myform = GradeROForm(data=request.POST, instance=mygrade) it works like I expect, except of course that the student field is changeable. When the comments are the shown way, the "studentId" field is displayed as a number (not the name, problem 1) and when I hit submit I get an error saying that studentId needs to be a Student instance. I'm at a loss as to how to fix this. I'm not wedded to Alex Gaynor's code. ANY code will work. I'm relatively new to both Python and Django, so the hints I've seen on websites that say "making a read-only field is easy" are still beyond me. // models.py class Student(models.Model): name = models.CharField(max_length=50) parent = models.CharField(max_length=50) def __unicode__(self): return self.name class Grade(models.Model): studentId = models.ForeignKey(Student) finalGrade = models.CharField(max_length=3) # testbed.grades.readonly is alex gaynor's code from testbed.grades.readonly import ReadOnlyField class GradeROForm(ModelForm): studentId = ReadOnlyField() class Meta: model=Grade class GradeForm(ModelForm): class Meta: model=Grade // views.py def modifyGrade(request,student): student = Student.objects.get(name=student) mygrade = Grade.objects.get(studentId=student) if request.method == "POST": # myform = GradeForm(data=request.POST, instance=mygrade) myform = GradeROForm(data=request.POST, instance=mygrade) if myform.is_valid(): grade = myform.save() info = "successfully updated %s" % grade.studentId else: # myform=GradeForm(instance=mygrade) myform=GradeROForm(instance=mygrade) return render_to_response('grades/modifyGrade.html',locals()) // template <p>{{ info }}</p> <form method="POST" action=""> <table> {{ myform.as_table }} </table> <input type="submit" value="Submit"> </form> // Alex Gaynor's code from django import forms from django.utils.html import escape from django.utils.safestring import mark_safe from django.forms.util import flatatt class ReadOnlyWidget(forms.Widget): def render(self, name, value, attrs): final_attrs = self.build_attrs(attrs, name=name) if hasattr(self, 'initial'): value = self.initial return mark_safe("<span %s>%s</span>" % (flatatt(final_attrs), escape(value) or '')) def _has_changed(self, initial, data): return False class ReadOnlyField(forms.FileField): widget = ReadOnlyWidget def __init__(self, widget=None, label=None, initial=None, help_text=None): forms.Field.__init__(self, label=label, initial=initial, help_text=help_text, widget=widget) def clean(self, value, initial): self.widget.initial = initial return initial

    Read the article

  • Searches (and general querying) with HBase and/or Cassandra (best practices?)

    - by alexeypro
    I have User model object with quite few fields (properties, if you wish) in it. Say "firstname", "lastname", "city" and "year-of-birth". Each user also gets "unique id". I want to be able to search by them. How do I do that properly? How to do that at all? My understanding (will work for pretty much any key-value storage -- first goes key, then value) u:123456789 = serialized_json_object ("u" as a simple prefix for user's keys, 123456789 is "unique id"). Now, thinking that I want to be able to search by firstname and lastname, I can save in: f:Steve = u:384734807,u:2398248764,u:23276263 f:Alex = u:12324355,u:121324334 so key is "f" - which is prefix for firstnames, and "Steve" is actual firstname. For "u:Steve" we save as value all user id's who are "Steve's". That makes every search very-very easy. Querying by few fields (properties) -- say by firstname (i.e. "Steve") and lastname (i.e. "l:Anything") is still easy - first get list of user ids from "f:Steve", then list from "l:Anything", find crossing user ids, an here you go. Problems (and there are quite a few): Saving, updating, deleting user is a pain. It has to be atomic and consistent operation. Also, if we have size of value limited to some value - then we are in (potential) trouble. And really not of an answer here. Only zipping the list of user ids? Not too cool, though. What id we want to add new field to search by. Eventually. Say by "city". We certainly can do the same way "c:Los Angeles" = ..., "c:Chicago" = ..., but if we didn't foresee all those "search choices" from the very beginning, then we will have to be able to create some night job or something to go by all existing User records and update those "c:CITY" for them... Quite a big job! Problems with locking. User "u:123" updates his name "Alex", and user "u:456" updates his name "Alex". They both have to update "f:Alex" with their id's. That means either we get into overwriting problem, or one update will wait for another (and imaging if there are many of them?!). What's the best way of doing that? Keeping in mind that I want to search by many fields? P.S. Please, the question is about HBase/Cassandra/NoSQL/Key-Value storages. Please please - no advices to use MySQL and "read about" SELECTs; and worry about scaling problems "later". There is a reason why I asked MY question exactly the way I did. :-)

    Read the article

  • log4net dependency problem

    - by Alex DeLarge
    I have an issue with log4net which has been bugging me for a while and I've resolved to sort it. I have a class library which references log4net. If I reference this class library in another project I must then reference log4net in this project otherwise I get a build error Unknown build error, 'Cannot resolve dependency to assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.' I'm aware that the error message is probably telling me the solution, unfortunately I don't speak gibberish... Cheers guys Alex..

    Read the article

  • Iphone Custom UITabBarItem without rounded edges

    - by Alex Milde
    hi i try to customize a uitabbar i extended uitabbar item and now have a customized image in it but i cant get rid of the rounded edges. code: @interface CustomTabBarItem : UITabBarItem { UIImage *customHighlightedImage; } @property (nonatomic, retain) UIImage *customHighlightedImage; @end @implementation CustomTabBarItem @synthesize customHighlightedImage; - (void) dealloc { [customHighlightedImage release]; customHighlightedImage=nil; [super dealloc]; } -(UIImage *) selectedImage { return self.customHighlightedImage; } @end maybe somoen knows how to get rid of the rounded rect around the image thanks in advance alex

    Read the article

  • HTML5 cache manifest: whitelisting ALL remote resources?

    - by Alex Ford
    I'm doing an iPhone version of a desktop site that includes a blog. The blog often embeds images from other domains (the image URLs always start with http:// in this case, obviously), but because I'm using cache-manifest, these images don't load because they aren't declared in the manifest file. I have a NETWORK: whitelist section that has all of my AJAX request files, etc. I've even whitelisted the flickr farm domains because a lot of the images we add to the blog come from our flickr page. The flickr images show up just fine, but any other "random" image hotlinks from another domain show broken. I tried adding a line like this: http:// to the NETWORK: section, but it doesn't seem to like http:// as a whitelist. Does anyone have any thoughts on this? Thanks! Alex

    Read the article

  • Why isn't my os.rename working?

    - by Alex
    Hi All, I'm trying to rename some files, but getting a baffling error*. When I run this: if os.path.isfile(fullPath): print 'fmf exists' print fullPath print newFilePath os.rename(fullPath,newFilePath) I get the following error: fmf exists (correct fullPath) (correct newFilePath, ie. destination) Traceback (most recent call last): File "whatever.py", line 374, in ? os.rename(fullPath,newFilePath) OSError: [Errno 2] No such file or directory Since I know that the file at fullPath exists, I'm baffled by the error. Of course, newFilePath doesn't exist, because that would be dumb. Any hints? Thanks! Alex *Aren't they all?

    Read the article

  • PHP form script error

    - by Alex
    Hi, I have created a rather larger html form and I would like the data to send to my email address. I am using the POST method and thought my PHP was up to snuff. However, I now get the following error upon submission: Parse error: syntax error, unexpected '}' in C:\www\mo\marinecforum\send_form_application.php on line 90. I am having a hell of a time with this. Beyond the error above, I wonder if there is a better way to approach this? Here is the PHP: http://pastebin.com/MKUcgihg Many thanks, Alex

    Read the article

  • tomcat JAXB 1 and 2 linkageerror

    - by Alex
    Hi there, I'm running a tomcat 6, spring, apache cxf webservice, know it is a must to add one third party library to my webapp to fulfill an order. I have jaxb-impl-2.1.12.jar for apache cxf in WEB-INF/lib folder and the new library which contains the JAXB 1.0 runtime. JAXB 2 ist used by apache cxf for dynamic clients (i need them). So is there a possibility to run the webapps with both libraries? Best regards Alex Caused by: java.lang.LinkageError: You are trying to run JAXB 2.0 runtime but you have old JAXB 1.0 runtime earlier in the classpath. Please remove the JAXB 1.0 runtime for 2.0 runtime to work correctly.

    Read the article

  • SSAS: distribution of measures over percentage

    - by Alex
    Hi there, I am running a SSAS cube that stores facts of HTTP requests. The is a column "Time Taken" that stores the milliseconds a particular HTTP request took. Like... RequestID Time Taken -------------------------- 1 0 2 10 3 20 4 20 5 2000 I want to provide a report through Excel that shows the distribution of those timings by percentage of requests. A statement like "90% of all requests took less than 20millisecond". Analysis: 100% <2000 80% <20 60% <20 40% <10 20% <=0 I am pretty much lost what would be the right approach to design aggregations, calculations etc. to offer this analysis through Excel. Any ideas? Thanks, Alex

    Read the article

  • Using SimpleModal (jQuery plugin) to display a popup iFrame without unnecessary scrollbars

    - by Alex Black
    I'm using SimpleModal: http://www.ericmmartin.com/projects/simplemodal/ And displaying an iframe, as per the example: // Display an external page using an iframe var src = "http://365.ericmmartin.com/"; $.modal('<iframe src="' + src + '" height="450" width="830" style="border:0">', { closeHTML:"", containerCss:{ backgroundColor:"#fff", borderColor:"#fff", height:450, padding:0, width:830 }, overlayClose:true }); And the popup has two sets of scrollbars, one perhaps for the HTML element representing the popup, and one for the iFrame. Try the demo to see. Ideally I'd like no scrollbars if the content fits, otherwise a single vertical scrollbar. Any ideas? Thanks! Alex

    Read the article

  • Ubuntu Github ssh keys issue

    - by Alex Baranosky
    I followed every step given in this guide: http://help.github.com/linux-key-setup/ When I get to the end I am able to ssh to [email protected], getting the response: PTY allocation request failed on channel 0 Hi AlexBaranosky! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed But when I go to clone my repo it fails saying: Permission denied (publickey). fatal: The remote end hung up unexpectedly I've used Github a lot, but this is my first use of it from an Ubuntu computer, is there something I am missing here? Any help is greatly appreciated. Alex

    Read the article

  • Nginx A/B testing

    - by Alex
    Hey, I'm trying to do A/B testing and I'm using Nginx fo this purpose. My Nginx config file looks like this: events { worker_connections 1024; } error_log /usr/local/experiments/apps/reddit_test/error.log notice; http { rewrite_log on; server { listen 8081; access_log /usr/local/experiments/apps/reddit_test/access.log combined; location / { if ($remote_addr ~ "[02468]$") { rewrite ^(.+)$ /experiment$1 last; } rewrite ^(.+)$ /main$1 last; } location /main { internal; proxy_pass http://www.reddit.com/r/lisp; } location /experiment { internal; proxy_pass http://www.reddit.com/r/haskell; } } } This is kind of working, but css and js files woon't load. Can anyone tell me what's wrong with this config file or what would be the right way to do it? Thanks, Alex

    Read the article

  • JQuery live event binding prevents additional callbacks

    - by Alex Ciminian
    Hey! I was building an AJAX listing of elements in my site, with the ability to delete them (also via AJAX). The following piece of code handles the deletion: $('ul.action-menu a.delete').live('click', function () { $.post($(this).attr('href'), function (data) { var recvData = eval( '(' + data + ')' ); if ((recvData.status == 1) && (recvData.delId)) { $('#alert-' + recvData.delId).fadeOut(); } else { alert(recvData.message); } }); return false; }); This works just fine. The problem is that, for elements that were not there when the page was loaded (i.e. that were added dynamically), the post callback does not get executed and it doesn't fade out after being deleted (the AJAX call is being made, it just doesn't execute the callback). Do you have any idea why this is happening? Thanks, Alex

    Read the article

  • How to sign installation files of a Visual Studio .msi

    - by Alex
    This may be a duplicate, though I can't find it at this time. If so please point me in the right direction. I recently purchased an authenticode certificate from globalsign and am having problems signing my files for deployment. There are a couple of .exe files that are generated by a project and then put into a .msi. When I sign the .exe files with the signtool the certificate is valid and they run fine. The problem is that when I build the .msi (using the visual studio setup project) the .exe files loose their signatures. So I can sign the .msi after it is built, but the installed .exe files continue the whole "unknown publisher" business. How can I retain the signature on these files for installation on the client machine? You help is appreciated. -Alex

    Read the article

  • Template engine recommendations

    - by alex
    I'm looking for a template engine. Requirements: Runs on a JVM. Java is good; Jython, JRuby and the like, too... Can be used outside of servlets (unlike JSP) Is flexible wrt. to where the templates are stored (JSP and a lot of people require the templates to be stored in the FS). It should provide a template loading interface which one can implement or something like that Easy inclusion of parameterized templates- I really like JSP's tag fragments Good docs, nice code, etc., the usual suspects I've looked at JSP- it's nearly perfect except for the servlet and filesystem coupling, Stringtemplate- I love the template syntax, but it fails on the filesystem coupling, the documentation is lacking and template groups and stuff are confusing, GXP, TAL, etc. Ideas, thoughts? Alex

    Read the article

  • SQL Anywhere 11, JZ0C0: Connection is already closed

    - by Alex
    SLOVED see commend I develop am webservice based on apache tomcat 6.0.26, apache cxf 2.2.7, spring 3.0, hibernate 3.3 and sybase sqlanywhere 11. im using the latest JDBC Driver from SYBASE jconn.jar Version 6. The persistence layer is based on spring + hibernate dao, the connection is configured via a JNDI datasoure (META-INF directory). It seems that, during longer times of inactivity, the connection from the webservice to the database is closed. Exception: java.sql.SQLException: JZ0C0: Connection is already closed. Best regards, Alex

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >