Search Results

Search found 353 results on 15 pages for 'jake wharton'.

Page 13/15 | < Previous Page | 9 10 11 12 13 14 15  | Next Page >

  • [Java] Safe way of exposing keySet().

    - by Jake
    This must be a fairly common occurrence where I have a map and wish to thread-safely expose its key set: public MyClass { Map<String,String> map = // ... public final Set<String> keys() { // returns key set } } Now, if my "map" is not thread-safe, this is not safe: public final Set<String> keys() { return map.keySet(); } And neither is: public final Set<String> keys() { return Collections.unmodifiableSet(map.keySet()); } So I need to create a copy, such as: public final Set<String> keys() { return new HashSet(map.keySet()); } However, this doesn't seem safe either because that constructor traverses the elements of the parameter and add()s them. So while this copying is going on, a ConcurrentModificationException can happen. So then: public final Set<String> keys() { synchronized(map) { return new HashSet(map.keySet()); } } seems like the solution. Does this look right?

    Read the article

  • keyboard in UIWebView shows and then hides itself on input focus

    - by Jake
    I have a page that's loading into a UIWebView (which takes 100% of the screen) on an iPad. When I touch a text field, the page positions the text field to the right place and the keyboard starts to come up, but then it turns around and goes back down and blur is called on the input field. When I try this same page in mobile Safari, the keyboard is able to deploy successfully. I can't figure out what the rules are for the keyboard to show successfully and stay up = and why this is different for uiwebview than safari. All my research on the subject has yielded no answers.

    Read the article

  • Public Private Key Encryption Tutorials

    - by Jake M
    Do you know of a tutorial that demonstrates Public Private Key encryption(PPKE) in C++ or C? I am trying to learn how it works and eventually use Crypto++ to create my own encryptions using public private keys. Maybe theres a Crypto++ PPKE tutorial? Maybe someone can explain the relationship(if any) between the public and private keys? Could anyone suggest some very simple public and private key values I could use(like 'char*32','char/32') to create my simple PPKE program to understand the concept?

    Read the article

  • Javascript cloned object looses its prototype functions

    - by Jake M
    I am attempting to clone an object in Javascript. I have made my own 'class' that has prototype functions. My Problem: When I clone an object, the clone cant access/call any prototype functions. I get an error when I go to access a prototype function of the clone: clone.render is not a function Can you tell me how I can clone an object and keep its prototype functions This simple JSFiddle demonstrates the error I get: http://jsfiddle.net/VHEFb/1/ function cloneObject(obj) { // Handle the 3 simple types, and null or undefined if (null == obj || "object" != typeof obj) return obj; // Handle Date if (obj instanceof Date) { var copy = new Date(); copy.setTime(obj.getTime()); return copy; } // Handle Array if (obj instanceof Array) { var copy = []; for (var i = 0, len = obj.length; i < len; ++i) { copy[i] = cloneObject(obj[i]); } return copy; } // Handle Object if (obj instanceof Object) { var copy = {}; for (var attr in obj) { if (obj.hasOwnProperty(attr)) copy[attr] = cloneObject(obj[attr]); } return copy; } throw new Error("Unable to copy obj! Its type isn't supported."); } function MyObject(name) { this.name = name; // I have arrays stored in this object also so a simple cloneNode(true) call wont copy those // thus the need for the function cloneObject(); } MyObject.prototype.render = function() { alert("Render executing: "+this.name); } var base = new MyObject("base"); var clone = cloneObject(base); clone.name = "clone"; base.render(); clone.render(); // Error here: "clone.render is not a function"

    Read the article

  • python multiprocessing member variable not set

    - by Jake
    In the following script, I get the "stop message received" output but the process never ends. Why is that? Is there another way to end a process besides terminate or os.kill that is along these lines? from multiprocessing import Process from time import sleep class Test(Process): def __init__(self): Process.__init__(self) self.stop = False def run(self): while self.stop == False: print "running" sleep(1.0) def end(self): print "stop message received" self.stop = True if __name__ == "__main__": test = Test() test.start() sleep(1.0) test.end() test.join()

    Read the article

  • Documentation for Qt documentation comments? Qt + Doxygen?

    - by Jake Petroules
    Where can I find documentation for Qt documentation comments? I'm referring to how Qt uses a specific style for documentation comments, like so: /*! \class MyClassName \brief The MyClassName class is used as an example on Stack Overflow. This class serves a few functions, the most important being: \list \i So people can understand my question. \i So people can have a few laughs at the comedy in my example. \endlist */ ...you get the picture. So where can I find information about all the switches, like \class, \list, \brief, etc. Also, what tool(s) do I use to generate documentation files from these comments in my source files? Does Doxygen support this syntax?

    Read the article

  • Calling arrays from other methods in a different class

    - by Jake H
    Hello, I need help dealing with an array in my java program. in my first class, "test", I set 4 variables and then send them to my other class (test2). arr[i] = new test2(id, fname, lname, case); at that point, variables are set and then I want to return those variables. So in the test2 class, I have a method that strictly returns one of those variables public int getId(){ return id; } I understand this is a little stupid, but professor gets what professor wants I guess. What I want to do now is in my main method in "test" I want to retrieve that variable and sort the array based on that int. Unfortunately, I have to create my own sort function, but I think this would work for what I want to do. for(j = 0; j < arr.length; j++){ int indexMin =j; for(i = j; i < arr.length;i++){ if(arr[i] < arr[indexMin]){ indexMin = i; } } int tmp = arr[j]; arr[j] = arr[indexMin]; arr[indexMin] = tmp; } I appreciate any help anyone could provide. Thank you

    Read the article

  • Trouble understanding Java map Entry sets

    - by Jake Sellers
    I'm looking at a java hangman game here: https://github.com/leleah/EvilHangman/blob/master/EvilHangman.java The code in particular is this: Iterator<Entry<List<Integer>, Set<String>>> k = partitions.entrySet().iterator(); while (k.hasNext()) { Entry<?, ?> pair = (Entry<?, ?>)k.next(); int sizeOfSet = ((Set<String>)pair.getValue()).size(); if (sizeOfSet > biggestPartitionSize) { biggestPartitionSize = sizeOfSet; } } Now my question. My google foo is weak I guess, I cannot find much on Entry sets other than the java doc itself. Is is just a temporary copy of the map? And I cannot find any info at all on the syntax: Entry<?, ?> Can anyone explain or point me toward an explanation of what is going on with those question marks? Thanks in advanced.

    Read the article

  • jQuery .find() not working in IE

    - by Jake
    I have a function trying to run this: if ( action=='fadeIn' ) { if ( $( this ).css( 'position' ) == "static" ) { $( this ).css( {position: 'relative'} ); } $( this ).append( '<span class="bg_fade">' ) } var fader = $( this ).find( '.bg_fade' ); alert(fader.attr('class')); It works fine in Firefox, but in IE, the alert returns undefined. Any ideas?

    Read the article

  • How can keep track of the index path of a button in a tableview cell?

    - by Jake
    I have a table view where each cell has a button accessory view. The table is managed by a fatchedresults controller and is frequently reordered. I want to be able to press a button and be able to obtain the index path of the pressed button's tableviewcell. I've been trying to get this working for days by storing the row of the button in it's tag, but when the table get's reordered the row becomes incorrect and I keep failing at reordering the tags correctly when a change is made. Any new ideas on how to keep track of the button's cell's index path? Thanks so much for any help.

    Read the article

  • HashMap Memory Leak because of Dynamic Array

    - by Jake M
    I am attempting to create my own HashMap to understand how they work. I am using an array of Linked Lists to store the values(strings) in my hashmap. I am creating the array like this: Node** list; Instead of this: Node* list[nSize]; This is so the array can be any size at runtime. But I think I am getting a memory leak because of how I am doing this. I dont know where the error is but when I run the following simple code the .exe crashes. Why is my application crashing and how can I fix it? Note: I am aware that using a vector would be much better than an array but this is just for learning and I want to challenge myself to create the hashmap using a 'Dynamic' Array. PS: is that the correct term(Dynamic Array) for the kind of array I am using? struct Node { // to implement }; class HashMap { public: HashMap(int dynSize) { *list = new Node[dynSize]; size = dynSize; for (int i=0; i<size; i++) list[i] = NULL; cout << "END\n"; } ~HashMap() { for (int i=0; i<size; i++) delete list[i]; } private: Node** list; // I could use a vector here but I am experimenting with a pointer to an array(pointer), also its more elegant int size; }; int main() { // When I run this application it crashes. Where is my memory leak? HashMap h(5); system("PAUSE"); return 0; }

    Read the article

  • Change the value of a dropdown if it is equal to something

    - by Jake Neal
    Sorry if this question has already been asked and answered, but I couldn't find anything specifically for my needs. I have a form that has placeholders and javascript to make sure the form isn't submitted with the placeholders still there. There is a dropdown box that has the value of 'Best time to call'. What I want to do is if this value is passed as the default, I want it to change to something like "n/a" or a blank value. I have achieved this with the comments box using the following javascript, but it doesn't seem to work the same for the dropdown: var comments=document.getElementById('comments').value; if (comments=="Comments") { document.getElementById('comments').value=""; } This isn't a required field so I can't have an alert come up, so I just need to value to be changed if submitted as 'Best time to call'. Hope I have explained everything correctly

    Read the article

  • Add Hover display for table cell

    - by Jake
    I have a table, but it is not in a list format, meaning not a column/row format. I look for specific cells to add a hover event that displays a description of the cell. $("#TableID td").hover(function(){ //ifCellThatIWant $(this).append("<span>Message that was brought in</span>"); }, function(){ $(this).children().remove(); }); The problem is right now is that the hover displays a span(with info. inside) that I used jquery to append the span to the cell when mouseover, which expands the cell, which is an effect that I don't like or want. I'm Trying to have an out of the table look,but still be by the cell that triggered the event; because if the span has a lot of info. in it, expanding the cell dynamically will start to look pretty nasty. Also will help if I had some type of css direction on how will I make the display for the mouseover "description" span look nice. My mind thought is that a way to accomplish what I want is giver the appended span the position of my mouse cursor when hover, but not sure if its the right approach or what the syntax would look like.

    Read the article

  • How do I do division on HH:MM:SS format time strings in C#?

    - by Jake
    I have a series of times that are coming to me as strings from a web service. The times are formated as HH:MM:SS:000 (3 milisecond digits). I need to compare two times to determine if one is more than twice as long as the other: if ( timeA / timeB > 2 ) What's the simplest way to work with the time strings? If I was writing in Python this would be the answer to my question: Difference between two time intervals in Python Edit: What I'm really looking for is a way to get the ratio of timeA to timeB, which requires division, not subtraction. Unfortunately, the DateTime structure doesn't appear to have a division operator. Updated the question title to reflect this.

    Read the article

  • Separating Variables Inside an Array

    - by Jake Avila Talledo
    Hey i have an array an I need to separate each value so it would be something like this $arry = array(a,b,c,d,e,f) $point1 = (SELECT distance FROM Table WHERE Origin = a AND Destination = b); $point2 = (SELECT distance FROM Table WHERE Origin = b AND Destination = c); $point3 = (SELECT distance FROM Table WHERE Origin = c AND Destination = d); $point4 = (SELECT distance FROM Table WHERE Origin = d AND Destination = e); $point5 = (SELECT distance FROM Table WHERE Origin = e AND Destination = f); $point6 = (SELECT distance FROM Table WHERE Origin = f AND Destination = g); $point7 = (SELECT distance FROM Table WHERE Origin = g AND Destination = f); $total_trav = $point1+$point2+$point3+$point4+$point5+$point6+$point7

    Read the article

  • Simple PHP GET question

    - by Jake
    I know how to detect if a particular GET method is in the url: $username = $_GET['username']; if ($username) { // whatever } But how can I detect something like this: http://www.mysite.com?username=me&action=editpost How can I detect the "&action" above?

    Read the article

  • Programmatically log on to a site

    - by Shaihi
    I am not sure if this fits better on StackOverflow, but here goes: I want to programmatically log on to: http://wrds-web.wharton.upenn.edu/wrds/index.cfm?true I tried capturing the log on url using fiddler2 and HttpFox, but to no avail. Is this a server side script that I cannot capture? If so how can I do the log on?

    Read the article

  • e-interview: SunSpace to WebCenter migration

    - by me
    I had the pleasure to do an e-interview with Ana Neves around the SunSpace to WebCenter migration project.  Below is the english version of the interview.  Enjoy   Peter, you joined Oracle in 2009 through the acquisition of Sun. Becoming a part of Oracle meant many changes. The internal collaboration platform was one of them, as per a post you wrote back in 2011. Sun had SunSpace. How would you describe SunSpace? SunSpace was the internal Community and Social Collaboration platform for the Sun's Global Sales and Services Organization. SunSpace served around 600 communities with a main focus around technology, products and services. SunSpace was a big success. Within 3 months of its launch SunSpace had over 20,000 users and it won the Atlassian "Not just another wiki" Award for the best use of Confluence (https://blogs.oracle.com/peterreiser/entry/goodbye_sunspace_hello_webcenter). What made SunSpace so special? 1. People centric versus  Web centric The main concept of SunSpace put the person in the middle of everything. All relevant information, resources  etc. where dynamically pushed to a person's  myProfile ( Facebook like interface) based on the person's interest and  needs.  2. Ease to use  SunSpace was really easy to use. We spent a lot of time on social interaction design to optimize the user experience.  Also we integrated some sophisticated technology to hide complexity from the user. As example - when a user added a document to SunSpace - we analyzed the content of the document and suggested related metadata and tags to the user based on a sophisticated algorithm which was integrated with the corporate taxonomy. Based on this metadata the document was automatically shared with the relevant communities.  3. Easy to find One of the main use cases for SunSpace was that  a user could quickly find the content and information they needed for their job.  The search implementation was based on:  optimized search engine algorithm using social value based ranking enhancements community facilitated search optimization  faceted search which recommended highly relevant  content like products, communities and experts 4. Social Adoption  - How to build vibrant communities You can deploy the coolest social technology but what if the users are not using it?   To drive user adoption we implemented two  complementary models: 4.1 Community Methodology  We developed a set of best practices on how to create, run and sustain communities including: community structure and types (e.g. Community of Practice, Community of Interest etc.) & tips and tricks on how to build a "vibrant " communities, Community Health check etc.  These best practices where constantly tuned and updated by the community of community drivers. 4.2. Social Value System To drive user adoption there is ONE key  question you  have to answer for each individual user: What's In It For Me (WIIFM) We developed a Social Value System called Community Equity which measures the social value flow between People, Content and Metadata. Based on this technology we added "Gamfication" techniques (although at that time this term did not exist ) to SunSpace to honor people for the active contribution and participation.  As example: All  social credentials a user earned trough active community participation where dynamically displayed on her/his myProfile. How would you describe WebCenter? Oracle WebCenter (@oraclewebcenter) is the Oracle's  user engagement platform for social business. It helps people work together more efficiently through contextual collaboration tools that optimize connections between people, information, and applications and ensures users have access to the right information in the context of the business process in which they are engaged. Oracle WebCenter can help your organization deliver contextual and targeted Web experiences to users and enable employees to access information and applications through intuitive portals, composite applications, and mash-ups. How does it compare to SunSpace in terms of functionality? Before I answer this question, I would like to point out some limitation we started to see with the current SunSpace implementation. Due to the massive growth of the user population (>20,000 users), we experienced  performance and scalability challenges with the current technology. Also at the time - Sun Internal Communications and SunIT planned to replace the entire Sun Intranet with SunSpace. We  kicked-off a project to evaluate the enterprise level technology which eventually would replace the good old static Intranet.  And then Oracle acquired Sun. We already had defined the functional requirements for the Intranet replacement with a Social Enterprise Stack and we just needed to evaluate the functional requirements against WebCenter   Below are the summary of this evaluation  MyProfile SunSpace WebCenter How WebCenter Works Home MyProfile: to access, click on your name at the top of any WebCenter page Your name, title, and reporting line are displayed.  Sub-tabs show your activity stream (Activities); people in your network (Connections); files you have uploaded (Documents); your contact information (Organization); and any personal information you wish to share (About).   Files MyFiles Allows you to upload, download and store documents or wiki pages within folders and subfolders.  The WebDav interface allows you to download / upload files / folders with a simple drag and drop to / from your local machine.  Tagging is supported and recommended. Network HomeMyConnections Home: displays the activity stream of individuals in your network.MyConnections: shows individuals in your network.  Click on a person's name to see their contact info and link to their profile. Status Updates MyProfle > Activties Add and displays  your recent activties and status updates. Watches Preferences > Subscriptions > Current Subscriptions Receive email notifications when  pages / spaces you watch are modified. Drafts N/A WebCenter does not support Drafts Settings Preferences: to access, click on 'Preferences' at the top of any WebCenter page Set your general preferences, as well as your WebCenter messaging, search and mail settings. MyCommunities MySpaces: to access, click on 'Spaces' at the top of any WebCenter page Displays MySpaces (communities you are a member of); and Recent Spaces (communities you have recently visited). Community SunSpace Webcenter How Webcenter Works Home Home Displays a community introduction and activity stream.  Members can add messages, links or documents via the Community Message Board. No Top Contributors widget. People Members Lists members of the community. The Mail All Members feature allows moderators and participants to send a message to all members of the community. Membership Management can be found under > Manage > Members News News Members can post and access latest community news and they can subscribe to news using an RSS reader Documents Documents Allows community members to upload, download and store documents or wiki pages within folders and subfolders.  The WebDav interface allows participants to download / upload files / folders with a simple drag and drop to / from your local machine.  Tagging is supported and recommended. Wiki Wiki Allows community members to create and update web pages with a WYSIWYG editor.  Note: WebCenter does not support macros or portlet embedding. Forum Forum Post community forum topics. Contribute to community forum conversations.  N/A Calendar Update and/or view the Community Calendar. N/A Analytics Displays detailed analytics data (views,downloads, unique users etc.) for Pages, Wiki, Documents, and Forum in a given community space. What is the adoption of WebCenter at Oracle? The entire Intranet serving around 100,000 users  is running on WebCenter Content.  For professional communities we use WebCenter Portal and Spaces. Currently we have around 6,000 community spaces with  around 40,000 members.  Does Oracle have any metrics to assess usage and impact of WebCenter? Can you give us some examples? Sure -  we have a lot of metrics   For the Intranet we use traditional metrics like pageviews, monthly unique visitors and unique visits.  For Communities we use the WebCenter Portal/Spaces analytics service which gives as a wealth of data. The key metrics we track are: Space traffic (PageViews, Unique Users) Wiki,Documents (views, downloads etc.) Forum (users, views, posts etc.) Registered members over time  Depending on the community we can filter/segment the metrics by User Properties e.g. Country, Organization, Job Role etc. What are you doing to improve usage and impact? 1. We  integrating the WebCenter social services/fabric into all  main business applications. As example The Fusion CRM deployment is seamless integrated with Oracle Social Network (OSN) and all conversation around an opportunity or customer engagement is  done in OSN (see youtube video). 2. We drive Social Best Practice trough a program called "Social Networking & Business Collaboration (SNBC) program" You worked both with WebCenter and SunSpace. Knowing what you know today, if you had the chance to choose between the two, which one would you choose? Why? That's a tricky question   In the early days of  the Social Enterprise implementation (we started SunSpace in 2006), we needed an agile and easy to deploy technology to keep up with the users requirements. Sometimes we pushed two releases per day  and we were in a permanent perpetual beta mode - SunSpace was perfect for that.  After the social implementation matured over time - community generated content became business critical and we saw a change in the  requirements from agile to stability, scalability and reliability  of the infrastructure.  WebCenter is the right choice for such an enterprise-level deployment.  You are a WebCenter Evangelist at Oracle. What do you do as part of that role? Our  role is to help position Oracle as one of the key thought leaders and solutions provider for Social Business. In addition we drive social innovation trough our Oracle Appslab  team. Is that a full time role? Yes  How many other Evangelists are there in Oracle? We are currently 5 people in the WebCenter evangelist team (@webcentervoices): Christian Finn (@cfinn) leads the team - Christian came from the Microsoft Sharepoint product management team and is a recognized expert in Social Business and Enterprise Collaboration. Noël Jaffré  (@noeljaffre) is our Web Experience Management (WEM) guru and came to Oracle via FatWire acquisition (now WebCenter Sites). Jake Kuramoto (@theapplab) is part of the Oracle AppsLab innovation  team - Jake is well known as  the driving force behind  http://theappslab.com  a blog around social and innovation.  Noel Portugal (@noelportugal) is a developer in the Oracle AppsLab innovation team - he is the inventor of OraTweet - Oracle's internal tweeting platform  Peter Reiser (@peterreiser) is  a Social Business guru and the inventor of SunSpace and Community Equity.  What area of the business do you and the rest of the Evangelists sit in? What area of the organisation is responsible for WebCenter? We are part of the WebCenter product management  organization.  Is WebCenter part of the Knowledge Management strategy? Oracle WebCenter is the Oracle's user engagement platform for social business. It brings together the most complete portfolio of portal, web experience management, content, social and collaboration technologies into a single product suite and is the product foundation of the Oracle Knowledge Management strategy.  I am aware Oracle also uses Beehive internally. How would you describe Beehive? Oracle Beehive provides an integrated set of communication and collaboration services built on a single scalable, secure, enterprise-class platform Beehive is  internally used for enterprise wide mail, calendar and real collaboration (Web conferencing) services.  Are Beehive and WebCenter connected? Historically Beehive and WebCenter Portal & Content had some overlap in functionally. (Hey - if  a company has an acquisition strategy to strengthen its product offering and accelerate  innovation, it's pretty normal that functional overlap exists  :- )) A key objective of the WebCenter strategy is  to combine all social and collaboration offerings under the WebCenter product family. That means that certain Beehive components  will be integrated into the overall WebCenter product offering.  Are there any other internal collaboration tools at Oracle? Which ones There here are two other main social tools which are widely used at Oracle  Oracle Connect was the first social tool the Oracle AppsLab team created in 2007 - see (Jake's blog post for details). It is still extensively used. ... and as a former Sun guy I like this quote from the blog post:  "Traffic to Connect peaked right after the Sun merger in 2010, when it served several hundred thousand pageviews each month; since then, traffic has subsided, but still averages tens of thousands of pageviews to several thousand users each month." Oratweet - Oracle internal microblogging platform has been used since June 2008 and it is still growing.  It's entirely written in Oracle Application Express (APEX) which is a rapid web application development tool for the Oracle database. Wanna try it out? Here you can download the code.  What is Oracle's strategy regarding (all these) collaboration tools? Pretty straight forward. The strategy is to seamless  integrate the WebCenter social & collaboration services into all Business Applications to help customers to socialize their enterprise. 

    Read the article

  • How can I connect to a mail server using SMTP over SSL using Python?

    - by jakecar
    Hello, So I have been having a hard time sending email from my school's email address. It is SSL and I could only find this code online by Matt Butcher that works with SSL: import smtplib, socket version = "1.00" all = ['SMTPSSLException', 'SMTP_SSL'] SSMTP_PORT = 465 class SMTPSSLException(smtplib.SMTPException): """Base class for exceptions resulting from SSL negotiation.""" class SMTP_SSL (smtplib.SMTP): """This class provides SSL access to an SMTP server. SMTP over SSL typical listens on port 465. Unlike StartTLS, SMTP over SSL makes an SSL connection before doing a helo/ehlo. All transactions, then, are done over an encrypted channel. This class is a simple subclass of the smtplib.SMTP class that comes with Python. It overrides the connect() method to use an SSL socket, and it overrides the starttles() function to throw an error (you can't do starttls within an SSL session). """ certfile = None keyfile = None def __init__(self, host='', port=0, local_hostname=None, keyfile=None, certfile=None): """Initialize a new SSL SMTP object. If specified, `host' is the name of the remote host to which this object will connect. If specified, `port' specifies the port (on `host') to which this object will connect. `local_hostname' is the name of the localhost. By default, the value of socket.getfqdn() is used. An SMTPConnectError is raised if the SMTP host does not respond correctly. An SMTPSSLError is raised if SSL negotiation fails. Warning: This object uses socket.ssl(), which does not do client-side verification of the server's cert. """ self.certfile = certfile self.keyfile = keyfile smtplib.SMTP.__init__(self, host, port, local_hostname) def connect(self, host='localhost', port=0): """Connect to an SMTP server using SSL. `host' is localhost by default. Port will be set to 465 (the default SSL SMTP port) if no port is specified. If the host name ends with a colon (`:') followed by a number, that suffix will be stripped off and the number interpreted as the port number to use. This will override the `port' parameter. Note: This method is automatically invoked by __init__, if a host is specified during instantiation. """ # MB: Most of this (Except for the socket connection code) is from # the SMTP.connect() method. I changed only the bare minimum for the # sake of compatibility. if not port and (host.find(':') == host.rfind(':')): i = host.rfind(':') if i >= 0: host, port = host[:i], host[i+1:] try: port = int(port) except ValueError: raise socket.error, "nonnumeric port" if not port: port = SSMTP_PORT if self.debuglevel > 0: print>>stderr, 'connect:', (host, port) msg = "getaddrinfo returns an empty list" self.sock = None for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res try: self.sock = socket.socket(af, socktype, proto) if self.debuglevel > 0: print>>stderr, 'connect:', (host, port) self.sock.connect(sa) # MB: Make the SSL connection. sslobj = socket.ssl(self.sock, self.keyfile, self.certfile) except socket.error, msg: if self.debuglevel > 0: print>>stderr, 'connect fail:', (host, port) if self.sock: self.sock.close() self.sock = None continue break if not self.sock: raise socket.error, msg # MB: Now set up fake socket and fake file classes. # Thanks to the design of smtplib, this is all we need to do # to get SSL working with all other methods. self.sock = smtplib.SSLFakeSocket(self.sock, sslobj) self.file = smtplib.SSLFakeFile(sslobj); (code, msg) = self.getreply() if self.debuglevel > 0: print>>stderr, "connect:", msg return (code, msg) def setkeyfile(self, keyfile): """Set the absolute path to a file containing a private key. This method will only be effective if it is called before connect(). This key will be used to make the SSL connection.""" self.keyfile = keyfile def setcertfile(self, certfile): """Set the absolute path to a file containing a x.509 certificate. This method will only be effective if it is called before connect(). This certificate will be used to make the SSL connection.""" self.certfile = certfile def starttls(): """Raises an exception. You cannot do StartTLS inside of an ssl session. Calling starttls() will return an SMTPSSLException""" raise SMTPSSLException, "Cannot perform StartTLS within SSL session." And then my code: import ssmtplib conn = ssmtplib.SMTP_SSL('HOST') conn.login('USERNAME','PW') conn.ehlo() conn.sendmail('FROM_EMAIL', 'TO_EMAIL', "MESSAGE") conn.close() And got this error: /Users/Jake/Desktop/Beth's Program/ssmtplib.py:116: DeprecationWarning: socket.ssl() is deprecated. Use ssl.wrap_socket() instead. sslobj = socket.ssl(self.sock, self.keyfile, self.certfile) Traceback (most recent call last): File "emailer.py", line 5, in conn = ssmtplib.SMTP_SSL('HOST') File "/Users/Jake/Desktop/Beth's Program/ssmtplib.py", line 79, in init smtplib.SMTP.init(self, host, port, local_hostname) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py", line 239, in init (code, msg) = self.connect(host, port) File "/Users/Jake/Desktop/Beth's Program/ssmtplib.py", line 131, in connect self.sock = smtplib.SSLFakeSocket(self.sock, sslobj) AttributeError: 'module' object has no attribute 'SSLFakeSocket' Thank you!

    Read the article

  • Tolkien’s Rivendell Rendered in LEGO

    - by Jason Fitzpatrick
    If you’re a fan of all things geeky rendered in LEGO–and we certainly are–you’ll want to take a moment to appreciate this incredible model of the mythical Rivendell from the Lord of the Rings universe. Courtesy of builders Blake Baer and Jake Bittner, the behemoth model measures nearly 4×3 ft. in size, weighs 120 pounds, and required over 50,000 LEGO bricks. Hit up the link below to check out the full set of photos. Rivendell in LEGO [via Geeks Are Sexy] How To Switch Webmail Providers Without Losing All Your Email How To Force Windows Applications to Use a Specific CPU HTG Explains: Is UPnP a Security Risk?

    Read the article

  • How to Build Your Own Siri App In a Browser

    - by ultan o'broin
    This post from Applications User Experience team co-worker Mark Vilrokx (@mvilrokx) about building your own Siri-style voice app in a browser using Rails, Chrome, and WolframAlpha is so just good you've now got it thrice! I love these kind of How To posts. They not only show off innovation but inspire others to try it out too. Love the sharing of the code snippets too. Hat tip to Jake at the AppsLab (and now on board with the Applications UX team too) for picking up the original All Things Rails blog post. Oracle Voice & Nuance demo on the Oracle Applications User Experience Usable Apps YouTube Channel Mark recently presented on Oracle Voice at the Oracle Usability Advisory Board on Oracle Voice and Oracle Fusion Applications and opened customers and partners eyes to how this technology can work for their users in the workplace and what's coming down the line! Great job, Mark.

    Read the article

  • Introducing the Industry's First Analytics Machine, Oracle Exalytics

    - by Manan Goel
    Analytics is all about gaining insights from the data for better decision making. The business press is abuzz with examples of leading organizations across the world using data-driven insights for strategic, financial and operational excellence. A recent study on “data-driven decision making” conducted by researchers at MIT and Wharton provides empirical evidence that “firms that adopt data-driven decision making have output and productivity that is 5-6% higher than the competition”. The potential payoff for firms can range from higher shareholder value to a market leadership position. However, the vision of delivering fast, interactive, insightful analytics has remained elusive for most organizations. Most enterprise IT organizations continue to struggle to deliver actionable analytics due to time-sensitive, sprawling requirements and ever tightening budgets. The issue is further exasperated by the fact that most enterprise analytics solutions require dealing with a number of hardware, software, storage and networking vendors and precious resources are wasted integrating the hardware and software components to deliver a complete analytical solution. Oracle Exalytics In-Memory Machine is the world’s first engineered system specifically designed to deliver high performance analysis, modeling and planning. Built using industry-standard hardware, market-leading business intelligence software and in-memory database technology, Oracle Exalytics is an optimized system that delivers answers to all your business questions with unmatched speed, intelligence, simplicity and manageability. Oracle Exalytics’s unmatched speed, visualizations and scalability delivers extreme performance for existing analytical and enterprise performance management applications and enables a new class of intelligent applications like Yield Management, Revenue Management, Demand Forecasting, Inventory Management, Pricing Optimization, Profitability Management, Rolling Forecast and Virtual Close etc. Requiring no application redesign, Oracle Exalytics can be deployed in existing IT environments by itself or in conjunction with Oracle Exadata and/or Oracle Exalogic to enable extreme performance and best in class user experience. Based on proven hardware, software and in-memory technology, Oracle Exalytics lowers the total cost of ownership, reduces operational risk and provides unprecedented analytical capability for workgroup, departmental and enterprise wide deployments. Click here to learn more about Oracle Exalytics.  

    Read the article

  • Computer Bugs - Etymology and Entomology

    - by PointsToShare
    Whatever bugs you My wife and I used to take some of our summer vacation I a cabin on the shore of Lake Atsion in NJ. I t is a delightful place in the Wharton forest with Brown yet fresh water, where we would canoe, swim and enjoy true rest. Alas, in the last few years, yellow flies also discovered the area’s pastoral delights and came in hoards to bug us. So much so that we had to give up. As a computer programmer I abhor bugs. The bugs that bug me – except the pesky yellow flies – are program bugs , a specific variety of computer bugs. You can find an excellent take on the etymology of the word ‘bug” in this delightful monogram: http://www.jamesshuggins.com/h/tek1/first_computer_bug.htm In my youth, I worked on Burroughs computers. Unlike their IBM brethren, the Burroughs used a 96 column card. The cards were much smaller than the 80 column IBM cards. We wrote our programs on coding sheets and then a key-punch operator transcribed them into punched cards. These were fed into a card reader and compiled. The compiler would notify us of compiler errors or bugs, but it was not always easy to get the meaning of the message. My friend Mark Wildt, also a Burroughs veteran, gave me an old punched card from one of his programs. Obviously a bug!! Here It Is!! That’s All Folks!

    Read the article

< Previous Page | 9 10 11 12 13 14 15  | Next Page >