Search Results

Search found 10930 results on 438 pages for 'self signed'.

Page 3/438 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Install self-signed certificate on local server (iis)

    - by ile
    On this page there are instructions on how to create self-signed cert (on apache) and how to install this certificate on server. I found this page (http://www.visualwin.com/SelfSSL/) with instructions on how to create self-signed certificate on windows (iis). I followed instructions and when I type https://myip/myapp (this leads to localhost because I set my router's port forwarding to go to localhost on my pc) this part works. From the first link, the most important part is this: What needs to be installed in IE is actually the Root CA Certificate. In the how-to above, the Root CA Certificate is called ca.crt. Copy this file to the server that is running QuickBooks. The following is for IE6: - Open IE - Tools - Internet Options - Content - Certificates - Trusted Root Certification Authorities Tab - Import, Next, Browse to 'ca.crt' - Next, Next, Finish, Close, OK The part that is missing in second link is that there is no instruction on how to get .crt file, so I tried to get it myself. What I did was following: I opened https://myip/myapp in Firefox and then "This Connection is Untrusted" screen appeared. Then I clicked on "Add Exception" and then below "Certificate Status" I clicked "View". Under the Details tab I clicked on Export and choosed Save as type: "X 509 Certificate (PEM)" and file was saved with .crt extension. Then I opened IE8 and followed above instructions. After opening https://myip/myapp in IE8 I always get warning screen. Does anyone knows what am I doing wrong? Thanks, Ile

    Read the article

  • Hopcroft–Karp algorithm in Python

    - by Simon
    I am trying to implement the Hopcroft Karp algorithm in Python using networkx as graph representation. Currently I am as far as this: #Algorithms for bipartite graphs import networkx as nx import collections class HopcroftKarp(object): INFINITY = -1 def __init__(self, G): self.G = G def match(self): self.N1, self.N2 = self.partition() self.pair = {} self.dist = {} self.q = collections.deque() #init for v in self.G: self.pair[v] = None self.dist[v] = HopcroftKarp.INFINITY matching = 0 while self.bfs(): for v in self.N1: if self.pair[v] and self.dfs(v): matching = matching + 1 return matching def dfs(self, v): if v != None: for u in self.G.neighbors_iter(v): if self.dist[ self.pair[u] ] == self.dist[v] + 1 and self.dfs(self.pair[u]): self.pair[u] = v self.pair[v] = u return True self.dist[v] = HopcroftKarp.INFINITY return False return True def bfs(self): for v in self.N1: if self.pair[v] == None: self.dist[v] = 0 self.q.append(v) else: self.dist[v] = HopcroftKarp.INFINITY self.dist[None] = HopcroftKarp.INFINITY while len(self.q) > 0: v = self.q.pop() if v != None: for u in self.G.neighbors_iter(v): if self.dist[ self.pair[u] ] == HopcroftKarp.INFINITY: self.dist[ self.pair[u] ] = self.dist[v] + 1 self.q.append(self.pair[u]) return self.dist[None] != HopcroftKarp.INFINITY def partition(self): return nx.bipartite_sets(self.G) The algorithm is taken from http://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm However it does not work. I use the following test code G = nx.Graph([ (1,"a"), (1,"c"), (2,"a"), (2,"b"), (3,"a"), (3,"c"), (4,"d"), (4,"e"),(4,"f"),(4,"g"), (5,"b"), (5,"c"), (6,"c"), (6,"d") ]) matching = HopcroftKarp(G).match() print matching Unfortunately this does not work, I end up in an endless loop :(. Can someone spot the error, I am out of ideas and I must admit that I have not yet fully understand the algorithm, so it is mostly an implementation of the pseudo code on wikipedia

    Read the article

  • GAE Datastore Put()

    - by Ivan Slaughter
    def post(self): update = self.request.get('update') if users.get_current_user(): if update: personal = db.GqlQuery("SELECT * FROM Personal WHERE __key__ = :1", db.Key(update)) personal.name = self.request.get('name') personal.gender = self.request.get('gender') personal.mobile_num = self.request.get('mobile_num') personal.birthdate = int(self.request.get('birthdate')) personal.birthplace = self.request.get('birthplace') personal.address = self.request.get('address') personal.geo_pos = self.request.get('geo_pos') personal.info = self.request.get('info') photo = images.resize(self.request.get('img'), 0, 80) personal.photo = db.Blob(photo) personal.put() self.redirect('/admin/personal') else: personal= Personal() personal.name = self.request.get('name') personal.gender = self.request.get('gender') personal.mobile_num = self.request.get('mobile_num') personal.birthdate = int(self.request.get('birthdate')) personal.birthplace = self.request.get('birthplace') personal.address = self.request.get('address') personal.geo_pos = self.request.get('geo_pos') personal.info = self.request.get('info') photo = images.resize(self.request.get('img'), 0, 80) personal.photo = db.Blob(photo) personal.put() self.redirect('/admin/personal') else: self.response.out.write('I\'m sorry, you don\'t have permission to add this LP Personal Data.') Should this will update the existing record if the 'update' is querystring containing key datastore key. I try this but keep adding new record/entity. Please give me some sugesstion to correctly updating the record/entity. Correction? : def post(self): update = self.request.get('update') if users.get_current_user(): if update: personal = Personal.get(db.Key(update)) personal.name = self.request.get('name') personal.gender = self.request.get('gender') personal.mobile_num = self.request.get('mobile_num') personal.birthdate = int(self.request.get('birthdate')) personal.birthplace = self.request.get('birthplace') personal.address = self.request.get('address') personal.geo_pos = self.request.get('geo_pos') personal.info = self.request.get('info') photo = images.resize(self.request.get('img'), 0, 80) personal.photo = db.Blob(photo) personal.put() self.redirect('/admin/personal') else: personal= Personal() personal.name = self.request.get('name') personal.gender = self.request.get('gender') personal.mobile_num = self.request.get('mobile_num') personal.birthdate = int(self.request.get('birthdate')) personal.birthplace = self.request.get('birthplace') personal.address = self.request.get('address') personal.geo_pos = self.request.get('geo_pos') personal.info = self.request.get('info') photo = images.resize(self.request.get('img'), 0, 80) personal.photo = db.Blob(photo) personal.put() self.redirect('/admin/personal') else: self.response.out.write('I\'m sorry, you don\'t have permission to add this LP Personal Data.')

    Read the article

  • Objective-C I can access self.view but not self.view.frame

    - by user292896
    I can access and show self.view and see the frame in the log but when I try to access self.view.frame I get null. Below is the log output of NSLog(@"Show self.view:%@",self.view); NSLog(@"Show self.view.frame:%@",self.view.frame); - 2010-03-28 11:08:43.373 vivmed_CD_Tab[20356:207] Show self.view:<UITableView: 0x4001600; frame = (0 0; 320 583); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x3b21270>> 2010-03-28 11:08:43.373 vivmed_CD_Tab[20356:207] Show self.view.frame:(null) Can anyone explain why self.view.frame is null but self.view shows a frame? May Goal is to change the frame size. Cheers, Grant

    Read the article

  • App Engine webapp.RequestHandler child instances has no self.request during __init__

    - by grucha
    i use modified webapp.RequestHandler for handling requests in my app: class MyRequestHandler(webapp.RequestHandler): """ Request handler with some facilities like user. self.out is the dictionary to pass to templates """ def __init__(self, *args, **kwargs): super(MyRequestHandler, self).__init__(*args, **kwargs) self.out = { 'user': users.get_current_user(), 'logout_url': users.create_logout_url(self.request.uri) } def render(self, template_name): """ Shortcut to render templates """ self.response.out.write(template.render(template_name, self.out)) class DeviceList(MyRequestHandler): def get(self): self.out['devices'] = GPSDevice.all().fetch(1000) self.render('templates/device_list.html') but I get an exception: line 28, in __init__ self.out['logout_url'] = users.create_logout_url(self.request.uri) AttributeError: 'DeviceList' object has no attribute 'request' When the code causing exception is moved out of __init__ everything's fine: class MyRequestHandler(webapp.RequestHandler): """ Request handler with some facilities like user. self.out is the dictionary to pass to templates and initially it contains user object for example """ def __init__(self, *args, **kwargs): super(MyRequestHandler, self).__init__(*args, **kwargs) self.out = { 'user': users.get_current_user(), } def render(self, template_name): """ Shortcut to render templates """ self.out['logout_url'] = users.create_logout_url(self.request.uri) self.response.out.write(template.render(template_name, self.out)) Whi is that? Why there's no self.request after parent's (i.e. webapp.RequestHandler's) __init__ was executed?

    Read the article

  • How do I create a self referential association (self join) in a single class using ActiveRecord in Rails?

    - by Daniel Chang
    I am trying to create a self join table that represents a list of customers who can refer each other (perhaps to a product or a program). I am trying to limit my model to just one class, "Customer". The schema is: create_table "customers", force: true do |t| t.string "name" t.integer "referring_customer_id" t.datetime "created_at" t.datetime "updated_at" end add_index "customers", ["referring_customer_id"], name: "index_customers_on_referring_customer_id" My model is: class Customer < ActiveRecord::Base has_many :referrals, class_name: "Customer", foreign_key: "referring_customer_id", conditions: {:referring_customer_id => :id} belongs_to :referring_customer, class_name: "Customer", foreign_key: "referring_customer_id" end I have no problem accessing a customer's referring_customer: @customer.referring_customer.name ... returns the name of the customer that referred @customer. However, I keep getting an empty array when accessing referrals: @customer.referrals ... returns []. I ran binding.pry to see what SQL was being run, given a customer who has a "referer" and should have several referrals. This is the SQL being executed. Customer Load (0.3ms) SELECT "customers".* FROM "customers" WHERE "customers"."id" = ? ORDER BY "customers"."id" ASC LIMIT 1 [["id", 2]] Customer Exists (0.2ms) SELECT 1 AS one FROM "customers" WHERE "customers"."referring_customer_id" = ? AND "customers"."referring_customer_id" = 'id' LIMIT 1 [["referring_customer_id", 3]] I'm a bit lost and am unsure where my problem lies. I don't think my query is correct -- @customer.referrals should return an array of all the referrals, which are the customers who have @customer.id as their referring_customer_id.

    Read the article

  • Creating self-signed SSL on IIS - Remote access problem

    - by ile
    I followed these instructions to create self-signed ssl: http://www.visualwin.com/SelfSSL/ (I opened SelfSSL and typed selfssl /T) When I access https: //localhost/ than it works, but when I try to access it remotely (i set up my router to port forward to localhost), for example https: //myip the page does not load. Also, I noticed one other thing. When I access localhost locally then I am asked to enter user/pass, but if I access remotely the I get the following warning: Under Construction The site you were trying to reach does not currently have a default page. It may be in the process of being upgraded and configured. ... I don't know if it is related with this but I hope someone know the answer. Thanks, Ile

    Read the article

  • Red Hat - Accept Self-Signed Certificates

    - by user552788
    Hi: Is there a way I can get a Red Hat Linux box to trust a self-signed certificate? e.g. wget https://example.com - gives an error that certificate is untrusted as 'https://example.com' has a self-signed certificate; with wget '--no-check-certificate' can over-ride checking of the certificate. But I would like to get the Red Hat to implicitly trust the self-signed certificate - is there a way to do this? Thanks.

    Read the article

  • How to replace a Widget with another using Qt ?

    - by Natim
    Hi, I have an QHBoxLayout with a QTreeWidget on the left, a separator on the middle and a widget on the right. When I click on the QTreeWidget, I want to change the widget on the right to modify the QTreeWidgetItem I tried to do this with this code : def new_rendez_vous(self): self.ui.horizontalLayout_4.removeWidget(self.ui.editionFormWidget) del self.ui.editionFormWidget self.ui.editionFormWidget = RendezVousManagerDialog(self.parent) self.ui.editionFormWidget.show() self.ui.horizontalLayout_4.addWidget(self.ui.editionFormWidget) self.connect(self.ui.editionFormWidget, QtCore.SIGNAL('saved'), self.scheduleTreeWidget.updateData) def edit(self, category, rendez_vous): self.ui.horizontalLayout_4.removeWidget(self.ui.editionFormWidget) del self.ui.editionFormWidget self.ui.editionFormWidget = RendezVousManagerDialog(self.parent, category, rendez_vous) self.ui.editionFormWidget.show() self.ui.horizontalLayout_4.addWidget(self.ui.editionFormWidget) self.connect(self.ui.editionFormWidget, QtCore.SIGNAL('saved'), self.scheduleTreeWidget.updateData) def edit_category(self, category): self.ui.horizontalLayout_4.removeWidget(self.ui.editionFormWidget) del self.ui.editionFormWidget self.ui.editionFormWidget = CategoryManagerDialog(self.parent, category) self.ui.editionFormWidget.show() self.ui.horizontalLayout_4.addWidget(self.ui.editionFormWidget) self.connect(self.ui.editionFormWidget, QtCore.SIGNAL('saved'), self.scheduleTreeWidget.updateData) But it doesn't work and all the widgets are stacked up on each other : . Do you know how I can remove the old widget and next display the new one ?

    Read the article

  • Edit of self referencing HABTM in cakephp works, sometimes

    - by Odegard
    I'm using a self referencing HABTM model with Participants. You sign up for an event and when you log in to your reservation/profile you see a list of other participants and you can choose to add yourself and others into various groups; share hotel room, share transportation from airport etc. What I've managed so far: 1) In my profile I see the list of all other participants with checkboxes. Great so far. 2) Adding another participant works fine. Next time I edit, the participant I added is shown as checked. 3) Removing another participant works fine too as long as you still have checked participants before you submit! Again, with words: There are 3 participants. I'm logged in as one of them, and I see the 2 other people on the participants list. I choose to check both of them. This works fine (always). Later I choose to remove one of them (by unchecking the checkbox and hitting submit). This also works fine (always). If I want to remove the last checkbox... nothing is updated (always!). What's curious is that I can add and remove any odd combination of participants and it will always work UNLESS I choose to remove every participants in one go (removing a one and only participant is a special case of "remove all checked participants"). As far as I know, HABTMs work by first deleting all relations, then re-saving them. I can see that in my tables when I remove, add, remove, add the same participant over and over again - the id on the HABTM table is always increasing. When I deselect all participants at once, however, the relations are not updated. The ids stay the same, so it's like the save never happened. This behaviour is so specific and peculiar, I have a feeling I'm missing something obvious here. Anyway, here's the relevant code: Model class Participant extends AppModel { var $hasAndBelongsToMany = array( 'buddy' = array( 'className' = 'Participant', 'joinTable' = 'participants_participants', 'foreignKey' = 'participant_id', 'associationForeignKey' = 'buddy_id', 'unique' = true, ) ); Controller function edit($id = null) { if (!$id && empty($this-data)) { $this-Session-setFlash(__('Invalid Participant', true)); $this-redirect(array('action'='index')); } if (!empty($this-data)) { if ($this-Participant-saveAll($this-data)) { $this-Session-setFlash(__('The Participant has been saved', true)); $this-redirect(array('action'='index')); } else { $this-Session-setFlash(__('The Participant could not be saved. Please, try again.', true)); } } if (empty($this-data)) { $this-data = $this-Participant-read(null, $id); } // Fetching all participants except yourself $allParticipants = $this-Participant-find('list', array('conditions' = array('participant.id ' = $id))); // Fetching every participant that has added you to their list $allBuddies = $this-Participant-ParticipantsParticipant-find('list', array( 'conditions' = array('buddy_id' = $id), 'fields' = 'ParticipantsParticipant.participant_id', 'order' = 'ParticipantsParticipant.participant_id ASC' )); $this-set(compact('allParticipants','allBuddies')); } View echo $form-create('Participant'); echo $associations-habtmCheckBoxes($allParticipants, $this-data['buddy'], 'buddy', 'div', '\'border: 1px solid #000;\'', '\'border: 1px solid #000;\''); echo $form-end('Submit'); I'm using a slightly modified helper, habtmCheckBoxes, found here: http://cakeforge.org/snippet/detail.php?type=snippet&id=190 It works like this: function habtmCheckBoxes($rows=array(), $selectedArr=array(), $modelName, $wrapTag='p', $checkedDiv, $uncheckedDiv) {}

    Read the article

  • signed applet automatically running as insecure

    - by Terje Dahl
    My application is deployed as a self-signed applet to several thousand users at more than 50 schools across the country (in Norway). The user is presented with the standard Java security warning asking if they will accept the signature. When they do, the applet runs perfectly. However, about half a year ago a group of 7 school, all under a common IT department, stopped getting the security warning. In stead the applet loads and starts running in untrusted mode, without first giving the user an option to accept or reject the signature. The problem is on Windows machines, and only when the machine is connected to the schools network. If they take the same machine home with them, the program functions as it should, with security warnings and everything. I know little about Window systems in general, but I would think it would be some sort of policy-file or something that is loaded when a machine hooks up to/through the schools network. Furthermore, the problem only started occurring in these 7 schools after changes made after a security breach they had a while back. The IT department is stumped. I am stumped. Any thoughts, comments, suggestions?

    Read the article

  • generate correctly a self signed certificate Zimbra

    - by rkmax
    I have a Single mail server with Zimbra 8.0.0 for generate certificate I'm following Generate the cert. ORG=MyOrganization CN=mail.mydomain.com COUNTRY=myCountry CITY=myCity /opt/zimbra/bin/zmcertmgr createcrt -new -days 365 -subject "/C=$COUNTRY/ST=N/A/L=$CITY/O=$ORG/OU=ZCS/CN=$CN" /opt/zimbra/bin/zmcertmgr deploycrt self -allserver su - zimbra "zmcontrol restart" Veririficate with /opt/zimbra/bin/zmcertmgr viewdeployedcrt. i can see the new cert In Chrome go to https://mail.mydomain.com and export the .cer test in a Windows client certutil.exe -addstore root \path\to\exported.cert root "Root Certification Authorities trusted" You can add a root certificate to the root store CertUtil:-addstore command error: 0x8007000d (WIN32: 13) CertUtil: Invalid data. even from chrome i've tried to add the cert without successful results. can anyone help me with this problem?

    Read the article

  • Utility that helps in file locking - expert tips wanted

    - by maix
    I've written a subclass of file that a) provides methods to conveniently lock it (using fcntl, so it only supports unix, which is however OK for me atm) and b) when reading or writing asserts that the file is appropriately locked. Now I'm not an expert at such stuff (I've just read one paper [de] about it) and would appreciate some feedback: Is it secure, are there race conditions, are there other things that could be done better … Here is the code: from fcntl import flock, LOCK_EX, LOCK_SH, LOCK_UN, LOCK_NB class LockedFile(file): """ A wrapper around `file` providing locking. Requires a shared lock to read and a exclusive lock to write. Main differences: * Additional methods: lock_ex, lock_sh, unlock * Refuse to read when not locked, refuse to write when not locked exclusivly. * mode cannot be `w` since then the file would be truncated before it could be locked. You have to lock the file yourself, it won't be done for you implicitly. Only you know what lock you need. Example usage:: def get_config(): f = LockedFile(CONFIG_FILENAME, 'r') f.lock_sh() config = parse_ini(f.read()) f.close() def set_config(key, value): f = LockedFile(CONFIG_FILENAME, 'r+') f.lock_ex() config = parse_ini(f.read()) config[key] = value f.truncate() f.write(make_ini(config)) f.close() """ def __init__(self, name, mode='r', *args, **kwargs): if 'w' in mode: raise ValueError('Cannot open file in `w` mode') super(LockedFile, self).__init__(name, mode, *args, **kwargs) self.locked = None def lock_sh(self, **kwargs): """ Acquire a shared lock on the file. If the file is already locked exclusively, do nothing. :returns: Lock status from before the call (one of 'sh', 'ex', None). :param nonblocking: Don't wait for the lock to be available. """ if self.locked == 'ex': return # would implicitly remove the exclusive lock return self._lock(LOCK_SH, **kwargs) def lock_ex(self, **kwargs): """ Acquire an exclusive lock on the file. :returns: Lock status from before the call (one of 'sh', 'ex', None). :param nonblocking: Don't wait for the lock to be available. """ return self._lock(LOCK_EX, **kwargs) def unlock(self): """ Release all locks on the file. Flushes if there was an exclusive lock. :returns: Lock status from before the call (one of 'sh', 'ex', None). """ if self.locked == 'ex': self.flush() return self._lock(LOCK_UN) def _lock(self, mode, nonblocking=False): flock(self, mode | bool(nonblocking) * LOCK_NB) before = self.locked self.locked = {LOCK_SH: 'sh', LOCK_EX: 'ex', LOCK_UN: None}[mode] return before def _assert_read_lock(self): assert self.locked, "File is not locked" def _assert_write_lock(self): assert self.locked == 'ex', "File is not locked exclusively" def read(self, *args): self._assert_read_lock() return super(LockedFile, self).read(*args) def readline(self, *args): self._assert_read_lock() return super(LockedFile, self).readline(*args) def readlines(self, *args): self._assert_read_lock() return super(LockedFile, self).readlines(*args) def xreadlines(self, *args): self._assert_read_lock() return super(LockedFile, self).xreadlines(*args) def __iter__(self): self._assert_read_lock() return super(LockedFile, self).__iter__() def next(self): self._assert_read_lock() return super(LockedFile, self).next() def write(self, *args): self._assert_write_lock() return super(LockedFile, self).write(*args) def writelines(self, *args): self._assert_write_lock() return super(LockedFile, self).writelines(*args) def flush(self): self._assert_write_lock() return super(LockedFile, self).flush() def truncate(self, *args): self._assert_write_lock() return super(LockedFile, self).truncate(*args) def close(self): self.unlock() return super(LockedFile, self).close() (the example in the docstring is also my current use case for this) Thanks for having read until down here, and possibly even answering :)

    Read the article

  • Please guide this self-taught Web Developer.

    - by ChickenPuke
    One of the major regrets in life is that I didn't do something with my introversion. I didn't manage to get past the first year of college because of that. I have chosen the path where there are no video games and other time sinks, all I have is the internet to quench my thirst of learning the ins and outs of the field of Web Developing/Designing. Though currently, I'm taking a Web Design Associate course at one of the best Computer Arts and this is the last month of the class. Even though I'm still a sapling, I love this field so much. So basically, At school I'm learning web design while at home I'm teaching myself web-developing. First thing first, returning to college seems impossible at the moment because of some financial problems. I'm pretty comfortable with CSS and HTML and I'm into PHP/MySQL at the moment. Could you please provide me a web-development Curriculum to follow. And do I need to learn about the theories behind? And I think I'm still young(I'm 18 at the time of writing). Is it a good thing or bad thing for choosing this path? I'm glad with my decision but in all honesty, I'm worrying about my future and employment because I'm an undergrad, coming from a country where companies are degree b!tches, it saddens me so. Thank you. (My questions are the bold parts. )

    Read the article

  • A toolset for self improvement and learning [closed]

    - by Sebastian
    Possible Duplicate: I’m having trouble learning I've been working as an IT consultant for 1½ years and I am very passionate about programming. Before that I studied MSc Software Engineering and had both a part time job as a developer for a big telecom company. During that time I also took extra courses and earned a SCJP certificate. I have been continuously reading a lot of books during the last 3½ years. Now to my problem. I want to continue learning and become a really, really good developer. Apart from my daytime job as a full time java developer I have taken university courses in, for me, new languages and paradigms. Most recently, android game development and then functional programming with Scala. I've read books, went to conferences and had a couple of presentations for internal training purposes in our local office. I want to have some advice from other people who have previously been in my situation or currently are. What are you guys doing to keep improving yourselves? Here is some things that I have found are working for me: Reading books I've mostly read books about best practices for programming, OO-design, refactoring, design patterns, tdd. Software craftmanship if you like. I keep a reading list and my current book is Apprenticeship patterns. Taking courses In my country we have a really good system for taking online distance courses. I have also taken one course at coursera.org and a highly recommend that platform. Ive looked at courses at oreilly.com, industriallogic, javaspecialists.eu and they seem to be okay. If someone gives these type of courses a really good review, I can probably convince my boss. Workshops that span over a couple of days would probably be harder, but Ive seen that uncle Bob will have one about refactoring and tdd in 6months not far from here.. :) Are their possibly some online learning platforms that I dont know about? Educational videos I've bought uncle bobs videos from cleancoders.com and I highly recommend them. The only thing I dont like is that they are quite expensive and that he talks about astronomy for ~10 minutes in every episode. Getting certified I had a lot of fun and learned a lot when I studied for the SCJP. I have also done some preparation for the microsoft equivalent but never went for it. I think it is a good when selling yourself as a newly graduated student and also will boost your knowledge if your are interested in it. Now I would like others to start sharing their experiences and possibly give me some advice! BR Sebastian

    Read the article

  • Time management and self improvement

    - by Filip
    Hi, I hope I can open a discussion on this topic as this is not a specific problem. It's a topic I hope to get some ideas on how people in similar situation as mine manage their time. OK, I'm a single developer on a software project for the last 6-8 months. The project I'm working on uses several technologies, mainly .net stuff: WPF, WF, NHibernate, WCF, MySql and other third party SDKs relevant for the project nature. My experience and knowledge vary, for example I have a lot of experience in WPF but much less in WCF. I work full time on the project and im curios on how other programmers which need to multi task in many areas manage their time. I'm a very applied type of person and prefer to code instead of doing research. I feel that doing research "might" slow down the progress of the project while I recognize that research and learning more in areas which I'm not so strong will ultimately make me more productive. How would you split up your daily time in productive coding time and time to and experiment, read blogs, go through tutorials etc. I would say that Im coding about 90%+ of my day and devoting some but very little time in research and acquiring new knowledge.

    Read the article

  • Time management and self improvement

    - by Filip
    I hope I can open a discussion on this topic as this is not a specific problem. It's a topic I hope to get some ideas on how people in similar situation as mine manage their time. OK, I'm a single developer on a software project for the last 6-8 months. The project I'm working on uses several technologies, mainly .net stuff: WPF, WF, NHibernate, WCF, MySql and other third party SDKs relevant for the project nature. My experience and knowledge vary, for example I have a lot of experience in WPF but much less in WCF. I work full time on the project and im curios on how other programmers which need to multi task in many areas manage their time. I'm a very applied type of person and prefer to code instead of doing research. I feel that doing research "might" slow down the progress of the project while I recognize that research and learning more in areas which I'm not so strong will ultimately make me more productive. How would you split up your daily time in productive coding time and time to and experiment, read blogs, go through tutorials etc. I would say that Im coding about 90%+ of my day and devoting some but very little time in research and acquiring new knowledge. Thanks for your replies. I think I will adopt a gradual transition to Dominics block parts. I kinda knew that coding was taking up way to much of my time but it feels good having a first version of the project completed and ready. With a few months of focused hard work behind me I hope to get more time to experiment and expand my knowlegde. Now I only hope my boss will cut me some slack and stop pressuring me for features...

    Read the article

  • Self Service Reporting With PowerPivot

    - by blakmk
    There are so many cool new features in Sql 2008 release 2 it was difficult for me to pick a topic for T-SQL Tuesday . But the one that I am now a secret fan of, I once resented for its creation. Let me explain, for years I have encountered reporting systems cobbled together in tools like Access and Excel built by "database hobbyists" who had no formal training in database design or best practices. They would take their monstrosities as far as they could go before ultimatley it stopped working or the person that wrote it left the company. At that point it would become the resident DBA's problem to support it as a Live application. So when I first heard of Power Pivot, a sense of Deja Vu overtook me and I felt like the guy in the Ausin Powers movie , knowing the inevitable is coming but somehow unsure how to get out of the way. But when I eventually saw it in action, I quickly realised that it is a very powerful tool. It has a much smaller "time to market" than traditional BI architectures. Combined with the new features of Excel, some pretty impressive dashboards can be produced.Of course PowerPivot is not a magic bullet and along with potential scalability issues there are the usual issues such as master data management and data quality that cannot be overcome easily with power pivot. As a tool though, it has potential. Traditional BI is expensive, both in terms of time and the amount of resources it takes to deliver the system. The time lag between an analyst or a commercial accountant requesting reports and the report being delivered can make a huge commercial difference. I have observed companies where empowered end users become extremely productive when allowed to plough in to various disperate datasets. It may not be the correct way or the most sustainable but its cheap and quick. In these times when budgets are being slashed and we are forced to deliver more with less, why not empower the end user in a tool that is designed for exactly this task.... @blakmk  

    Read the article

  • Trouble making OAuth signed requests

    - by behrk2
    Hello, I am able to successfully make non-authenticated and protected calls to the Netflix API. I am having a little trouble making signed requests to the catalog, however. Using the OAuth Test page, it is clear to me that my Base String is correct. My request URL is also correct, except for the oauth_signature. The oauth_signature is the only thing that differs. If I understand correctly, the only difference between a protected call and a signed call is that there are no tokens involved, and that I am appending on call parameters (such as term). So, I am using the exact same code that I use for my protected calls that I am for my signed calls, except my signature key ONLY contains my shared secret (with an ampersand sign on the end of it). It does not use the access token. Am I missing something here? Where else can I be going wrong? Thanks!

    Read the article

  • Unsigned versus signed numbers as indexes

    - by simendsjo
    Whats the rationale for using signed numbers as indexes in .Net? In Python, you can index from the end of an array by sending negative numbers, but this is not the case in .Net. It's not easy for .Net to add such a feature later as it could break other code perhaps using special rules (yeah, a bad idea, but I guess it happens) on indexing. Not that I have ever have needed to index arrays over 2,147,483,647 in size, but I really cannot understand why they choose signed numbers. Can it be because it's more normal to use signed numbers in code?

    Read the article

  • How to clear wxpython frame content when dragging a panel?

    - by aF
    Hello, I have 3 panels and I want to make drags on them. The problem is that when I do a drag on one this happens: How can I refresh the frame to happear its color when the panel is no longer there? This is the code that I have to make the drag: def onMouseMove(self, event): (self.pointWidth, self.pointHeight) = event.GetPosition() (self.width, self.height) = self.GetSizeTuple() if (self.pointWidth>100 and self.pointWidth<(self.width-100) and self.pointHeight < 15) or self.parent.dragging: self.SetCursor(wx.StockCursor(wx.CURSOR_SIZING)) """implement dragging""" if not event.Dragging(): self.w = 0 self.h = 0 return self.CaptureMouse() if self.w == 0 and self.h == 0: (self.w, self.h) = event.GetPosition() else: (posw, posh) = event.GetPosition() displacement = self.h - posh self.SetPosition( self.GetPosition() - (0, displacement)) else: self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) def onDraggingDown(self, event): if self.pointWidth>100 and self.pointWidth<(self.width-100) and self.pointHeight < 15: self.parent.dragging = 1 self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) self.SetBackgroundColour('BLUE') self.parent.SetTransparent(220) self.Refresh() def onDraggingUp(self, event): self.parent.dragging = 0 self.parent.SetTransparent(255) self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) and this are the binds for this events: self.Bind(wx.EVT_MOTION, self.onMouseMove) self.Bind(wx.EVT_LEFT_DOWN, self.onDraggingDown) self.Bind(wx.EVT_LEFT_UP, self.onDraggingUp) With this, if I click on the top of the panel, and move down or up, the panel position changes (I drag the panel) to the position of the mouse.

    Read the article

  • How to debug python del self.callbacks[s][cid] keyError when the error message does not indicate where in my code the error is

    - by lkloh
    In a python program I am writing, I get an error saying Traceback (most recent call last): File "/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx- x86_64/Canopy.app/Contents/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Users/lkloh/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 413, in button_release_event FigureCanvasBase.button_release_event(self, x, y, num, guiEvent=event) File "/Users/lkloh/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 1808, in button_release_event self.callbacks.process(s, event) File "/Users/lkloh/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/cbook.py", line 525, in process del self.callbacks[s][cid] KeyError: 103 Do you have any idea how I can debug this/ what could be wrong? The error message does not point to anywhere in code I have personally written. I get the error message only after I close my GUI window, but I want to fix it even though it does not break the functionality of my code. The error is part of a very big program I am writing, so I cannot post all my code, but below is code I think is relevant: def save(self, event): self.getSaveAxes() self.save_connect() def getSaveAxes(self): saveFigure = figure(figsize=(8,1)) saveFigure.clf() # size of save buttons rect_saveHeaders = [0.04,0.2,0.2,0.6] rect_saveHeadersFilterParams = [0.28,0.2,0.2,0.6] rect_saveHeadersOverride = [0.52,0.2,0.2,0.6] rect_saveQuit = [0.76,0.2,0.2,0.6] #initalize axes saveAxs = {} saveAxs['saveHeaders'] = saveFigure.add_axes(rect_saveHeaders) saveAxs['saveHeadersFilterParams'] = saveFigure.add_axes(rect_saveHeadersFilterParams) saveAxs['saveHeadersOverride'] = saveFigure.add_axes(rect_saveHeadersOverride) saveAxs['saveQuit'] = saveFigure.add_axes(rect_saveQuit) self.saveAxs = saveAxs self.save_connect() self.saveFigure = saveFigure show() def save_connect(self): #set buttons self.bn_saveHeaders = Button(self.saveAxs['saveHeaders'], 'Save\nHeaders\nOnly') self.bn_saveHeadersFilterParams = Button(self.saveAxs['saveHeadersFilterParams'], 'Save Headers &\n Filter Parameters') self.bn_saveHeadersOverride = Button(self.saveAxs['saveHeadersOverride'], 'Save Headers &\nOverride Data') self.bn_saveQuit = Button(self.saveAxs['saveQuit'], 'Quit') #connect buttons to functions they trigger self.cid_saveHeaders = self.bn_saveHeaders.on_clicked(self.save_headers) self.cid_savedHeadersFilterParams = self.bn_saveHeadersFilterParams.on_clicked(self.save_headers_filterParams) self.cid_saveHeadersOverride = self.bn_saveHeadersOverride.on_clicked(self.save_headers_override) self.cid_saveQuit = self.bn_saveQuit.on_clicked(self.save_quit) def save_quit(self, event): self.save_disconnect() close()

    Read the article

  • Pygame Sprite/Font rendering issues

    - by Grimless
    Hey guys. Here's my problem: I have a game class that maintains a HUD overlay that has a bunch of elements, including header and footer background sprites. Everything was working fine until I added a 1024x128 footer sprite. Now two of my text labels will not render, despite the fact that they DO exist in my Group and self.elements array. Is there something I'm missing? When I take out the footerHUDImage line, all of the labels render correctly and everything works fine. When I add the footerHUDImage, two of the labels (the first two) no longer render and the third only sometimes renders. HELP PLEASE! Here is the code: class AoWHUD (object): def __init__(self, screen, delegate, dataSource): self.delegate = delegate self.dataSource = dataSource self.elements = [] headerHudImage = KJRImage("HUDBackground.png") self.elements.append(headerHudImage) headerHudImage.userInteractionEnabled = True footerHUDImage = KJRImage("ControlsBackground.png") self.elements.append(footerHUDImage) footerHUDImage.rect.bottom = screen.get_rect().height footerHUDImage.userInteractionEnabled = True lumberMessage = "Lumber: " + str(self.dataSource.lumber) lumberLabel = KJRLabel(lumberMessage, size = 48, color = (240, 200, 10)) lumberLabel.rect.topleft = (_kSpacingMultiple * 0, 0) self.elements.append(lumberLabel) stoneMessage = "Stone: " + str(self.dataSource.stone) stoneLabel = KJRLabel(stoneMessage, size = 48, color = (240, 200, 10)) stoneLabel.rect.topleft = (_kSpacingMultiple * 1, 0) self.elements.append(stoneLabel) metalMessage = "Metal: " + str(self.dataSource.metal) metalLabel = KJRLabel(metalMessage, size = 48, color = (240, 200, 10)) metalLabel.rect.topleft = (_kSpacingMultiple * 2, 0) self.elements.append(metalLabel) foodMessage = "Food: " + str(len(self.dataSource.units)) + "/" + str(self.dataSource.food) foodLabel = KJRLabel(foodMessage, size = 48, color = (240, 200, 10)) foodLabel.rect.topleft = (_kSpacingMultiple * 3, 0) self.elements.append(foodLabel) self.selectionSprites = {32 : pygame.image.load("Selected32.png").convert_alpha(), 64 : pygame.image.load("Selected64.png")} self._sprites_ = pygame.sprite.Group() for e in self.elements: self._sprites_.add(e) print self.elements def draw(self, screen): if self.dataSource.resourcesChanged: lumberMessage = "Lumber: " + str(self.dataSource.lumber) stoneMessage = "Stone: " + str(self.dataSource.stone) metalMessage = "Metal: " + str(self.dataSource.metal) foodMessage = "Food: " + str(len(self.dataSource.units)) + "/" + str(self.dataSource.food) self.elements[2].setText(lumberMessage) self.elements[2].rect.topleft = (_kSpacingMultiple * 0, 0) self.elements[3].setText(stoneMessage) self.elements[3].rect.topleft = (_kSpacingMultiple * 1, 0) self.elements[4].setText(metalMessage) self.elements[4].rect.topleft = (_kSpacingMultiple * 2, 0) self.elements[5].setText(foodMessage) self.elements[5].rect.topleft = (_kSpacingMultiple * 3, 0) self.dataSource.resourcesChanged = False self._sprites_.draw(screen) if self.delegate.selectedUnit: theSelectionSprite = self.selectionSprites[self.delegate.selectedUnit.rect.width] screen.blit(theSelectionSprite, self.delegate.selectedUnit.rect)

    Read the article

  • Simple App Engine Sessions Implementation

    - by raz0r
    Here is a very basic class for handling sessions on App Engine: """Lightweight implementation of cookie-based sessions for Google App Engine. Classes: Session """ import os import random import Cookie from google.appengine.api import memcache _COOKIE_NAME = 'app-sid' _COOKIE_PATH = '/' _SESSION_EXPIRE_TIME = 180 * 60 class Session(object): """Cookie-based session implementation using Memcached.""" def __init__(self): self.sid = None self.key = None self.session = None cookie_str = os.environ.get('HTTP_COOKIE', '') self.cookie = Cookie.SimpleCookie() self.cookie.load(cookie_str) if self.cookie.get(_COOKIE_NAME): self.sid = self.cookie[_COOKIE_NAME].value self.key = 'session-' + self.sid self.session = memcache.get(self.key) if self.session: self._update_memcache() else: self.sid = str(random.random())[5:] + str(random.random())[5:] self.key = 'session-' + self.sid self.session = dict() memcache.add(self.key, self.session, _SESSION_EXPIRE_TIME) self.cookie[_COOKIE_NAME] = self.sid self.cookie[_COOKIE_NAME]['path'] = _COOKIE_PATH print self.cookie def __len__(self): return len(self.session) def __getitem__(self, key): if key in self.session: return self.session[key] raise KeyError(str(key)) def __setitem__(self, key, value): self.session[key] = value self._update_memcache() def __delitem__(self, key): if key in self.session: del self.session[key] self._update_memcache() return None raise KeyError(str(key)) def __contains__(self, item): try: i = self.__getitem__(item) except KeyError: return False return True def _update_memcache(self): memcache.replace(self.key, self.session, _SESSION_EXPIRE_TIME) I would like some advices on how to improve the code for better security. Note: In the production version it will also save a copy of the session in the datastore. Note': I know there are much more complete implementations available online though I would like to learn more about this subject so please don't answer the question with "use that" or "use the other" library.

    Read the article

  • How can I generate signed distance fields (2D) in real time, fast?

    - by heishe
    In a previous question, it was suggested that signed distance fields can be precomputed, loaded at runtime and then used from there. For reasons I will explain at the end of this question (for people interested), I need to create the distance fields in real time. There are some papers out there for different methods which are supposed to be viable in real-time environments, such as methods for Chamfer distance transforms and Voronoi diagram-approximation based transforms (as suggested in this presentation by the Pixeljunk Shooter dev guy), but I (and thus can be assumed a lot of other people) have a very hard time actually putting them to use, since they're usually long, largely bloated with math and not very algorithmic in their explanation. What algorithm would you suggest for creating the distance fields in real-time (favourably on the GPU) especially considering the resulting quality of the distance fields? Since I'm looking for an actual explanation/tutorial as opposed to a link to just another paper or slide, this question will receive a bounty once it's eligible for one :-). Here's why I need to do it in real time: There's something else:

    Read the article

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