Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 52/584 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • stumped on jquery call inside chrome extension

    - by phil swenson
    In my chrome extension I call this: jsonPost = { email:"[email protected]", password:"demo", content: $('#selected_text').val(), notification_type: $('#notification_type').val(), name:$('#notification_name').val() } $.post('http://localhost:3000/api/create.json', jsonPost, function (data) { console.log("type of data = " + typeof(data)); console.log("data in function = " + data); } The data makes it to the server. But the response is lost, in the console ---type of data = String ---data in function = So for some reason I am not getting the response back. Works from the browser. I even tried doing a get against cnn.com and got no response. any ideas? thanks

    Read the article

  • ActiveRecord finding from inside a serialized field

    - by JP
    While working with ActiveRecord I have a table which stores a serialized array of participant usernames for each row. Is there an easy way to search for all rows who contain a specific user? I realise I could just make a new linked table for the participants, but I feel like that would increase my overhead unnecessarily -- what do you think?

    Read the article

  • android does not display "" inside TextView?

    - by UMMA
    dear friends, i am trying to display STRING my car name is "abc" in textview. it displays &qoute;abc&qoute; after running application. i have tried decoding into " and then assigning it to TextView but it always convert " to &qoute; can any one guide me how to solve this issue? any help would be appriciated.

    Read the article

  • JQuery Facebox Plugin : Get it inside the form tag

    - by Kevin Sheffield
    I am wanting to use the Facebox plugin for JQuery but am having a few issues getting it running how I want. The div that houses the facebox content is created outside of the tag so even though I am loading up some web controls none of them are firing back to the server. Has anyone dealt with this that can give me some pointers?

    Read the article

  • Scope of variables inside of javascript

    - by wcpro
    I have the following code sample that im trying to wrap my head around $(document).ready(function () { test("load json", function () { length = 0; // length = 0 $.getJSON("plugins/form.json", function (data) { length = data.fields.length; // length = 4 }); ok(length == 4, "length = " + length.toString()); // length = 0? wtf? }); }); the 'length' variable does not persist when the $.getJSON runs. I cant figure out if its because its asynchronous or because the variable is out of scope.

    Read the article

  • How to make html image clickable inside a TextView

    - by Gonan
    I have the following text in a string in the resources file: <a href="mailto:[email protected]">&lt;img src="mail_big" /&gt;</a> It shows the image fine (I implemented ImageGetter) but it is not clickable. I have tried adding the Linkify thingy but I don't think it's meant for this case, and so it doesn't work. The setMovementMethod doesn't work either. I have tried different combinations of the above: <a href="mailto:[email protected]">&lt;img src="mail_big" /&gt;hello</a> Here, even the "hello" part is not clickable (neither blue nor underlined). <a href="mailto:[email protected]"><img src="mail_big" /></a> This doesn't even show the image. &lt;a href="mailto:[email protected]"&gt;&lt;img src="mail_big" /&gt;&lt;/a&gt; If I just write the email, without the <a> tag it works perfectly, but I would like to use the image of an envelope that the user can click on. It's not possible to use an imagebutton because this text is in the middle of a string and so I can't split it. Any ideas? Thanks! EDIT: I found a solution or rather found how to do it correctly. All I had to do was adding the setMovementMethod call before the call to setText in the TextView and ALSO, and COMPLETELY NECESSARY, remove the attribute "android:autoLink="all" from the layout. Apparently, parsing mails and urls in a string is mutually exclusive to interpreting the link tags in a string. So one or the other but not both. Finally my layout is just a TextView with nothing special, just width and height. The activity is like this: TextView tv = (TextView)findViewById(R.id.about_text); tv.setMovementMethod(LinkMovementMethod.getInstance()); tv.setText(Html.fromHtml(getString(R.string.about_content), new ImageGetter(), null)); And the string is like this: <string name="about_content"><a href="mailto:[email protected]"><img src="mail" /></a></string>

    Read the article

  • disable dates using jquery inside gridview control

    - by bladerunner
    Hi there, I have a gridview which contains a textbox control. I need to show the calendar for the user to pick the date and certain dates are to be disabled using jquery. I found a post on stackoverflow that talked about how to disable certain dates. I am done with that part, except not sure how to pass the textbox control to this jquery function. Here is the code. <script type="text/javascript" language="javascript"> function pageLoad(sender, args) { var enabledDays = ['09/21/2011', '10/05/2011', '10/19/2011', '11/02/2011', '11/16/2011']; /* utility functions */ function editDays(date) { for (var i = 0; i < enabledDays.length; i++) { if (new Date(enabledDays[i]).toString() == date.toString()) { return [true]; } } return [false]; } /* create datepicker */ $(document).ready(function() { $('#<%= txtInHomeDate.ClientID %>').datepicker({ beforeShow: springDate, beforeShowDay: editDays, dateFormat: 'mm/dd/yy', buttonImage: 'images/cal.gif', buttonText: 'Choose date', firstDay: 1, buttonImageOnly: true, showOn: 'both', showAnim: 'fadeIn', onSelect: function() { $(this).trigger("onchange", null); } }); function springDate() { var defaultMin = new Date(); var defaultMax = new Date(); var Min = defaultMin; var Max = defaultMax; // make valid date from hiddenfied value format is MM/dd/yyyy dateMin = $('#<%= hfStDate.ClientID %>').val(); dateMin = new Date(dateMin); dateMax = $('#<%= hfEndDate.ClientID %>').val(); dateMax = new Date(dateMax); if (dateMin && dateMax) { Min = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate()); Max = new Date(dateMax.getFullYear(), dateMax.getMonth(), dateMax.getDate()); } return { minDate: Min, maxDate: Max }; } }); } <.... <asp:TemplateField HeaderText="In-Home Date"> <ItemStyle HorizontalAlign="Center" /> <ItemTemplate> <asp:HiddenField ID="hfStDate" runat="server" Value="09/01/2011" /> <asp:HiddenField ID="hfEndDate" runat="server" Value="11/30/2011" /> <asp:TextBox ID="txtInHomeDate" runat="server" /> </ItemTemplate> </asp:TemplateField> Currently, it errors out since the jquery function won't find the txtInHomeDate. Could I get some help as I am pretty close to get this done? Thanks!!

    Read the article

  • C++ - Opening a file inside a function using fopen

    - by Josh
    I am using Visual Studio 2005 (C++). I am passing a string into a function as a char array. I want to open the file passed in as a parameter and use it. I know my code works to an extent, because if I hardcode the filename as the first parameter it works perfectly. I do notice if I look at the value as a watch, the value includes the address aside the string literal. I have tried passing in the filename as a pointer, but it then complains about type conversion with __w64. As I said before it works fine with "filename.txt" in place of fileName. I am stumped. void read(char fileName[50],int destArray[MAX_R][MAX_C],int demSize[2]) { int rows=0; int cols=0; int row=0; int col=0; FILE * f = fopen(fileName,"r"); ...

    Read the article

  • building list of child objects inside main object

    - by Asdfg
    I have two tables like this: Category: Id Name ------------------ 1 Cat1 2 Cat2 Feature: Id Name CategoryId -------------------------------- 1 F1 1 2 F2 1 3 F3 2 4 F4 2 5 F5 2 In my .Net classes, i have two POCO classes like this: public class Category { public int Id {get;set;} public int Name {get;set;} public IList<Feature> Features {get;set;} } public class Feature { public int Id {get;set;} public int CategoryId {get;set;} public int Name {get;set;} } I am using a stored proc that returns me a result set by joining these 2 tables. This is how my Stored Proc returns the result set. SELECT c.CategoryId, c.Name Category, f.FeatureId, f.Name Feature FROM Category c INNER JOIN Feature f ON c.CategoryId = f.CategoryId ORDER BY c.Name --Resultset produced by the above query CategoryId CategoryName FeatureId FeatureName --------------------------------------------------- 1 Cat1 1 F1 1 Cat1 2 F2 2 Cat2 3 F3 2 Cat2 4 F4 2 Cat2 5 F5 Now if i want to build the list of categories in my .Net code, i have to loop thru the result set and add features unless the category changes. This is how my .Net code looks like that builds Categories and Features. List<Category> categories = new List<Category>(); Int32 lastCategoryId = 0; Category c = new Category(); using (SqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { //Check if the categoryid is same as previous one. //If Not, add new category. //If Yes, dont add the category. if (lastCategoryId != Convert.ToInt32(reader["CategoryId"])) { c = new Category { Id = Convert.ToInt32(reader["CategoryId"]), Name = reader["CategoryName"].ToString() }; c.Features = new List<Feature>(); categories.Add(c); } lastCategoryId = Convert.ToInt32(reader["CategoryId"]); //Add Feature c.Features.Add(new Feature { Name = reader["FeatureName"].ToString(), Id = Convert.ToInt32(reader["FeatureId"]) }); } return categories; } I was wondering if there is a better way to do build the list of Categories?

    Read the article

  • not able to style a ul inside a nav tag

    - by user1831677
    I am trying to make a nav menu for my website and have been using http://www.onextrapixel.com/2011/06/03/how-to-create-a-horizontal-dropdown-menu-with-html-css-and-jquery/ as a guide. It has worked fine but as soon as I try to add ( id="coolMenu" ) to the nav tag it stops working. I took it away from the ul tag and added it to the nav tag and it no longer works. It does not display anything at all. What am in doing wrong? Thanks. html code below: <nav id="coolMenu"> <ul> <li><a href="#">Lorem</a></li> <li><a href="#">Mauricii</a></li> <li> <a href="#">Periher</a> <ul class="noJS"> <li><a href="#">Hellenico</a></li> <li><a href="#">Genere</a></li> <li><a href="#">Indulgentia</a></li> </ul> </li> <li><a href="#">Tyrio</a></li> <li><a href="#">Quicumque</a></li> </ul> </nav> css below: /* Structure ------------------------------------------*/ #coolMenu, #coolMenu ul { list-style: none; } #coolMenu { float: left; } #coolMenu > li { float: left; } #coolMenu li a { display: block; height: 2em; line-height: 2em; padding: 0 1.5em; text-decoration: none; } #coolMenu ul { position: absolute; display: none; z-index: 999; } #coolMenu ul li a { width: 80px; } #coolMenu li:hover ul.noJS { display: block; } /* Main menu ------------------------------------------*/ #coolMenu { font-family: Arial; font-size: 12px; background: #2f8be8; } #coolMenu > li > a { color: #fff; font-weight: bold; } #coolMenu > li:hover > a { background: #f09d28; color: #000; } /* Submenu ------------------------------------------*/ #coolMenu ul { background: #f09d28; } #coolMenu ul li a { color: #000; } #coolMenu ul li:hover a { background: #ffc97c; }

    Read the article

  • Use LINQ to SQL results inside SQL Server stored procedure

    - by ifwdev
    Note: I'm not trying to call a SQL Server stored proc using a L2SQL datacontext. I use LINQPad for some fairly complex "reporting" that takes L2SQL output saved to an Array and is processed further. For example, it's usually much easier to do multiple levels of grouping with LINQ to Objects instead of trying to optimize a T-SQL query to run in a reasonable amount of time. What would be the easiest way to take the end result of one of these "applications" and use that in a SQL Server 2008 stored proc? The idea is to use the data for a Reporting Services Report, rather than copying and pasting into Excel (manual labor). The reports need to be accessible on the report server (not using the Report Server control in an application). I could output CSV and read that somehow via command line exec, but that seems like a hack. Thanks for your help.

    Read the article

  • Accept Cookies inside Java code ?

    - by yox
    Hi, I'm dealing with a HTTP sockets project, I have to send 2 HTTP GET requests from my java code like this : Request 1 : call page X Page X is setting a cookie. Request 2 : call to page Y as you see to access the content of page Y i cookie must be present... how to accept a cookie from java code please ?

    Read the article

  • Perl standard input with argument inside Bash

    - by neversaint
    I want to have such pipe in bash #! /usr/bin/bash cut -f1,2 file1.txt | myperl.pl foo | sort -u Now in myperl.pl it has content like this my $argv = $ARG[0] || "foo"; while (<>) { chomp; if ($argv eq "foo") { # do something with $_ } else { # do another } } But why the Perl script can't recognize the parameter passed through bash? Namely the code break with this message: Can't open foo: No such file or directory at myperl.pl line 15. What the right way to do it so that my Perl script can receive standard input and parameter at the same time?

    Read the article

  • How can I Add newer Data to the start of the xml file (Example inside)

    - by Ofear
    Hi All! After alot of work i finish to make a xml reader and writer... but my problem is that i want the newer data that i insert using my form will be added to the top of the xml file. and not in the bottom.. let me show you an example: this is the XML file: <?xml version="1.0" encoding="utf-8"?> <events> <record> <event>old event</event> <eventDate>1/1/2009</eventDate> <desc>old desc</desc> </record> <record> <event>newer event</event> <eventDate>12/12/2011</eventDate> <desc>newer desc</desc> </record> </events> now.. I want the XML file to be like this: newer data and then old data <?xml version="1.0" encoding="utf-8"?> <events> <record> <event>newer event</event> <eventDate>12/12/2011</eventDate> <desc>newer desc</desc> </record> <record> <event>old event</event> <eventDate>1/1/2009</eventDate> <desc>old desc</desc> </record> </events> This is my add.php (the file that get the POST information from the Form in the main.html : <?php $record = array( 'event' => $_POST['event'], 'eventDate' => $_POST['eventDate'], 'desc' => $_POST['desc'], ); $doc = new DOMDocument(); $doc->load( 'events.xml' ); $doc->formatOutput = true; $r = $doc->getElementsByTagName("events")->item(0); $b = $doc->createElement("record"); $event = $doc->createElement("event"); $event->appendChild( $doc->createTextNode( $record["event"] ) ); $b->appendChild( $event ); $eventDate = $doc->createElement("eventDate"); $eventDate->appendChild( $doc->createTextNode( $record["eventDate"] ) ); $b->appendChild( $eventDate ); $desc = $doc->createElement("desc"); $desc->appendChild( $doc->createTextNode( $record["desc"] ) ); $b->appendChild( $desc ); $r->appendChild( $b ); $doc->save("events.xml"); header("Location: {$_SERVER['HTTP_REFERER']}"); ?> Where do i need to edit to be able to make the *xml as i want?*

    Read the article

  • Drupal, Lightbox: cannot edit the content inside

    - by Patrick
    hi, I'm using Drupal and Lightbox module to display the content of articles in this website: donatellabernardi.ch/drupal if you click on an article the lightbox is displayed. However I have 2 problems with it: 1) I cannot use the libraries such as the tooltip library qTip from it. (If you move the mouse over the balls, you'll see the tooltips) 2) I cannot invert the title with the balls (tags), because it seems that the template of the node in the lightbox is not controlled by my theme. I tried also to change the node template (in the drupal root folder), swapping title and meta data but it didn't work. thanks

    Read the article

  • How can I ssh inside a Perl script?

    - by Salman
    I want to SSH to a server and execute a simple command like "id" and get the output of it and store it to a file on my primary server. I do not privileges to install Net::SSH which would make my task very easy. Please provide me a solution for this. I tried using backticks but I am not able to store the output on the machine from which my script runs.

    Read the article

  • Can I query inside a SQLite Transaction?

    - by CSharperWithJava
    I'm using the SQLite3 database system in the Android library. I need to execute a query during a transaction to see if there is a similar entry already there. If there is, I have to perform some other logic and adjustments before I add a new row. Can I execute a query within a transaction and get the result back immediately?

    Read the article

  • foo and _foo - about variables inside a class

    - by kame
    class ClassName(object): """ """ def __init__(self, foo, bar): """ """ self.foo = foo # read-write property self.bar = bar # simple attribute def _set_foo(self, value): self._foo = value def _get_foo(self): return self._foo foo = property(_get_foo, _set_foo) a = ClassName(1,2) #a._set_foo(3) print a._get_foo() When I print a._get_foo() the function _get_foo prints the variable self._foo . But where does it come from? self._foo and self.foo are different, aren't they?

    Read the article

  • How to change font color inside an existing script

    - by user320946
    Hi everyone, I get a script from a website to put it into my website, but the font color is not what I want. the script is: < script language="javascript" src="http://www.parstools.net/calendar/?type=2"< /script and now I want to change the font color of it, what should I do? I would really appreciate your help, thanks.

    Read the article

  • Use of properties vs backing-field inside owner class

    - by whatispunk
    I love auto-implemented properties in C# but lately there's been this elephant standing in my cubicle and I don't know what to do with him. If I use auto-implemented properties (hereafter "aip") then I no longer have a private backing field to use internally. This is fine because the aip has no side-effects. But what if later on I need to add some extra processing in the get or set? Now I need to create a backing-field so I can expand my getters and setters. This is fine for external code using the class, because they won't notice the difference. But now all of the internal references to the aip are going to invoke these side-effects when they access the property. Now all internal access to the once aip must be refactored to use the backing-field. So my question is, what do most of you do? Do you use auto-implemented properties or do you prefer to always use a backing-field? What do you think about properties with side-effects?

    Read the article

  • A public struct inside a class

    - by Koning Baard
    I am new to C++, and let's say I have two classes: Creature and Human: /* creature.h */ class Creature { private: public: struct emotion { /* All emotions are percentages */ char joy; char trust; char fear; char surprise; char sadness; char disgust; char anger; char anticipation; char love; }; }; /* human.h */ class Human : Creature { }; And I have this in my main function in main.cpp: Human foo; My question is: how can I set foo's emotions? I tried this: foo->emotion.fear = 5; But GCC gives me this compile error: error: base operand of '-' has non-pointer type 'Human' This: foo.emotion.fear = 5; Gives: error: 'struct Creature::emotion' is inaccessible error: within this context error: invalid use of 'struct Creature::emotion' Can anyone help me? Thanks P.S. No I did not forget the #includes

    Read the article

  • Polling Functionality inside profile page and users wall in Facebook

    - by Pankaj Khurana
    Hi, I have visited page "http://www.facebook.com/FamilyGuy". They are providing poll features on their wall. There are radio buttons with some options. If i click on a particular option the response is shown in the form of graph their only. There is another way also . If i click on become a fan. Then this form is posted on my wall. From their i can vote and graph is generated similarly to previous procedure. I want to know how it is done. Thanks

    Read the article

  • Change Label Control Property Based on Data from SqlDataSource Inside a Repeater

    - by Furqan Muhammad Khan
    I am using a repeater control to populate data from SqlDataSource into my custom designed display-box. <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" OnDataBinding="Repeater_ItemDataBound"> <HeaderTemplate> </HeaderTemplate> <ItemTemplate> <div class="bubble-content"> <div style="float: left;"> <h2 class="bubble-content-title"><%# Eval("CommentTitle") %></h2> </div> <div style="text-align: right;"> <asp:Label ID="lbl_category" runat="server" Text=""><%# Eval("CommentType") %> </asp:Label> </div> <div style="float: left;"> <p><%# Eval("CommentContent") %></p> </div> </div> </ItemTemplate> <FooterTemplate> </FooterTemplate> </asp:Repeater> <asp:SqlDataSource ID="mySqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:myConnectionString %>" SelectCommand="SELECT [CommentTitle],[CommentType],[CommentContent] FROM [Comments] WHERE ([PostId] = @PostId)"> <SelectParameters> <asp:QueryStringParameter Name="PostId" QueryStringField="id" Type="String" /> </SelectParameters> </asp:SqlDataSource> Now, there can be three types of "CommentTypes" in the database. I want to change the CssClass property of "lbl_category" based on the value of [CommentType]. I tried doing this: <asp:Label ID="lbl_category" runat="server" CssClass="<%# Eval("CommentType") %>" Text=""><%# Eval("CommentType") %></asp:Label> But this gives an error: "The server control is not well formed" and haven't been able to find a way to achieve this in the code behind. Can someone please help?

    Read the article

  • track the content inside an iframe using google analytics

    - by nitish
    I have used tons of iframes of my clients websites in the microsites that i have created for them. the max i can track is someone moved the mouse over the iframe. Is it possible to track the way that i track any other webpage with in my website. I heard it from my jackass colleague that it can be done. is it really possible? If so can you please help me?

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >