Daily Archives

Articles indexed Thursday March 11 2010

Page 19/97 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Why use Apache over NGINX/Cherokee/Lighttpd?

    - by codysoyland
    Apache has been the de facto standard web server for over a decade, but recent years have brought us web servers that consume less RAM and handle many more requests per second using fewer threads and asynchronous i/o. In my opinion, I also find the configuration of these servers to be more straightforward and minimal. Why do people use Apache when asynchronous servers are so much more lightweight? Is there any clear benefit?

    Read the article

  • Anyone know how to use TValue.AsType<TNotifyEvent> properly?

    - by Mason Wheeler
    I'm trying to use RTTI to add an event handler to a control, that may already have an event handler set. The code looks something like this: var prop: TRttiProperty; val: TValue; begin prop := FContext.GetType(MyControl.ClassInfo).GetProperty('OnChange'); val := prop.GetValue(MyControl); FOldOnChange := val.AsType<TNotifyEvent>; prop.SetValue(MyControl, TValue.From<TNotifyEvent>(self.MyOnChange)); end; I want this so I can do this in MyOnChange: begin if assigned(FOldOnChange) then FOldOnChange(Sender); //additional code here end; Unfortunately, the compiler doesn't seem to like the line FOldOnChange := val.AsType<TNotifyEvent>;. It says E2010 Incompatible types: 'procedure, untyped pointer or untyped parameter' and 'TNotifyEvent' Anyone know why that is or how to fix it? It looks right to me...

    Read the article

  • MapItemsControls not updating Silverlight Bing Map

    - by Matt
    I'm using a MapItemsControl to control my Pushpin items within my Bing silverlight map. Right on the page load, I add a new pin programatically, and the pin shows up on the map. However I've now taken it further and I'm adding pins to my datasource via a click on the map. The new pins add to my datasource, but do not show up on the map. Do I need to rebind my datasource to my map control or somehow refresh the datasource? Here's some code <UserControl.Resources> <DataTemplate x:Key="PinData"> <m:Pushpin Location="{Binding Location}" PositionOrigin="BottomCenter" Width="Auto" Height="Auto" Cursor="Hand"> <m:Pushpin.Template> <ControlTemplate> <Grid> <myTestApp:MasterPin DataContext="{Binding}"/> </Grid> </ControlTemplate> </m:Pushpin.Template> </m:Pushpin> </DataTemplate> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <m:Map x:Name="myMap" CredentialsProvider="" Mode="Road" ScaleVisibility="Collapsed" > <m:MapItemsControl x:Name="mapItems" ItemTemplate="{StaticResource PinData}"/> </m:Map> </Grid> public partial class Map : UserControl { private List< BasePin > dataSource = new List< BasePin >(); public Map() { InitializeComponent(); _Initialize(); } private void _Initialize() { //this part works and adds a pin to the map dataSource.Add( new BaseSite( -33.881532, 18.440208 ) ); myMap.MouseClick += Map_MouseClick; mapItems.ItemsSource = dataSource; } public void Map_MouseClick(object sender, MapMouseEventArgs e)) { BasePin pin = new BasePin(); pin.Location = myMap.ViewportPointToLocation( e.ViewportPoint ); dataSource.Add( pin ); } }

    Read the article

  • Best WP blank(naked) template?

    - by Grace Ladder
    Hi All I like to coding few wordpress templates, and did search around that found there are few naked templates available, which i can start with. As i am pretty new for wordpress, can you recommend the best naked template as foundation I can use? Cheers

    Read the article

  • How to find relation between change in latitudes at centre of map and top/bottom

    - by Imran
    Hi, Im having little trouble finding a relation between the movement at centre and edge of a circle, Im doing for panning world map,my map extent is 180,89:-180,-89, my map pans by adding change(dx,dY) to its extents and not its centre. Now a situation has arrrised where I have to move the map to a specific centre, to calculate the change in longitudes is very easy and simple, but its the change in lattitudes that has caused problem. It seems the change in centreY of map is more than the change at edge of the mapY, or simply if I have to move the map centre from 0long,0lat to 73long,33lat, for dX I simply get 73, but for dY apparently it looks 33 but if i add 33 to top of map that is 89 , it will be 122 which is incorrect since Latitudes are between 90 and -90 . It seems a case a projection of a circle on 2D plane where the edge of circle since is moving backward due to angle expereinces less change and the centre expereinces more change, now is there a relation between these two factors? I tried converting the difference between OriginY and destinationY into radians and then add to Top and Bottom of Map, but it did'nt really work for me. Please note that the map is project on a virtual canvas whose width starts from 256 and increases by 256*2^z , z=0 is default and whole world is visible at that extent of canvas code: public void moveMapTo(double destinationLongitude,double destinationLattitude) // moves map to the new centre { double dXLong=destinationLongitude-centreLongitude; double atanhsinO = atanh(Math.sin(destinationLattitude * Math.PI / 180.00)); double atanhsinD = atanh(Math.sin(centreLatitude * Math.PI / 180.00)); double atanhCentre = (atanhsinD + atanhsinO) / 2; double latitudeSpan =destinationLattitude - centreLatitude; double radianOfCentreLatitude = Math.atan(Math.sinh(atanhCentre)); double dXLat=latitudeSpan / Math.cos(radianOfCentreLatitude); dXLat*=getLattitudeSpan()*(Math.PI/180); <--- HERE IS THE PORBLEM System.out.println("dxLong:"+dXLong+"_dxLat:"+dXLat); mapLeft+=dXLong; mapRight+=dXLong; mapTop+=dXLat; mapBottom+=dXLat; } ////latitude span function private double getLattitudeSpan() { double latitudeSpan = mapTop - mapBottom; latitudeSpan = latitudeSpan / Math.cos(radianOfCentreLatitude); return Math.abs(latitudeSpan); } //ht

    Read the article

  • SoapUI load test customised error

    - by Jothikumar
    Hello, Im trying to do load testing on a web server. I want to customise the error fields whenever i get results other than 200 ok. At present the error is realised only when the server doesnot respond. Is there anyway i could customise error as i need.

    Read the article

  • How to configure oracle instantclient for mono?

    - by funwithcoding
    Mono is really awesome. Some of our applications worked in linux out of the box even without recompiling the binary. However I am having tough time to configure oracle instantclient to use it with mono. I installed instantclient on a CentOS VM(by installing instantclient rpm) but however I did not find TNSNAMES.ORA anywhere. I searched for oracle and I found the following path contains the oracle libraries. [root@bagvapp rupert]# ll /usr/lib/oracle/11.2/client/lib/ total 143280 -rw-r--r-- 1 root root 7456 Aug 14 2009 cobsqlintf.o -rw-r--r-- 1 root root 342 Aug 14 2009 glogin.sql lrwxrwxrwx 1 root root 17 Mar 9 06:52 libclntsh.so -> libclntsh.so.11.1 -rw-r--r-- 1 root root 40088477 Aug 14 2009 libclntsh.so.11.1 -rw-r--r-- 1 root root 6986848 Aug 14 2009 libnnz11.so lrwxrwxrwx 1 root root 15 Mar 9 06:52 libocci.so -> libocci.so.11.1 -rw-r--r-- 1 root root 1879549 Aug 14 2009 libocci.so.11.1 -rw-r--r-- 1 root root 89377610 Aug 14 2009 libociei.so -rw-r--r-- 1 root root 152304 Aug 14 2009 libocijdbc11.so -rw-r--r-- 1 root root 1501651 Aug 14 2009 libsqlplusic.so -rw-r--r-- 1 root root 1218075 Aug 14 2009 libsqlplus.so -rw-r--r-- 1 root root 777979 Aug 14 2009 libsqora.so.11.1 -rw-r--r-- 1 root root 1996228 Aug 14 2009 ojdbc5.jar -rw-r--r-- 1 root root 2111220 Aug 14 2009 ojdbc6.jar -rw-r--r-- 1 root root 298388 Aug 14 2009 ottclasses.zip drwxr-xr-x 3 root root 4096 Mar 9 06:52 precomp -rw-r--r-- 1 root root 37807 Aug 14 2009 xstreams.jar no TNSPING available, no TNSNAMES.ORA, Now how to configure the mono to use this as the oracle client? and how to specify oracle database in app.config connection string section? Though mono is a powerful framework, seems like it is having problems like linux does, all the documentation is only available in mailing lists and whatever is available on official site is either outdated or not clear for normal user. Hope things will change soon and Mono will THE programming framework for linux.

    Read the article

  • Find value of selected item in Drop down menu.

    - by Ozaki
    I have a drop down menu in an ASPX page along the lines of: <form> <select name="cars"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="fiat" selected="selected">Fiat</option> <option value="audi">Audi</option> </select> </form> That is dynamically generated from another controller (value and label). After the user selects one of the options I need to find out what the selected value/label (will be the same) is so I can hit an update button and retrieve the data on that option. What would be the easiest way to find out the value of the user "selected" option?

    Read the article

  • Gimpel's PC-lint and Flexelint; Anyone used them?

    - by samoz
    So I've read a few magazine articles and the website for Gimpel's PC-lint and Flexelint C/C++ compiler. It's really expensive (at least for me), but it seems like it might have some merit to warrant the cost. So I'm wondering if anyone else has used/bought them and can provide their opinions?

    Read the article

  • HTML Agility Pack

    - by Harikrishna
    I want to parse the html table using html agility pack. I want to extract only some predefined column data from the table. But I am new to parsing and html agility pack and I have tried but I don't know how to use the html agility pack for my need. If anybody knows then give me example if possible.

    Read the article

  • Package <blah> does not exist - NetBeans 6.8 & Windows 7

    - by bjmac
    I'm using NetBeans 6.8 on Windows 7. Upgrade from WinXP and NetBEans 6.7. Now my existing java web app project is no longer able to import/find the packages I've developed. And yet the project still compiles and runs OK. I've tried changing the Java Platform/JDK from 1.6.0_10 back to JDK 1.5.0_22 but I still receive errors package does not exist. All other libraries and packages are able to import OK ...

    Read the article

  • Microsoft Word 2007 opening all docs with field codes toggled off

    - by WilliamKF
    Recently, something changed with my Microsoft Word 2007 installation/preferences on Windows XP, such that whenever I open a word document, all the field codes are displayed raw instead of as their expanded value. For example, my header reads: My Name { TITLE \* MERGEFORMAT } Version { REVNUM \* MERGEFORMAT } But, if I copy and paste it here, it reads expanded: My Name My Doc Title Version 42 I expect to see the copy and paste version directly inside Word, I can work around this by right clicking on each such field and choosing toggle field codes, however, I never had to do that before, as previously, the document opened with all such field codes expanded. Another example is the Table of Contents which shows as: { TOC \o "1-3" \h \z \u } Instead of the full table of contents. I searched the word options dialog, but could not find anything that appeared relevant. Please suggest how to restore the old behavior.

    Read the article

  • How to call a view on click of each UITableViewCell programatically?

    - by Cathy
    Hi, I have created a UITableViewcontroller and a UINavigationController in a TableController.m with UITableviewCell set to say @"CellOne" @"CellTwo". Now i also created two other files `ImageView1.m` ImageView2.m where if i click on CellOne i should be able to get the view placed on ImageView1.m, same applied to the ImageView2.m.How should i achieve this programatically without using nib file?

    Read the article

  • How to pass parameters dynamically in PHP?

    - by user198729
    I need to pass the $route to its inner function,but failed: function compilePath( $route ) { preg_replace( '$:([a-z]+)$i', 'pathOption' , $route['path'] ); function pathOption($matches) { global $route;//fail to get the $route } } I'm using php5.3,is there some feature that can help?

    Read the article

  • jQuery, Forms, Browser Refreshes

    - by Eric Cope
    I have a large form with some fields values dependent on previous elements. I use jquery's .trigger event to trigger the dependent field's update functions. When I refresh the page (click reload or click back), the previous values selected are still there, but the dependent fields are not reflecting the other element's values. How can I trigger the update functions upon refresh? I saw a way to prevent the browser from using the form's cached values. I'd rather use the cached values and update the elements dependent on the elements with cached values.

    Read the article

  • Sending SMS with GSM phone\modem using Objective C

    - by user291182
    Hi Im new with Objective C but a veteran of C# & VB.Net. Is there an available API or functionality in cocoa where i can communicate with my GSM Phone to listen to any incoming SMS messages and be able to send messages myself. I'm trying to build an application for OSX SnowLeopard that can do this. Under the windows platform there are available API's that i can use to do this job for me. I just need hook up my mobile phone into my PC, configure the API to communicate with the phone thru one of the available COM Ports used by the device. Your help is very much appreciated. Thanks [email protected]

    Read the article

  • Datetime picker in iphone

    - by sudhakarilla
    I have one issue with Datetime Picker In my firstview i have button.If i click that button it should open DateTime Picker in the second view. After selecting the datetime it should show datetime in the firstview text field. Please help in this issue.

    Read the article

  • Winforms control that works like ajax tag-completion

    - by Sargola
    Heya, I want to create a winforms app where you can assign tags to an entity. ofc I want the customer to re-use existing tags a lot. That's why I want to show them the list of tags while they are typing (similar to intellisense in VS and the tags-dropdown even here in stackoverflow ;)) do you have any control(s) in mind that offers this functionality? can I reuse a ComboBox for this? (here I need to drop it down programatically - how?) I want to have the taglist getting input-focus but not lose the mainform-focus, and I want it to be on top over all windows and even range out of the mainform-area (like intellisense in vs) thx!

    Read the article

  • MySQL Select names with last names ending with certain letter

    - by Brian
    I have a MySQL database with a field Name which contains full names. To select all people with last names ending in a particular letter, let's say A for this example, I use the following query: SELECT * FROM db WHERE Name LIKE '% A%'. However, this also selects users who have a middle name starting with A. Is there anyway to alter this query so that only a last name ending in A will be selected?

    Read the article

  • C++ - Access array (in main) from methods outside main

    - by John Smith
    I have an array in my main class that holds objects that I need to print out for a menu listing. The array is declared and initialized in main. I need to, however, access the same array in a sub-menu function. If I copy the code (for loop that prints out the values) to the sub-menu, nothing is printed (presumably because it can't access the original array and has made a new, blank one). Is there any way (without making the array a global variable) that I can access the array in this sub-menu? Both the main and the sub-menu function are in the same file and the sub-menu is called from main. Maybe to put it more simply, can I use scope resolution to bring me up one 'level' in scope?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >