Search Results

Search found 27 results on 2 pages for 'edan'.

Page 1/2 | 1 2  | Next Page >

  • How to configure Apache (sites-available vs httpd.conf)

    - by Edan Maor
    Hi, I'm brand new to Apache so this might be a stupid question. I've been trying to follow a few basic tutorials explaining how to get Apache up and running (on ubuntu, running on Amazon). I've mostly come up blank, because all the tutorials told me to configure httpd.conf (to add DocumentRoot, etc.). I've now stumbled across one tutorial that told me to add site configurations to the sites-available directory (under /etc/apache), and then symlink to it from sites-enabled. Configuring this way seems to work. But now I'm confused - how am I supposed to configure Apache? Most tutorials still seem to say that I should be using httpd.conf. Which one should I be using? What's the difference? Why are all the tutorials "wrong" (if they are)? Thanks!

    Read the article

  • Which AMI should I use as a base for a Django application?

    - by Edan Maor
    I'm starting development of a Django application, on Amazon's Web Services. I'm looking to build an instance that will serve the Django. I don't have much experience with such things, having only used a shared host before (WebFaction). So I'm wondering, which AMI should I use as a base? I'm assuming I want an Ubuntu AMI, possibly with certain things like Apache pre-installed? One minor point: I'm planning to serve several different Django projects from the same instance. I use virtualenv on my dev machine right now to separate the different projects, I'm assuming I'll do the same on EC2. Thanks!

    Read the article

  • Mouse gestures for Windows with "Rocker" support

    - by Edan Maor
    I'm looking for a mouse gestures program for Windows (including XP). I've seen gMote and StrokeIt, both pretty good, but they're both missing one thing: support for Rocker Gestures. If you don't know it, a Rocker gesture is just holding your right mouse button, then clicking your left (and vice versa). StrokeIt, at least, supports Rocker gestures in one direction, but not the other. Anybody know of a good program that has support for Rocker gestures? Thanks

    Read the article

  • Map a URL bought with Dreamhost to Amazon EC2 (AWS)

    - by Edan Maor
    I have several URLs I purchased through Dreamhost. I'm starting to use Amazon's AWS, and I'd like to map the URLs to Amazon. This is something of a silly question, and I've already done the same thing several times to other services (mapping from Dreamhost to WebFaction). But for some reason when I tried to find the proper way to do the same mapping to Amazon, I find a lot of detailed writing talking about whether I should be using CNAME or A records, etc. So I wanted to ask in the simplest possible terms and hopefully get a simple, concrete answer: I bought a URL from Dreamhost, I have an EC2 server running on AWS (to which I already mapped an Elastic IP address). How do I make the URL map to AWS? And if there are several options, which one should I effectively be using? P.S. Meta-question - why are things so much more difficult with AWS? When I search Google for "Move from Dreamhost to WebFaction, I get very simple answers on how to do the mapping. In what way is AWS different?

    Read the article

  • Subdomain only accessible from one computer

    - by Edan Maor
    I recently added a wildcard A record to my domain (*.root.com), mapping it to a certain elastic ip on AWS. I've configured apache to redirect all references to something.root.com to root.com, except for one specific "dev" subdomain, which is hosting its own site (a Django app, specifically). The Problem: This setup works perfectly for me on my computer. But on other computers around the office, it doesn't seem to work. Specifically, trying to visit dev.root.com gives an "unable to find server" error. Pinging dev.root.com gives a "cannot resolve hostname" error. The weird thing: pinging any other subdomain of root.com does work, from all machines. I would think this was all due to DNS propagation, except all the computers are behind the same office router, so how could that be the case? Any ideas?

    Read the article

  • Does setting an A record for a root domain set it (automatically) for subdomains?

    - by Edan Maor
    I bought a domain from Dreamhost, but my servers are actually running on Amazon's AWS. I have an Elastic IP, say 1.1.1.1. In the Dreamhost panel, I've added an A record for my domain name, pointing it to 1.1.1.1. My question is, are all subdomains (e.g. www.mydomain.com, a.mydomain.com, etc.) automatically mapped to 1.1.1.1 as well, because the root is? Or do I have to add separate rules for each subdomain?

    Read the article

  • How to Architect a system on AWS for scaling (with a MySQL back-end)

    - by Edan Maor
    I'm trying to understand how to architect an Amazon Web Services application. As I understand it, the whole point of using something like AWS is to make the eventual scaling easier, so I'm trying to understand how to do that. I have an instance, running off of EBS (EBS-based instance, not a regular instance). My application (a Django app) uses MySQL as a back-end. So the question is, where am I supposed to install the MySQL? Do I install it on the same instance? In which case, as far as I can tell, I can't simply create more server instances from that image. Or am I supposed to simply spin up another server as a DB server, and run off of that? Thanks for any help!

    Read the article

  • Urllib's urlopen breaking on some sites (e.g. StackApps api)

    - by Edan Maor
    I'm using urllib2's urlopen function to try and get a JSON result from the StackOverflow api. The code I'm using: >>> import urllib2 >>> conn = urllib2.urlopen("http://api.stackoverflow.com/0.8/users/") >>> conn.readline() The result I'm getting: '\x1f\x8b\x08\x00\x00\x00\x00\x00\x04\x00\xed\xbd\x07`\x1cI\x96%&/m\xca{\x7fJ\... I'm fairly new to urllib, but this doesn't seem like the result I should be getting. I've tried it in other places and I get what I expect (the same as visiting the address with a browser gives me: a JSON object). Using urlopen on other sites (e.g. "http://google.com") works fine, and gives me actual html. I've also tried using urllib and it gives the same result. I'm pretty stuck, not even knowing where to look to solve this problem. Any ideas?

    Read the article

  • Urllib's urlopen breaking on some sites (e.g. StackApps api): returns garbage results

    - by Edan Maor
    I'm using urllib2's urlopen function to try and get a JSON result from the StackOverflow api. The code I'm using: >>> import urllib2 >>> conn = urllib2.urlopen("http://api.stackoverflow.com/0.8/users/") >>> conn.readline() The result I'm getting: '\x1f\x8b\x08\x00\x00\x00\x00\x00\x04\x00\xed\xbd\x07`\x1cI\x96%&/m\xca{\x7fJ\... I'm fairly new to urllib, but this doesn't seem like the result I should be getting. I've tried it in other places and I get what I expect (the same as visiting the address with a browser gives me: a JSON object). Using urlopen on other sites (e.g. "http://google.com") works fine, and gives me actual html. I've also tried using urllib and it gives the same result. I'm pretty stuck, not even knowing where to look to solve this problem. Any ideas?

    Read the article

  • Urllib's urlopen broken on some sites (StackApps api)

    - by Edan Maor
    I'm using urllib2's urlopen function to try and get a JSON result from the StackOverflow api. The code I'm using: >>> import urllib2 >>> conn = urllib2.urlopen("http://api.stackoverflow.com/0.8/users/") >>> conn.readline() The result I'm getting: '\x1f\x8b\x08\x00\x00\x00\x00\x00\x04\x00\xed\xbd\x07`\x1cI\x96%&/m\xca{\x7fJ\... I'm fairly new to urllib, but this doesn't seem like the result I should be getting. I've tried it in other places and I get what I expect (the same as visiting the address with a browser gives me: a JSON object). Using urlopen on other sites (e.g. "http://google.com") works fine, and gives me actual html. I've also tried using urllib and it gives the same result. I'm pretty stuck, not even knowing where to look to solve this problem. Any ideas?

    Read the article

  • Urllib's urlopen broken on some sites (e.g. StackApps api)

    - by Edan Maor
    I'm using urllib2's urlopen function to try and get a JSON result from the StackOverflow api. The code I'm using: >>> import urllib2 >>> conn = urllib2.urlopen("http://api.stackoverflow.com/0.8/users/") >>> conn.readline() The result I'm getting: '\x1f\x8b\x08\x00\x00\x00\x00\x00\x04\x00\xed\xbd\x07`\x1cI\x96%&/m\xca{\x7fJ\... I'm fairly new to urllib, but this doesn't seem like the result I should be getting. I've tried it in other places and I get what I expect (the same as visiting the address with a browser gives me: a JSON object). Using urlopen on other sites (e.g. "http://google.com") works fine, and gives me actual html. I've also tried using urllib and it gives the same result. I'm pretty stuck, not even knowing where to look to solve this problem. Any ideas?

    Read the article

  • add JButton into frame with JTable

    - by Edan
    hello, I would like to know how to put a button inside a frame that contain JTable inside. (The button should not be inside a cell, but after the table ends) Here is the example code I wrote so far: class SimpleTableExample extends JFrame { // Instance attributes used in this example private JPanel topPanel; private JTable table; private JScrollPane scrollPane; private JButton update_Button; // Constructor of main frame public SimpleTableExample() { // Set the frame characteristics setTitle("Add new item" ); setSize(300, 200); setBackground( Color.gray ); // Create a panel to hold all other components topPanel = new JPanel(); topPanel.setLayout( new BorderLayout() ); getContentPane().add( topPanel ); // Create columns names String columnNames[] = {"Item Description", "Item Type", "Item Price"}; // Create some data String dataValues[][] = {{ "0", "Entree", "0" }}; // Create a new table instance table = new JTable( dataValues, columnNames ); //////////////////////////// JComboBox item_Type_Combobox = new JComboBox(); item_Type_Combobox = new JComboBox(item_Type.values()); TableColumn column = table.getColumnModel().getColumn(1); column.setCellEditor(new DefaultCellEditor(item_Type_Combobox)); //////////////////////////// // Add the table to a scrolling pane scrollPane = new JScrollPane( table ); topPanel.add( scrollPane, BorderLayout.CENTER ); } } How do I add button after the table I created? thanks in advance

    Read the article

  • Which StackOverflow-style MarkDown (WMD) javascript editor should I use?

    - by Edan Maor
    Background I'm working on an application which requires user-entered content, and I've decided to use a StackOverflow-style MarkDown editor. After researching this topic for the last few days, I realize there are numerous forks of the base WMD editor, some with a few basic enhancements and some with serious differences from the StackOverflow one. Since this will be the heart of the application, I'd like to start with the best code base I can. I'd be happy if anyone can recommend which one of the many solutions out there best fits my needs. Below is requirements, plus what I've managed to find already. I'm hoping this question will help me decide which version to go with, and maybe help me discover a port out there that's an even better fit for my needs. The requirements for my project Live Preview Multiple editors on the same page (not know how many in advance, since the user can dynamically add another editing box). Ability to extend with extra buttons (I'd like a button to upload a picture, instead of just adding an img url). Ability to dynamically show/hide the edit box (and only see the preview box). Not an absolute must, but I'd prefer to stick as close to StackOverflow's look and feel, since it's well known. Don't know if this matters, but the backend is written in Django. Editors I've looked at Here are a few of the code bases I've looked at, with thoughts. Obviously, I might be missing another solution out there. The derobins version. From what I can tell, this is the official StackOverflow version. Seems like it doesn't support multiple editors on one page. JQuery.MarkEdit. Looks very good, but is pretty different from the StackOverflow version. MooWMD. Looks like the winner right now, but I'm a little concerned since it looks less active/hackable than MarkEdit. The wmd-new version. Not sure, looks like an old codebase without much use. The SocialSite branch. Seems like it's not for public use.

    Read the article

  • print matrix in dialog box

    - by Edan
    Hello, I'm having a little difficulty to print a matrix array on dialog box. The matrix is integer and as far as i understood i need to change it into string? anyway, here's the code: public void print_Matrix(int row, int column) { for (int i = 0; i <= row; i++) { for (int j = 0; j <= column; j++) { JOptionPane.showMessageDialog(null, matrix_Of_Life); } } what I need to do in order to print array into dialog box? thanks.

    Read the article

  • Difference between Revert and Update in Mercurial

    - by Edan Maor
    I'm just getting started with Mercurial, and I've come across something which I don't understand. I made changes to several files, and now I want to undo all the changes I made to one of them (i.e. go back to my last commit for one specific file). As far as I can see, the command I want is revert. In the page I linked to, there is the following statement: This operation however does not change the parent revision of the working directory (or revisions in case of an uncommitted merge). To undo an uncomitted merge, you can use "hg update -C -r." which will reset the parents to the first parent. I don't understand the difference between the two (hg revert vs. hg update -C -r). Can anyone enlighten me as to the difference? And in my case, do I really want the revert or the update to go get rid of the changes I made to the file? Thanks

    Read the article

  • how to show integer values in JComboBox?

    - by Edan
    Hello, I would like to know how to set a JComboBox that contain integers values that I could save. Here is the definitions of values: public class Item { private String itemDesc; private int itemType; public static int ENTREE=0; public static int MAIN_MEAL=1; public static int DESSERT=2; public static int DRINK=3; private float price; int[] itemTypeArray = { ENTREE, MAIN_MEAL, DESSERT, DRINK }; Object[][] data = {{itemDesc, new Integer(itemType), new Float(price)}}; . . . } Now, I want the add a JComboBox that the user will choose 1 of the items (ENTREE, MAIN_MEAL...) and then I could set the number as an Integer. I know that JComboBox need to be something like that: JComboBox combo = new JComboBox(itemTypeArray.values()); JOptionPane.showMessageDialog( null, combo,"Please Enter Item Type", `JOptionPane.QUESTION_MESSAGE);` What am I doing wrong?

    Read the article

  • Which MarkDown (WMD) javascript editor should I use?

    - by Edan Maor
    Background I'm working on an application which requires user-entered content, and I've decided to use a StackOverflow-style MarkDown editor. After researching this topic for the last few days, I realize there are numerous forks of the base WMD editor, some with a few basic enhancements and some with serious differences from the StackOverflow one. Since this will be the heart of the application, I'd like to start with the best code base I can. I'd be happy if anyone can recommend which one of the many solutions out there best fits my needs. Below is requirements, plus what I've managed to find already. I'm hoping this question will help me decide which version to go with, and maybe help me discover a port out there that's an even better fit for my needs. The requirements for my project Live Preview Multiple editors on the same page (not know how many in advance, since the user can dynamically add another editing box). Ability to extend with extra buttons (I'd like a button to upload a picture, instead of just adding an img url). Ability to dynamically show/hide the edit box (and only see the preview box). Not an absolute must, but I'd prefer to stick as close to StackOverflow's look and feel, since it's well known. Don't know if this matters, but the backend is written in Django. Editors I've looked at Here are a few of the code bases I've looked at, with thoughts. Obviously, I might be missing another solution out there. The derobins version. From what I can tell, this is the official StackOverflow version. Seems like it doesn't support multiple editors on one page. JQuery.MarkEdit. Looks very good, but is pretty different from the StackOverflow version. MooWMD. Looks like the winner right now, but I'm a little concerned since it looks less active/hackable than MarkEdit. The wmd-new version. Not sure, looks like an old codebase without much use. The SocialSite branch. Seems like it's not for public use.

    Read the article

  • JCombobox containing enum values inside a table

    - by Edan
    Hello, I have a class containing Enum with values. (names) In other class I would like to enter inside a table a cell type of JCombobox that will use these enums values. my problem is to combain between string values and the enum. for example the enum class: enum item_Type {entree, main_Meal, Dessert, Drink} for example the table class: setTitle("Add new item" ); setSize(300, 80); setBackground( Color.gray ); // Create a panel to hold all other components topPanel = new JPanel(); topPanel.setLayout( new BorderLayout() ); getContentPane().add( topPanel ); //new JComboBox(item_Type.values()); JComboBox aaa = new JComboBox(); aaa = new JComboBox(item_Type.values()); TableColumn sportColumn = table.getColumnModel().getColumn(2); // Create columns names String columnNames[] = {"Item Description", "Item Type", "Item Price"}; // Create some data String dataValues[][] = {{ "0", aaa, "0" }}; // Create a new table instance table = new JTable( dataValues, columnNames ); // Add the table to a scrolling pane scrollPane = new JScrollPane( table ); topPanel.add( scrollPane, BorderLayout.CENTER ); I know that at the dataValues array I cant use aaa (the enum jcombobox). How can I do that? thanks in advance.

    Read the article

  • How to add a context processor from a Django app

    - by Edan Maor
    Say I'm writing a Django app, and all the templates in the app require a certain variable. The "classic" way to deal with this, afaik, is to write a context processor and add it to TEMPLATE_CONTEXT_PROCESSORS in the settings.py. My question is, is this the right way to do it, considering that apps are supposed to be "independent" from the actual project using them? In other words, when deploying that app to a new project, is there any way to avoid the project having to explicitly mess around with its settings?

    Read the article

  • FuzzyFinder in vim - prevent duplicate filenames in Windows

    - by Edan Maor
    I'm using the FuzzyFinder plugin for vim (specifically with gvim on Windows). It works great, except for one problem: it has many duplicate filenames. As far as I can tell, this happens because it's case sensitive to filenames, whereas Windows is not. So when I open a file from someplace that lists the directory as "C:\", and another place that lists it as "c:\", I get two different filenames. Does anyone know of a way that I can fix this? Thanks!

    Read the article

  • how to use JComboBox using Enum in Dialog Box

    - by Edan
    Hi, I define enums: enum itemType {First, Second, Third}; public class Item { private itemType enmItemType; ... } How do I use it inside Dialog box using JComboBox? Means, inside the dialog box, the user will have combo box with (First, Second, Third). Also, is it better to use some sort of ID to each numerator? (Integer) thanks.

    Read the article

  • Django choking oddly on some static media

    - by Edan Maor
    My situation: I'm serving static media via Django on my dev machine. On some files that I try and load, I get back this error: Traceback: File "c:\Program Files\Python26\Lib\site-packages\django\core\handlers\base.py" in get_response 92. response = callback(request, *callback_args, **callback_kwargs) File "E:\Stack2Blog\src.hg\stack2blog\..\stack2blog\stack2blogapp\views.py" in userpage 71. so_user = site.user(userid) File "E:\Stack2Blog\src.hg\stack2blog\..\stack2blog\stack2blogapp\stackexchange.py" in user 476. u, = self.users((nid,), **kw) File "E:\Stack2Blog\src.hg\stack2blog\..\stack2blog\stack2blogapp\stackexchange.py" in users 481. return self._get(User, ids, 'users', kw) File "E:\Stack2Blog\src.hg\stack2blog\..\stack2blog\stack2blogapp\stackexchange.py" in _get 471. return self.build(root, typ, coll, kw) File "E:\Stack2Blog\src.hg\stack2blog\..\stack2blog\stack2blogapp\stackexchange.py" in build 448. json = self._request(url, kw) File "E:\Stack2Blog\src.hg\stack2blog\..\stack2blog\stack2blogapp\stackexchange.py" in _request 422. dump = json.load(data) File "c:\Program Files\Python26\lib\json\__init__.py" in load 264. return loads(fp.read(), Exception Type: AttributeError at /userpage/362498 Exception Value: 'str' object has no attribute 'read' I've traced it to specific files which don't work (by going to their specific urls). Here's the odd part: changing the filename of the files makes them suddenly work. For example, I had a file called 'post.jpg', which gave this error. I renamed it to 'pos.jpg' and it worked. Back to 'post.jpg' and it gives the same error.

    Read the article

  • problem with update the counter value

    - by Edan
    Hello, I having problem to update the counter (integer value). this is the definitions of the class: public class Item_Actions { private final int MAX_ITEMS = 100; private Item myItem[]; private int counter; public Item_Actions() { myItem = new Item[MAX_ITEMS]; counter++; } //Constructor add item into the menu (Description, type & price of Item) public void addItem(Item itm) { myItem[counter] = itm; counter++; }....... Now everytime I call the addItem constructor from another class, the counter always stays on zero. What causing it and how do I save the data inside? thanks

    Read the article

1 2  | Next Page >