Daily Archives

Articles indexed Friday October 25 2013

Page 14/19 | < Previous Page | 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Save response from certain WEB resources while recording scenario

    - by jdevelop
    I need to create scenario for user interaction with single-page WEB application. The application does lots of AJAX calls in order to authenticate user and get user data. So I created simple scenario with HTTP Test Script Recorder and tried to record my script. Everything went well, however I noticed that whilst request data is recorder properly, the response data is not recorder at all. I tried to enable Add assertions and Regex matching - but that didn't work as well. Can you please advice how do I record response texts as well?

    Read the article

  • Server side method not getting called

    - by Rangel Fernandes
    From the below javascript code i am trying to call a serverside method, but serververside method is not getting called. I am using jquery, ajax <script type="text/javascript" src="JquryLib.js"></script> <script type="text/javascript" language="javascript"> function fnPopulateCities() { debugger; var State = $("#ddlState").val(); GetCities(State); return false; } function GetCities(StateId) { debugger; var v1 = 'StateId: ' + StateId; $.ajax( { type: "POST", url: 'DropDownList_Cascade.aspx/PopulateCities', data: '{' + v1 + '}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (result) { if (result.status === "OK") { alert('Success!!'); } else { fnDisplayCities(result); } }, error: function (req, status, error) { alert("Sorry! Not able to retrieve cities"); } }); } </script> This is my serverside method which i need to call. private static ArrayList PopulateCities(int StateId) { //this code returns Cities ArrayList from database. } It is giving me the following error: 500 (Internal Server Error) I cannot figure out what is wrong. please help! Stack Trace: [ArgumentException: Unknown web method PopulateCities.Parameter name: methodName]

    Read the article

  • How to remove space under images?

    - by user2831652
    So here's my problem, there's a small white space showing up under the pictures on my tumblr, but the space only shows up under photosets, not under photos. I have on my CSS: #post{padding:10px;} #post img{display:block;} And then on my html: {block:Posts} <div id="post"> {block:Photo}<img src="{PhotoURL-500}"/>{/block:Photo} {block:Photoset}{Photoset-500}{/block:Photoset} </div> {/block:Posts} But the photoset adds a 3px space under the images, turning the padding to 13px for no reason. Can someone help me figure out this?

    Read the article

  • Capistrano 3, Rails 4, database configuration does not specify adapter

    - by Kazmin
    When I start cap production deploy it fails like this: DEBUG [4ee8fa7a] Command: cd /home/deploy/myapp/releases/releases/20131025212110 && (RVM_BIN_PATH=~/.rvm/bin RAILS_ENV= ~/.rvm/bin/myapp_rake assets:precompile ) DEBUG [4ee8fa7a] rake aborted! DEBUG [4ee8fa7a] database configuration does not specify adapter You can see that "RAILS_ENV=" is actually empty and I'm wondering why that might be happening? I assume that this is the reason for the latter error that I don't have a database configuration. The deploy.rb file is below: set :application, 'myapp' set :repo_url, '[email protected]:developer/myapp.git' set :branch, :master set :deploy_to, '/home/deploy/myapp/releases' set :scm, :git set :devpath, "/home/deploy/myapp_development" set :user, "deploy" set :use_sudo, false set :default_env, { rvm_bin_path: '~/.rvm/bin' } set :keep_releases, 5 namespace :deploy do desc 'Restart application' task :restart do on roles(:app), in: :sequence, wait: 5 do # Your restart mechanism here, for example: within release_path do execute " bundle exec thin restart -O -C config/thin/production.yml" end end end after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do within release_path do end end end after :finishing, 'deploy:cleanup' end?

    Read the article

  • Creation of zip folder in php

    - by Kishan
    I am trying to create a zip folder of my downloaded images. Here is my code. I am not getting any errors, but the zip is not getting downloaded.The code is getting compiled and I am getting the output till the display part of the current directory, but after that the code seems to go wrong somewhere and I am not able to get any Zip archive. <?php $conn_id=ftp_connect("localhost") or die("Could not connect"); ftp_login($conn_id,"kishan","ubuntu"); //login to ftp localhost echo "The current directory is " . ftp_pwd($conn_id); //display current directory ftp_chdir($conn_id,'/var/www/test1'); //changing to the directory where my images are downloaded. echo "<br/><p> Changing to directory" . ftp_pwd($conn_id); $file_folder="."; echo "<br/> The content of the directory is <br/>"; print_r(ftp_rawlist($conn_id,".")); // display the contents of the directory if(extension_loaded('zip')) //check whether extension is loaded { $zip=new ZipArchive(); $zip_name="a.zip"; //some name to my zip file if($zip->open($zip_name,ZIPARCHIVE::CREATE)!==TRUE) { $error="Sorry ZIP creation failed at this time"; } $contents=ftp_nlist($conn_id,"."); foreach($contents as $file) //addition of files to zip one-by-one { $zip->addFile($file_folder.$file); } $zip->close(); //seal the zip } if(file_exists($zip_name)) //Content-dispostion of my zip file { header('Content-type:application/zip'); header('Content-Disposition:attachment; filename="'.$zip_name.'"'); readfile($zip_name); unlink($zip_name); } ?>

    Read the article

  • Need to copy columns H,K,L From one excel workbook to new workbook using Excel Macro

    - by bhargav reddy
    I have a excel workbook A.xlsx with columns A through T, now i need to copy specific columns H,K,L to a new workbook which would be created while i run a macro. I was able to successfully copy a range of columns from one worksheet to another, but i am not finding a way to copy specific columns to a new workbook. Private Sub copy_sub() Sheets("Sheet1").Columns("H:K").Copy Sheets("Sheet2").Range("A1") End Sub

    Read the article

  • Simple User Access Control with CodeIgniter framework Code (ACL) Library

    - by Hafiz Arslan Akbar
    Friends, I am new User of PHP n CodeIgniter. I just want do a simple task, user access control. there are 5 different user in a class,, I have to write a code which gives just one line output for one user. for example,, by using ACL library, just pick one out put. deal with basic level... Manager , Teacher , Student , Chairperson PHP page contain one text box and button. by using ACL library we just put one code or string in textbox and get related output... some thing like this... text box contain 1, Now Manager access Control,, text box contain 2, Now Teacher Access Control,, text box contain 3, Chairperson access control.. Plz guide step by step. Thanx in advance dear.......

    Read the article

  • Unable to edit a database row from JSF

    - by user1924104
    Hi guys i have a data table in JSF which displays all of the contents of my database table, it displays it fine, i also have a delete function that can successfully delete from the database fine and updates the data table fine however when i try to update the database i get the error java.lang.IllegalArgumentException: Cannot convert richard.test.User@129d62a7 of type class richard.test.User to long below is the code that i have been using to delete the rows in the database that is working fine : public void delete(long userID) { PreparedStatement ps = null; Connection con = null; if (userID != 0) { try { Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root"); String sql = "DELETE FROM user1 WHERE userId=" + userID; ps = con.prepareStatement(sql); int i = ps.executeUpdate(); if (i > 0) { System.out.println("Row deleted successfully"); } } catch (Exception e) { e.printStackTrace(); } finally { try { con.close(); ps.close(); } catch (Exception e) { e.printStackTrace(); } } } } i simply wanted to edit the above code so it would update the records instead of deleting them so i edited it to look like : public void editData(long userID) { PreparedStatement ps = null; Connection con = null; if (userID != 0) { try { Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root"); String sql = "UPDATE user1 set name = '"+name+"', email = '"+ email +"', address = '"+address+"' WHERE userId=" + userID; ps = con.prepareStatement(sql); int i = ps.executeUpdate(); if (i > 0) { System.out.println("Row updated successfully"); } } catch (Exception e) { e.printStackTrace(); } finally { try { con.close(); ps.close(); } catch (Exception e) { e.printStackTrace(); } } } } and the xhmtl is : <p:dataTable id="dataTable" var="u" value="#{userBean.getUserList()}" paginator="true" rows="10" editable="true" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15"> <p:column> <f:facet name="header"> User ID </f:facet> #{u.userID} </p:column> <p:column> <f:facet name="header"> Name </f:facet> #{u.name} </p:column> <p:column> <f:facet name="header"> Email </f:facet> #{u.email} </p:column> <p:column> <f:facet name="header"> Address </f:facet> #{u.address} </p:column> <p:column> <f:facet name="header"> Created Date </f:facet> #{u.created_date} </p:column> <p:column> <f:facet name="header"> Delete </f:facet> <h:commandButton value="Delete" action="#{user.delete(u.userID)}" /> </p:column> <p:column> <f:facet name="header"> Delete </f:facet> <h:commandButton value="Edit" action="#{user.editData(u)}" /> </p:column> currently when you press the edit button it will only update it with the same values as i haven't yet managed to get the datatable to be editable with the database, i have seen a few examples with an array list where the data table gets its values from but never a database so if you have any advice on this too it would be great thanks

    Read the article

  • How to configure grails and shiro to mark cookies secure?

    - by j4y
    I'm using Grails 2.2.4 with the Shiro plugin (v1.1.4) and would like to mark the cookies as secure so the session information won't be sent over http. This is the attribute I want to set: securityManager.sessionManager.sessionIdCookie.secure = true The shiro source says to use the Grails bean property override mechanism, which is grails-app/conf/spring/resources.groovy How can I override just the one setting? // If the legacy 'security.shiro.filter.config' option is set, // use our custom INI-based filter... if (application.config.security.shiro.filter.config) { log.warn "security.shiro.filter.config option is deprecated. Use Grails' bean property override mechanism instead." 'filter-class'('org.apache.shiro.grails.LegacyShiroFilter') 'init-param' { 'param-name'('securityManagerBeanName') 'param-value'('shiroSecurityManager') }

    Read the article

  • Ruby on rails edit form for has_one relation

    - by user2900873
    I have a clan.rb and clan_options.rb clan.rb class Clan < ActiveRecord::Base has_one :options, :class_name => "ClanOptions", :foreign_key => "clan_id", dependent: :destroy end clan_options.rb class ClanOptions < ActiveRecord::Base belongs_to :clan end To create an edit form for clan.rb I use the following: <%= form_for @clan, :html => {:class => 'form-horizontal'} do |clan| %> <fieldset> <!-- form stuff --> </fieldset> <% end %> It works how I want. But now I want to create an edit form for the clan_options.rb, I have no idea how to do this. If anymore information is needed to solve this, ask me.

    Read the article

  • Custom deleters for std::shared_ptrs

    - by Kristian D'Amato
    Is it possible to use a custom deleter after creating a std::shared_ptr without using new? My problem is that object creation is handled by a factory class and its constructors & destructors are protected, which gives a compile error, and I don't want to use new because of its drawbacks. To elaborate: I prefer to create shared pointers like this, which doesn't let you set a custom deleter (I think): auto sp1 = make_shared<Song>(L"The Beatles", L"Im Happy Just to Dance With You"); Or I can create them like this, which does let met set a deleter through an argument: auto sp2(new Song, MyDeleterFunc); But the second one uses new, which AFAIK isn't as efficient as the top sort of allocation. Maybe this is clearer: is it possible to get the benefits of make_shared<> as well as a custom deleter? Would that mean having to write an allocator?

    Read the article

  • can this code be shortened or improved?

    - by user2816683
    Can this be shortened/improved? I'm trying to make a password checker in python. Could the if's be put into a for loop? And if so, how? pw = input("Enter password to test: ") caps = sum(1 for c in pw if c.isupper()) lower = sum(1 for c in pw if c.islower()) nums = sum(1 for c in pw if c.isnumeric()) scr = ['weak', 'medium', 'strong'] r = [caps, lower, nums] if len(pw) < 6: print("too short") elif len(pw) > 12: print("too long") if caps >= 1: if lower >= 1: if nums >= 1: print(scr[2]) elif nums < 1: print("your password is " + scr[1]) elif lower < 1: print("your password strength is " + scr[0]) elif caps < 1: print("your password strength is " + scr[1]) Thanks for any suggestions :D

    Read the article

  • threading in Python taking up too much CPU

    - by KevinShaffer
    I wrote a chat program and have a GUI running using Tkinter, and to go and check when new messages have arrived, I create a new thread so Tkinter keeps doing its thing without locking up while the new thread goes and grabs what I need and updates the Tkinter window. This however becomes a huge CPU hog, and my guess is that it has to do somehow with the fact that the Thread is started and never really released when the function is done. Here's the relevant code (it's ugly and not optimized at the moment, but it gets the job done, and itself does not use too much processing power, as when I run it not threaded, it doesn't take up much CPU but it locks up Tkinter) Note: This is inside of a class, hence the extra tab. def interim(self): threading.Thread(target=self.readLog).start() self.after(5000,self.interim) def readLog(self): print 'reading' try: length = len(str(self.readNumber)) f = open('chatlog'+str(myport),'r') temp = f.readline().replace('\n','') while (temp[:length] != str(self.readNumber)) or temp[0] == '<': temp = f.readline().replace('\n','') while temp: if temp[0] != '<': self.updateChat(temp[length:]) self.readNumber +=1 else: self.updateChat(temp) temp = f.readline().replace('\n','') f.close() Is there a way to better manage the threading so I don't consume 100% of the CPU very quickly?

    Read the article

  • Get particular row as series from pandas dataframe

    - by Pratyush
    How do we get a particular filtered row as series? Example dataframe: >>> df = pd.DataFrame({'date': [20130101, 20130101, 20130102], 'location': ['a', 'a', 'c']}) >>> df date location 0 20130101 a 1 20130101 a 2 20130102 c I need to select the row where location is c as a series. I tried: row = df[df["location"] == "c"].head(1) # gives a dataframe row = df.ix[df["location"] == "c"] # also gives a dataframe with single row In either cases I can't the row as series.

    Read the article

  • my Search method is coming up with all nulls

    - by Epic.Distortion
    Let me give a quick explanation. I took a 5 week course through a company on Java in July. They covered basic stuff, like console app, crud operations, mysql, and n-tier architecture. Since the course ended I didn't use it much because I went back to work, and other medical reasons surfaced....blah blah. I was told by the company to make a simple program to reflect what I learned. Turns out I retained very little. I decided to make a video game starage program. It would be used to stare your video games so you wouldn't have to search your bookcase(or how ever you store your games.) It is a basic console app using the crud operations with MYSQL. I can't get my search function to actually work. I have 2 layers a Presentation layer and a Logic layer. The search method allows them to search for a game by the title. when i bring run the program and use Search it only displays the title and the rest is null. here is my Presentation layer: private static Games SearchForGame() { Logic aref = new Logic(); Games g = new Games(); Scanner scanline = new Scanner(System.in); System.out.println("Please enter the name of the game you wish to find:"); g.setTitle(scanline.nextLine()); aref.SearchGame(); System.out.println(); System.out.println("Game Id: " + g.getGameId()); System.out.println("Title: " + g.getTitle()); System.out.println("Rating: " + g.getRating()); System.out.println("Platform: "+ g.getPlatform()); System.out.println("Developer: "+ g.getDeveloper()); return g; } and here is my logic layer public Games SearchGame() { Games g = new Games(); try { Class.forName(driver).newInstance(); Connection conn = DriverManager.getConnection(url+dbName,userName,password); java.sql.PreparedStatement statement = conn.prepareStatement("SELECT GameId,Title,Rating,Platform,Developer FROM games WHERE Title=?"); statement.setString(1, g.getTitle()); ResultSet rs = statement.executeQuery(); while(rs.next()){ g.setGameId(rs.getInt("GameId")); g.setTitle(rs.getString("Title")); g.setRating(rs.getString("Rating")); g.setPlatform(rs.getString("Platform")); g.setDeveloper(rs.getString("Developer")); statement.executeUpdate(); } } catch (Exception e) { e.printStackTrace(); } return g; } here is also my last results Please enter the name of the game you wish to find: Skyrim Game Id: 0 Title: Skyrim Rating: null Platform: null Developer: null any help would be greatly appreciated and thanks in advance EDIT: here is my code for my games class public class Games { public int GameId; public String Title; public String Rating; public String Platform; public String Developer; public int getGameId() { return GameId; } public int setGameId(int gameId) { return GameId = gameId; } public String getTitle() { return Title; } public String setTitle(String title) { return Title = title; } public String getRating() { return Rating; } public void setRating(String rating) { Rating = rating; } public String getPlatform() { return Platform; } public void setPlatform(String platform) { Platform = platform; } public String getDeveloper() { return Developer; } public void setDeveloper(String developer) { Developer = developer; } }

    Read the article

  • invalid context 0x0 under iOS 7.0 and system degradation

    - by Alex
    I've read as many search results I could find on this dreaded problem, unfortunatelly, each one seems to focus on a specific function call. My problem is that I get the same error from multiple functions, which I am guessing are being called back from functions that I use. To make matters worse, the actual code is within a custom private framework which is being imported in another project, and as such, debugging isn't as simple? Can anyone point me to the right direction? I have a feeling I'm calling certain methods wrongly or with bad context, but the output from xcode is not very helpful at this point. : CGContextSetFillColorWithColor: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. : CGContextSetStrokeColorWithColor: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. : CGContextSetFlatness: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. : CGContextAddPath: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. : CGContextDrawPath: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. : CGContextRestoreGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. : CGContextGetBlendMode: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. Those errors may occur when a custom view is presented, or one of its inherited classes. At which point they spawn multiple times, until the keyboard won't provide any input. Touch events are still registered, but system slows down, and eventually may lead to unallocated object errors.

    Read the article

  • Return value of a JQuery autocomplete using an array of objects as its source

    - by user2920430
    In a JQuery autocomplete which uses an array of objects as its source, can I display the label in the INPUT and later access the value? The default behavior is that the value is displayed in the INPUT after selection. In this case the values represent indexes to unique keys in rows in a table. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>autocomplete demo</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> </head> <body> <label for="autocomplete">Select a programming language: </label> <input id="autocomplete"> <script> $( "#autocomplete" ).autocomplete({ source: [ { label:"c++", value:1 }, { label: "java", value:2 }, { label: "javascript", value:3 } ] }); </script> </body> </html>

    Read the article

  • Setting location based on previous parameter of $routeChangeError with AngularJS

    - by Moo
    I'm listening on events of the type $routeChangeError in a run block of my application. $rootScope.$on("$routeChangeError", function (event, current, previous, rejection) { if (!!previous) { console.log(previous); $location.path(previous.$$route.originalPath); } }); With the help of the previous parameter I would like to set the location to the previous page. This works as long as the "originalPath" of "previous.$$route" does not contain any parameters. If it contains parameters the "originalPath" is not transformed. Logging the previous objects returns the following output: $$route: Object ... originalPath: "/users/:id" regexp: /^\/users\/(?:([^\/]+)?)$/ ... params: Object id: "3" How can I set the location to the previous path including the parameters?

    Read the article

  • animate each child jquery

    - by Martavis P.
    It's amazing how simple this should be but I can't get it to work. I'm looking to animate a set of divs one at a time. I am using animate.css for those familiar with it. I thought I may have found the answer here but jsFiddle is not working at the moment. Anywho, the code is $('.elements').each(function(i) { $(this).addClass('animated slideInLeft').delay(500); }); The problem is that when I debug and step through each element, the animation is happening for each element but when I let it run, it appears to all do it at once. What is needed to actually show the animation one at a time? Thanks EDIT: jsFiddle is back up and that link provided below did not help. The answer did not include looping through elements, but looping the animation itself. EDIT 2 Here is a Fiddle to play with if you guys need one.

    Read the article

  • Sony SmartWatch 2 Magnetic Fields confusion

    - by user1865735
    I'm trying to use Registration.SensorTypeValue.MAGNETIC_FIELD in SmartWatch's 2 plugin. But values that I received put me into some dissapointed state, cause of few reason: Values is to big (I tested magnetic fields on 3 phones and result is like "-12. , 38, -14", and the watch give me something like "488, 440, -115") Values are almost static, they live in very small range. What's wrong with me or with the watch? I think this question is for Sony support team.

    Read the article

  • Defining a select list through controller and view model

    - by Ibrar Hussain
    I have a View Model that looks like this: public class SomeViewModel { public SomeViewModel(IEnumerable<SelectListItem> orderTemplatesListItems) { OrderTemplateListItems = orderTemplatesListItems; } public IEnumerable<SelectListItem> OrderTemplateListItems { get; set; } } I then have an Action in my Controller that does this: public ActionResult Index() { var items = _repository.GetTemplates(); var selectList = items.Select(i => new SelectListItem { Text = i.Name, Value = i.Id.ToString() }).ToList(); var viewModel = new SomeViewModel { OrderTemplateListItems = selectList }; return View(viewModel); } Lastly my view: @Html.DropDownListFor(n => n.OrderTemplateListItems, new SelectList(Model.OrderTemplateListItems, "value", "text"), "Please select an order template") The code works fine and my select list populates wonderfully. Next thing I need to do is set the selected value that will come from a Session["orderTemplateId"] which is set when the user selects a particular option from the list. Now after looking online the fourth parameter should allow me to set a selected value, so if I do this: @Html.DropDownListFor(n => n.OrderTemplateListItems, new SelectList(Model.OrderTemplateListItems, "value", "text", 56), "Please select an order template") 56 is the Id of the item that I want selected, but to no avail. I then thought why not do it in the Controller? As a final attempt I tried building up my select list items in my Controller and then passing the items into the View: public ActionResult Index() { var items = _repository.GetTemplates(); var orderTemplatesList = new List<SelectListItem>(); foreach (var item in items) { if (Session["orderTemplateId"] != null) { if (item.Id.ToString() == Session["orderTemplateId"].ToString()) { orderTemplatesList.Add(new SelectListItem { Text = item.Name, Value = item.Id.ToString(), Selected = true }); } else { orderTemplatesList.Add(new SelectListItem { Text = item.Name, Value = item.Id.ToString() }); } } else { orderTemplatesList.Add(new SelectListItem { Text = item.Name, Value = item.Id.ToString() }); } } var viewModel = new SomeViewModel { OrderTemplateListItems = orderTemplatesList }; return View(viewModel); } Leaving my View like so: @Html.DropDownListFor(n => n.OrderTemplateListItems, new SelectList(Model.OrderTemplateListItems, "value", "text"), "Please select an order template") Nothing! Why isn't this working for me?

    Read the article

  • ActiveMQ Message Queue Slows Down after 2 million plus message

    - by pongs
    I have a message queue named amq570queue, after accumulating 2 million messages it started to slow down. What broker settings do I need to adjust to fix this issue? I temporarily moved it into a new message queue(in the same broker) and it is working fine. I initially thought that the kahadb has reached its size limit that is why it is getting slow. Is there a way to limit the size of Message Dequeued? Thank you in advance for any inputs. Regards, Walter

    Read the article

  • Get the Dynamic table data from gui in selenium webDriver

    - by Rabindra
    I am working on a web based Application that I am testing with Selenium. On one page the content is dynamically loaded in table. I want to get the Table data, i am geting a "org.openqa.selenium.NullPointerElementException" in this line. WebElement table = log.driver.findElement(By.xpath(tableXpath)); I tried the following complete code. public int selectfromtable(String tableXpath, String CompareValue, int columnnumber) throws Exception { WebElement table = log.driver.findElement(By.xpath(tableXpath)); List<WebElement> rows = table.findElements(By.tagName("tr")); int flag = 0; for (WebElement row : rows) { List<WebElement> cells = row.findElements(By.tagName("td")); if (!cells.isEmpty() && cells.get(columnnumber).getText().equals(CompareValue)) { flag = 1; Thread.sleep(1000); break; } else { Thread.sleep(2000); flag = 0; } } return flag; } I am calling the above method like String tableXpath = ".//*[@id='event_list']/form/div[1]/table/tbody/tr/td/div/table"; selectfromtable(tableXpath, eventType, 3); my html page is like <table width="100%"> <tbody style="overflow: auto; background-color: #FFFFFF"> <tr class="trOdd"> <td width="2%" align="center"> <td width="20%" align="center"> Account </td> <td width="20%" align="center"> Enter Collection </td> <td width="20%" align="center"> <td width="20%" align="center"> 10 </td> <td width="20%" align="center"> 1 </td> </tr> </tbody> <tbody style="overflow: auto; background-color: #FFFFFF"> <tr class="trEven"> <td width="2%" align="center"> <td width="20%" align="center"> Account </td> <td width="20%" align="center"> Resolved From Collection </td> <td width="20%" align="center"> <td width="20%" align="center"> 10 </td> <td width="20%" align="center"> 1 </td> </tr> </tbody> </table>

    Read the article

  • Simplex noise vs Perlin noise

    - by raRaRa
    I would like to know why Perlin noise is still so popular today after Simplex came out. Simplex noise was made by Ken Perlin himself and it was suppose to take over his old algorithm which was slow for higher dimensions and with better quality (no visible artifacts). Simplex noise came out in 2001 and over those 10 years I've only seen people talk of Perlin noise when it comes to generating heightmaps for terrains, creating procedural textures, et cetera. Could anyone help me out, is there some downside of Simplex noise? I heard rumors that Perlin noise is faster when it comes to 1D and 2D noise, but I don't know if it's true or not. Thanks!

    Read the article

  • IE 11 Developer Tools - changing console target to a different frameset or iframe

    - by vladimirl
    Originally posted on: http://geekswithblogs.net/vladimirl/archive/2013/10/25/ie-11-developer-tools---changing-console-target-to-a.aspxTo change current console iframe/frameset type this into console command line where "contentIFrame" in the iframe/frameset name (there should not be quotes around the iframe name):console.cd(contentIFrame);To return to the top level window, use cd() with no argument:console.cd();It took me some time to find out that this was possible in IE 11 Developer tools. Everything is so much easier in Chrome. No drama. Sometimes I feel that I hate IE more and more. Reference (http://msdn.microsoft.com/en-us/library/ie/dn255006(v=vs.85).aspx#console_in):All script entered in the command line executes in the global scope of the currently selected window. If your webpage is built with a frameset or iframes, those frames load their own documents in their own windows.To target the window of a frameset frame or an iframe, use the cd() command, with the frame/iframe's name or ID attribute as the argument. For example, you have a frame with the name microsoftFrame and you're loading the Microsoft homepage in it.JavaScriptcd(microsoftFrame); Current window: www.microsoft.com/en-us/default.aspx Important  Note that there were no quotes around the name of the frame. Only pass the unquoted name or ID value as the parameter.To return to the top level window, use cd() with no argument.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19  | Next Page >