Search Results

Search found 832 results on 34 pages for 'dummy'.

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

  • How to create contexts in shoulda macros

    - by Honza
    Asking this question again with smaller code sample: # this is a dummy shoulda macro that creates a context def self.macro_context context "macro" do yield end end # i am expecting this test to fail within the macro context context "some context" do macro_context do should "test" do fail end end end So what I would expect is to see: 1) Error: test: some context macro context should test. (TestClassName) But I am getting only this: So what I would expect is to see: 1) Error: test: some context should test. (TestClassName) Any idea what am I doing wrong?

    Read the article

  • Win32: How to crash?

    - by Ian Boyd
    i'm trying to figure out where Windows Error Reports are saved; i hit Send on some earlier today, but i forgot that i want to "view the details" so i can examine the memory minidumps. But i cannot find where they are stored (and google doesn't know). So i want to write a dummy application that will crash, show the WER dialog, let me click "view the details" so i can get to the folder where the dumps are saved. How can i crash on Windows?

    Read the article

  • JSON: How do I alert the name of the first node in level 1 in this code snippet?

    - by user143805
    var response = "{\"tree\":[{\"level1\":[{\"node\":{\"id\": 1,\"name\": \"paradox\",\"parent\": 0}}]},{\"level2\":[{\"node\":{\"id\": 2,\"name\": \"lucent\",\"parent\": 1}},{\"node\":{\"id\": 3,\"name\": \"reiso\",\"parent\": 1}}]},{\"level3\":[{\"node\":{\"id\": 4,\"name\": \"pessi\",\"parent\": 3}},{\"node\":{\"id\": 5,\"name\": \"misho\",\"parent\": 2}}]},{\"level4\":[{\"node\":{\"id\": 6,\"name\": \"hema\",\"parent\": 5}},{\"node\":{\"id\": 7,\"name\": \"iiyo\",\"parent\": 4}}]}]}"; var data = eval("(" + response + ")"); This is a dummy json response I am currently testing. Now how do I get the value of "name" in the 1st node of "level1" from the "tree"? Thanks

    Read the article

  • virtual directory for php app

    - by Tom
    I created a virtual directory for my php app. Now I get the "Directory Listing Denied This Virtual Directory does not allow contents to be listed." Do I need to make some kind of dummy index.asp file that redirects (OR PREFERRED: just displays index.php) or how to solve this? I have restricted access to webserver, but index.php is set to be default

    Read the article

  • protect_from_forgery & Unobtrusive Javascript

    - by Matt Grande
    Hi all, I have some javascript making an ajax call in my Rails site: $.ajax({type: "PUT", url: url, data: { dummy: data }, complete: function(data) {}}); When Rails gets it, it throws back an ActionController::InvalidAuthenticityToken Error. I'd like to keep the protect_from_forgery stuff in there, if possible... But I'm at a loss for how can I pass the auth token from a javascript file? Can anyone help me out?

    Read the article

  • Select column value that matches a combination of other columns values on the same table

    - by Ala
    I have a table called Ads and another Table called AdDetails to store the details of each Ad in a Property / Value style, Here is a simplified example with dummy code: [AdDetailID], [AdID], [PropertyName], [PropertyValue] 2 28 Color Red 3 28 Speed 100 4 27 Color Red 5 28 Fuel Petrol 6 27 Speed 70 How to select Ads that matches many combinations of PropertyName and PropertyValue, for example : where PropertyName='Color' and PropertyValue='Red' And where PropertyName='Speed' and CAST(PropertyValue AS INT) > 60

    Read the article

  • Div in Div: layout question

    - by MrG
    I created the following layout: something Dummy #1 // .. the div above repeats several times I'm using the folowing style sheet: div.title { border: 1px black solid; } and would expect a border around all of class=title, but see only some strange lines at the top. Please let me know what I do wrong. Many many thanks!

    Read the article

  • Quote marks in controls' property in ASP.NET markup

    - by abatishchev
    Sounds dummy but I can't set to a server-side control's property a value contains quote marks ": <asp:CompareValidator ErrorMessage="Curreny-from can't be equal to currency-to" runat="server" /> I need to quote "from" and "to". I tried escaping \"from\" and double quote marks ""from"" - both doesn't work. How to do that?

    Read the article

  • Fake ssl cetificate for development

    - by Zerotoinfinite
    Hi, I am using asp.net 3.5 with c#, I want to develop website with SSL transaction. But before Developing the site I want to work with SSL to learn more from it. Please let me know from where I can get the dummy SSL or Fake SSL so that I could do the development work. Thanks in advance

    Read the article

  • WPF - Two way binding use a user control...binding to object, not an element!

    - by Scott
    I created an object with a simple property with a default value. I then created a user control that has a text box in it. I set the datacontext of the user control to the object. The text box correctly shows the properties default value but I can't seem to update the property value when the user changes the text box value. I created a simple project to illustrate my code. Thanks for the help!! public partial class UserControl1 : UserControl { public UserControl1() { InitializeComponent(); } private string _titleValue; public string TitleValue { get { return _titleValue; } set { _titleValue = value; textBox1.Text = _titleValue; } } public static readonly DependencyProperty TitleValueProperty = DependencyProperty.Register( "TitleValue", typeof(string), typeof(UserControl1), new FrameworkPropertyMetadata(new PropertyChangedCallback(titleUpdated)) ); //Don't think I should need to do this!!! private static void titleUpdated(DependencyObject d, DependencyPropertyChangedEventArgs e) { ((UserControl1)d).TitleValue = (string)e.NewValue; } } <UserControl x:Class="WpfApplication1.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <Grid> <TextBox Height="23" HorizontalAlignment="Left" Margin="94,97,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" Text="{Binding Path=TitleValue, Mode=TwoWay}"/> </Grid> </UserControl> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); var dummy = new DummyObject("This is my title."); userControl11.DataContext = dummy; } private void button1_Click(object sender, RoutedEventArgs e) { MessageBox.Show("The value is: " + ((DummyObject)userControl11.DataContext).Title); } } <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" xmlns:my="clr-namespace:WpfApplication1"> <Grid> <my:UserControl1 HorizontalAlignment="Left" Margin="95,44,0,0" x:Name="userControl11" VerticalAlignment="Top" Height="191" Width="293" TitleValue="{Binding Path=Title, Mode=TwoWay}"/> <Button Content="Check Value" Height="23" HorizontalAlignment="Left" Margin="20,12,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" /> </Grid> </Window>

    Read the article

  • From mod_rewrite to isapi_rewrite

    - by Ty
    Hi, I have a Modx htaccess file which needs to be rewritten from mod_rewrite to isapi_rewrite 2. Can someone please help me? The following lines need to be changed for isapi_rewrite 2: Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^.internal\ dummy\ connection.$ [NC] RewriteRule .* - [F,L] RewriteRule ^(manager|assets) - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] Many thanks.

    Read the article

  • COM(C++) Programming Tutorials

    - by Deep-B
    Hey guys, I was wondering if there're any good sites that deal with learning C++/COM from the ground up? Looking for something like a crash course (two weeks, and not being hypothetical here). Assume knowledge in standard C/C++, or at least not a complete dummy.

    Read the article

  • Error loading CMSMS website

    - by adeniyi makinde
    I just uploaded a CMSMS website, but cannot view the website. Am getting the error: Warning: require(/home/inkbran1/public_html/century21nigeria/lib/smarty/Smarty.class.php) [function.require]: failed to open stream: No such file or directory in /home/inkbran1/public_html/century21nigeria/include.php on line 153 Fatal error: require() [function.require]: Failed opening required '/home/inkbran1/public_html/century21nigeria/lib/smarty/Smarty.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/inkbran1/public_html/century21nigeria/include.php on line 153 Please, what can i do? I am a PHP dummy.

    Read the article

  • Is there a better way to declare an empty, typed matrix in MATLAB?

    - by Arthur Ward
    Is there a way to "declare" a variable with a particular user-defined type in MATLAB? zeros() only works for built-in numeric types. The only solution I've come up with involves using repmat() to duplicate a dummy object zero times: arr = repmat(myClass(), [1 0]) Without declaring variables this way, any code which does "arr(end+1) = myClass()" has to include a special case for the default empty matrix which is of type double. Have I missed something a little more sensible?

    Read the article

  • How to refresh the properties view in Eclipse RCP?

    - by geejay
    I am using the properties view in RCP, i.e org.eclipse.ui.views.properties.PropertySheet. I want to be able to refresh the content of these properties programmatically. It seems RCP is geared towards the use case where this changes only when a selection changes. Is there any way I can fire a dummy event to get this to refresh (without having ugly UI artifacts such as visibly switching between parts) ?

    Read the article

  • ant (1.8.0/1.8.1) zip empty directories

    - by andersonbd1
    Hi, I noticed that neither the zip or jar targets are including empty directories. I googled a little and found this was a regression issue way back with 1.6 (.2 I think), but it was claimed to have been fixed. I was using 1.8.0 so I upgraded to 1.8.1, but am having the same issue. Anyone know of any workarounds besides adding dummy files to those directories? Thanks, Ben Anderson

    Read the article

  • jquery load a specific #Div content from multiple html files

    - by Vikram
    Hello friends I am trying to make a Content Slider for my site. I have multiple HTML files and the structure of these files is like this: <div id="title"><h2>Title of the Slide</h2></div> <div id="image"><a href="http://mylink.com"><img src="image.jpg" width="600" height="300" alt="image"</a></div> <div id="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.</div> I have been trying to use the following script get content (but no success): <?php function render($position="") { ob_start(); foreach(glob("/slides/*.html") as $fileName) { $fname = basename( $fileName ); $curArr = file($fname); $slides[$fname ]['title'] = $curArr[0]; $slides[$fname ]['image'] = $curArr[1]; $slides[$fname ]['content'] = $curArr[2]; foreach($slides as $key => $value){ ?> <div id="slide-title"> <?php echo $value['title'] ?> </div> <div id="slide-content"> <?php echo $value['image'] ?> </div> <div id="slide-image"> <?php echo $value['content'] ?> </div> <?php }} ?> <?php return ob_get_clean(); } But then I came to know about a jQuery function.... (again no success) jQuery.noConflict(); (function($){ $(document).ready(function () { $('#slide-title').load('slides/slide1.html #title'); $('#slide-content').load('slides/slide1.html #content'); $('#slide-image').load('slides/slide1.html #image'); }); })(jQuery); Now My questions are..... Am I using the right syntax. How do I get the content from multiple files using jQuery. Please Note : My knowledge on Programming is almost '0'. I have just started learning it.

    Read the article

  • Django @ Google App Engine - Site Map Framework

    - by dkp
    Hi Folks, has anybody managed to get Djangos site map framework to run on Google App Engine? I receive the following exception: ImproperlyConfigured at /sitemap.xml You haven't set the DATABASE_ENGINE setting yet. Request Method: GET Request URL: http://127.0.0.1:8080/sitemap.xml Exception Type: ImproperlyConfigured Exception Value: You haven't set the DATABASE_ENGINE setting yet. Exception Location: D:\Program Files\Google\google_appengine\lib\django\django\db\backends\dummy\base.py in complain, line 13

    Read the article

  • Inlining an array of non-default constructible objects in a C++ class

    - by porgarmingduod
    C++ doesn't allow a class containing an array of items that are not default constructible: class Gordian { public: int member; Gordian(int must_have_variable) : member(must_have_variable) {} }; class Knot { Gordian* pointer_array[8]; // Sure, this works. Gordian inlined_array[8]; // Won't compile. Can't be initialized. }; As even beginner C++ users know, the language guarantees that all members are initialized when constructing a class. And it doesn't trust the user to initialize everything in the constructor - one has to provide valid arguments to the constructors of all members before the body of the constructor even starts. Generally, that's a great idea as far as I'm concerned, but I've come across a situation where it would be a lot easier if I could actually have an array of non-default constructible objects. The obvious solution: Have an array of pointers to the objects. This is not optimal in my case, as I am using shared memory. It would force me to do extra allocation from an already contended resource (that is, the shared memory). The entire reason I want to have the array inlined in the object is to reduce the number of allocations. This is a situation where I would be willing to use a hack, even an ugly one, provided it works. One possible hack I am thinking about would be: class Knot { public: struct dummy { char padding[sizeof(Gordian)]; }; dummy inlined_array[8]; Gordian* get(int index) { return reinterpret_cast<Gordian*>(&inlined_array[index]); } Knot() { for (int x = 0; x != 8; x++) { new (get(x)) Gordian(x*x); } } }; Sure, it compiles, but I'm not exactly an experienced C++ programmer. That is, I couldn't possibly trust my hacks less. So, the questions: 1) Does the hack I came up with seem workable? What are the issues? (I'm mainly concerned with C++0x on newer versions of GCC). 2) Is there a better way to inline an array of non-default constructible objects in a class?

    Read the article

  • conditionally enabling constructor

    - by MK
    Here is how I can conditionally enable a constructor of a class : struct Foo { template<class T> Foo( T* ptr, boost::enable_if<is_arithmetic<T> >::type* = NULL ) {} }; I would like to know why I need to do the enabling via a dummy parameter. Why can I not just write : struct Foo { template<class T> Foo( boost::enable_if<is_arithmetic<T>, T>::type* = NULL ) {} };

    Read the article

  • Does the for foreach construct in java create a hard or soft copy?

    - by Doug
    Say I have the following piece of java code ArrayList<Double> myList = new Double[100]; for (Double x : myList) x = randomDouble(); Does this actually modify myList or just the dummy variable? I realize I should just try this code segment out, but I think this is the sort of thing I should be able to google or search for on this site, and several queries so far have turned up nothing useful.

    Read the article

  • MYSQL UPDATE with IN and Subquery

    - by Johal
    Hi i have tables like this : table entry : id | total_comments ___________ 1 | 0 2 | 0 3 | 0 4 | 0 table comments : id | eid | comment ___________ 1 | 1 | comment sdfd 2 | 1 | testing testing 3 | 1 | comment text 4 | 2 | dummy comment 5 | 2 | sample comment 6 | 1 | fg fgh dfh Query i write : UPDATE entry SET total_comments = total_comments + 1 WHERE id IN ( SELECT eid FROM comments WHERE id IN (1,2,3,4,5,6)) Results i get is : table entry : id | total_comments ___________ 1 | 1 2 | 1 3 | 0 4 | 0 Expected results : table entry : id | total_comments ___________ 1 | 4 2 | 2 3 | 0 4 | 0 Any help will be appreciated.

    Read the article

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