Daily Archives

Articles indexed Monday May 3 2010

Page 14/107 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • using 'or' operator not working for menu

    - by John Wilkes
    In my code here, I have a CSS class called "active" which I use if the $_GET['page'] == tutorials, php, mysql, etc... The problem is, even if the 'page' variable is not equal to any of these values, the Tutorials button in this case is still active for some reason. Any ideas why this would be happening? Am I using the 'or' (||) operand incorrectly? <?php if($_GET['page'] == 'tutorials' || 'php' || 'mysql' || 'html' || 'css' || 'js') { ?> <li class="active"> <?php } else { ?> <li> <?php } ?> <a href="index.php?page=tutorials">Tutorials</a> <ul> <li><a href="index.php?page=php">PHP</a></li> <li><a href="index.php?page=mysql">MySQL</a></li> <li><a href="index.php?page=html">HTML</a></li> <li><a href="index.php?page=css">CSS</a></li> <li><a href="index.php?page=js">JS</a></li> </ul> </li>

    Read the article

  • Trouble creating a button matrix in Interface Builder

    - by Jake
    Hi, I am trying to create a matrix of buttons in Interface Builder 3.2.1 but can not find anyway to do it. I read the question and answer posted here: http://stackoverflow.com/questions/1771835/how-to-create-a-nsmatrix-of-nsimagecell-in-interface-builder-in-10-6 But following Layout Embed Objects In, as suggested, I see only View and Scroll View as options, not Matrix. Have I missed something? Thanks.

    Read the article

  • Populating dropdownlist in asp.net mvc doesn't seem to work for me...

    - by Pandiya Chendur
    I use a dropdownlist in one of my create.aspx but it some how doesnt seem to work... public IEnumerable<Materials> FindAllMeasurements() { var mesurements = from mt in db.MeasurementTypes select new Materials() { Id= Convert.ToInt64(mt.Id), Mes_Name= mt.Name }; return mesurements; } and my controller, public ActionResult Create() { var mesurementTypes = consRepository.FindAllMeasurements().AsEnumerable(); ViewData["MeasurementType"] = new SelectList(mesurementTypes, "Id", "Mes_Name"); return View(); } and my create.aspx has this, <p> <label for="MeasurementTypeId">MeasurementType:</label> <%= Html.DropDownList("MeasurementType", ViewData["MeasurementType"])%> <%= Html.ValidationMessage("MeasurementTypeId", "*") %> </p> When i execute this i got these errors, System.Web.Mvc.HtmlHelper<CrMVC.Models.Material>' does not contain a definition for 'DropDownList' and the best extension method overload 'System.Web.Mvc.Html.SelectExtensions.DropDownList(System.Web.Mvc.HtmlHelper, string, System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>)' has some invalid arguments 2.cannot convert from 'object' to 'System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>

    Read the article

  • PHP MySQL INSERT fails due to unique constraint

    - by sjw
    On insert I am catching the unique constraint mysql_errno() 1062. This works fine but I want to find the existing row to re-instate or modify it. Is there are method to obtain the row id on insert fail? I tried mysql_insert_id() but realised that would only return the row I'm inserting (or failed to insert) therefore, I get 0. Is there no option but to issue another mysql_query and simply perform a select on the duplicate value? I just want to make sure there is no better, quicker, more economical way to do this.

    Read the article

  • How to create Haar Cascade (xml) for using with OpenCV?

    - by inTagger
    If you familiar with OpenCV library, you know what is haar cascade image object detection. I mean image object detection like human face or something else. I have haar cascade xml for face detection, but i don't know how to create my own. I want to create Haar Cascade xml to detect simple bright circle light sources (i.e. flashing infrared light from TV remote control). So, how to create Haar Cascade (xml) for using with OpenCV?

    Read the article

  • where does the professional sheen of a GUI application realistically come from?

    - by JW
    I have been playing around with php-gtk recently and in the past I have experimented with Java to make GUI 'hello world' apps. However both these types of applications have had a bit of a clunky (almost childish) look and feel to them. I cannot deny that they are handy for making apps for in-house use (and I totally respect the amount of community effort that goes into these projects). But I would not necessarily be proud to sell it as a commercial application with a price tag of, say, £450 or £1,000. If I wanted to make an application that had the look and feel of, say, Firefox for Windows, or Adobe xyz, what GUI/language should I use? Is the 'professional sheen' or smart look and feel down to the designer or is it the case that, no matter how good a designer is, picking the right GUI framework is essential to get that look?

    Read the article

  • How to pass values from client side to server side ?

    - by manojp1988
    Hi All, I got a situation to transfer values from jsp to servlet's action class. Previously we did it using <input type="hidden" id="name" value="manoj" /> we take this value in action class by request.getParameter("name"). But now we couldn't pass value like "Hi\n i am\n Manoj". Since it has new line included in the string we couldn't take it like this to action. So how I can take value like this to action or is there any way other than hidden input? Thanks .

    Read the article

  • Deserialization error in a new environment

    - by cerhart
    I have a web application that calls a third-party web service. When I run it locally, I have no problems, but when I move it to my production environment, I get the following error: There is an error in XML document (2, 428). Stack: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at RMXClasses.RMXContactService.ContactService.getActiveSessions(String user, String pass) in C:\Users\hp\Documents\Visual Studio 2008\Projects\ReklamStore\RMXClasses\Web References\RMXContactService\Reference.cs:line 257 at I have used the same web config file from the production environment but it still works locally. My local machine is a running vista home edition and the production environment is windows server 2003. The application is written in asp.net 3.5, wierdly under the asp.net config tab in iis, 3.5 doesn't show up in the drop down list, although that version of the framework is installed. The error is not being thrown in my code, it happens during serialization. I called the method on the proxy, I have checked the arguments and they are OK. I have also logged the SOAP request and response, and they both look OK as well. I am really at a loss here. Any ideas? SOAP log: This is the soap response that the program seems to have trouble parsing only on server 2003. On my machine the soap is identical, and yet it parses with no problems. SoapResponse BeforeDeserialize; <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ContactService" xmlns:ns2="http://api.yieldmanager.com/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getActiveSessionsResponse> <sessions SOAP-ENC:arrayType="ns2:session[1]" xsi:type="ns2:array_of_session"> <item xsi:type="ns2:session"> <token xsi:type="xsd:string">xxxxxxxxxxxxxxxxxxxx1ae12517584b</token> <creation_time xsi:type="xsd:dateTime">2009-09-25T05:51:19Z</creation_time> <modification_time xsi:type="xsd:dateTime">2009-09-25T05:51:19Z</modification_time> <ip_address xsi:type="xsd:string">xxxxxxxxxx</ip_address> <contact_id xsi:type="xsd:long">xxxxxx</contact_id></item></sessions> </ns1:getActiveSessionsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

    Read the article

  • iphone xml handing

    - by Mitch
    I want my app to read a XML via internet. Also I want to keep the previously download xml so next time I may not need to download again until certain hours is passed or whatever period of time according to settings. Do you recommend me to download it first and store locally before process it? Or should I process it while downloading (with libxml2 I guess)? What do you usually with apps using remote XML? Targeting 3.0 devices btw.

    Read the article

  • Changing the message (or exception) in WPF ValidatesOnException binding

    - by Emad
    I have a WPF application using MVVM. I am using binding to a POCO object. The Textbox is bound to a property in the object like: <TextBox.Text> <Binding Path="CertainProperty" Mode="TwoWay" > <Binding.ValidationRules> <ExceptionValidationRule/> </Binding.ValidationRules> </Binding> </TextBox.Text> Now this property is a a int property and when the user tried to enter a non-numeric value, they get the "input string was not in a correct format". What I need to do is customize this message to a more user friendly one. How can I do that ?

    Read the article

  • Image Transformation on iPhone, how to?

    - by Horace Ho
    Since I cannot pre-render all the images in PNGs and real-time image transformation functions are required, namely: skew perspective (like the transform action found in Photoshop) Which API (CoreAnimation? OpenGL ES?) should I look into? Even better, is there any sample code around? Thanks!

    Read the article

  • How do I pass the value of the previous form element into an "onchange" javascript function?

    - by Jen
    Hello, I want to make some UI improvements to a page I am developing. Specifically, I need to add another drop down menu to allow the user to filter results. This is my current code: HTML file: <select name="test_id" onchange="showGrid(this.name, this.value, 'gettestgrid')"> <option selected>Select a test--></option> <option value=1>Test 1</option> <option value=2>Test 2</option> <option value=3>Test 3</option> </select> This is pseudo code for what I want to happen: <select name="test_id"> <option selected>Select a test--></option> <option value=1>Test 1</option> <option value=2>Test 2</option> <option value=3>Test 3</option> </select> <select name="statistics" onchange="showGrid(PREVIOUS.name, PREVIOUS.VALUE, THIS.value)"> <option selected>Select a data display --></option> <option value='gettestgrid'>Show averages by student</option> <option value='gethomeroomgrid'>Show averages by homeroom</option> <option value='getschoolgrid'>Show averages by school</option> </select> How do I access the previous field's name and value? Any help much appreciated, thx! Also, JS function for reference: function showGrid(name, value, phpfile) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } var url=phpfile+".php"; url=url+"?"+name+"="+value; url=url+"&sid="+Math.random(); xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); }

    Read the article

  • How to get Word 2003 to make my print layout go from left to right?

    - by Shaul
    My copy of MS Word 2003 was installed on my computer with the locale set to Israel, so among other things my Normal.dot template was set up for right-to-left. I managed to fix most of the Hebrew support things so that I am working in English by default now. The only thing I haven't found a cure for is how to make the "print layout" view also go from left to right; as things are, the page flow always appears from right to left, even in English documents - IOW, page 1 appears on the right of page 2, as shown below. I can't see any obvious option to change this. How do I do it?

    Read the article

  • What Is .recently-used.xbel and How Do I Delete It for Good?

    - by The Geek
    If you’re reading this article, you’ve probably noticed the .recently-used.xbel file in the root of your User folder, and you’re wondering why it keeps constantly coming back even though you repeatedly delete it. So What Is It? The quick answer is that it’s part of the GTK+ library used by a number of cross-platform applications, perhaps the most well-known of which is the Pidgin instant messenger client. As the name implies, the file is used to store a list of the most recently used files. In the case of Pidgin, this comes into play when you are transferring files over IM, and that’s when the file will appear again. Note: this is actually a known and reported bug in Pidgin, but sadly the developers aren’t terribly responsive when it comes to annoyances. Pidgin seems to go for long periods of time without any updates, but we still use it because it’s open-source, cross-platform, and works well. How Do I Get Rid of It? Unfortunately, there’s no way to easily get rid of it, apart from using a different application. If you need to transfer files over Pidgin, the file is going to re-appear… but there’s a quick workaround! The general idea is to set the file properties to Hidden and Read-only. You’d think you could just set it to Hidden and be done with it, but Pidgin will re-create the file every time, so instead we’re leaving the file there and preventing it from being accessed. You could also totally remove access through the Security tab if you wanted to, but this worked fine for me… as you can see, no more file in the folder. Of course, you can’t have the show hidden files and folders option turned on, or the file will continue to show up. Want to get really geeky? You can toggle hidden files with a shortcut key. Similar Articles Productive Geek Tips Hide Recently Used Documents/Programs From the Windows Vista Start MenuQuick Tip: Windows Vista Temp Files DirectoryDelete Wrong AutoComplete Entries in Windows Vista MailDisable Delete Confirmation Dialog in Windows 7 or VistaHow to Delete a System File in Windows 7 or Vista TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Enable DreamScene in Windows 7 Microsoft’s “How Do I ?” Videos Home Networks – How do they look like & the problems they cause Check Your IMAP Mail Offline In Thunderbird Follow Finder Finds You Twitter Users To Follow Combine MP3 Files Easily

    Read the article

  • How to sekect latest chnge done in the given Table structure?

    - by OM The Eternity
    I have a Table structure as id, trackid, table_name, operation, oldvalue, newvalue, field, changedonetime Now if I have 3 rows for the same "trackid" same "field", then how can i select the latest out of the three? i.e. for e.g.: id = 100 trackid = 152 table_name = jos_menu operation= UPDATE oldvalue = IPL newvalue = IPLcccc field = name live = 0 changedonetime = 2010-04-30 17:54:39 and id = 101 trackid = 152 table_name = jos_menu operation= UPDATE oldvalue = IPLcccc newvalue = IPL2222 field = name live = 0 changedonetime = 2010-04-30 18:54:39 As u can see above the secind entry is the latest change, Now what query I shoud use to get the only one and Latest row out of many such rows...

    Read the article

  • Network programming and Packets interactions.

    - by Eyla
    Greeting, This month I will start working on my master thesis. My thesis's subject is about network security. I need to deal with network interfaces and packets. I've used shappcap before to interact with packets but I'm not sure if C# is the most powerful language to deal with network programing and packets. I worked a bit with winshark and I saw how powerful it is and as you know winsharp is open source developed using C++. I'm not sure if I should use C# or C++ for network security programming and I want your through about the best language might be for network programming and packets interaction. should I use C#, C++, or java or some thing else? please give me your advice. Thank you,

    Read the article

  • iPhone application-Memory handling issues

    - by Vin
    Hi All, I am having some memory management issues in my app. Maybe someone may help me out here. 1) While checking for leaks in intruments, when I deploy and run the app on device, the virtual memory utilized, starts from 50 MB(even though i've just launched the app and am on the first screen). My resources contribute to 2.6 MB of it and I don't know what is contributing for the rest. What is the ideal utilization of virtual memory for an app? 2) In certain screen of the app, user is allowed to click a picture from the camera. In Instruments, I observe that virtual memory utilization jumps around 20MB, on the invocation of camera. Is it normal and can it be decreased? Looking forward to hear a reply soon. Thanks in advance

    Read the article

  • Comparing Dates in LINQ and C#

    - by Redburn
    I have a LINQ query which checks to see if there are any tests done since the beginning of the year. var MetersTestedCount = (from n in _mttDomainContext.MTTMeterTests where n.TestDate > DateTime.Parse("1/1/2010") select n.TestDate).Count(); This query however returns an empty set. I have a similar SQL query which pulls some records, USE MeterTestTracking Select * From MTTMeterTest WHERE TestDate > '1/1/2010' I have been to the previous posts. Even though similar, still no help: How to compare just the date, not the timestamp using LINQ and How to compare dates in LINQ? What's the correct way to check dates in LINQ to return a dataset?

    Read the article

  • Retrieving my own data via FaceBook API

    - by goggin13
    I am building a website for a comedy group which uses Facebook as one of their marketing platforms; one of the requirements for the new site is to display all of their Facebook events on a calendar. Currently, I am just trying to put together a Python script which can pull some data from my own Facebook account, like a list of all my friends. I presume once I can accomplish this I can move to pulling more complicated data out of my clients account (since they have given me access to their account). I have looked at many of the posts here, and also went through the Facebook API documentation, including Facebook Connect, but am really beating my head against the wall. Everything I have read seems like overkill, as it involves setting up a good deal of infrastructure to allow my app to set up connections to any arbitrary user's account (who authorizes me). Shouldn't it be much simpler, given I only ever need to access 1 account? I cannot find a way to retrieve data without having to display the Facebook login window. I have a script which will retrieve all my friends, but it includes a redirect where I have to physically log myself in to Facebook. Would appreciate any advice or links, I just feel like I must be missing something simple. Thank you!

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >