Search Results

Search found 4060 results on 163 pages for '400 the cat'.

Page 18/163 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Stop SWF file from repeating

    - by Samuel
    Hey people, I have converted a short clip to an .swf file, i want to implement it on my website: <object width="400" height="300"> <param name="movie" value="movie.swf"> <embed src="movie.swf" width="400" height="300"> </embed> </object> When i play it it autoplays (that's fine) but it also keeps repeating over and over, i'd like it to stop at the end and just display the end frame (as mentioned i converted a movie so i cant do it with actionscript in the .fla file). Thanks for any tips!

    Read the article

  • How can I send a GET request containing a colon, to an ASP.NET MVC2 controller?

    - by Cheeso
    This works fine: GET /mvc/Movies/TitleIncludes/Lara%20Croft When I submit a request that contains a colon, like this: GET /mvc/Movies/TitleIncludes/Lara%20Croft:%20Tomb ...it generates a 400 error. The error says ASP.NET detected invalid characters in the URL. If I try url-escaping, the request looks like this: GET /mvc/Movies/TitleIncludes/Lara%20Croft%3A%20Tomb ...and this also gives me a 400 error. If I replace the colon with a | : GET /mvc/Movies/TitleIncludes/Lara%20Croft|%20Tomb ..that was also rejeted as illegal, this time with a 500 error. The message: Illegal characters in path. URL-escaping that | results in the same error. I really, really don't want to use a querystring parameter. related: Sending URLs/paths to ASP.NET MVC controller actions

    Read the article

  • Simple, fast SQL queries for flat files.

    - by plinehan
    Does anyone know of any tools to provide simple, fast queries of flat files using a SQL-like declarative query language? I'd rather not pay the overhead of loading the file into a DB since the input data is typically thrown out almost immediately after the query is run. Consider the data file, "animals.txt": dog 15 cat 20 dog 10 cat 30 dog 5 cat 40 Suppose I want to extract the highest value for each unique animal. I would like to write something like: cat animals.txt | foo "select $1, max(convert($2 using decimal)) group by $1" I can get nearly the same result using sort: cat animals.txt | sort -t " " -k1,1 -k2,2nr And I can always drop into awk from there, but this all feels a bit awkward (couldn't resist) when a SQL-like language would seem to solve the problem so cleanly. I've considered writing a wrapper for SQLite that would automatically create a table based on the input data, and I've looked into using Hive in single-processor mode, but I can't help but feel this problem has been solved before. Am I missing something? Is this functionality already implemented by another standard tool? Halp!

    Read the article

  • How to bind DataTable to Chart series?

    - by user175908
    Hello, How to do bind data from DataTable to Chart series? I get null reference exception. I tried binding with square brackets and it did not worked either. So, how to do the binding? Thanks. P.S: I included DataGrid XAML and CS which works just fine. Converting data to List<KeyValuePair<string,int>> works good but it is kinda slow and is unnessesary trash in code. I use WPFToolkit (the latest version). XAML: <Window x:Class="BindingzTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="606" Width="988" xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"> <Grid Name="LayoutRoot"> <charting:Chart Title="Letters and Numbers" VerticalAlignment="Top" Height="400"> <charting:Chart.Series> <charting:ColumnSeries Name="myChartSeries" IndependentValueBinding="{Binding Letter}" DependentValueBinding="{Binding Number}" ItemsSource="{Binding}" /> </charting:Chart.Series> </charting:Chart> <DataGrid Name="myDataGrid" VerticalAlignment="Stretch" Margin="0,400,0,50" ItemsSource="{Binding}" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn Header="Letter" Binding="{Binding Letter}"/> <DataGridTextColumn Header="Number" Binding="{Binding Number}"/> </DataGrid.Columns> </DataGrid> <Button Content="Generate" HorizontalAlignment="Left" Name="generateButton" Width="128" Click="GenerateButtonClicked" Height="52" VerticalAlignment="Bottom" /> </Grid> CS: public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } DataTable GenerateMyTable() { var myTable = new DataTable("MyTable"); myTable.Columns.Add("Letter"); myTable.Columns.Add("Number"); myTable.Rows.Add("A", 500); myTable.Rows.Add("B", 400); myTable.Rows.Add("C", 500); myTable.Rows.Add("D", 600); myTable.Rows.Add("E", 300); myTable.Rows.Add("F", 200); return myTable; } private void GenerateButtonClicked(object sender, RoutedEventArgs e) { var myGeneratedTable = GenerateMyTable(); myDataGrid.DataContext = myGeneratedTable; myChartSeries.DataContext = myGeneratedTable; // Calling this throws "Object reference not set to an instance of an object" exception } }

    Read the article

  • mySQL experts - need help with 'intersect'

    - by MTCreations
    I know that mySQL 5.x does not support INTERSECT, but that seems to be what I need. Table A: Products (p_id) Table B: Prod_cats (cat_id) - category info (name, description, etc) Table C: prod_2cats (p_id, cat_id) - many to many prod_2cats holds the many (1 or more) categories that have been assigned to Products (A). Doing a query/filter lookup, (user interactive) and need to be able to select across multiple categories the products that meet ALL the criteria. Ex: - 80 products assigned to Category X - 50 products assigned to Category Y - but only 10 products (intersect) are assigned to BOTH cat X AND cat Y This sql works for one category: SELECT * FROM products WHERE p_show='Y' AND p_id IN ( SELECT p_id FROM prods_2cats AS PC WHERE PC.cat_id =" . $cat_id ." <-$cat_id is sanitized var passed from query form . I can't seem to find the means to say ' give me the intersect of cat A and cat B' and get back the subset (10 records, from my example) Help!

    Read the article

  • Compute the Length of Largest substring that starts and ends with the same substring

    - by Deepak
    Hi People, Below is the Problem Statement: PS: Given a string and a non-empty substring sub, compute recursively the largest substring which starts and ends with sub and return its length. Examples: strDist("catcowcat", "cat") ? 9 strDist("catcowcat", "cow") ? 3 strDist("cccatcowcatxx", "cat") ? 9 Below is my Code: (Without recursion)//since i found it hard to implement with recursion. public int strDist(String str, String sub){ int idx = 0; int max; if (str.isEmpty()) max = 0; else max=1; while ((idx = str.indexOf(sub, idx)) != -1){ int previous=str.indexOf(sub, idx); max = Math.max(max,previous); idx++; } return max; } Its working for few as shown below but returns FAIL for others. Expected This Run strDist("catcowcat", "cat") ? 9 6 FAIL strDist("catcowcat", "cow") ? 3 3 OK strDist("cccatcowcatxx", "cat") ? 9 8 FAIL strDist("abccatcowcatcatxyz", "cat") ? 12 12 OK strDist("xyx", "x") ? 3 2 FAIL strDist("xyx", "y") ? 1 1 OK strDist("xyx", "z") ? 0 1 FAIL strDist("z", "z") ? 1 1 OK strDist("x", "z") ? 0 1 FAIL strDist("", "z") ? 0 0 OK strDist("hiHellohihihi", "hi") ? 13 11 FAIL strDist("hiHellohihihi", "hih") ? 5 9 FAIL strDist("hiHellohihihi", "o") ? 1 6 FAIL strDist("hiHellohihihi", "ll") ? 2 4 FAIL Could you let me whats wrong with the code and how to return the largest substring that begins and ends with sub with its respective length.

    Read the article

  • How to store arrays in single array

    - by Jessy
    How can I store arrays in single array? e.g. I have four different arrays, I want to store it in single array int storeAllArray [] and when I call e.g. storeAllArray[1] , I will get this output [11,65,4,3,2,9,7]instead of single elements? int array1 [] = {1,2,3,4,5,100,200,400}; int array2 [] = {2,6,5,7,2,5,10}; int array3 [] = {11,65,4,3,2,9,7}; int array4 [] = {111,33,22,55,77}; int storeAllArray [] = {array1,array2,array3,array2} // I want store all array in on array for (int i=0; i<storeAllArray; i++){ System.out.println(storeAllArray.get[0]); // e.g. will produce --> 1,2,3,4,5,100,200,400 , how can I do this? }

    Read the article

  • Reading escape characters with XMLStreamReader

    - by Roman
    Hi I have a problem reading escape characters inside an xml using. javax.xml.stream.XMLStreamReader for instance I have that tag : <imageURL_large>http://image.shopzilla.com/resize?sq=400&amp;uid=1809235620</imageURL_large> and when I read the value it is read like that : http://image.shopzilla.com/resize?sq=400 Any ideas how that could be fixed ?

    Read the article

  • Graphical net and text

    - by chesheerkys
    Hello! My task is to make a control, that behaves itself like RichTextBox, but contains a graphical net. The only task, this net is solving, is to be visible. It should be solution in overriding OnPaint method, but it doesn't. This code: protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { base.OnPaint(e); ...//drawing a line } gives me RichTextBox without of text This code: protected override void WndProc(ref System.Windows.Forms.Message m) { base.WndProc(ref m); if (m.Msg == 15) { Graphics g = this.CreateGraphics(); g.DrawLine(new Pen(Color.White, 1), new Point(0, 0), new Point(400, 400)); } } sometimes draws extra lines Actually since these two ways don't work, I don't know what to try. Waiting for your advices :) BR Dmitry P.S. I’ve heard a lot about great opportunities of WPF, but I’m not really common with this technology and don’t know what to start with. P.P.S. Sorry for my English, it’s not my natural language.

    Read the article

  • Problem performance datawarehouse with lots of indexes

    - by Lieven Cardoen
    Our product takes tests of some 350 candidates at the same time. At the end of the test, results for each candidate are moved to a datawarehouse full of indexes on it. For each test there's some 400 records to be entered in datawarehouse. So 400 x 350 is a lot of records. If there are not much records in the datawarehouse, all goes well. But if there are already lots of records in the datawarehouse, then a lot of inserts fail... Is there a way to have indexes that are only rebuild at the end of the day or isn't that the real problem? Or how would you solve this?

    Read the article

  • Asp.net TreeView control - maximum number of nodes

    - by mas_oz2k1
    I have a treeView control in ASP.NET page that will be loaded with up to 12,000 nodes in different levels. For example: Node 1 Node 1.1 … Node 1.400 Node 1.400.1 … Node 1.400.6400 Node 2 Node 3 Node 4 According to this link: http://msdn.microsoft.com/en-us/library/ms529261.aspx the node limit is 1000. Is this correct or is it dependent on available memory(please specify value)? Assuming it is correct. is there any way to split the 4600 child nodes in say in chunks of 300 hundred? I am thinking that if dummy nodes are used (previous /next navigation) to navigate the chunks will easy the load of the html page. Sample code in C# will be greatly appreciated. (Or VB.NET if you can not translate it to C#)

    Read the article

  • Question about function returning array data

    - by Doug
    var grossBrackets = new Array( '300', '400', '500', '600', '700', '800', '900', '1000' ); function bracketSort( itemToSort ) { for( index = 0 ; index < grossBrackets.length ; index++ ) { if ( itemToSort < grossBrackets[index] ) { bracketData[index]++; } else if ( itemToSort > grossBrackets[7] ) { grossBrackets[7]++; } } return bracketData; } This is my current code, and I basically want to sort the data into their proper brackets. My source code is really long, but when I input these numbers into the function: 200.18 200.27 200.36 200.45 200.54 bracketData prints 5,5,5,5,5,5,5,5 or is there a better way to do this? Brackets: <300, <400, <500, <600, <700, <800, <900, <1000, greater than 1000

    Read the article

  • getting proxies of the correct type in nhibernate

    - by Nir
    I have a problem with uninitialized proxies in nhibernate The Domain Model Let's say I have two parallel class hierarchies: Animal, Dog, Cat and AnimalOwner, DogOwner, CatOwner where Dog and Cat both inherit from Animal and DogOwner and CatOwner both inherit from AnimalOwner. AnimalOwner has a reference of type Animal called OwnedAnimal. Here are the classes in the example: public abstract class Animal { // some properties } public class Dog : Animal { // some more properties } public class Cat : Animal { // some more properties } public class AnimalOwner { public virtual Animal OwnedAnimal {get;set;} // more properties... } public class DogOwner : AnimalOwner { // even more properties } public class CatOwner : AnimalOwner { // even more properties } The classes have proper nhibernate mapping, all properties are persistent and everything that can be lazy loaded is lazy loaded. The application business logic only let you to set a Dog in a DogOwner and a Cat in a CatOwner. The Problem I have code like this: public void ProcessDogOwner(DogOwner owner) { Dog dog = (Dog)owner.OwnedAnimal; .... } This method can be called by many diffrent methods, in most cases the dog is already in memory and everything is ok, but rarely the dog isn't already in memory - in this case I get an nhibernate "uninitialized proxy" but the cast throws an exception because nhibernate genrates a proxy for Animal and not for Dog. I understand that this is how nhibernate works, but I need to know the type without loading the object - or, more correctly I need the uninitialized proxy to be a proxy of Cat or Dog and not a proxy of Animal. Constraints I can't change the domain model, the model is handed to me by another department, I tried to get them to change the model and failed. The actual model is much more complicated then the example and the classes have many references between them, using eager loading or adding joins to the queries is out of the question for performance reasons. I have full control of the source code, the hbm mapping and the database schema and I can change them any way I want (as long as I don't change the relationships between the model classes). I have many methods like the one in the example and I don't want to modify all of them. Thanks, Nir

    Read the article

  • How to determine why a burned DVD won't boot?

    - by cat pants
    So I have an interesting problem where a burned DVD of "debian-7.2.0-ia64-CD-1.iso" won't boot. The DVD is a DVD+RW. I have tried erasing, burning, and booting from "debian-live-7.0.0-i386-gnome-desktop+nonfree.iso" and that works fine, but I would rather install debian 7.2 with the x86-64 architecture. After burning "debian-7.2.0-ia64-CD-1.sio", I can mount the CD as well and it appears that all the files show up correctly. I was just wondering if there is any sort of boot sector I can try inspecting on the ISO to see if perhaps it is incorrect. Thanks!

    Read the article

  • SQl to list rows in not in another table

    - by SmartestVEGA
    I have the following query which have 1000 rows select staffdiscountstartdate,datediff(day,groupstartdate,staffdiscountstartdate),EmployeeID from tblEmployees where GroupStartDate < '20100301' and StaffDiscountStartDate '20100301' and datediff(day,groupstartdate,staffdiscountstartdate)1 order by staffdiscountstartdate desc i have the following query which have 400 rows: ie the employees in tblemployees and in tblcards select a.employeeid,b.employeeid from tblEmployees a,tblCards b where GroupStartDate < '20100301' and StaffDiscountStartDate '20100301' and datediff(day,groupstartdate,staffdiscountstartdate)1 and a.employeeid=b.employeeid How to list the employees which is there in tblemployees and not in tblcards? ie is 1000-400 = 600 rows ???

    Read the article

  • Using a dictionary file with sed

    - by Winston
    I have a blacklist.txt file that contains keywords I want to remove using sed. Here's what the blacklist.txt file contain winston@linux ] $ cat blacklist.txt obscure keywords here ... And here's what I have so far, but currently doesn't work. blacklist=$(cat blacklist.txt); output="filtered_file.txt" for i in $blacklist; do cat $input | sed 's/$i//g' >> $output done

    Read the article

  • How to stop .Net HttpWebRequest.GetResponse() raising an exception

    - by James
    Surely, surely, surely there is a way to configure the .Net HttpWebRequest object so that it does not raise an exception when HttpWebRequest.GetResponse() is called and any 300 or 400 status codes are returned? Jon Skeet does not think so, so I almost dare not even ask, but I find it hard to believe there is no way around this. 300 and 400 response codes are valid responses in certain circumstances. Why would we be always forced to incur the overhead of an exception? Perhaps there is some obscure configuration setting that evaded Jon Skeet? Perhaps there is a completely different type of request object that can be used that does not have this behavior? (and yes, I know you can just catch the exception and get the response from that, but I would like to find a way not to have to). Thanks for any help

    Read the article

  • scrollTo scrolls to the top of the page

    - by yanis
    Hi, I have the following Javscript code. When the page is loaded it is scrolled to the right position. When I click on the link to run the function the page scrolls to the top of the page. Has anybody any idea how to fix it? <html> <head> <script type="text/javascript"> function scroll() { window.scrollTo(0, 400) } </script> <title></title> </head> <body onload="window.scrollTo(0, 400)"> <img src="a.jpg"/> <a href="#" onclick="scroll">comments1</a> </body> </html>

    Read the article

  • What is the maximum number of virtualhosts Apache can handle?

    - by FractalizeR
    Hello. What is the maximum number of VirtualHosts Apache can handle on a single machine (I don't mean anything related to load, let's suppose it's irrelevant for the question). And we take only Apache without any proxifying things like nginx. I am asking because on one forum one guy reported that his Apache works unstable with the number of sites more than 400 on a single machine. If you have a config, that handles more than 400, please tell me here. Thanks.

    Read the article

  • Clean URLs mod_rewrite & wildcard subdomains

    - by Søren Zet
    I got this url http://domain.com/blogs/directory-param with this rule RewriteBase /blogs/directory/ RewriteRule ^/blogs/directory-([A-Za-z0-9-]+)$ /blogs/directory/index.php?cat=$1 [L] so I get /blogs/directory/index.php?cat=param now my problem is the following: I use wildcards subdomains so every *.domain.com is mapped to domain.com/blogs/ for example soeren.domain.com is mapped to domain.com/blogs and so on... My problem now is I want a rule for soeren.domain.com/directory-param which points to domain.com/blogs/directory?index.php?cat=param Do you have any ideas?

    Read the article

  • SQl to list rows if not in another table

    - by SmartestVEGA
    I have the following query which have 1000 rows select staffdiscountstartdate,datediff(day,groupstartdate,staffdiscountstartdate), EmployeeID from tblEmployees where GroupStartDate < '20100301' and StaffDiscountStartDate > '20100301' and datediff(day,groupstartdate,staffdiscountstartdate)>1 order by staffdiscountstartdate desc i have the following query which have 400 rows: ie the employees in tblemployees and in tblcards select a.employeeid,b.employeeid from tblEmployees a,tblCards b where GroupStartDate < '20100301' and StaffDiscountStartDate > '20100301' and datediff(day,groupstartdate,staffdiscountstartdate)>1 and a.employeeid=b.employeeid How to list the employees which is there in tblemployees and not in tblcards? ie is 1000-400 = 600 rows ???

    Read the article

  • Re-factoring a CURL request to Ruby's RestClient

    - by user94154
    I'm having trouble translating this CURL request into Ruby using RestClient: system("curl --digest -u #{@user}:#{@pass} '#{@endpoint}/#{id}' --form image_file=@'#{path}' -X PUT") I keep getting 400 Bad Request errors. As far as I can tell, the request does get properly authenticated, but hangs up from the file upload part. Here are my best attempts, all of which get me those 400 errors: resource = RestClient::Resource.new "#{@endpoint}/#{id}", @user, @pass #attempt 1 resource.put :image_file => File.new(path, 'rb'), :content_type => 'image/jpg' #attempt 2 resource.put File.read(path), :content_type => 'image/jpg' #attempt 3 resource.put File.open(path) {|f| f.read}, :content_type => 'image/jpg'

    Read the article

  • Using Simple HTML Dom to match a string on the page

    - by Abs
    Hello all, How do I match and get the flash vars on a HTML page? I am using simple HTML dom element and I am able to narrow down to a div containing the text I need. <script type="text/javascript"> var s1 = new SWFObject("jw4.4/player.swf", "player", "400", "50", "9"); s1.addParam("allowfullscreen", "true"); s1.addParam('allowscriptaccess','always'); s1.addVariable("width","400"); s1.addVariable("height","50"); s1.addVariable("overstretch", "false"); s1.addParam('flashvars',"this_id=/tg&amp;autostart=true"); s1.write("container"); How do I get the value of this_id, so I want to return /tg? What would I put in find? Or do i have to use something else? $html = file_get_html("$url"); $file_path = $html->find('this_id=/'); Thanks all for any help

    Read the article

  • efficient list mapping in python

    - by Joey
    Hi everyone, I have the following input: input = [(dog, dog, cat, mouse), (cat, ruby, python, mouse)] and trying to have the following output: outputlist = [[0, 0, 1, 2], [1, 3, 4, 2]] outputmapping = {0:dog, 1:cat, 2:mouse, 3:ruby, 4:python, 5:mouse} Any tips on how to handle given with scalability in mind (var input can get really large).

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >