Search Results

Search found 1064 results on 43 pages for 'eval'.

Page 11/43 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • JQuery Selector - Finding an img in a table

    - by CccTrash
    Cant seem to get the following to find the 'skull' button when the 'heart' button is clicked... Here is the JQuery... $(".voteup").click(function() { var id = $(this).attr("title"); var userID = $('[id$=HiddenFieldUserID]').val(); var ipAddress = $('[id$=HiddenFieldIPAddress]').val(); var skullButton = $(this).parent().siblings(".votedowntd").children("votedown"); registerUpVote("up", id, $(this), skullButton, userID, ipAddress); }); And the HTML... <table width="200px"> <td width="35px" class="votedowntd"> <img src='<%# (bool)Eval("skull") ? "images/skull.png" : "images/skull-bw.png" %>' alt="Vote Down" class="votedown" title='<%# Eval("entry.ID") %>' /> </td> <td width="130px" style="text-align: center;"> Num Votes Goes Here </td> <td width="35px" class="voteuptd"> <img src='<%# (bool)Eval("heart") ? "images/heart.png" : "images/heart-bw.png" %>' alt="Vote Up" class="voteup" title='<%# Eval("entry.ID") %>' /> </td> <tr> </tr> </table> So basically what I need to do is when one img is clicked, I need to find the other one. Why is what I have not working? Is there a better way to do this?

    Read the article

  • exception in thread "main" java.lang.NoclassDefFoundError: cal/class

    - by Gaurav
    enter import java.io.*; class eval { double add(double a,double b) { return (a+b); } double sub(double a,double b) { return (a-b); } double mul(double a,double b) { return (a*b); } double div(double a,double b) { return (a/b); } } class cal extends eval { public static void main(String args[])throws IOException { eval a1=new eval(); try{ System.out.println("1) Add"); System.out.println("2) Subtract"); System.out.println("3) Multiply"); System.out.println("4) Divide"); System.out.println("5) Enter your choice"); BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int ch;ch=Integer.parseInt(br.readLine()); System.out.println("Enter two number"); double a;a=Integer.parseInt(br.readLine()); double b;b=Integer.parseInt(br.readLine()); switch(ch) { case 1: a1.add(a,b); break; case 2: a1.sub(a,b); break; case 3: a1.mul(a,b); break; case 4: a1.div(a,b); break; } } catch (IOException e) { System.out.println("Error occured, please restart application."); } } }

    Read the article

  • How to set image Tag URLs programmatically in ASP.NET C# inside of a ListView Control?

    - by loyalpenguin
    Hi, I know how you can set an tag's url attribute programmatically in c#, but it seems when I try to access the image element inside of a tag I cannot access it. The is residing in the . NOTE: I am only having this issue inside the Now the ListView tag is also databound.(this is probably why I cannot access, because it isn't guaranteed that it will even exist perhaps). How can I get around this so that I can display my images programmatically or is there a better solution? Here's the source: <asp:ListView ID="ListView_Comments" runat="server" DataKeyNames="ReviewID,ProductID,Rating" DataSourceID="EDS_CommentsList"> <ItemTemplate> <tr style="background-color:#EDECB3;color: #000000;"> <td><%# Eval("CustomerName") %></td> <td> <img src='Styles/Images/ReviewRating_d<%# Eval("Rating") %>.gif' alt=""> <br /> </td> <td> <%# Eval("Comments") %> </td> </tr> </ItemTemplate> <AlternatingItemTemplate> <tr style="background-color:#F8F8F8;"> <td><%# Eval("CustomerName") %></td> <td> <img id="rateImage" src="" alt="" runat="server" /> ......

    Read the article

  • Changing property of ItemTemplate controls in ListView

    - by arturito
    I have ListView containig LinkButtons in ItemTemplate. ListView is inside UpdatePanel so it is not doing page refresh. When users click on one the LinkButtons it changes its css property in order to mark the selection: protected void ListView1_ItemCommand1(object sender, ListViewCommandEventArgs e) { ((LinkButton)e.CommandSource).CssClass = "selected"; } That allows multiple selections. But once the page is refreshed the selection disappears, meaning that css property of control goes back to default. <ItemTemplate> <asp:LinkButton ID="local" Text='<%#Eval("Local.Name")%>' runat="server" CommandName="selectLocal" CommandArgument='<%#Eval("Local.Id") %>' CssClass="notSelected" > </asp:LinkButton> <asp:LinkButton ID="guest" Text='<%#Eval("Guest.Name")%>' runat="server" CommandName="selectGuest" CommandArgument='<%#Eval("Guest.Id") %>' CssClass="notSelected" > </asp:LinkButton> </ItemTemplate> How can I select them programatically on page reload? (I'm mainating selection list in session)

    Read the article

  • Creating a three level ASP.NET menu with SiteMap, how do i do it?

    - by user270399
    I want to create a three level menu, I have got a recursive function today that works with three levels. But the thing is how do i output the third lever? Using two repeaters i have managed to get a hold of the first two levels through the ChildNodes property. But that only gives me the second level. What if a want the third level? Example code below. How do i get the third level? :) <asp:Repeater ID="FirstLevel" DataSourceID="SiteMapDataSource" runat="server" EnableViewState="false"> <ItemTemplate> <li class="top"> <a href='/About/<%#Eval("Title")%>.aspx' class="top_link"><span class="down"><%#Eval("Title")%></span><!--[if gte IE 7]><!--></a><!--<![endif]--> <asp:Repeater runat="server" ID="SecondLevel" DataSource='<%#((SiteMapNode)Container.DataItem).ChildNodes%>'> <HeaderTemplate><!--[if lte IE 6]><table><tr><td><![endif]--><ul class="sub"></HeaderTemplate> <ItemTemplate> <li> <a href='<%#((string)Eval("Url")).Replace("~", "")%>' style="text-align: left;"><%#Eval("Title")%></a> Third repeater here? </li> </ItemTemplate> <FooterTemplate></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></FooterTemplate> </asp:Repeater> </li> </ItemTemplate> </asp:Repeater>

    Read the article

  • How do I get 2-way data binding to work for nested asp.net Repeater controls

    - by jimblanchard
    I have the following (trimmed) markup: <asp:Repeater ID="CostCategoryRepeater" runat="server"> <ItemTemplate> <div class="costCategory"> <asp:Repeater ID="CostRepeater" runat="server" DataSource='<%# Eval("Costs")%>'> <ItemTemplate> <tr class="oddCostRows"> <td class="costItemTextRight"><span><%# Eval("Variance", "{0:c0}")%></span></td> <td class="costItemTextRight"><input id="SupplementAmount" class="costEntryRight" type="text" value='<%# Bind("SupplementAmount")%>' runat="server" /></td> </tr> </ItemTemplate> </asp:Repeater> </div> </ItemTemplate> </asp:Repeater> The outer repeater's DataSource is set in the code-beside. I've snipped them, but there are Eval statements that wire up to the properties in the outer Repeater. Anyway, one of the fields in the inner Repeater needs to be a Bind instead of an Eval, as I want to get the values that the user types in. The SupplementAmount input element correctly receives it's value when the page loads, but on the other side, when I inspect the contents of the Costs List when the form posts back, the changes the user made aren't present. Thanks.

    Read the article

  • Out-of-memory algorithms for addressing large arrays

    - by reve_etrange
    I am trying to deal with a very large dataset. I have k = ~4200 matrices (varying sizes) which must be compared combinatorially, skipping non-unique and self comparisons. Each of k(k-1)/2 comparisons produces a matrix, which must be indexed against its parents (i.e. can find out where it came from). The convenient way to do this is to (triangularly) fill a k-by-k cell array with the result of each comparison. These are ~100 X ~100 matrices, on average. Using single precision floats, it works out to 400 GB overall. I need to 1) generate the cell array or pieces of it without trying to place the whole thing in memory and 2) access its elements (and their elements) in like fashion. My attempts have been inefficient due to reliance on MATLAB's eval() as well as save and clear occurring in loops. for i=1:k [~,m] = size(data{i}); cur_var = ['H' int2str(i)]; %# if i == 1; save('FileName'); end; %# If using a single MAT file and need to create it. eval([cur_var ' = cell(1,k-i);']); for j=i+1:k [~,n] = size(data{j}); eval([cur_var '{i,j} = zeros(m,n,''single'');']); eval([cur_var '{i,j} = compare(data{i},data{j});']); end save(cur_var,cur_var); %# Add '-append' when using a single MAT file. clear(cur_var); end The other thing I have done is to perform the split when mod((i+j-1)/2,max(factor(k(k-1)/2))) == 0. This divides the result into the largest number of same-size pieces, which seems logical. The indexing is a little more complicated, but not too bad because a linear index could be used. Does anyone know/see a better way?

    Read the article

  • page variable in a repeater

    - by carrot_programmer_3
    Hi I'm having a bit of an issue with a asp.net repeater I'm building a categories carousel with the dynamic categories being output by a repeater. Each item is a LinkButton control that passes an argument of the category id to the onItemClick handler. a page variable is set by this handler to track what the selected category id is.... public String SelectedID { get { object o = this.ViewState["_SelectedID"]; if (o == null) return "-1"; else return (String)o; } set { this.ViewState["_SelectedID"] = value; } } problem is that i cant seem to read this value while iterating through the repeater as follows... <asp:Repeater ID="categoriesCarouselRepeater" runat="server" onitemcommand="categoriesCarouselRepeater_ItemCommand"> <ItemTemplate> <%#Convert.ToInt32(Eval("CategoryID")) == Convert.ToInt32(SelectedID) ? "<div class=\"selectedcategory\">":"<div>"%> <asp:LinkButton ID="LinkButton1" CommandName="select_category" CommandArgument='<%#Eval("CategoryID")%>' runat="server"><img src="<%#Eval("imageSource")%>" alt="category" /><br /> </div> </ItemTemplate> </asp:Repeater> calling <%=SelectedID%> in the item template works but when i try the following expression the value of SelectedID returns empty.. <%#Convert.ToInt32(Eval("CategoryID")) == Convert.ToInt32(SelectedID) ? "match" : "not a match"%> the value is being set as follows... protected void categoriesCarouselRepeater_ItemCommand(object source, RepeaterCommandEventArgs e) { SelectedID = e.CommandArgument); } Any ideas whats wrong here?

    Read the article

  • Efficient way to remove empty lists from lists without evaluating held expressions?

    - by Alexey Popkov
    In previous thread an efficient way to remove empty lists ({}) from lists was suggested: Replace[expr, x_List :> DeleteCases[x, {}], {0, Infinity}] Using the Trott-Strzebonski in-place evaluation technique this method can be generalized for working also with held expressions: f1[expr_] := Replace[expr, x_List :> With[{eval = DeleteCases[x, {}]}, eval /; True], {0, Infinity}] This solution is more efficient than the one based on ReplaceRepeated: f2[expr_] := expr //. {left___, {}, right___} :> {left, right} But it has one disadvantage: it evaluates held expressions if they are wrapped by List: In[20]:= f1[Hold[{{}, 1 + 1}]] Out[20]= Hold[{2}] So my question is: what is the most efficient way to remove all empty lists ({}) from lists without evaluating held expressions? The empty List[] object should be removed only if it is an element of another List itself. Here are some timings: In[76]:= expr = Tuples[Tuples[{{}, {}}, 3], 4]; First@Timing[#[expr]] & /@ {f1, f2, f3} pl = Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}]; First@Timing[#[pl]] & /@ {f1, f2, f3} Out[77]= {0.581, 0.901, 5.027} Out[78]= {0.12, 0.21, 0.18} Definitions: Clear[f1, f2, f3]; f3[expr_] := FixedPoint[ Function[e, Replace[e, {a___, {}, b___} :> {a, b}, {0, Infinity}]], expr]; f1[expr_] := Replace[expr, x_List :> With[{eval = DeleteCases[x, {}]}, eval /; True], {0, Infinity}]; f2[expr_] := expr //. {left___, {}, right___} :> {left, right};

    Read the article

  • Better code for accessing fields in a matlab structure array?

    - by John
    I have a matlab structure array Modles1 of size (1x180) that has fields a, b, c, ..., z. I want to understand how many distinct values there are in each of the fields. i.e. max(grp2idx([foo(:).a])) The above works if the field a is a double. {foo(:).a} needs to be used in the case where the field a is a string/char. Here's my current code for doing this. I hate having to use the eval, and what is essentially a switch statement. Is there a better way? names = fieldnames(Models1); for ix = 1 : numel(names) className = eval(['class(Models1(1).',names{ix},')']); if strcmp('double', className) || strcmp('logical',className) eval([' values = [Models1(:).',names{ix},'];']); elseif strcmp('char', className) eval([' values = {Models1(:).',names{ix},'};']); else disp(['Unrecognized class: ', className]); end % this line requires the statistics toolbox. [g, gn, gl] = grp2idx(values); fprintf('%30s : %4d\n',names{ix},max(g)); end

    Read the article

  • Problem in homemade function to merge objects

    - by Eric
    I'm trying to make a function that merges arrays. The reason is, I have a function that supposed to get the settings of an entity, and merge them with the global defaults. //So for example, let's say globalOptions is something like this var globalOptions={opt1:'foo',opt2:'something'}; //and this is entityOptions var entityOptions={opt1:'foofoo',opt2:null}; The only difference is it has objects in objects and objects in objects in objects, so what I made was a function that loops through all objects, thinking I would later, easily be able to loop through it all. Please ignore the array thing. That is defected, but unneeded. function loopObj(obj, call, where, objcall, array) { if ($.isArray(obj) || $.isPlainObject(obj)) { for (i in obj) { if ($.isArray(obj)) { if (array) { loopObj(obj[i], call, where[where.length] = i, true); if (objcall) { call(obj[i],where,true); } } else { loopObj(obj[i], call, where+'['+i+']', false); if (objcall) { call(obj[i],where,true); } } } else { if (array) { loopObj(obj[i], call, where[where.length] = parseInt(i), true); if (objcall) { call(obj[i],where,true); } } else { loopObj(obj[i], call, where+'[\''+i+'\']', false); if (objcall) { call(obj[i],where,true); } } } } } else { return call(obj,where); } } Then I made this program to convert it: function mergeObj(a,b) { temp.retd = new Object(); loopObj(a,function (c,d) { if (c) { eval(d.replace('%par%','temp.retd'))=c; } else { eval(d.replace('%par%','temp.retd'))=eval(d.replace('%par%','b')); } },'%par%', true); return temp.retd(); } I get the error: Uncaught ReferenceError: Invalid left-hand side in assignment (anonymous function)base.js:51 loopObjbase.js:40 loopObjbase.js:31 mergeObjbase.js:46 (anonymous function)base.js:72 I know what it means, the eval returns an anonomys variable (copy of the variable), so I can't set it, only get it.

    Read the article

  • Google Maps API Geocode gives error "Invalid label" in Firefox

    - by Bennystijn
    Today I struggled with the following: $.ajax({url:'http://maps.google.com/maps/api/geocode/jsonaddress=Karachi&sensor=false&output=json&callback=?', dataType: 'json', success: function(data){ //eval("("+data+")"); alert(data); } }); Firefox gives the error "Invalid Label" and Chrome "Uncaught SyntaxError: Unexpected token :". I found a lot of posts about this, and I tried all kinds of things like eval(), but also: $.getJSON('http://maps.google.com/maps/api/geocode/jsonaddress=Karachi&sensor=false&output=json&callback=?', function(data){ //eval("("+data+")"); alert(data); } ); Same result. Also, other json data works fine, for instance flickr ("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?). So it has something to do with the Google Maps API output i guess.. Thanks in advance.

    Read the article

  • problem with sqldatasource and data binding

    - by Alexander
    I am trying to pull out data from the table I had from the database according to the id which is passed from the URL. However I always get data from id= 1? Why? FYI I took this code directly from the ClubWebsite starter kit and copy and paste it to my project to make several changes, the ClubWebsite one worked fine.. but this one doesn't and can't find any reason why because they both looked exactly the same. <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Events_View.aspx.cs" Inherits="Events_View" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="splash" Runat="Server"> <div id="splash4">&nbsp;</div> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div id="content"> <div class="post"> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ClubDatabase %>" SelectCommand="SELECT dbo.Events.id, dbo.Events.starttime, dbo.events.endtime, dbo.Events.title, dbo.Events.description, dbo.Events.staticURL, dbo.Events.address FROM dbo.Events"> <SelectParameters> <asp:Parameter Type="Int32" DefaultValue="1" Name="id"></asp:Parameter> </SelectParameters> </asp:SqlDataSource> <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" DataKeyNames="id" AllowPaging="false" Width="100%"> <ItemTemplate> <h2> <asp:Label Text='<%# Eval("title") %>' runat="server" ID="titleLabel" /> </h2> <div> <br /> <p> <asp:Label Text='<%# Eval("address") %>' runat="server" ID="addressLabel" /> </p> <p> <asp:Label Text='<%# Eval("starttime","{0:D}") %>' runat="server" ID="itemdateLabel" /> <br /> <asp:Label Text='<%# ShowDuration(Eval("starttime"),Eval("endtime")) %>' runat="server" ID="Label1" /> </p> </div> <p> <asp:Label Text='<%# Eval("description") %>' runat="server" ID="descriptionLabel" /> </p> </ItemTemplate> </asp:FormView> <div class="dashedline"> </div> </div> </div> </asp:Content> using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Configuration; using System.Data; public partial class Events_View : System.Web.UI.Page { const int INVALIDID = -1; protected void Page_Load(object sender, System.EventArgs e) { SqlDataSource1.SelectParameters["id"].DefaultValue = System.Convert.ToString(EventID); } public int EventID { get { int m_EventID; object id = ViewState["EventID"]; if (id != null) { m_EventID = (int)id; } else { id = Request.QueryString["EventID"]; if (id != null) { m_EventID = System.Convert.ToInt32(id); } else { m_EventID = 1; } ViewState["EventID"] = m_EventID; } return m_EventID; } set { ViewState["EventID"] = value; } } protected void FormView1_DataBound(object sender, System.EventArgs e) { DataRowView view = (DataRowView)(FormView1.DataItem); object o = view["staticURL"]; if (o != null && o != DBNull.Value) { string staticurl = (string)o; if (staticurl != "") { Response.Redirect(staticurl); } } } protected string ShowLocationLink(object locationname, object id) { if (id != null && id != DBNull.Value) { return "At <a href='Locations_view.aspx?LocationID=" + Convert.ToString(id) + "'>" + (string)locationname + "</a><br/>"; } else { return ""; } } protected string ShowDuration(object starttime, object endtime) { DateTime starttimeDT = (DateTime)starttime; if (endtime != null && endtime != DBNull.Value) { DateTime endtimeDT = (DateTime)endtime; if (starttimeDT.Date == endtimeDT.Date) { if (starttimeDT == endtimeDT) { return starttimeDT.ToString("h:mm tt"); } else { return starttimeDT.ToString("h:mm tt") + " - " + endtimeDT.ToString("h:mm tt"); } } else { return "thru " + endtimeDT.ToString("M/d/yy"); } } else { return starttimeDT.ToString("h:mm tt"); } } }

    Read the article

  • Error "window" is not defined when loading Protovis from javax.script?

    - by Shane
    I am loading Protovis using javax.script: ScriptEngineManager factory = new ScriptEngineManager(); ScriptEngine engine = factory.getEngineByName(scriptEngine); engine.eval(new java.io.FileReader("protovis-d3.1.js")); But I get the following exception: Exception in thread "main" javax.script.ScriptException: sun.org.mozilla.javascr ipt.internal.EcmaError: ReferenceError: "window" is not defined. (<Unknown sourc e>#5033) in <Unknown source> at line number 5033 at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source) at javax.script.AbstractScriptEngine.eval(Unknown Source) at RJScript.EvalScript(RJScript.java:20) at RJScript.main(RJScript.java:26) This same script runs from a browser. Do I need to do something so that the "window" is defined?

    Read the article

  • Given a string describing a Javascript function. convert it to a Javascript function

    - by brainjam
    Say I've got a Javascript string like the following var fnStr = "function(){blah1;blah2;blah3; }" ; (This may be from an expression the user has typed in, duly sanitized, or it may be the result of some symbolic computation. It really doesn't matter). I want to define fn as if the following line was in my code: var fn = function(){blah1;blah2;blah3; } ; How do I do that? The best I've come up with is the following: var fn = eval("var f = function(){ return "+fnStr+";}; f() ;") ; This seems to do the trick, even though it uses the dreaded eval(), and uses a slightly convoluted argument. Can I do better? I.e. either not use eval(), or supply it with a simpler argument?

    Read the article

  • IIS log analysis - how to retrieve referer information

    - by balalakshmi
    Per this documentation http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/676400bc-8969-4aa7-851a-9319490a9bbb.mspx?mfr=true , it says cs(Referrer) contains the referer information that can be read from the IIS log I am trying to display the log information using a asp.net repeater control: <asp:Repeater ID="rptlIISLogEntries" runat="server"> ... ... <ItemTemplate> <tr> <td><%# Eval("time")%></td> <td><%# Eval("cs(Referrer)")%></td> Eval("cs(Referrer)" throws an error DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'cs'. my Question: how to display the referer information in the repeater

    Read the article

  • Handling pointer while updating a key value in rpgle

    - by abhinav singh
    my code goes like this femp uf e k disk dvar1 s 5p 0 c *loval setll emp c read emp c dow not %eof(emp) C eval ecode = ecode + 10 c eval var1=ecode c update recemp c var1 setgt emp c read emp c enddo c eval *inlr=*on here is a file named emp with record format name recemp with ecode as the key ...now when i am reading the file and then updating the ecode without using setgt ..the pointer is not moving ahead it is updating the same ecode value many time ...now when i use set gt pointer picks the next record but it dint work when two ecode values are same ...else also it will not be working with descending key values...is there any solution so that i can set pointer regardless of the fact whether the values are same or ascending or descending .......thanks

    Read the article

  • Drools Rules: How can I use a method on "when" section?

    - by manoelhc
    Hi, I need to execute a method on "when" section of a DSLR file and I´m not sure if it´s possible. Example: rule "WNPRules_10" when $reminder:Reminder(source == "HMI") $user:User(isInAgeRange("30-100")==true) Reminder(clickPercentual >= 10) User(haveAtLeastOptIns("1,2,3,4") == true) then $reminder.setPriority(1);update($reminder); end (note: isInAgeRange() and haveAtLeastOptIns() are methods of User) I tried with eval() and no errors appeared, but it didn´t execute. Like this: rule "WNPRules_10" when $reminder:Reminder(source == "HMI") $user:User(eval($user.isInAgeRange("30-100")==true)) Reminder(clickPercentual >= 10) User(eval($user.haveAtLeastOptIns("1,2,3,4") == true)) then $reminder.setPriority(1);update($reminder); end How can I resolve this problem?

    Read the article

  • include_once error : failed to open stream in Boonex Dolphin v7.0.9

    - by Guillaume Pierre
    first let me say I'm a beginner in PHP, specifically PHP Object-oriented programming. I'm working on a V7.0.9 dolphin version.http://www.boonex.com/dolphin While I'm trying to include a class.php from a 3rd-part developer I work with <?php include_once ('modules/developer/configure/classes/class.php'); I get this error : Warning: include_once(modules/developer/configure/classes/ClassExample.php): failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/dolphin/inc/classes/BxDolPageView.php(612) : eval()'d code on line 2 Warning: include_once(): Failed opening 'modules/developer/configure/classes/ClassExample.php' for inclusion (include_path='.:') in /var/www/vhosts/mysite.com/httpdocs/dolphin/inc/classes/BxDolPageView.php(612) : eval()'d code on line 2 Fatal error: Class 'ClassExample' not found in /var/www/vhosts/mysite.com/httpdocs/dolphin/inc/classes/BxDolPageView.php(612) : eval()'d code on line 6 I'm trying to figure out where is the problem... does it comes from Boonex? or is it linked to my server configuration? I really don't know where to begin to resolve... Thx in advance for your kind help if you get knowledge on it

    Read the article

  • HASH reference error with HTTP::Message::decodable

    - by scarba05
    Hi, I'm getting an "Can't use an undefined value as a HASH reference" error trying to call HTTP::Message::decodable() using Perl 5.10 / libwww installed on Debian Lenny OS using the aptitude package manager. I'm really stuck so would appreciate some help please. Here's the error: Can't use an undefined value as a HASH reference at (eval 2) line 1. at test.pl line 4 main::__ANON__('Can\'t use an undefined value as a HASH reference at enter code here`(eval 2)...') called at (eval 2) line 1 HTTP::Message::__ANON__() called at test.pl line 6 Here's the code: use strict; use HTTP::Request::Common; use Carp; $SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; print HTTP::Message::decodable();

    Read the article

  • Why does HTTP::Message::decodable complain about "Can't use an undefined value as a HASH reference"?

    - by scarba05
    I'm getting a Can't use an undefined value as a HASH reference error trying to call HTTP::Message::decodable() using Perl 5.10 / libwww installed on Debian Lenny OS using the aptitude package manager. I'm really stuck so would appreciate some help please. Here's the error: Can't use an undefined value as a HASH reference at (eval 2) line 1. at test.pl line 4 main::__ANON__('Can\'t use an undefined value as a HASH reference at enter code here`(eval 2)...') called at (eval 2) line 1 HTTP::Message::__ANON__() called at test.pl line 6 Here's the code: use strict; use HTTP::Request::Common; use Carp; $SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; print HTTP::Message::decodable();

    Read the article

  • R counting the occurance of similar rows of data frame

    - by Matt
    I have data in the following format called DF (this is just a made up simplified sample): eval.num, eval.count, fitness, fitness.mean, green.h.0, green.v.0, offset.0 random 1 1 1500 1500 100 120 40 232342 2 2 1000 1250 100 120 40 11843 3 3 1250 1250 100 120 40 981340234 4 4 1000 1187.5 100 120 40 4363453 5 1 2000 2000 200 100 40 345902 6 1 3000 3000 150 90 10 943 7 1 2000 2000 90 90 100 9304358 8 2 1800 1900 90 90 100 284333 However, the eval.count column is incorrect and I need to fix it. It should report the number of rows with the same values for (green.h.0, green.v.0, and offset.0) by only looking at the previous rows. The example above uses the expected values, but assume they are incorrect. How can I add a new column (say "count") which will count all previous rows which have the same values of the specified variables? I have gotten help on a similar problem of just selecting all rows with the same values for specified columns, so I supposed I could just write a loop around that, but it seems inefficient to me.

    Read the article

  • Solving a math problem/expression, which is a string, in PHP

    - by Koning WWWWWWWWWWWWWWWWWWWWWWW
    The user can enter a math problem (expression) like 5 + 654, 6 ^ 24, 2!, sqrt(543), log(54), sin 5, sin(50). After some reformatting (e.g. change sin 5 into sin(5)), and doing an eval, PHP gives me the right result: $problem = "5 + 5324"; eval("$result = " . $problem); echo $problem . " = " . $result; However, this is quite unsafe: /* If you read this, please, plz don't be stupid and DO NOT EXECUTE this code!!!!! */ $problem = "shell_exec('rm -rf /')"; eval("$result = " . $problem); /* Nukes system */ echo $problem . " = " . $result; Can anyone point me in the right direction parsing and solving a math question like the examples above, which is safe? Thanks.

    Read the article

  • R counting the occurrences of similar rows of data frame

    - by Matt
    I have data in the following format called DF (this is just a made up simplified sample): eval.num, eval.count, fitness, fitness.mean, green.h.0, green.v.0, offset.0 random 1 1 1500 1500 100 120 40 232342 2 2 1000 1250 100 120 40 11843 3 3 1250 1250 100 120 40 981340234 4 4 1000 1187.5 100 120 40 4363453 5 1 2000 2000 200 100 40 345902 6 1 3000 3000 150 90 10 943 7 1 2000 2000 90 90 100 9304358 8 2 1800 1900 90 90 100 284333 However, the eval.count column is incorrect and I need to fix it. It should report the number of rows with the same values for (green.h.0, green.v.0, and offset.0) by only looking at the previous rows. The example above uses the expected values, but assume they are incorrect. How can I add a new column (say "count") which will count all previous rows which have the same values of the specified variables? I have gotten help on a similar problem of just selecting all rows with the same values for specified columns, so I supposed I could just write a loop around that, but it seems inefficient to me.

    Read the article

  • Unable to bind in asp.net grid Template Column

    - by OneSmartGuy
    I am having trouble accessing the data field. I receive the error: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. I can get the value but using <%# getOpenJobs((string)Eval("ParentPart")) % but I need to use it in the if to display a certian picture if it passes the condition. Is there a better way to do this or am i just missing something simple? <telerik:GridTemplateColumn UniqueName="hasOpenJobs" HeaderText=""> <ItemTemplate> <% if (getOpenJobs((string)Eval("ParentPart")) > 1) { %> <img src="../images/job-icon.gif" alt="Open Jobs" /> <%} %> </ItemTemplate> </telerik:GridTemplateColumn>

    Read the article

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