Search Results

Search found 5105 results on 205 pages for 'words'.

Page 139/205 | < Previous Page | 135 136 137 138 139 140 141 142 143 144 145 146  | Next Page >

  • Generic SQL builder .NET

    - by Patrick
    I'm looking for a way to write an SQL statement in C# targeting different providers. A typical example of SQL statements differentiating is the LIMIT in PostgreSQL vs. TOP in MSSQL. Is the only way to solve SQL-syntax like the two above to write if-statements depending on which provider the user selects or using try catch statements as flow control (LIMIT didn't work, I'll try TOP instead)? I've seen the LINQ Take method, but I'm wondering if one can do this without LINQ? In other words, does C# have some generic SQL Provider class that I have failed to find that can be used?

    Read the article

  • Java loop and increment problem

    - by user552961
    Can any one tell me what is the problem in my program? String a[],b[]; int c[] = new int[b.length]; for (int j = 0; j < a.length; j++) { for (int k = 0; k < b.length; k++) { if (b[k].equals(a[j])) { c[k]++; } else { c[k] = 0; } } } I have thousands of words stored in a HashMap. Now I want to check in every file that how many time one word occurred from allWords. Can you point out mistake in my program or give me your idea that how I can do it?

    Read the article

  • Is there a (C#) library that will create feeds for Amazon Marketplace Web Services?

    - by Josh Kodroff
    Does anyone know of a library out there (preferably in C#) that will take classes and generate XML or flat files suitable for feeds to Amazon Marketplace Web Services? In other words, I'd like to do something like this: var feed = new AmazonProductFeed(); var list = new AmazonProductList(); var product1 = new AmazonProduct(); product1.Name = "Product 1"; list.Add(product1); var product2 = new AmazonProduct(); product2.Name = "Product 2"; list.Add(product2); feed.Products = list; // spits out XML compliant with Amazon's schema Console.Write(feed.ToXml()); It looks like the only code Amazon provides are wrappers for the web service itself and the directory-based transport utility (AMTU).

    Read the article

  • extending Bash tab completion: how to handle paths / partial commands?

    - by Rawing
    I've added tab completion for my program to bash. It works quite well, but I don't know how to handle partial completion of words. Example: the user types ./program /home/user/De and presses TAB. This is then completed to ./program /home/user/Desktop/ , but there's now a trailing whitespace after 'Desktop/', which is not what I want. Basically, I need a way of preventing bash from adding whitespace after the completed word. I don't want to use bash's completion for paths.

    Read the article

  • Using the same cookie in two logins

    - by cer9ss
    Hi everyone, I need your help I've a MVC project that uses Jquery, where I've implemented a mechanism of "Remember Me" using cookies to save, clear and retrieve the login and password. I also have two screens where the user does the login. I want that both logins manipulate the same cookie. I've got to implement it, but I've realized that each one has a different behaviour. I mean, the cookie's value I save in the first login is not the same than the value that retrieves the second login (when I open it). In other words, if I mark "remind me" on the first login, it isn't reflected on the second login and viceversa. What can I do to make that both of them manipulate and read the same values from the same cookie? Is it possible? PS: For this situations I'm using the same web navigator: Firefox or IE. Thanks in advance

    Read the article

  • When open-sourcing a live Rails app, is it dangerous to leave the session key secret in source contr

    - by rspeicher
    I've got a Rails app that's been running live for some time, and I'm planning to open source it in the near future. I'm wondering how dangerous it is to leave the session key store secret in source control while the app is live. If it's dangerous, how do people usually handle this problem? I'd guess that it's easiest to just move the string to a text file that's ignored by the SCM, and read it in later. Just for clarity, I'm talking about this: # Your secret key for verifying cookie session data integrity. # If you change this key, all old sessions will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. ActionController::Base.session = { :key => '_application_session', :secret => '(long, unique string)' } And while we're on the subject, is there anything else in a default Rails app that should be protected when open sourcing a live app?

    Read the article

  • what's the javascript "var _gaq = _gaq || []; " for ?

    - by parvas
    The Async Tracking in google analytics looks like this: var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); About The first line var _gaq = _gaq || []; I think it ensures that if _gaq is already defined we should use it otherwise we should an array. Can anybody explain what this is for ? Also, does it matter if _gaq gets renamed ? in other words does google analytics rely on a global object named _gaq ? Thanks Parvas

    Read the article

  • PHP & MySQL Problem

    - by Fincha
    I Have a script, getting text from DB and post it on other DB. Problem is, if I have a Text lngen then 840 Words, I can't call this page. Get an error about "Not Found" or "Connection brocken" or what ever. In FF i get no error, only blank page. I found out the Problem is in lenght of the query i send... but how can i fix it??? My it be the Problem, if a query is longer then 6000 Characters?

    Read the article

  • Translate sequence in macro parameters to separate macros

    - by Alex Tiger
    How to acces each element in macro if the definition is like MACRO(name, seq) and the code is like: MACRO("TheName", (Elem1) (Elem2) (Elem3) ) I want to generate the next code: MACRO("TheName", ELEMMACRO(Elem1) ELEMMACRO(Elem2) ELEMMACRO(Elem3) ) Or something like that. In other words, I want to process every parameter separately (I don't care of definition, even if it will be something like MACRO("TheName", Elem1, Elem2, Elem3 ) There could be more elements, there could be less. I have tried V_ARGS (I need it only for gcc), but I can only copy all the elements by that, not to process them separately. What can I do? P.S. Because of some reasons, I can't use Boost.

    Read the article

  • Where to find viterbi algorithm transition values for natural language processing?

    - by Rodrigo Salazar
    I just watched a video where they used Viterbi algorithm to determine whether certain words in a sentence are intended to be nouns/verbs/adjs etc, they used transition and emission probabilities, for example the probability of the word 'Time' being used as a verb is known (emission) and the probability of a noun leading onto a verb (transition). http://www.youtube.com/watch?v=O_q82UMtjoM&feature=relmfu (The video) How can I find a good dataset of transition and emission probabilities for this use-case? Or EVEN just a single example with all the probabilities displayed, I want to use realistic numbers in a demonstration.

    Read the article

  • Should I pointer-cast from a private derived class to its base class?

    - by skydoor
    I found this from C++FAQ Generally, No. From a member function or friend of a privately derived class, the relationship to the base class is known, and the upward conversion from PrivatelyDer* to Base* (or PrivatelyDer& to Base&) is safe; no cast is needed or recommended. However users of PrivatelyDer should avoid this unsafe conversion, since it is based on a private decision of PrivatelyDer, and is subject to change without notice. How to understand the above words? I don't think the explanation is correct or accurate. I have a code like this class A{ }; class B: private A{ }; int main(){ B *b = new B(); A *a = new A(); a = b; //wrong a = (A*)b; //right }

    Read the article

  • Is there an HTML code that can make my background picture transparent and my text non-transparent?

    - by user1831312
    Okay so I've been typing some HTML code for a technology class that I need to satisfy for my Education major. This is what i have for my background: body { background-image:url('islandbeach.jpg'); background-repeat:repeat; background-position:center; background-attachment:fixed; background-size:cover; } Now, I want to make my background transparent or faded so I can see the text and the other image that I have. The background is too colorful to be able to see the words without having to squint. Are there any HTML codes that can do this for me? I am not a pro at this stuff, I've just been following everything my professor has told me to do so please explain stuff in baby steps if you do have an answer. Thank you so so much!

    Read the article

  • Javascript: Inherit method from base class and return the subclass's private variable

    - by marisbest2
    I have the following BaseClass defined: function BaseClass (arg1,arg2,arg3) { //constructor code here then - var privateVar = 7500; this.getPrivateVar = function() { return privateVar; }; } I want to have the following subclass which allows changing privateVar like so: function SubClass (arg1,arg2,arg3,privateVar) { //constructor code here then - var privateVar = privateVar; } SubClass.prototype = new BaseClass(); Now I want SubClass to inherit the getPrivateVar method. However, when I try this, it always returns 7500 which is the value in the BaseClass and not the value of privateVar. In other words, is it possible to inherit a BaseClass's public methods but have any references in them refer to the SubClass's properties? And how would I do that?

    Read the article

  • Organizing c# code into different files

    - by Adam S
    Hi everyone. I've gotten to a point where my main code file is about a thousand lines long and it's getting un-manageable; that is, I'm starting to get confused and not know where to locate some things. It's well-commented but there's just too much stuff. I'd really like to be able to organize my code into different files, each with its own purpose. I want to get all the help VS gives me as I type when I edit these other files. A picture can say a thousand words: Is what I'm trying to do even possible?

    Read the article

  • MySQL pivot tables - covert rows to columns

    - by user2723490
    This is the structure of my table: Then I run a query SELECT `date`,`index_name`,`results` FROM `mst_ind` WHERE `index_name` IN ('MSCI EAFE Mid NR USD', 'Alerian MLP PR USD') AND `time_period`='M1' and get a table like How can I convert "index_name" rows to columns like: date | MSCI EAFE Mid NR USD | Alerian MLP PR USD etc In other words I need each column to represent an index and rows to represent date-result. I understand that MySQL doesn't have pivot table functions. What is the easiest way of doing this? I've tried this code, but it generates an error: SELECT `date`, MAX(IF(index_name = 'Alerian MLP PR USD' AND `time_period`='M1', results, NULL)) AS res1, MAX(IF(index_name = 'MSCI EAFE Mid NR USD' AND `time_period`='M1', results, NULL)) AS res2 FROM `mst_ind` GROUP BY `date I need to make the conversion on the query level - not PHP. Please suggest a nice and elegant solution. Thanks!

    Read the article

  • How to "redefine search" or correct "misspelling" from the database

    - by From.ME.to.YOU
    Hello i want to add new feature to the search in my website. i'm using PHP and MYSQL. mysql database containing a table to the items that the user will search for, for each item there is a "keyword" column that's comma separated keywords "EXAMPLE: cat,dog,horse". after the user search in my website i want to get the words that are let me say "85%" similar to his search keyword, this is for redefine search. and for misspelling i want a service or something that provide if the keyword is correct or misspelled so i get some corrections and check if those exists in the database and then give those corrections to user to change his search keyword. i'm not asking for a solution here ... but if you can direct me in a one way or another that will be great Thanks guys Cheers

    Read the article

  • indexing according to frequency

    - by Bfu38
    sorry to bother you. I have a data.frame like this: 24.8 23.2 22.8 22.5 22.5 22.4 22.4 22.4 22.3 22.2 22.2 22.2 22 21.9 21.9 21.8 I would like to add an index according to the frequency, to have the following output: 24.8 1 23.2 1 22.8 1 22.5 2 22.5 2 22.4 3 22.4 3 22.4 3 22.3 1 22.2 3 22.2 3 22.2 3 22 1 21.9 2 21.9 2 21.8 1 How this can be done? in other words, since 28.8 occurs 1 time, it will have the index 1; since 22.5 occurs two times, it will have index 2 and so on.

    Read the article

  • Traversing ORM relationships returns duplicate results

    - by NKing253
    I have 4 tables -- store, catalog_galleries, catalog_images, and catalog_financials. When I traverse the relationship from store --> catalog_galleries --> catalog_images in other words: store.getCatalogGallery().getCatalogImages() I get duplicate records. Does anyone know what could be the cause of this? Any suggestions on where to look? The store table has a OneToOne relationship with catalog_galleries which in turn has a OneToMany relationship with catalog_images and an eager fetch type. The store table also has a OneToMany relationship with catalog_financials.

    Read the article

  • mod_perl2 send original requested url

    - by spoier
    Hello all, I have a mod_perl module to intercept the http response fase but I just want to intercept it and satisfy that request... In other words, I want to get the request and return what the client requested... I have something like this: use strict; use Apache2::RequestRec (); # for $r->content_type use Apache2::RequestIO (); # for $r->puts use Apache2::Const -compile => qw(:common); sub handler { my $r = shift; $r->content_type('text/html'); return Apache2::Const::OK; } 1; Apparently it doesn't work...

    Read the article

  • What is the purpose of @ as part of a member name in C#?

    - by thelaughingdm
    As you can imagine, Googling or Binging for any phrase containing an '@' is difficult. In creating a new web service, one of the members of the imported C# proxy class is prefixed with the @. For example: plan.@event = new Insurance.Event(); I assume that it is Visual Studio's way resolving potential conflicts with reserved words because 'event' is a reserved word. Changing the property in the web service interface to something other than 'event' (i.e. 'healthevent') removes the @ from the property. Is this a correct assumption?

    Read the article

  • Twitter Answering System with Php

    - by 1342
    I'm working on a project which gives information to students, online and instantly on Twitter ( for my university, I'm also student in Computer Engineering - first year ) I'm fetching mentions which comes to this account - https://twitter.com/BahcesehirBilgi I'm trying to search these in order to filters which i created in my panel. http://imgim.com/2107incia8023554.jpg - This is panel screenshot ( filter add ) I'm splitting filter words and searching them in mydatabase coloumn which get information about users tweet ( using mysql like, %word1%%word2% etc ). http://imgim.com/3792incis3008867.jpg - Example of filter, and answers http://imgim.com/1424incit5317319.jpg - random dashboard screenshot Here is the question, how can i search this filters more accurately and more human friendly in my database ? Please dont forget this is my first project, and new in Php and working alone :)

    Read the article

  • sort list(of string()) using a variable index into string() as key - vb.net

    - by tullynyguy
    I have a List(of String()). I have written a custom comparer (implements IComparer(of string)) to do an alphanumeric sort. Is there a way to sort the List using a given index to determine which position in the String() to sort by? In other words one time I might sort by Index = 0 and another time by Index = 3. The length of all String() in the list is the same. For reference this question is similar to Sort List<String[]> except I am using VB.net and that question is hardwired to Index=0.

    Read the article

  • In a JDBC ResultSet, what should happen when getLong() or getShort() is called on an int result colu

    - by Uri
    Say that I have a JDBC ResultSet, and I call the getLong() or getshort() method. For which of the following SQL types {SMALLINT, INT, BIGINT} should I get long, and for which types should I get an error? In other words, if I have an INT and I want a SMALLINT (A short), would I get it, or would I get an error? Similarly, if I have an INT and want a BIGINT (a long), would I get it, or would I get an error? The Javadocs (listed below) say nothing. public long getLong(int columnIndex) throws SQLException Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language. Parameters: columnIndex - the first column is 1, the second is 2, ... Returns: the column value; if the value is SQL NULL, the value returned is 0 Throws: SQLException - if a database access error occurs

    Read the article

  • What would be the most efficient way to do this search (mysql or text)?

    - by alex
    Suppose I have 500 rows of data, each with a paragraph of text (like this paragraph). That's it.I want to do a search that is not only based on words. (%LIKE%, not FULL_TEXT) What would be faster? SELECT * FROM ...WHERE LIKE "%query%"; This would put load on the database server. Select all. Then, go through each one and do .find = 0 This would put load on the web server. This is a website, and people will be searching frequently.

    Read the article

  • How to search and validate plain texts (where it starts with http AND ends with .aspx) to be a valid hyperlink in a page body content?

    - by syntaxcode
    My web page content is populated by a plain text that is retrieved from a CDATA format - plain text data. This is the site http://checksite.apsx to get information. For more information, visit http://moresites.com/FAQ/index.html or search the site. Now, my goal is to convert this plain text to a valid hyperlinks. I've used a javascript code that does the conversion - /((http|https|ftp):\/\/[^ ]+)/g; , but sometimes if there are multiple words, it captures an invalid URL. My question: Is there a way to strictly capture any string that starts with "http" AND ends with ".html" or "aspx" will be converted into a valid hyperlink? it should look like this - This is the site http://checksite.apsx to get information. For more information, visit http://moresites.com/FAQ/index.html or search the site.

    Read the article

< Previous Page | 135 136 137 138 139 140 141 142 143 144 145 146  | Next Page >