Search Results

Search found 10741 results on 430 pages for 'self improvement'.

Page 16/430 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • How to Conduct a Website Self Evaluation

    Site owners looking to improve recognition and performance may wish to take some time to evaluate its present level of operation. Site owners recently completing improvements may look to see how these changes have affected site performance. The question remains: Where Do I Start?

    Read the article

  • SMTP mailbox unavailable - intermittent and self-inflicted

    - by user134451
    I have an app that runs daily, sending confirmation emails to dozens of customers. Emails are sent using SMTP with authentication. The app also has some error handling, and occasionally anonymous SMTP is used to notify the webmaster that an e-mail issue has been encountered (a malformed email address, usually). Whenever these warning notifications are sent, the customer notifications that follow throw an error: "Mailbox unavailable. The server response was: 5.7.1 Unable to relay". The customer notification emails are sent, but my app drops into the exception handler. And all subsequent customer notification emails have this problem. Everything is fine next time the programs run, until a webmaster warning email is sent. Anyone have an ideas what would cause this? My first thought was that the client didn't like being switched back and forth between anonymous to authenticated modes. I created a separate client for each mode, but that didn't help.

    Read the article

  • No improvement in speed when using Ehcache with Hibernate

    - by paddydub
    I'm getting no improvement in speed when using Ehcache with Hibernate Here are the results I get when i run the test below. The test is reading 80 Stop objects and then the same 80 Stop objects again using the cache. On the second read it is hitting the cache, but there is no improvement in speed. Any idea's on what I'm doing wrong? Speed Test: First Read: Reading stops 1-80 : 288ms Second Read: Reading stops 1-80 : 275ms Cache Info: elementsInMemory: 79 elementsInMemoryStore: 79 elementsInDiskStore: 0 JunitCacheTest public class JunitCacheTest extends TestCase { static Cache stopCache; public void testCache() { ApplicationContext context = new ClassPathXmlApplicationContext("beans-hibernate.xml"); StopDao stopDao = (StopDao) context.getBean("stopDao"); CacheManager manager = new CacheManager(); stopCache = (Cache) manager.getCache("ie.dataStructure.Stop.Stop"); //First Read for (int i=1; i<80;i++) { Stop toStop = stopDao.findById(i); } //Second Read for (int i=1; i<80;i++) { Stop toStop = stopDao.findById(i); } System.out.println("elementsInMemory " + stopCache.getSize()); System.out.println("elementsInMemoryStore " + stopCache.getMemoryStoreSize()); System.out.println("elementsInDiskStore " + stopCache.getDiskStoreSize()); } public static Cache getStopCache() { return stopCache; } } HibernateStopDao @Repository("stopDao") public class HibernateStopDao implements StopDao { private SessionFactory sessionFactory; @Transactional(readOnly = true) public Stop findById(int stopId) { Cache stopCache = JunitCacheTest.getStopCache(); Element cacheResult = stopCache.get(stopId); if (cacheResult != null){ return (Stop) cacheResult.getValue(); } else{ Stop result =(Stop) sessionFactory.getCurrentSession().get(Stop.class, stopId); Element element = new Element(result.getStopID(),result); stopCache.put(element); return result; } } } ehcache.xml <cache name="ie.dataStructure.Stop.Stop" maxElementsInMemory="1000" eternal="false" timeToIdleSeconds="5200" timeToLiveSeconds="5200" overflowToDisk="true"> </cache> stop.hbm.xml <class name="ie.dataStructure.Stop.Stop" table="stops" catalog="hibernate3" mutable="false" > <cache usage="read-only"/> <comment></comment> <id name="stopID" type="int"> <column name="STOPID" /> <generator class="assigned" /> </id> <property name="coordinateID" type="int"> <column name="COORDINATEID" not-null="true"> <comment></comment> </column> </property> <property name="routeID" type="int"> <column name="ROUTEID" not-null="true"> <comment></comment> </column> </property> </class> Stop public class Stop implements Comparable<Stop>, Serializable { private static final long serialVersionUID = 7823769092342311103L; private Integer stopID; private int routeID; private int coordinateID; }

    Read the article

  • QTreeWidget insertTopLevelItem - index given not accurately displayed in Tree?

    - by mleep
    I am unable to properly insert a QTreeWidgetItem at a specific index, in this case I am removing all QTreeWidgetItems from the tree, doing a custom sort on their Date Objects and then inserting them back into the QTreeWidget. However, upon inserting (even one at a time) the QTreeWidgetItem is not inserted into the correct place. The code below prints out: index 0: 0 index 0: 1 index 1: 0 index 0: 2 index 1: 1 index 2: 0 index 0: 3 index 1: 2 index 2: 0 index 3: 1 index 0: 4 index 1: 2 index 2: 0 index 3: 1 index 4: 3 print 'index 0: ', self.indexOfTopLevelItem(childrenList[0]) self.insertTopLevelItem(0, childrenList[1]) print 'index 0: ', self.indexOfTopLevelItem(childrenList[0]), ' index 1: ',\ self.indexOfTopLevelItem(childrenList[1]) self.insertTopLevelItem(0, childrenList[2]) print 'index 0: ', self.indexOfTopLevelItem(childrenList[0]), ' index 1: ',\ self.indexOfTopLevelItem(childrenList[1]), ' index 2: ', \ self.indexOfTopLevelItem(childrenList[2]) self.insertTopLevelItem(0, childrenList[3]) print 'index 0: ', self.indexOfTopLevelItem(childrenList[0]), ' index 1: ',\ self.indexOfTopLevelItem(childrenList[1]), ' index 2: ',\ self.indexOfTopLevelItem(childrenList[2]), 'index 3: ',\ self.indexOfTopLevelItem(childrenList[3]) self.insertTopLevelItem(0, childrenList[4]) print 'index 0: ', self.indexOfTopLevelItem(childrenList[0]),\ ' index 1: ', self.indexOfTopLevelItem(childrenList[1]),\ ' index 2: ', self.indexOfTopLevelItem(childrenList[2]),\ 'index 3: ', self.indexOfTopLevelItem(childrenList[3]),\ 'index 4: ', self.indexOfTopLevelItem(childrenList[4])

    Read the article

  • Using PyQt signals correctly

    - by Skilldrick
    A while ago I did some work in Qt for C++; now I'm working with PyQt. I have a subclass of QStackedWidget, and inside that a subclass of QWidget. In the QWidget I want to click a button that goes to the next page of the QStackedWidget. My (simplified) approach is as follows: class Stacked(QtGui.QStackedWidget): def __init__(self, parent=None): QtGui.QStackedWidget.__init__(self, parent) self.widget1 = EventsPage() self.widget1.nextPage.connect(self.nextPage) self.widget2 = MyWidget() self.addWidget(self.widget1) self.addWidget(self.widget2) def nextPage(self): self.setCurrentIndex(self.currentIndex() + 1) class EventsPage(QtGui.QWidget): nextPage = QtCore.pyqtSignal() def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.continueButton = QtGui.QPushButton('Continue') self.continueButton.clicked.connect(self.nextPage) So, basically, I'm connecting the continueButton clicked signal to the EventsPage nextPage signal, which I'm then connecting in Stacked to the nextPage method. I could just delve into the internals of EventsPage in Stacked and connect self.widget1.continueButton.clicked, but that seemed to completely defeat the purpose of signals and slots. So does this approach make sense, or is there a better way?

    Read the article

  • [Django] Change state of obiects

    - by gameboy
    hi I have following problem. I have model: class Towar(models.Model): nrSeryjny=models.CharField(max_length=100) opis=models.CharField(max_length=255) naStanie=models.NullBooleanField(null=True) def __unicode__(self): return "%s" % self.opis def lowerName(self): return self.__class__.__name__.lower() def checkState(self): return self.naStanie def changeState(self,state): self.naStanie=state class Meta: ordering=['nrSeryjny'] app_label = 'baza' permissions=(("view_towar","mozna miec podglad dla towar"),) and model : class Wypozyczenie(models.Model): dataPobrania=models.DateField() pracownik=models.ForeignKey(User,null=True) kontrahent=models.ForeignKey(Kontrahenci,null=True) towar=models.ForeignKey(Towar,null=True) objects=WypozyczenieManager() default_objects=models.Manager() ZwrotyObjects=WypozyczenieZwrotyManager() def lowerName(self): return self.__class__.__name__.lower() def __unicode__(self): if self.towar == None: return "Dla:%s -- Kto:%s -- Kiedy:%s -- Co:%s" % (self.kontrahent,self.pracownik,self.dataPobrania,"Brak") else: return "Dla:%s -- Kto:%s -- Kiedy:%s -- Co:%s" % (self.kontrahent,self.pracownik,self.dataPobrania,self.towar) class Meta: ordering=['dataPobrania'] app_label = 'baza' permissions=(("view_wypozyczenie","mozna miec podglad dla wypozyczenie"),) and view to adding models: def modelAdd(request,model,modelForm): mod=model() if request.user.has_perm('baza.add_%s' % mod.lowerName()): if request.method=='POST': form=modelForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect('/'+ mod.lowerName() + '/') else: form=modelForm() v=RequestContext(request,{'form':form}) return render_to_response('add_form.html',v) and i whant do that, when i add Wypozyczenie and save it then the Towar that is stored by Wypozyczenie change his na stanie from True to False Greets

    Read the article

  • How to display and change an icon inside a python Tk Frame

    - by codingJoe
    I have a python Tkinter Frame that displays several fields. I want to also add an red/yellow/green icon that will display the status of an external device. The icon is loaded from a file called ICON_LED_RED.ico. How do I display the icon in my frame? How do I change the icon at runtime? for example replace BitmapImage('RED.ico') with BitmapImage('GREEN.ico') class Application(Frame): def init(self, master=None): Frame.__init__(self, master) self.pack() self.createWidgets() def createWidgets(self): # ...other frame code.. works just fine. self.OKBTN = Button(self) self.OKBTN["text"] = "OK" self.OKBTN["fg"] = "red" self.OKBTN["command"] = self.ok_btn_func self.OKBTN.pack({"side": "left"}) # when I add the following the frame window is not visible # The process is locked up such that I have to do a kill -9 self.statusFrame = Frame(self, bd=2, relief=RIDGE) Label(self.statusFrame, text='Status:').pack(side=LEFT, padx=5) self.statIcon = BitmapImage('data/ICON_LED_RED.ico') Label (self.statusFrame, image=self.statIcon ).grid() self.statusFrame.pack(expand=1, fill=X, pady=10, padx=5)

    Read the article

  • Execute function without sending 'self' to it

    - by Sergey
    Is that possible to define a function without referencing to self this way? def myfunc(var_a,var_b) But so that it could also get sender data, like if I defined it like this: def myfunc(self, var_a,var_b) That self is always the same so it looks a little redundant here always to run a function this way: myfunc(self,'data_a','data_b'). Then I would like to get its data in the function like this sender.fields. UPDATE: Here is some code to understand better what I mean. The class below is used to show a page based on Jinja2 templates engine for users to sign up. class SignupHandler(webapp.RequestHandler): def get(self, *args, **kwargs): utils.render_template(self, 'signup.html') And this code below is a render_template that I created as wrapper to Jinja2 functions to use it more conveniently in my project: def render_template(response, template_name, vars=dict(), is_string=False): template_dirs = [os.path.join(root(), 'templates')] logging.info(template_dirs[0]) env = Environment(loader=FileSystemLoader(template_dirs)) try: template = env.get_template(template_name) except TemplateNotFound: raise TemplateNotFound(template_name) content = template.render(vars) if is_string: return content else: response.response.out.write(content) As I use this function render_template very often in my project and usually the same way, just with different template files, I wondered if there was a way to get rid of having to call it like I do it now, with self as the first argument but still having access to that object.

    Read the article

  • singledispatch in class, how to dispatch self type

    - by yanxinyou
    Using python3.4. Here I want use singledispatch to dispatch different type in __mul__ method . The code like this : class Vector(object): ## some code not paste @functools.singledispatch def __mul__(self, other): raise NotImplementedError("can't mul these type") @__mul__.register(int) @__mul__.register(object) # Becasue can't use Vector , I have to use object def _(self, other): result = Vector(len(self)) # start with vector of zeros for j in range(len(self)): result[j] = self[j]*other return result @__mul__.register(Vector) # how can I use the self't type @__mul__.register(object) # def _(self, other): pass # need impl As you can see the code , I want support Vector*Vertor , This has Name error Traceback (most recent call last): File "p_algorithms\vector.py", line 6, in <module> class Vector(object): File "p_algorithms\vector.py", line 84, in Vector @__mul__.register(Vector) # how can I use the self't type NameError: name 'Vector' is not defined The question may be How Can I use class Name a Type in the class's method ? I know c++ have font class statement . How python solve my problem ? And it is strange to see result = Vector(len(self)) where the Vector can be used in method body .

    Read the article

  • Force an indent in Python code for organizational purposes

    - by Vine
    Is there a way to force an indent in Python? I kind of want it for the sake of making the code look organized. As an example: # How it looks now class Bro: def __init__(self): self.head = 1 self.head.eye = 2 self.head.nose = 1 self.head.mouth = 1 self.neck = 1 self.torso = 1 # How it'd look ideally (indenting sub-variables of 'head') class Bro: def __init__(self): self.head = 1 self.head.eye = 2 self.head.nose = 1 self.head.mouth = 1 self.neck = 1 self.torso = 1 I imagine this is possible with some sort of workaround, yeah?

    Read the article

  • class, dict, self, init, args ?

    - by kame
    class attrdict(dict): def __init__(self, *args, **kwargs): dict.__init__(self, *args, **kwargs) self.__dict__ = self a = attrdict(x=1, y=2) print a.x, a.y b = attrdict() b.x, b.y = 1, 2 print b.x, b.y Could somebody explain the first four lines in words? I read about classes and methods. But here it seems very confusing.

    Read the article

  • Ubuntu 14.04 disk utility SMART self-test failed threshold not exceeded

    - by user2323470
    I'm using the "Disks" program in Ubuntu 14.04 (live DVD) to assess the health of a drive I suspect is failing. However, when I first opened the program, it showed that the overall health was OK and all assessments are OK as well. I then tried to run a short self-test, but now the overall assessment shows a red "SELF-TEST FAILED". In the details section it says "Last self-test failed (read)" and "threshold not exceeded". All individual assessments are still OK though!! What I don't understand is, does that mean that the test executed and determined that the drive is a goner, or does it mean that the test didn't actually execute properly?

    Read the article

  • HTTPS with Self-Signed Certificate Issues... Solution or better way?

    - by stormin986
    All I need to do is download some basic text-based and image files from a web server that has a self-signed SSL certificate. I have been trying to figure out how to use HttpClient to do this, but getting the SSL to work is a nightmare that seems to be way too much trouble for such a simple task. Is there a better way to perform these file downloads? Perhaps through a WebView or Browser feature? Reinventing the wheel of making a simple HTTPS GET request is a major pain, and is significantly holding up my development schedule. ** Updated title to more accurately reflect question / solution **

    Read the article

  • self.window.rootViewController vs window addSubview

    - by Gazzer
    I've noticed a lot of examples for iPhone apps in the Application Delegate - (void)applicationDidFinishLaunching:(UIApplication *)application have [window addSubview: someController.view]; (1) as opposed to self.window.rootViewController = self.someController; (2) Is there any practical reason to use one over the other? Is one technically correct? Do controller's have the an equivalent command to number (2) like self.someController.rootController = self.someOtherController; // pseudocode

    Read the article

  • How to use a self-signed SSL certificate when developing with Trigger.io?

    - by user610345
    Our backend is in rails, and for several reasons the development environment has to be run with rails using a self-signed SSL certificate. This works fine on the desktop after manually trusting the certificate. Using Trigger.io, we're developing a mobile application targeting iOS from the same backend. It would be ideal for us to be able to run the rails server with SSL (so we can compare the browser output) and still have the iOS simulator connect properly without complaining about invalid certs. Production is using a proper ssl-cert, but what's the best way to set up the simulator?

    Read the article

  • python 3 self class dict

    - by Jjang
    I am trying to create my own class of dictionary in python 3 which has a field of dict variable and setitem and getitem methods. Though, it doesnt work for some reason. Tried to look around but couldn't find the answer. class myDictionary: def __init(self): self.myDic={} def __setitem__(self, key, value): self.myDic[key]=value I'm getting: 'myDictionary' object has no attribute 'myDic' Any ideas? :)

    Read the article

  • Exklusiv für Oracle Academy-Teilnehmer und nur bis 15. Juli 2011: bis zu 68% Preisnachlass auf Self-Study-Kurse

    - by bwolf
    Kennen Sie schon unsere Oracle University-Produkte zum eigenständigen Lernen? Oracle University bieten Ihnen eine große Auswahl von individuellen Kursen verfügbar als Self-Study CDs an. Diese Kurse sind zu 100 % angelehnt an unsere Klassenraumkurse oder beinhalten spezifische und individuelle Schwerpunkte. Die CDs der Oracle University werden jederzeit auf den neuesten IT Standards konzipiert und sind genau auf die Bedürfnisse unserer Kunden zugeschnitten. Ihre Vorteile:  Durch unser einmaliges Angebot der Self-Study CDs können Sie...: ...Ihr bereits vorhandenes Wissen vertiefen oder erweitern ...als individuelles Nachschlagewerk Ihr Know-How immer auf dem neusten Stand halten ...unsere Self-Study CDs unbegrenzt zeitlich nutzen ...jederzeit die Inhalte nochmal nachschlagen und vertiefen ...neue Mitarbeiter einfach einarbeiten ...Reisekosten zu 100% vermeiden ...und können jederzeit zeitlich flexibel sein. Folgende attraktive Preiskonditionen bieten wir exklusiv nur für Oracle Academy-Teilnehmer an. Sie erhalten schon ab der  1. Self-Study CD 58 % Preisnachlass Sie erhalten ab der 11. Self-Study CD 63 % PreisnachlassS Sie erhalten ab der 21. Self-Study CD 68 % PreisnachlassS So erhalten Sie z.B. unseren Self-Study-Kurs Fundamentals of the Java Programming Language, Java SE 6, schon für 218,82 € zzgl. MwSt Die komplette Liste verfügbarer Self-Study-Kurse finden Sie hier Wichtig: Das Angebot ist nur bis zum 15. Juli 2011 gültig! Da das Angebot NICHT bei Online-Buchungen gilt, kontaktieren Sie bitte unsere Kollegin Nele Mletschkowsky (Tel. kostenfrei 0800-1862336).

    Read the article

  • When returning from a period of not programming, do you find you've improved?

    - by Jon Purdy
    It seems as though whenever I take an extended break from programming—whether to pursue other interests or simply because I fall out of the habit for a while—I invariably find that when I return to a project and set to coding, I come with an abundance of new ideas, novel approaches, and just plain better code. It may be because I have a lot of other creative interests besides programming, and my mind likes to find correlation and crossover between them, so while I'm doing one thing, in the back of my mind I'm usually also applying it to another. So what's your experience? Do you ever return from a break (whether intentional or not) feeling not only refreshed, but also somehow noticeably improved? Is it actually the norm?

    Read the article

  • Best practices to work on several programming projects simultaneously

    - by Mahbubur R Aaman
    Most of the time I have to work on several projects simultaneously. I want to provide my best output at every project. What practices would be the best for me work on each project with better output? EDIT: It is better to follow http://www.joelonsoftware.com/articles/fog0000000022.html But every companies does not follow JOEL methodologies. In this situation, what should i do? EDIT: I am a lead programmer. I have to lead several projects. Need to solve several programming problems of programmers. In this situation, what should i do?

    Read the article

  • What do you do with coder's block?

    - by Garet Claborn
    Lately it has been a bit rough. I basically know all the things I need and all the avenues to get there for work. There's been no real issue of a problem with too high complexity, and performance is good. Still, after three major projects this year, my mind is behaving a little strange. It's like I'm used to working in O(1+log(N-neatTricks)) but for some reason it processes in O(N^2)! I've experienced a sort of burnout after long deadlines and drudging projects before, but when it turns into a longer experience, I haven't found the usual suspects to be helpful. Take more walks Work on other code Overdesign everything until I feel intensely driven to just make it (sorta works) How can a programmer recoup from the specific hole in your head programming leaves after being mentally ransacked by these bloody corporations and their fancy money? Hopefully some of you have some better ideas, because I could really use another round of being looted and pillaged.I've often wondered if there are special puzzles or some kind of activity that would de-stress the tangled balance of left and right braininess programmers often deal with. Do any special techniques, activities, anything seem to help with the developer's mindset especially?

    Read the article

  • Learning language is enough to create average applications ?

    - by Freshblood
    Many books teach a programming language. However, knowing a specific language is not the same as knowning application or GUI design nor project layout. So, attempting to make an average application fails after learning a language. It is clear that knowing a language is not enough to make an application. If you agree with what I have said, why doesn't anyone mention this instead of teaching pure language syntax and features? Why books don't mention how to make a better application ?

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >