Search Results

Search found 5586 results on 224 pages for 'global illumination'.

Page 148/224 | < Previous Page | 144 145 146 147 148 149 150 151 152 153 154 155  | Next Page >

  • jQuery append css link to iframe head

    - by Micharch54
    I'm trying to append a css file to an iframe that is created on a page from a global script. I can access part of it, but for some reason I can't append to the head. It's not throwing errors either, which is frustrating. <script type="text/javascript"> $(document).ready(function() { $('#outline_text_ifr') .contents() .find('head') .append('<link type="text/css" rel="stylesheet" href="/include/outline.css" media="all" />'); }); </script>

    Read the article

  • Bind nic to VM on VMware ESXi 5

    - by lewis
    I have physical server with 2 Broadcom NIC's. First NIC connected to local network, via this connection we can: Connect to ESXi hypervisor (hypervisor has local ip, e.g. 192.168.1.5) Connect to VM on this hypervisor (VM has network adapter, with local ip, e.g. 192.168.1.6) Second NIC connected to "global" network. Via second link(and public IP), we can have access to VM from Internet. How I may setup VM to use second NIC's connection?

    Read the article

  • How to define an angular directive inside an angular directive's link function?

    - by user2316667
    I want to create an angular directive inside of a link function, however; the directive created is not able to be compiled. See this JSFiddle: http://jsfiddle.net/v47uvsj5/5/ Uncommenting this directive in the global space works as expected. app.directive('test', function () { return { templateUrl: 'myform', // wraps script tag with id 'myform' restrict: 'E', require: "^mydir", replace: true, scope: { }, link: function (scope, element, attrs, mydirCtrl) { scope.remove = function () { element.remove(); mydirCtrl.remove(); } } } }); But the exact same code inside the link function fails. The reason I want to do this is because I want the user (who is going to be myself) to be able to provide only a script tag's id via an id attribute to my main directive which will in turn create a 'wrapper' directive with a 'remove' method. This way, in the script tag, all one needs to do is implement the 'remove'.

    Read the article

  • Best way to implement a data structure in PHP ?

    - by Double Gras
    Hi, I want to use some kind of data structure in PHP (5.2), mainly in order to not pollute the global namespace. I think about two approaches, using an array or a class. Could you tell me which approach is better ? Thanks $SQL_PARAMETERS = array ( 'server' => '127.0.0.1', 'login' => 'root'); class SqlParameters { const SERVER = '127.0.0.1'; const LOGIN = 'root'; } echo $SQL_PARAMETERS['server']; echo SqlParameters::SERVER;

    Read the article

  • How to use personalized urls in asp.net mvc application.

    - by Bootcamp
    I am working on a website in which many users can create their account and have a personalized page. I wish to provide them a twitter like url to access their pages, for example www.mysite.com/smith or www.mysite.com/john . I am using asp.net mvc 1.0. I have an understand that i can add routes to the global.asax file, but i am not able to figure out how to add a route that will work for such urls. Please provide some help / suggestions. Thanks.

    Read the article

  • globally get any field value in user table of logged in user

    - by Jugga
    Im making a gaming community and i wanna be able to grab any info of the user on any page without so instead of having much of queries on all pages i made this function. Is it better to do this? Will this slow down the site? /** * ??????? ???????? ?? ????? ??????? authed ?????????????. */ function UserData($f) { global $_SESSION; return mysql_result(mysql_query("SELECT `$f` FROM `users` WHERE `id` = ".intval($_SESSION['id'])), 0, $f); }

    Read the article

  • Where do I put constants file for Codeigniter (PHP)?

    - by wag2639
    I have a list of constants (I'm using them as an enum), some are define statements, and some are just global variables. Where am I suppose to put them in the MVC framework so I can use them for both my model and my controller that needs to reference it? I'd rather not stick it into config/constants.php since they shouldn't be called except for by this model and the controllers that use it. Edit 1: Clarification To be more specific, I have my message_model model and it has a bunch of constants that I need that are stored in message_model_constants.php. Where should I put message_model_constants.php and is there a way to have it automatically included by the controller that loads message_model when message_model is not (and I don't want it to be) auto-loaded. Edit 2: I really don't want to have the constants auto-loaded except for when I use the model

    Read the article

  • php include not working on IE?

    - by janoChen
    This include is not working in IE: <?php include_once 'localization.php'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Global Colleague</title> <link href="css/style.css" rel="stylesheet" type="text/css"/><!--Start Kampyle Exit-Popup Code--> <script type="text/javascript"> Calling an array inside localization.php <?php echo l('content_p3'); ?>

    Read the article

  • Are memory leaks ever ok?

    - by Imbue
    Is it ever acceptable to have a memory leak in your C or C++ application? What if you allocate some memory and use it until the very last line of code in your application (for example, a global object's deconstructor)? As long as the memory consumption doesn't grow over time, is it OK to trust the OS to free your memory for you when your application terminates (on Windows, Mac, and Linux)? Would you even consider this a real memory leak if the memory was being used continuously until it was freed by the OS. What if a third party library forced this situation on you? Would refuse to use that third party library no matter how great it otherwise might be? I only see one practical disadvantage, and that is that these benign leaks will show up with memory leak detection tools as false positives.

    Read the article

  • Application wide messaging... without singletons?

    - by StormianRootSolver
    So, I want to go for a more Singleton - less design in the future. However, there seem to be a lot of tasks in an application that can't be done in meaningful way without singletons. I call them "application wide services", but they also fall into the same category as the cross cutting concerns, which I usually fix via AOP. Lets take an example: I want an application wide message queue that dispatches messages to components, every component can subscribe and publish there, it's a very nice multicast thing. The message queue and dispatching system are usually a (rather short) singleton class, which is very easy to implement in, say, C#. You can even use double dispatching and utilize message type metadata and the like, it's all so easy to do, it's almost trivial. However, having singletons is not really "object oriented design" (it introduces global variables) and it makes testing harder. Do you have any ideas? I'm asking this question because I'm willing to learn more about this topic, a LOT more. :-)

    Read the article

  • AppDomain assemblies not being loaded correctly.

    - by SharePoint Newbie
    Hi, We are doing the following in the Application_Start (Global.ascx.cs) for a WCF Service hosted by IIS 7.0 (integrated pipeline). var mapperConfigurations = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(a => a.GetExportedTypes().Where(t => typeof (IMapperConfiguration).IsAssignableFrom(t) && t.IsClass)) .ToList(); The web-service has 8-10 assemblies in its bin folder and each of them have multiple implementations of IMapperConfiguration. After an IIS Reset, no mapper configurations are found (found this using debug.write). However, this behaviour is inconsistent and at other times all implementations of IMapperConfiguration are found. When exactly does IIS load assemblies and what is wrong with this code? Thanks

    Read the article

  • Can we use Resource Expressions in javascript and other parts except Literal?

    - by balexandre
    The Literal control works all the time <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:ErrorMessages, errorCompanyNotFound %>" /> But if I want to use this as a parameter in an image, like <img src="blahblah" alt="" title"<%$ Resources:ErrorMessages, errorCompanyNotFound %>" /> It gives the annoying error Literal expressions like '' are not allowed. Use instead. Same happens if I try to access it through Javascript var noHit = '<%$ Resources:ErrorMessages, errorCompanyNotFound %>'; Does anyone had any idea how can I fetch the Global Resource value under this circumstances?

    Read the article

  • Zend Namespace - Check if Session Exists

    - by Vincent
    All, I am using Zend Framework and Zend_Session to do global session management for my application. I plan to clear all sessions on logout and hence am using the following code: if($this->sessionExists()) { $this->destroy(); } But it seems like it's not doing a good job.. I am getting an error: PHP Warning: session_destroy() [<a href='function.session-destroy'> function.session-destroy</a>]: Trying to destroy uninitialized session How can I get rid of this error? Is there an alternative to sessionExists()?

    Read the article

  • Please help me understand this PHP script.Noob here

    - by NissGTR
    I'm learning PHP,MySQL and came across this function today function get_director($director_id) { global $db; $query = 'SELECT people_fullname FROM people WHERE people_id = ' . $director_id; $result = mysql_query($query, $db) or die(mysql_error($db)); $row = mysql_fetch_assoc($result); extract($row); return $people_fullname; } I understand what functions are and I've created a few while learning PHP.But this one is a bit more complicated.I can't understand the WHERE people_id = ' . $director_id I'm new to MySQL.I guess the single quote ends the MySQL statement?And then it is concatenated with the argument? Please help me out.

    Read the article

  • Is there anything wrong with taking immediate actions in constructors?

    - by pestaa
    I have classes like this one: class SomeObject { public function __construct($param1, $param2) { $this->process($param1, $param2); } ... } So I can instantly "call" it as some sort of global function just like new SomeObject($arg1, $arg2); which has the benefits of staying concise, being easy to understand, but might break unwritten rules of semantics by not waiting till a method is called. Should I continue to feel bad because of a bad practice, or there's really nothing to worry about? Clarification: I do want an instance of the class. I do use internal methods of the class only. I initialize the object in the constructor, but call the "important" action-taker methods too. I am selfish in the light of these sentences.

    Read the article

  • Querying associated images in one table after querying products from another

    - by Andy
    I used this code to connect to a database and fetch results. This worked perfectly until i tried to work in another query to the images table to get associated images. I'm not very experienced with OO programming. So hopefully someone can see where ive gone wrong and help me out. <?php global $__CMS_CONN__; $sql = "SELECT * FROM ecom_products"; $stmt = $__CMS_CONN__->prepare($sql); $stmt->execute(array($id)); while ($row = $stmt->fetchObject()) { $imagesql = "SELECT * FROM ecom_product_images where id = $row->id && where primaryImage = '1'"; $imagestmt = $__CMS_CONN__->prepare($sql); $imagestmt->execute(array($id)); $imageName = $imagestmt->fetchObject(); echo '<a href="'.URL_PUBLIC.$row->id.'">'.$row->productNm.'</a>'.$imageName; } ?>

    Read the article

  • Oracle global_names DELETE problem

    - by jyzuz
    I'm using a database link to execute a DELETE statement on another DB, but the DB link name doesn't conform to global naming, and this requirement cannot change. Also I have global_names set to false, and cannot be changed either. When I try to use these links however, I receive: ORA-02069: - global_names parameter must be set to TRUE for this operation Cause: A remote mapping of the statement is required but cannot be achieved because GLOBAL_NAMES should be set to TRUE for it to be achieved. - Action: Issue `ALTER SESSION SET GLOBAL_NAMES = TRUE` (if possible) What is the alternative action when setting global_names=true is not possible? Cheers, Jean

    Read the article

  • How can I declare a pointer structure using {}?

    - by Y_Y
    This probably is one of the easiest question ever in C programming language... I have the following code: typedef struct node { int data; struct node * after; struct node * before; }node; struct node head = {10,&head,&head}; Is there a way I can make head to be *head [make it a pointer] and still have the availability to use '{ }' [{10,&head,&head}] to declare an instance of head and still leave it out in the global scope? For example: //not legal!!! struct node *head = {10,&head,&head};

    Read the article

  • [AS 3.0] How to use the string.match method to find multiple occurrences of the same word in a strin

    - by Steven
    In Actionscript and Adobe Flex, I'm using a pattern and regexp (with the global flag) with the string.match method and it works how I'd like except when the match returns multiple occurrences of the same word in the text. In that case, all the matches for that word point only to the index for the first occurrence of that word. For example, if the text is "cat dog cat cat cow" and the pattern is a search for cat*, the match method returns an array of three occurrences of "cat", however, they all point to only the index of the first occurrence of cat when i use indexOf on a loop through the array. I'm assuming this is just how the string.match method is (although please let me know if i'm doing something wrong or missing something!). I want to find the specific indices of every occurrence of a match, even if it is of a word that was already previously matched. I'm wondering if that is just how the string.match method is and if so, if anyone has any idea what the best way to do this would be. Thanks.

    Read the article

  • mysql to xls sheet genration problemI(getting html code along with records ,unable get column names)

    - by pmms
    <?php if($_POST['Submit']=='Generatexml') { $tblname=$_GET['genratexml']; //mysql_connect("localhost","root",""); //mysql_select_db("hitnrunf_db"); global $obj_mysql; $result = mysql_query("SELECT * FROM tbl_js_login"); while($row = mysql_fetch_array($result)) { $csv_output .= "$row[fld_id],$row[fld_fname],$row[fld_lname]"; $csv_output .="\015\012"; } header("Content-type: application/vnd.ms-excel"); header("Content-disposition: csv; filename= Student_Data_". date("Y-m-d") . ".csv"); print $csv_output; exit; } include_once $path."includes/jobseeker_form.php"; ?> In the above we are getting html code along wtih id, firstname, lastname columns. we are unable to get the heading of the columns also How to remove Html code from xls file also need to get headers

    Read the article

  • Store data in Ruby on Rails without Database

    - by snowmaninthesun
    I have a few data values that I need to store on my rails app and wanted to know if there are any alternatives to creating a database table just to do this simple task. Background: I'm writing some analytics and dashboard tools for my ruby on rails app and i'm hoping to speed up the dashboard by caching results that will never change. Right now I pull all users for the last 30 days, and re arange them so I can see the number of new users per day. It works great but takes quite a long time, in reality I should only need to calculate the most recent day and just store the rest of the array somewhere else. Where is the best way to store this array? Creating a database table seems a bit overkill, and i'm not sure that global variables are the correct answer. Is there a best practice for persisting data like this? If anyone has done anything like this before let me know what you did and how it turned out.

    Read the article

  • Returning std::vector by value

    - by deft_code
    It is oft said that in C++11 it is sane to return std::vector by value. In C++03 this was mostly true as RVO should optimize away the copy. But that should scared most developers away. In C++11 will a returned std::vector local variable always be moved? What if that vector is a member of a local variable instead of a local variable itself? Obviously returning a global variable will not be moved. What other cases will it not be moved?

    Read the article

  • Perl: Why does "use strict" not let me pass a parameter hash?

    - by Thariama
    I hava a perl subroutine where i would like to pass parameters as a hash (the aim is to include a css depending on the parameter 'iconsize'). I am using the call: get_function_bar_begin('iconsize' => '32'); for the subroutine get_function_bar_begin: use strict; ... sub get_function_bar_begin { my $self = shift; my %template_params = %{ shift || {} }; return $self->render_template('global/bars /tmpl_incl_function_bar_begin.html',%template_params); } Why does this yield the error message: Error executing run mode 'start': undef error - Can't use string ("iconsize") as a HASH ref while "strict refs" in use at CheckBar.pm at line 334 Am i doing something wrong here? Is there an other way to submit my data ('iconsize') as a hash?

    Read the article

  • ArithmeticException Java?

    - by KP65
    Can anyone help me find where the execption is? I can't seem to find the problem.. public void fieldChanged(Field f, int context){ //if the submit button is clicked try{ stopTime = System.currentTimeMillis(); timeTaken = stopTime - startTime; timeInSecs = ((timeTaken/1000)); speed = 45/timeInSecs; Dialog.alert("Speed of Delivery: " + speed + "mph"); } catch(ArithmeticException e){ Dialog.alert("error " + speed); e.printStackTrace(); } } startTime variable is a global variable..

    Read the article

  • php include file issue using document root

    - by nithi
    I have used the following code to get the document root. $path = get_file_dir(); function get_file_dir() { global $argv; return realpath($argv[0]); } Below code includes config.php and config.php has the $setuprun variable with a value. if((file_exists("$path/admin/config.php"))) { include_once "$path/admin/config.php"; } if($setuprun=="true") { //do some code } In my system, it takes the document root like /home/myname/myfolder and the variable $setuprun has the value and the code works perfectly. But in another user's system, it shows the following error. Notice: Undefined variable: setuprun in /usr/local/www/chat/setup.php on line 22. He is using FreeBSD 8.2 Stable with MySQL 5, PHP5 and Apache 2.2. Can anyone please help me to solve this error?

    Read the article

< Previous Page | 144 145 146 147 148 149 150 151 152 153 154 155  | Next Page >