Search Results

Search found 143 results on 6 pages for 'alvin reyes'.

Page 4/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • how good is java's UUID.randomUUID?

    - by Alvin
    I know randomized UUID have very very very low probability for collision in theory, but I am wondering, in practice, how good is java 5's randonUUID in terms of not having collision? Does anybody have any experience to share?

    Read the article

  • Bundle module with app on Google App Engine

    - by Oscar Reyes
    This may be a basic question but how can I include a module with my app. I'm very new to python and what I want to do is to include this module simplejson with my app, but after downloading it I have no idea what to do next :( This is how the module looks like after unzip it. I don't know what files to move to my app.

    Read the article

  • Create a string with the result of an expression and the expression that originated the value. Is it

    - by Oscar Reyes
    Like String r = SomeThing.toExecString("new Object().toString()"); And when executed the value of r would be: "new Object().toString() = java.lang.Object@c5e3974" Is this even possible at all? Would it need a bunch of reflection? A built in compiler maybe? AFAIK, this is not possible with regular Java. The closest thing I could get is IDE support like in IDEA with the "macro" soutv+tab that prints: Hit taband type the expression The IDE types the rest for you. But that's quite another completely thing.

    Read the article

  • SAML Authentication Portal

    - by Alvin Jones
    I'd like to develop a portal similar to what a company like OneLogin (http://www.onelogin.com/) has: The user would login with their login credentials then have links to the web resources that their account is associated with. When they see their resources all they need to do is click on them and they'll be automatically login in (SAML authentication). Are there any open source projects out there that have started on this effort? It would be great if there was something that we could use as a base to build on top of with a friendly license (e.g. MIT). Thanks

    Read the article

  • How to create a Java String from the contents of a file

    - by Oscar Reyes
    I've been using this idiom for some time now. And it seems to be the most wide spread at least in the sites I've visited. Does anyone have a better/different way to read a file into a string in Java. Thanks private String readFile( String file ) throws IOException { BufferedReader reader = new BufferedReader( new FileReader (file)); String line = null; StringBuilder stringBuilder = new StringBuilder(); String ls = System.getProperty("line.separator"); while( ( line = reader.readLine() ) != null ) { stringBuilder.append( line ); stringBuilder.append( ls ); } return stringBuilder.toString(); }

    Read the article

  • SDL Tridion Schema Field "List of Links" Options

    - by Alvin Reyes
    I'm looking to create an SDL Tridion schema with a list of repeatable links while avoiding multiple fields per link. Hyperlink In a rich text field I have the following options for creating a hyperlink:* Component Anchor http:// mailto: Other When content authors create one of these hyperlinks, they have the option to select linked (visible) text as well as title and target attributes that function like typical HTML hyperlinks. "Richtext" means a Text field with Height of the Text Area = at least 2 rows with Allow Rich Text Formatting selected. Single Schema Field Link When creating a single schema field, I see these options: External Link (author options will include http://, mailto, Other) Multimedia Link Component Link (which can allow Multimedia Values) Current Ideas The best out-of-the-box (OOTB) setups I've found for this "list of links" is either offering: a single 2-line RTF with instructions to create a hyperlink (of any type) in that field separate fields for each type as well as additional fields for display name, target, and title (where the fields are assembled through template code), authors fill in only one of the fields (component link or external) Question Is there a way in the schema form designer, by updating the schema source, or through code to offer the same (RTF) hyperlink drop-down options, but in a single field? I could be missing something, but recognize this scenario isn't supported OOTB.

    Read the article

  • Can someone explain me implicit parameters in Scala?

    - by Oscar Reyes
    And more specifically how does the BigInt works for convert int to BigInt? In the source code it reads: ... implicit def int2bigInt(i: Int): BigInt = apply(i) ... How is this code invoked? I can understand how this other sample: "Date literals" works. In. val christmas = 24 Dec 2010 Defined by: implicit def dateLiterals(date: Int) = new { import java.util.Date def Dec(year: Int) = new Date(year, 11, date) } When int get's passed the message Dec with an int as parameter, the system looks for another method that can handle the request, in this case Dec(year:Int) Q1. Am I right in my understanding of Date literals? Q2. How does it apply to BigInt? Thanks

    Read the article

  • ECM (Niche Vs Mass Market)

    - by Luj Reyes
    Hi Everyone, I recently started a little company with a couple of guys. Ours is the typical startup, a lot of ideas, dreams, talent and work hours :P. Our initial business plan was to develop a DM (Document Manager) with several features found on DropBox and other tools but with a big differentiator. Then we got in the team this Business Guy (I must say that several of us could be called 'Business Guys' but we are mainly hackers, he is just Another 'Networking Guy'), and along with him came this market analysis for a DM aimed at a very specific and narrow niche. We have many elements to believe in his market study and the idea is the classic "The market is X million, so if we grab a 10%...", and the market is really there to grab because all big providers deemed it too little and fled, let's say that the market is 5 million USD and demand very specific features. If we decide to go for this niche product we face a sales cycle of about 7 months, and the main goal of these revenue is to develop more ambitious projects. (Institutional VC is out of the question if you want to keep a marginal ownership of your company in my country). The only overlap between the niche and the mass market product features is the ability to store documents; everything else requires that we focus all of our efforts towards one or the other. I've studied a lot about the differences between Mass and Niche Markets, but I want to hear from people with actual experience. So everything comes down to this: If you have a really “saleable” idea what is the right thing to do: to go for the niche or go for the big prize and target primarily the mass market? Thanks for your input

    Read the article

  • Can someone explain me implicit conversions in Scala?

    - by Oscar Reyes
    And more specifically how does the BigInt works for convert int to BigInt? In the source code it reads: ... implicit def int2bigInt(i: Int): BigInt = apply(i) ... How is this code invoked? I can understand how this other sample: "Date literals" works. In. val christmas = 24 Dec 2010 Defined by: implicit def dateLiterals(date: Int) = new { import java.util.Date def Dec(year: Int) = new Date(year, 11, date) } When int get's passed the message Dec with an int as parameter, the system looks for another method that can handle the request, in this case Dec(year:Int) Q1. Am I right in my understanding of Date literals? Q2. How does it apply to BigInt? Thanks

    Read the article

  • drupal form textfield #default_value not working

    - by alvin.ng
    I am working on a custom module with multi-page form on drupal 6. I found that #default_value is not working when my '#type' = 'textfield'. However, when '#type'='textarea', it displays correctly with the '#default_value' specified. Basically, I wrote a FormFactory to return different form definition ($form) based on the post parameter received. Initially, it returns the display of directories list, user then selects from radio buttos until a specific directory contains a xml file, it will become edit form. The edit form will have text fields display the data (#default_value) inside the xml file, however the type 'textarea' works here rather than 'textfield'. How can I make my '#default_value' work in this case? Below is the non-working field definition: $form['pageset']['newsTitle'] = array( '#type' => 'textfield', '#title' => 'News Title', '#default_value' => "{$element->newsTitle}", '#rows' => 1, '#required' => TRUE, ); Then I changed it to textarea as shown below to make it work: $form['pageset']['newsTitle'] = array( '#type' => 'textarea', '#title' => 'News Title', '#default_value' => "{$element->newsTitle}", '#rows' => 1, '#required' => TRUE, );

    Read the article

  • Change the content type of a pop up window.

    - by Oscar Reyes
    This question brought a new one: I have a html page and I need it to change the content type when the user press "save" button so the browser prompt to save the file to disk I've been doing this in the server side to offer "excel" versions of the page ( which is basically a html table ) <c:if test="${page.asExcelAction}"> <% response.setContentType("application/vnd.ms-excel"); %> What I'm trying to do now is to do the same, but in the client side with javacript but I can't manage to do it so. This is what I've got so far: <html> <head> <script> function saveAs(){ var sMarkup = document.getElementById('content').innerHTML; //var oNewDoc = document.open('application/vnd.ms-excel'); var oNewDoc = document.open('text/html'); oNewDoc.write( sMarkup ); oNewDoc.close(); } </script> </head> <body> <div id='content'> <table> <tr> <td>Stack</td> <td>Overflow</td> </tr> </table> </div> <input type="button" value="Save as" onClick="saveAs()"/> </body> </html>

    Read the article

  • Flash uploader that can handle >2GB files?

    - by Alvin SMith
    Is there an open source Flash uploader that can handle files larger than 2 GB? ASP.net implementations like SlickUpload are not an option, and SWFUpload (and others that I've seen) do not handle files larger than 2 GB. Nor is requiring the user to have Java installed to run applets. This would be for both IE and Firefox. I've seen a couple "large file transfer" sites that have a Flash uploader and claim to go past the 2GB limit (which is the limit for http uploads for most browsers) so I know it is technically possible.

    Read the article

  • HTML5: Can't drag on-the-fly created <div> tag even though draggable='true' Do I need to "BLESS"

    - by Pete Alvin
    After creating a div on the fly with this markup: $('.circuit').prepend("<div class='component' draggable='true'>TRANSISTOR</div>"); It is NOT draggable itself :( Is jQuery prepend() the correct way to create "live" tags in the DOM? Do I need to somehow bless it a different way to make draggable=true really work? How to I wire it up so that on-the-fly divs can be draggable? AFTER NOTE: I added a static div and that is draggable. INTERESTING: I view both the static and dynamic using FireFox F12 Firebug and they are identical. But one is draggable and one is not!!!

    Read the article

  • How to use FMS with C# ASP.NET

    - by Luis Reyes
    Hi, I actually need a way to work with a Flash media Server using c# and asp.net. And I don't have a clue about how to accomplish that I've been looking for documentation but haven't found anything worth so far. Thx in advance. Edit: What I want is to edit a Shared Object in FMS from Asp.net.

    Read the article

  • awk can and perl cannot

    - by alvin
    somewhere i read about one specific feature present in awk which is absent in perl. failed in locating it again. would appreciate it, if anyone of you could remember. (yep, this might be a useless trivia.) but still curious.

    Read the article

  • How to create new account using servlets

    - by Alvin
    I want to know how can I create new account using servlets in post method? I'm currently following MVC design pattern, and I want to know if I pass the required data to register new account from JSP page, then how can I get that data in post method? As request.getParameter() method returning me null. How can I know that post method is calling to create new account? How can I pass all the relevant user information from servlets to model class for registering data to the database table?

    Read the article

  • Why am I having this InstantiationException in Java when accessing final local variables?

    - by Oscar Reyes
    I was playing with some code to make a "closure like" construct ( not working btw ) Everything looked fine but when I tried to access a final local variable in the code, the exception InstantiationException is thrown. If I remove the access to the local variable either by removing it altogether or by making it class attribute instead, no exception happens. The doc says: InstantiationException Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated. The instantiation can fail for a variety of reasons including but not limited to: - the class object represents an abstract class, an interface, an array class, a primitive type, or void - the class has no nullary constructor What other reason could have caused this problem? Here's the code. comment/uncomment the class attribute / local variable to see the effect (lines:5 and 10 ). import javax.swing.*; import java.awt.event.*; import java.awt.*; class InstantiationExceptionDemo { //static JTextField field = new JTextField();// works if uncommented public static void main( String [] args ) { JFrame frame = new JFrame(); JButton button = new JButton("Click"); final JTextField field = new JTextField();// fails if uncommented button.addActionListener( new _(){{ System.out.println("click " + field.getText()); }}); frame.add( field ); frame.add( button, BorderLayout.SOUTH ); frame.pack();frame.setVisible( true ); } } class _ implements ActionListener { public void actionPerformed( ActionEvent e ){ try { this.getClass().newInstance(); } catch( InstantiationException ie ){ throw new RuntimeException( ie ); } catch( IllegalAccessException ie ){ throw new RuntimeException( ie ); } } } Is this a bug in Java? edit Oh, I forgot, the stacktrace ( when thrown ) is: Caused by: java.lang.InstantiationException: InstantiationExceptionDemo$1 at java.lang.Class.newInstance0(Class.java:340) at java.lang.Class.newInstance(Class.java:308) at _.actionPerformed(InstantiationExceptionDemo.java:25)

    Read the article

  • 'int' object is not callable

    - by Oscar Reyes
    I'm trying to define a simply Fraction class And I'm getting this error: python fraction.py Traceback (most recent call last): File "fraction.py", line 20, in <module> f.numerator(2) TypeError: 'int' object is not callable The code follows: class Fraction(object): def __init__( self, n=0, d=0 ): self.numerator = n self.denominator = d def get_numerator(self): return self.numerator def get_denominator(self): return self.denominator def numerator(self, n): self.numerator = n def denominator( self, d ): self.denominator = d def prints( self ): print "%d/%d" %(self.numerator, self.denominator) if __name__ == "__main__": f = Fraction() f.numerator(2) f.denominator(5) f.prints() I thought it was because I had numerator(self) and numerator(self, n) but now I know Python doesn't have method overloading ( function overloading ) so I renamed to get_numerator but that's not the problems. What could it be?

    Read the article

  • JQuery/JavaScript div tag "containment" approach/algorithm?

    - by Pete Alvin
    Background: I've created an online circuit design application where div tags are containers that contain smaller div containers and so forth. Question: For any particular div tag I need to quickly identify if it contains other div tags (that may in turn contain other div tags). I've searched JQuery and I don't see any built-in routine for this. Does anyone know of an algorithm that's quicker than O(n^2)? Seems like I have to walk the list of div tags in an outer loop (n) and have an inner loop (another n) to compare against all other div tags and do a "containment test" (position, width, height), building a list of contained div tags. That's n-squared. Then I have to build a list of all nested div tags by concatenating contained lists. So the total would be O(n^2)+n. There must be a better way?

    Read the article

  • HTML5: dragover(), drop(): how get current x,y coordinates?

    - by Pete Alvin
    How does one determine the (x,y) coordinates while dragging "dragover" and after the drop ("drop") in HTML5 DnD? I found a webpage that describes x,y for dragover (look at e.offsetX and e.layerX to see if set for various browsers but for the life of me they ARE NOT set). What do you use for the drop(e) function to find out WHERE in the current drop target it was actually dropped? I'm writing an online circuit design app and my drop target is large. Do I need to drop down to mouse-level to find out x,y or does HTML5 provided a higher level abstraction?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >