Search Results

Search found 23261 results on 931 pages for 'case sensitive'.

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

  • DataContractSerializer sensitive to order of XML??

    - by e28Makaveli
    I have the following serialized XML: DataDescriptor <d5p1:TimePastToInitializeData > <d5p1:Hours>2</d5p1:Hours> <d5p1:Minutes>10</d5p1:Minutes> <d5p1:Seconds>5</d5p1:Seconds> </d5p1:TimePastToInitializeData> <d5p1:PollRate > <d5p1:Hours>2</d5p1:Hours> <d5p1:Minutes>10</d5p1:Minutes> <d5p1:Seconds>5</d5p1:Seconds> </d5p1:PollRate> </Value> </KeyValueOfstringanyType> With this order, the PollRate property is not constructed and the resulting deserialized object has a null value for this field. If, however, I change the order as follows: DataDescriptor <d5p1:PollRate > <d5p1:Hours>2</d5p1:Hours> <d5p1:Minutes>10</d5p1:Minutes> <d5p1:Seconds>5</d5p1:Seconds> </d5p1:PollRate> <d5p1:TimePastToInitializeData > <d5p1:Hours>2</d5p1:Hours> <d5p1:Minutes>10</d5p1:Minutes> <d5p1:Seconds>5</d5p1:Seconds> </d5p1:TimePastToInitializeData> </Value> </KeyValueOfstringanyType> both properties PollRate and TimePastToInitializeData are constructed and initialized properly. public class DataDescriptor { RefreshRate pastTime; [DataMember] public RefreshRate TimePastToInitializeData { get; set; } RefreshRate pollRate; [DataMember] public RefreshRate PollRate { get; set; } [OnDeserializing] void Initialize(StreamingContext c) { // should I do this?? } } And RefreshRate: [DataContract( Namespace = "http//www.emssatcom.com/occ600")] [Serializable] public class RefreshRate : Observable { public RefreshRate() { } int hours; [DataMember] public int Hours { get; set; } int mins; [DataMember] public int Minutes { get; set; } int secs; [DataMember] public int Seconds { get; set; } int ms; [DataMember] public int MilliSeconds { get; set; } }

    Read the article

  • Culture Sensitive GetHashCode

    - by user114928
    Hi, I'm writing a c# application that will process some text and provide basic query functions. In order to ensure the best possible support for other languages, I am allowing the users of the application to specify the System.Globalization.CultureInfo (via the "en-GB" style code) and also the full range of collation options using the System.Globalization.CompareOptions flags enum. For regular string comparison I'm then using a combination of: a) String.Compare overload that accepts the culture and options b) For some bulk processes I'm caching the byte data (KeyData) from CompareInfo.GetSortKey (overload that accepts the options) and using a byte-by-byte comparison of the KeyData. This seemed fine (although please comment if you think these two methods shouldn't be mixed), but then I had reason to use the HashSet< class which only has an overload for IEqualityComparer<. MS documentation seems to suggest that I should use StringComparer (which implements both IEqualityComparer< and IComparer<), but this only seems to support the "IgnoreCase" option from CompareOptions and not "IgnoreKanaType", "IgnoreSymbols", "IgnoreWidth" etc. I'm assuming that a StringComparer that ignores these other options could produce different hashcodes for two strings that might be considered the same using my other comparison options. I'd therefore get incorrect results from my application. Only thought at the moment is to create my own IEqualityComparer< that generates a hashcode from the SortKey.KeyData and compares eqality be using the String.Compare overload. Any suggestions?

    Read the article

  • Java - store sensitive data

    - by Mike
    Hello. I develop application with Java. I need to store some initial configuration data in some kind of file. I want my app to be able to read this data, but I don't want user to do so. Example : application loads IP from encrypted file. User sees like "dsda@#21da@" so he won't bother doing anything :) How should I do such a thing? Thanx!

    Read the article

  • How to check for case sensitive in hibernate criteria

    - by dhiraj
    0 vote down star I have used hibernate to fetch the login information from the mysql database. But the problem is that say for example the user name is 'dhiraj' in the database, now the login is successful by entering the user name, but it is also allowing to enter by taking the user name in uppercase also, e.g., 'DHIRAJ'. I want to restrict it to as it in the database. Can you tell me how to achieve that in hibernate?

    Read the article

  • How to store and compare time-zone sensitive times

    - by Chad Moran
    I have a data structure where an entity has times stored as an int (minutes into the day) for fast comparison. The entity also has a Foreign Key reference back to a TimeZone table which contains the .NET CLR ID Name and it's Standard Time/Daylight Time acronyms. Since this information is stored as time-zone insensitive - I was wondering how in LINQ to SQL I could convert this into a UTC DateTime for comparison against other times that will be in UTC. Just to be clear this conversion has to be done server-side so that I can execute filtering on the SQL Server and not the client. I am using .NET 3.5 SP1 and SQL Server 2008.

    Read the article

  • JQuery class selectors like $(.someClass) are case sensitive?

    - by Justin Grant
    Given this HTML: <div class="OpenIDSelector">some text</div> Why does this JQuery selector match it on some browsers and some pages, but not on others? $('.OpenIdSelector) NOTE: I ran into this problem and solved it myself, but it was annoying and I didn't find it on StackOverflow already, so I'm posting it as a Q&A pair so someone else won't waste an hour like I did.

    Read the article

  • Are there any context-sensitive code search tools?

    - by Vicky
    I have been getting very frustrated recently in dealing with a massive bulk of legacy code which I am trying to get familiar with. Say I try to search for a particular function call, I get loads of results that turn out to be completely irrelevant; some of them are easy to spot, eg a comment saying // Fixed functionality in foo() so don't need to handle this here any more But others are much harder to spot manually, because they turn out to be calls from other functions in modules that are only compiled in certain cases, or are part of a much larger block of code that is #if 0'd out in its entirety. What I'd like would be a search tool that would allow me to search for a term and give me the choice to include or exclude commented out or #if 0'd out code. Then the search results would be displayed alongside a list of #defines that are required in order for that snippet of code to be relevant. I'm working in C / C++, but other than the specific comment syntax I guess the techniques should be more generally applicable. Does such a tool exist?

    Read the article

  • switch statemt functioning improperly and giving error when i put break;

    - by nav
    The following is the code i used in a program - over here the month variable is an integer switch(month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: return 31; break; case 2: return 28; break; case 4: case 6: case 9: case 11: return 30; break; default: System.out.println("Invalid month."); return 0; } surprisingly, when i use the above switch construct.. it gives an error saying.. code unreachable for statements after each break statement Then i removed all the break statements, and the new code looks like this --- switch(month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: return 31; case 2: return 28; case 4: case 6: case 9: case 11: return 30; default: System.out.println("Invalid month."); return 0; } Now.. after removing the break statements .. the code worked perfectly well.. My question is... in the switch construct.. it is mandatory to use break.. or else the control flow continued.. and all the conditions are tested and executed!! right??? So why in the world is the previous ** syntactically Right** version giving an error.. and the modified syntactically incorrect version running perfectly well.. Any explanation.. anyone!!

    Read the article

  • sort std::list case sensitive elements

    - by Dave18
    #include <list> #include <string> using std::string; using std::list; int main() { list <string> list_; list_.push_back("C"); list_.push_back("a"); list_.push_back("b"); list_.sort(); } does sort() function sort the elements according to their character codes? I want the result here to be a b C after the sorting is done.

    Read the article

  • A case-insensitive related implementation problem

    - by Robert
    Hi All, I am going through a final refinement posted by the client, which needs me to do a case-insesitive query. I will basically walk through how this simple program works. First of all, in my Java class, I did a fairly simple webpage parsing: title=(String)results.get("title"); doc = docBuilder.parse("http://" + server + ":" + port + "/exist/rest/db/wb/xql/media_lookup.xql?" + "&title=" + title); This Java statement references an XQuery file "media_lookup.xql" which is stored on localhost, and the only parameter we are passing is the string "title". Secondly, let's take at look at that XQuery file: $title := request:get-parameter('title',""), $mediaNodes := doc('/db/wb/portfolio/media_data.xml'), $query := $mediaNodes//media[contains(title,$title)], Then it will evaluate that query. This XQuery will get the "title" parameter that are passes from our Java class, and query the "media_data" xml file stored in the database, which contains a bunch of media nodes with a 'title' element node. As you may expect, this simple query will just match those media nodes whose 'title' element contains a substring of what the value of string 'title' is. So if our 'title' is "Chi", it will return media nodes whose title may be "Chicago" or "Chicken". The refinment request posted by the client is that there should be NO case-sensitivity. The very intuitive way is to modify the XQuery statement by using a lower-case funtion in it, like: $query := $mediaNodes//media[contains(lower-case(title/text(),lower-case($title))], However, the question comes: this modified query will run my machine into memory overflow. Since my "media_data.xml" is quite huge and contains thouands of millions of media nodes, I assume the lower-case() function will run on each of the entries, thus causing the machine to crash. I've talked with some experienced XQuery programmer, and they think I should use an index to solve this problem, and I will definitely research into that. But before that, I am just posting this problem here to get other ideas or any suggestions, do you think any other way may help? for example, could I tweak the Java parse statement to realize the case-insensitivity? Since I think I saw some people did some string concatination by using "contains." in Java before passing it to the server. Any idea or help is welcomed, thanks in advance.

    Read the article

  • Logitech G700 mouse scrollwheel is way too sensitive, how can I configure it?

    - by Snir Hassidim
    I am trying to migrate my brother to use Ubuntu. However, his Logitech G700 mouse's scroll wheel is extremely sensitive. By sensitive, I mean that, due to the fact that it uses high-resolution scrolling, every minor nudge is interpreted as a scroll attempt. I have no way to configure this in Ubuntu - I want the OS to ignore every few events from the mouse scroll wheel to make it work properly. xev in a terminal is going crazy whenever I even lay a finger on the scroll wheel. How can I fix this issue?

    Read the article

  • UPS vs Solar Power in case of power failure for a server [on hold]

    - by Zen 8000k
    I am looking for a low power, low end pc able to run 24/7 without overheating and a way to support it in case of power failure. Power failures can be up to 72 hours. The pc dosen't need a monitor or keyboard. A modem must also be protected in case of power failure. When i say low end, i don't mean crap. The cpu needs to be x86 and have at least 1k cpu in this chart: http://www.cpubenchmark.net/index.php What's the best way to do this? EDIT: more info. I need to run a home server. The server will perform light tasks mainly. A x86 cpu sadly is the only route for my use. I want to be able to run the server and the router/modem in case of power failure. Now, regarding how long the power will fail: 1) 1 hours is OK for most situations. (say 90%) 2) 3 hours is OK (say 98%) 3) 6 hours is more thank OK. (say 99.5%) 4) On extreme cases the power might fail days. I believe this is very unlikely to happen. More is great but, really, how ofter power will fail more than 3 hours? I believe once every year at best. Well, that's too rare to care about. Given the above, I am looking for a cost effective way to archive 1-3 hour power or 6 hour if possible. Solutions: You guys give me great ideas. 1) Power generator: no good as power will fail for 10 seconds before returning. Also I read online, "clean" power generators cost 1.5k+, so it's out of budged. Non clean generator might damage electronics, right? 2) Solar power: i don't know for sure about this. Sounds like a great idea, too good to be true, honestly. For only 200$ i get 100+w? What are the drawbacks here? 3) UPS: This seems to be the best. The only problem is the cost. Cost < 200$ = great 400$ = budged limit

    Read the article

  • System fan connection on Mini-ITX server case and motherboard

    - by Robert
    The case: Newegg listing for Chenbro ES34169-BK-120 The motherboard: GIGABYTE GA-D525TUD (Newegg has it as well but I can't post more than one link due to being a new user) As far as the question, the system fan I have no idea how to get these to connect to the motherboard. There are two connectors which then go to extension fan cables. So when you connect these, it should be good, but the extension cables are two connectors that go to the system fans and a female molex connector (if you click the Chenbro listing, look at the 6th picture and you'll see the two connections being made and the molex connector just kind of hanging out in the case). Is there a piece I'm missing to get it to connect to the 3 pin sys_fan section of the board? Thanks,

    Read the article

  • Cut Caseload Costs, Speed Service Delivery For Social Services

    - by michael.seback
    Lower Caseload Costs, Speedier Service Delivery with New Oracle Social Services Solution Oracle has just introduced a new solution for social services agencies that's designed to help case workers address the challenges of rising workloads and growing demands by citizens for additional services. In the past, IT departments developed custom software in an effort to meet program outcomes. "Because this capability is out of the box with the Oracle solution, there's less complexity for organizations and an overall lower total cost of ownership," says Kimberly Ellison-Taylor, Oracle's executive director of health and human services. "Self service brings costs down to just pennies per interaction and makes it possible for clients to receive government services more quickly," Ellison-Taylor says. read more

    Read the article

  • Oracle Makes Social Services More Effective

    - by michael.seback
    By Brendan B. Read, TMCnet.com, April 5, 2010 Oracle Makes Social Services More Effective with New Oracle Social Services Suite Overworked, with too frequently heart-wrenching cases yet cash-strapped, social service agencies now have a new solution that has been expressly designed to help them accomplish more for their clients with the same resources. Oracle's Oracle Social Services Suite provides them with a complete, open and integrated platform for eligibility and case management to simplify eligibility determination increase caseworker efficiency and improve program effectiveness. The Social Services Suite also includes updated versions of Oracle's Siebel CRM Public Sector 8.2 and Oracle Policy Automation 10. Here are the Oracle Social Services Suite and Siebel CRM Public Sector 8.2 features and benefits: read the article here.

    Read the article

  • Homebrewed Headphone Amp Shows Off DIY Resin Casting Process

    - by Jason Fitzpatrick
    Although the guts of this DIY build are worth checking out in their own right, what really caught our eye was the beautiful resin cast case surrounding the build as it’s something that could be adapted to a wide variety of projects. Over at the electronics blog Runaway Brainz they were looking for a slick way to encase an amp project. Rather than go with a project box or similar construction, they did a resin pour and then sanded and polished the resulting encasement. The results are stunning and turn the electronic guts of the amp into a work of art. Freeform Headphone Amp [via Make] How to Stress Test the Hard Drives in Your PC or Server How To Customize Your Android Lock Screen with WidgetLocker The Best Free Portable Apps for Your Flash Drive Toolkit

    Read the article

  • Investigating a big C++ project from its source code [closed]

    - by user827992
    Possible Duplicate: What is the best method to start understanding BIG project source code? I have a project that I would like to dissect to learn something new from it. This project is about 200 megabytes. For me, it is just impossible to open every cpp and hpp file and read each and every one. I also don't know what is the best approach in this case. Many people on the internet are looking for an UML tool to generate some kind of graph. I think that UML works well when you are starting a project and you want to express the business logic of your classes and methods. In my opinion UML is totally useless when studying a project only from its source code. Also UML is an OO language, in a large sized C++ project I find a lot of stuff that is not an object and can express some other kind of paradigm. Can you name a tool or a class of software that can help with this?

    Read the article

  • Ask the Readers: How Do You Customize Your Computer?

    - by Jason Fitzpatrick
    Whether you spend your energy customizing via case mods or leave the box stock and re-skin the OS, we’re interested in hearing all about how you customize your computing experience and make the machine yours. This week we want to hear about the OS tweaks, skins, modifications, and other tweaks you’ve applied to your computer to personalize it. Whether it’s minor tweaks at work because IT has the machines locked down or massive custom-built boxes at home that show off your love for your favorite Sci-Fi show, it’s time to share your favorite tools, tricks, and tips for customizing your computing experience–even better, share some screenshots or photos in the comments below. Don’t forget to check back in on Friday for the What You Said roundup! How to Stress Test the Hard Drives in Your PC or Server How To Customize Your Android Lock Screen with WidgetLocker The Best Free Portable Apps for Your Flash Drive Toolkit

    Read the article

  • How can I initialize file names in the folders/ subfolders?

    - by user37991
    Sometimes Thunar allows 'camel-case' of file names, but only in the immediate folder, not the sub-folders. "Perl module to convert stringt to and from CamelCase" exists in Synaptic, but it is not powerful enough, or am I ignorant? The only way I can reliably do this is with Windows shareware (paid $$): Servant Salamander). That's why all my data & archives are on NTFS partitions. BTW: Synaptic has different entries for 'initialize' and 'initialise'. But I'll mention this in another question.

    Read the article

  • Preserving case in HTTP headers with Ruby's Net:HTTP

    - by emh
    Although the HTTP spec says that headers are case insensitive; Paypal, with their new adaptive payments API require their headers to be case-sensitive. Using the paypal adaptive payments extension for ActiveMerchant (http://github.com/lamp/paypal_adaptive_gateway) it seems that although the headers are set in all caps, they are sent in mixed case. Here is the code that sends the HTTP request: headers = { "X-PAYPAL-REQUEST-DATA-FORMAT" => "XML", "X-PAYPAL-RESPONSE-DATA-FORMAT" => "JSON", "X-PAYPAL-SECURITY-USERID" => @config[:login], "X-PAYPAL-SECURITY-PASSWORD" => @config[:password], "X-PAYPAL-SECURITY-SIGNATURE" => @config[:signature], "X-PAYPAL-APPLICATION-ID" => @config[:appid] } build_url action request = Net::HTTP::Post.new(@url.path) request.body = @xml headers.each_pair { |k,v| request[k] = v } request.content_type = 'text/xml' proxy = Net::HTTP::Proxy("127.0.0.1", "60723") server = proxy.new(@url.host, 443) server.use_ssl = true server.start { |http| http.request(request) }.body (i added the proxy line so i could see what was going on with Charles - http://www.charlesproxy.com/) When I look at the request headers in charles, this is what i see: X-Paypal-Application-Id ... X-Paypal-Security-Password... X-Paypal-Security-Signature ... X-Paypal-Security-Userid ... X-Paypal-Request-Data-Format XML X-Paypal-Response-Data-Format JSON Accept */* Content-Type text/xml Content-Length 522 Host svcs.sandbox.paypal.com I verified that it is not Charles doing the case conversion by running a similar request using curl. In that test the case was preserved.

    Read the article

  • The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common ta

    - by zurna
    I get "The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified." error with the following code. I initially had two tables, ADSAREAS & CATEGORIES. I started receiving this error when I removed CATEGORIES table. Select Case SIDX Case "ID" : SQLCONT1 = " AdsAreasID" Case "Page" : SQLCONT1 = " AdsAreasName" Case Else : SQLCONT1 = " AdsAreasID" End Select Select Case SORD Case "asc" : SQLCONT2 = " ASC" Case "desc" : SQLCONT2 = " DESC" Case Else : SQLCONT2 = " ASC" End Select ''# search feature ---> Select Case SEARCHFIELD Case "ID" : SQLSFIELD = "AND AdsAreasID" Case "Ads Areas" : SQLSFIELD = "AND AdsAreasName" Case Else : SQLSFIELD = "" End Select Select Case SEARCHOPER Case "eq" : SQLSOPER = " = " & SEARCHSTRING Case "ne" : SQLSOPER = " <> " & SEARCHSTRING Case "lt" : SQLSOPER = " <" & SEARCHSTRING Case "le" : SQLSOPER = " <= " & SEARCHSTRING Case "gt" : SQLSOPER = " >" & SEARCHSTRING Case "ge" : SQLSOPER = " >= " & SEARCHSTRING Case "bw" : SQLSOPER = " LIKE '" & SEARCHSTRING & "%' " Case "ew" : SQLSOPER = " LIKE '%" & SEARCHSTRING & "' " Case "cn" : SQLSOPER = " LIKE '%" & SEARCHSTRING & "%' " Case Else : SQLSOPER = "" End Select ''# search feature ---> SQL = "SELECT * FROM ( SELECT A.AdsAreasID, A.AdsAreasName, ROW_NUMBER() OVER (ORDER BY A.AdsAreasID) As Row" SQL = SQL & " FROM ADSAREAS A" SQL = SQL & " WHERE Row > ("& RecordsPageSize - RecordsPerPage &") AND Row <= ("& RecordsPageSize &") ORDER BY" & SQLCONT1 & SQLCONT2 Set objXML = objConn.Execute(SQL)

    Read the article

  • SQLite is the CASE statement expensive?

    - by galford13x
    I'm wondering if using a CASE statement in SQLite (or other SQL engines) to replace data is not advised. For example lets say I have a query. SELECT Users, CASE WHEN Active = 0 THEN 'Inactive' WHEN Active = 1 THEN 'Active' WHEN Active = 2 THEN 'Processing' ELSE 'ERROR' AS Active FROM UsersTable; When is it better to create a reference table and perform a JOIN. In this case I would create a Table 'ActiveStatesTable' with ActiveID, ActiveDescription and perform the JOIN.

    Read the article

  • need help passing multiple variables from foreach loop to test in switch case statement

    - by Brad
    $list_of_groups = array("FACULTY","STAFF"); foreach ($list_of_groups as $i => $group) { $user_in_group = $adldap->user_ingroup($username,$group); print "<h2>Group: ".$group." user in group? ".$user_in_group."</h2>"; // if 1, means yes } Need to print run the appropriate function based on what returns true. There are user's that are members of both FACULTY and STAFF groups, so I want to check for those users and display the appropriate content for them. So if the user is both faculty and staff, then display this, if they are only of staff, display that, same for faculty, might not make sense, but I will write out some code "in theory" that will help you understand what I am trying to do switch(Get group membership of user) { case "FACULTY": print "Faculty group member"; break; case "STAFF": print "Staff group member"; break; case "FACULTY and STAFF": print "Member of both faculty and staff"; break; } I am unsure on how it will check if they are members of both groups and run that thru the case statement to display the appropriate message. The foreach look currently runs thru every group the user belongs to, prints out the ones from the $list_of_groups and the number 1 to the right of it, signifying they belong to it. The problem I have is trying to use that information to run thru the case statement, I am unsure of how to go about that. This is what it prints out for the user currently passed thru the foreach loop: Group: FACULTY user in group? 1 Group: STAFF user in group? 1 Any help is appreciated.

    Read the article

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