Search Results

Search found 172 results on 7 pages for 'roland schulz'.

Page 4/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Strange PHP reference bug

    - by Roland Soós
    Hello, I have a really strange bug with my PHP code. I have a recursive code which build up a menu tree with object and one of my customers server can't make it work. Contructor: function Menu(&$menus, &$keys , &$parent, &$menu){ ... if($keys === NULL){ $keys = array_keys($menus); } ... for($x = 0; $x < count($keys); $x++) { var_dump($keys); $menu = $menus[$keys[$x]]; var_dump($keys); if($this->id == $menu->pid){ $keys[$x] = NULL; $this->submenus[] = new Menu($menus, $keys, $this, $menu); } } First var_dump give me back the array, the second give back the first element of $menus. Do you have any idea what causes this? PHP version 5.2.3

    Read the article

  • JQuery timer, how do I do this

    - by Roland
    Is there anyway to implement a timer for JQuery, eg. every 10 seconds it needs to call a js function. I tried the following window.setTimeout(function() { alert('test'); }, 1000); but this only executes ones and then never again.

    Read the article

  • Detect the URI encoding automatically in Tomcat

    - by Roland Illig
    I have an instance of Apache Tomcat 6.x running, and I want it to interpret the character set of incoming URLs a little more intelligent than the default behavior. In particular, I want to achieve the following mapping: So%DFe => Soße So%C3%9Fe => Soße So%DF%C3%9F => (error) The bevavior I want could be described as "try to decode the byte stream as UTF-8, and if it doesn't work assume ISO-8859-1". Simply using the URIEncoding configuration doesn't work in that case. So how can I configure Tomcat to encode the request the way I want? I might have to write a Filter that takes the request (especially the query string) and re-encodes it into the parameters. Would that be the natural way?

    Read the article

  • Why 2 GB memory limit when running in 64 bit Windows ?

    - by Roland Bengtsson
    I'm a member in a team that develop a Delphi application. The memory requirements are huge. 500 MB is normal but in some cases it got out of memory exception. The memory allocated in that cases is typically between 1000 - 1700 MB. We of course want 64-bits compiler but that won't happen now (and if it happens we also must convert to unicode, but that is another story...). My question is why is there a 2 GB memory limit per process when running in a 64 bit environment. The pointer is 32 bit so I think 4 GB would be the right limit. I use Delphi 2007.

    Read the article

  • Ho to convert classname as string to a class ?

    - by Roland Bengtsson
    I have classnames in a stringlist. For example it could be 'TPlanEvent', 'TParcel', 'TCountry' etc. Now I want to find out the sizes by looping the list. It works to have: Size := TCountry.InstanceSize; But I want it like this: for i := 0 to ClassList.Count - 1 do Size := StringToClass(ClassList[i]).InstanceSize; Obviously my question is what to write instead of method StringToClass to convert the string to a class.

    Read the article

  • Detailed error on fopen

    - by Roland
    I'm using fopen to read from a file $fh = fopen($path, 'r') or die('Could not open file'); Now I contantly get error Could not open file. I checked the file path and even changed the permissions of the file to 777. Is there a way I can get a detailed error report as why the file can't be opened similar to mysql_error()?

    Read the article

  • IE8 (compatibility mode) won't load my Ajax content

    - by Jens Roland
    Hi all - I am working on a jQuery script on http://www.qxl.dk/ and I can't seem to get IE7 (or more accurately, IE8 in IE7 compatibility mode) to load my content. The sidebar box on the right named "QXL Aktuelt" loads its HTML content from an external file using Ajax load(), then triggers a custom jQuery event ("aktuelt_loaded") that starts a carousel script (like a scrolling newsticker). Several other content sections on the same page are loaded through Ajax and they work just fine, so I'm wondering what's going wrong. Everything works as expected in Firefox 3.6 and IE8, but not in IE8's compatibility mode. The script that loads the Ajax content is (inline on the page): <div id="qxlaktueltHolder"></div> <script type="text/javascript"> $("#qxlaktueltHolder").load("/contents/dk/modul/qxlaktuelt/qxlaktuelt.htm", function() { $("#qxlaktueltHolder").trigger("qxlaktuelt_loaded", []); }); </script> <script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/jcarousellite_1.0.1.min.js'></script> <script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/qxlaktuelt_liveload.js'></script> The external script that responds to the event is in the following file: http://www.qxl.dk/contents/dk/js/qxlaktuelt_liveload.js All ideas are very welcome.

    Read the article

  • Sending most correct mimetype

    - by Roland Franssen
    Hi all, I have a list of extension to mimetype in a INI file. However some extensions have multiple mimetypes, for example; midi[] = "application/x-midi" midi[] = "audio/midi" midi[] = "audio/x-mid" midi[] = "audio/x-midi" midi[] = "music/crescendo" midi[] = "x-music/x-midi" 6 (possible) mimetypes for 1 extension. Whats common practice to determine the correct mimetype? (e.g. i need to set a HTTP content-type header). I know its not ideal; determining mimetypes based on extension.. but i need consistent (cross-server) results (e.g. fileinfo extension in PHP is making terrible guesses*). * Some fileinfo results for example; js - text/plain css - text/c-h

    Read the article

  • Translate SQL to OCL ?

    - by Roland Bengtsson
    I have a piece of SQL that I want to translate to OCL. I'm not good at SQL so I want to increase maintainability by this. We are using Interbase 2009, Delphi 2007 with Bold and modeldriven development. Now my hope is that someone here both speaks good SQL and OCL :-) The original SQL: Select Bold_Id, MessageId, ScaniaId, MessageType, MessageTime, Cancellation, ChassieNumber, UserFriendlyFormat, ReceivingOwner, Invalidated, InvalidationReason, (Select Parcel.MCurrentStates From Parcel Where ScaniaEdiSolMessage.ReceivingOwner = Parcel.Bold_Id) as ParcelState From ScaniaEdiSolMessage Where MessageType = 'IFTMBP' and not Exists (Select * From ScaniaEdiSolMessage EdiSolMsg Where EdiSolMsg.ChassieNumber = ScaniaEdiSolMessage.ChassieNumber and EdiSolMsg.ShipFromFinland = ScaniaEdiSolMessage.ShipFromFinland and EdiSolMsg.MessageType = 'IFTMBF') and invalidated = 0 Order By MessageTime desc After a small simplification: Select Bold_Id, (Select Parcel.MCurrentStates From Parcel where ScaniaEdiSolMessage.ReceivingOwner = Parcel.Bold_Id) From ScaniaEdiSolMessage Where MessageType = 'IFTMBP' and not Exists (Select * From ScaniaEdiSolMessage EdiSolMsg Where EdiSolMsg.ChassieNumber = ScaniaEdiSolMessage.ChassieNumber and EdiSolMsg.ShipFromFinland = ScaniaEdiSolMessage.ShipFromFinland and EdiSolMsg.MessageType = 'IFTMBF') and invalidated = 0 NOTE: There are 2 cases for MessageType, 'IFTMBP' and 'IFTMBF'. So the table to be listed is ScaniaEdiSolMessage. It has attributes like: MessageType: String ChassiNumber: String ShipFromFinland: Boolean Invalidated: Boolean It has also a link to table Parcel named ReceivingOwner with BoldId as key. So it seems like it list all rows of ScaniaEdiSolMessage and then have a subquery that also list all rows of ScaniaEdiSolMessage and name it EdiSolMsg. The it exclude almost all rows. In fact the query above give one hit from 28000 records. In OCL it is easy to list all instances: ScaniaEdiSolMessage.allinstances Also easy to filter rows by select for example: ScaniaEdiSolMessage.allinstances->select(shipFromFinland and not invalidated) But I do not understand how I should make a OCL to match the SQL above.

    Read the article

  • Optimize SQL with Interbase

    - by Roland Bengtsson
    I was inspired by the good answers from my previous question about SQL. Now this SQL is run on a DB with Interbase 2009. It is about 21 GB in size. SELECT DistanceAsMeters, Bold_Id, Created, AddressFrom.CityName_CO as FromCity, AddressTo.CityName_CO as ToCity FROM AddrDistance LEFT JOIN Address AddressFrom ON AddrDistance.FromAddress = AddressFrom.Bold_Id LEFT JOIN Address AddressTo ON AddrDistance.ToAddress = AddressTo.Bold_Id Where DistanceAsMeters = 0 and PseudoDistanceAsCostKm = 0 and not AddrDistance.bold_id in (select bold_id from DistanceQueryTask) Order By Created Desc There are 840000 rows with AddrDistance 190000 rows with Address and 4 with DistanceQueryTask. The question is, can this be done faster? I guess, the same query is run many times select bold_id from DistanceQueryTask. Note that I'm not interested in stored procedures, just plain SQL :)

    Read the article

  • Calling a method within Portlet when submitting form

    - by Roland
    I have a Portlet that contains a form. Now what I want to achieve is the following. 1) A Porlet containing a form is called within a page via <?php $this->widget('form'); ?> 2) The user fills in this form and clicks on submit "The submit button should be an ajax button" 3) When submit has been pressed the form should call a method within the form portlet class and the form should be replaced with a Thank you message. 4) I only want the current view in the portlet replaced with another view. My portlet class looks like this Yii::import('zii.widgets.CPortlet'); class Polls extends CPortlet{ public $usr_id=''; public function init(){ $cs = Yii::app()->clientScript; $cs->registerCoreScript('jquery'); parent::init(); } protected function renderContent(){ $this->render('form'); } public function update(){ $this->render('thankyou'); } } } Any advise, help would be highly appreciated.

    Read the article

  • How can I share an OnEnter event for a TcxGrid ?

    - by Roland Bengtsson
    I want to standardize the behaviour on an Devexpress TcxGrid. So I have a unit ClientData with a event: procedure TClientData.grdOnEnter(Sender: TObject); begin mnuCxGridStandardMenu.Grid := TcxGrid(Sender); end; If I try to use that event from a TcxGrid.OnEnter event in another unit it refuse to work. If I paste in ClientData.grdOnEnter then a dialog says it is not an valid identifier. Is it possible to share an event for several units in Delphi 2007 ?

    Read the article

  • Replacing IFrame with div

    - by Roland
    I have a IFrame where I load in a custom search, and display the results within the iframe. The search results I obtain by calling an external url, that returns a value. I need to implement the same thing for a mobi site that works on mobile devices, and thus I need to replace the IFrame with something else. Will this be possible using a div tag, since most mobile devices do not support frames. And no javascript may be used. Any advice will be appreciated.

    Read the article

  • Mailer issue, PHP values do not change

    - by Roland
    I have a script that runs once every month and send out stats to clients, now the stats are displayed in normal text and in the shape of a Pie Graph, now if I run the script mannually from the command line all info on the graphs are correct, but when the cron job executes the script the values for the first client are displaying on the graphs of all clients. but the text is correct. I'm using domDocument to build the HTML and PHPMailer to send out the email with the Graphs embedded into the mail also use pChart to generate the Graph My code that generates the PIE graph is below include_once "pChart.1.26e/pChart/pData.class"; include_once "pChart.1.26e/pChart/pChart.class"; // Dataset definition unset($DataSet); $DataSet = new pData; $DataSet->AddPoint(array($data['total_clicks'],$remaining),"Serie1"); if($remaining < 0){ $DataSet->AddPoint(array("Clicks delivered todate","Clicks remaining = 0"),"Serie2"); }else{ $DataSet->AddPoint(array("Clicks delivered todate","Clicks remaining"),"Serie2"); } $DataSet->AddAllSeries(); $DataSet->SetAbsciseLabelSerie("Serie2"); // Initialise the graph $pie = new pChart(492,292); $pie->drawBackground(255,255,254); $pie->LineWidth = 1.1; $pie->Values = 2; // $pie->drawRoundedRectangle(5,5,375,195,5,230,230,230); //$pie->drawRectangle(0,0,480,288,169,169,169); $pie->drawRectangle(5,5,487,287,169,169,169); $pie->loadColorPalette('pChart.1.26e/color/tones-3.txt',','); // Draw the pie chart $pie->setFontProperties("pChart.1.26e/Fonts/calibrib.ttf",18); $pie->drawTitle(140,33,"Campaign Overview",0,0,0); $pie->setFontProperties("pChart.1.26e/Fonts/calibrib.ttf",11); $pie->drawTitle(343,125,"Total clicks : ".$total_clicks,0,0,0); $pie->setFontProperties("pChart.1.26e/Fonts/calibri.ttf",10); if($remaining < 0){ $pie->setFontProperties("pChart.1.26e/Fonts/calibrib.ttf",10); $pie->drawTitle(260,250,"Campaign over-delivered by ".substr($remaining,1)." clicks",205,53,53); $pie->setFontProperties("pChart.1.26e/Fonts/calibri.ttf",10); } $pie->drawPieLegend(328,140,$DataSet->GetData(),$DataSet->GetDataDescription(),255,255,255); $pie->drawPieGraph($DataSet->GetData(),$DataSet->GetDataDescription(),170,150,130,PIE_VALUE,FALSE,50,30,0); $pie->Render("generated/3dpie.png"); unset($pie); unset($DataSet); $mail->AddEmbeddedImage("/var/www/html/stats/generated/3dpie.png","5"); I just can't understand why this only happens when the cronjob runs?

    Read the article

  • Comparing 2 mysql tables and updating only records that have changed

    - by Roland
    I have the following. Two mysql tables. I want to copy info that has changed from table a to b. For example if row 1 column 2 has changed in table a I want to only update that column in table b. Table b is not the same as a but has same columns that also exist in a. The other solution I have is to just clear table b and replace it with the contents from table a, the problem with this could be that the script will take longer to execute, since there are more than 10000 records. Any advise for which method would work the best will be highly appreciated

    Read the article

  • working as expectedJQuery load function with fading effects not working as expected

    - by Roland
    I have the following scenario jQuery('#content').fadeOut('slow',function(){ jQuery('#content').load("detail.php?product="+imgID+"&category="+cat); jQuery('#content').fadeIn('fast'); }); My problem however is that all the effects happen and when the effects are done, then only the contents of the PHP file loads into content, is there a better way so that the content is not slow in loading

    Read the article

  • Automatic clicking on Link build with Javascript by using watin

    - by BEC Roland
    I am trying to be able to automate the process of clicking on links built in javascript using watin. In the source code of web page, the links look like href="#", so i think these links works with Javascript. Runscript doesn't work with a Javascript code like "link.click". When i use a "link.flash()" i can see the link flash so i'm sure the script click on the links but there is not effect ( and the script doens't crash ) . Have you any ideas for resolve this problem ?

    Read the article

  • Pure Java open-source libraries for portfolio selection (= constrained, non-linear optimization)?

    - by __roland__
    Does anyone know or has experience with a pure Java library to select portfolios or do some similar kinds of quadratic programming with constraints? There seems to be a lot of tools, as already discussed elsewhere - but what I would like to use is a pure Java implementation. Since I want to call the library from within another open-source software with a BSD-ish license I would prefer LGPL over GPL. Any help is appreciated. If you don't know such libraries, which is the most simple algorithm you would suggest to implement? It has to cope with an inequality constraint (all x_i = 0) and an equality constraint (sum of all x_i = 1).

    Read the article

  • Getting variable in iframe

    - by Roland
    I'm passing a varaible to a iframe but can't seem to access this variable via the global get variable. <iframe src="uploadContract.php?clientid={$clientid}" frameborder="0" height="95"></iframe> in uploadContract.php I try to access the variable like $_GET['clientid']; Somehow I can't seem to get the value via the Get global What am I doing wrong?

    Read the article

  • Checking for valid email addresses

    - by Roland
    I'm running a website with more than 60 000 registered users. Every week notifications are send to these users via email, now I've noticed some of the mail addresses do not exists anymore eg. the domain address is valid but the email name en asdas@ is not valid anymore since person does not work at a company anymore etc. Now I'm looping through the database and doing some regular expression checks and checking if the MX records exist with the following two functions function verify_email($email){ if(!preg_match('/^[_A-z0-9-]+((\.|\+)[_A-z0-9-]+)*@[A-z0-9-]+(\.[A-z0-9-]+)*(\.[A-z]{2,4})$/',$email)){ return false; } else { return true; } } // Our function to verify the MX records function verify_email_dns($email){ list($name, $domain) = split('@',$email); if(!checkdnsrr($domain,'MX')){ return false; } else { return true; } } If the email address is in an invalid format or the domain does not exists I delete the users account. Are there any methods I could use to check if the email address still exists or not if the domain name is valid and the email address is in the correct format? For example [email protected] does not exist anymore but test.com is a valid domain name.

    Read the article

  • Adding custom styles to ckeditor

    - by Roland
    I recently added CKEditor to my app, I'm new to CKEditor and I would like to include my own css style sheets within the editor so that I can select them within the editor. Ho do I accomplish this my code sofar looks like this <script type="text/javascript"> CKEDITOR.replace( 'editor1',{ uiColor : '#9AB8F3', }); </script>

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >