Search Results

Search found 55882 results on 2236 pages for 'instruction set'.

Page 94/2236 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • Sphinx: change column set for searching in runtime

    - by Fedyashev Nikita
    I use Ultrasphinx gem plugin as a wrapper for accessing Sphinx search daemon. My model declaration: class Foo < ActiveRecord::Base is_indexed :fields => ['content', 'private_notes', 'user_id'] Client code: filters = {} if type == "private" # search only in `content` column filters['user_id'] = current_user.id else # search in `content` and `private_notes` columns end results = Ultrasphinx::Search.new(:query => params[:query], :per_page => 20, :page => params[:page] || 1, :filters => filters) The problem I have now with Ultrasphinx gem(or Sphinx, in general?) is that it does not allow me to change set of fields where to look for matches IN RUNTIME How can I solve this problem?

    Read the article

  • set up way of getting mysite.$domain

    - by jose silva
    Hi I have several domains, only one website and one databse table for each domain. example: wbesite.us - data from USA goes to database table main_usa wbesite.co.uk - data form UK goes to database table main_uk Only have one database with name of the website. Having only one website structured, and having variables like $sql="select * from main_".$countrycode." where bla..bla..., and many other variables to catch the domain extension, and so on... Now, instead of having one full website for each domain, how can set a script and wher do I put it in order to detect the domain that the user uses. In my server root do I create something like website.$domain ? Something like website OLX but for different purposes. I hope I made myself clear. Thank you.

    Read the article

  • Unable to return large result set ORA-22814

    - by rvenugopal
    Hello All I am encountering an issue when I am trying to load a large result set using a range query in Oracle 10g. When I try a smaller range (1 to 100), it works but when I try a larger range(1 and 1000), I get the following error "ORA-22814: attribute or element value is larger than specified in type" error. I have a basic UDT (PostComments_Type) and I have tried using both a VArray and a Table type of PostComments_Type but that hasn't made a difference. Your help is appreciated --Thanks Venu PROCEDURE RangeLoad ( floorId IN NUMBER, ceilingId IN NUMBER, o_PostComments_LARGE_COLL_TYPE OUT PostComments_LARGE_COLL_TYPE -- Tried using as VArray and also Table type of PostComments_Type )IS BEGIN SELECT PostComments_TYPE ( PostComments_ID, ... ) BULK COLLECT INTO o_PostComments_LARGE_COLL_TYPE ------------This is for VARRAY/Table Type. So bulk operation FROM PostComments WHERE PostComments_ID BETWEEN floorId And ceilingId; END RangeLoad;

    Read the article

  • Rails -- Cant set value for date_select in form

    - by ChrisWesAllen
    I'm pulling data from an API where the date data comes in as "2008-02-11 00:00:00 " I would like that data to go into my form within the date_select as a value so I can view it correctly before I add it into my database. The view looks like <%= f.label :start_date %><br /> <%= f.date_select :start_date, :value => " #{@stdate[idx]} " %> The object is actually an array of dates since I'm doing this action several times do thats why the [idx] is there; serving as an index. <%= @stdate[idx] % ends up outputting "2008-02-11 00:00:00 " but the fields for the date_select helper only outputs the current date "2010" "June" "5" in those dropdown date selects fields... Do I need to set the values of the Year, Month, and Date Individually? I have Chronic and tried to parse the object before using it as a value for the date_select and that didnt work either. Any ideas?

    Read the article

  • how to set title within content page asp.net

    - by varshney4u
    Hi, I have created a Content Page using Master Page. Within Master Page, I have created the following tag for Title: <head id="Head1" runat="server"> <title></title> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> </head> Within Content Page, following are set: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (String.IsNullOrEmpty(Request.QueryString["PatientRegistrationKey"])) { // .... } else { this.Page.Title = "My New Title"; //.... } } Though I am also setting the Master Page at run time as bellow: protected void Page_PreInit(Object sender, EventArgs e) { if (String.IsNullOrEmpty(Request.QueryString["PatientRegistrationKey"])) this.MasterPageFile = "~/MasterPages/A.master"; else this.MasterPageFile = "~/MasterPages/B.master"; } While getting open this page in browser, I got following Title: http://localhost:3562/?PatientRegistrationKey=0 - My New Title Please advice for the changes, so that there should be only My New Title within title, nothing extra like query string etc. Any help would be appreciated.

    Read the article

  • How to set cell's background in HTML table ?

    - by misha-moroshko
    I would like to set the background of a cell in HTML table to be like this. What are my options besides using an image as background ? Are there any predefined backgrounds like this ? Maybe dotted, or diagonal lines backgrounds ? In case of image background, if I don't know in advance what would be the size of the cell, what image size should I take ? How to make it be repetitive so it would look nice ? Any HTML/CSS/Javascript/jQuery suggestions are welcome :)

    Read the article

  • XForms: set default selection in dropdown in binding

    - by Purni
    I have a main instance named 'myinstance' which has the element . Color can be 'Red', 'Blue', 'Green' or ''Yellow'. The colors are populated in a drop-down from another instance called 'colorsinstance'. When my form loads, I want the default in the dropdown to be set to 'Green' in the nodeset binding. <instance id="colorsinstance"> <items> <item label="Color1" value="Red"/> <item label="Color2" value="Blue"/> <item label="Color3" value="Green"/> <item label="Color4" value="Yellow"/> </items> </instance> Main instance binding is as follows: <xforms:bind nodeset="instance('myinstance')"> <xforms:bind nodeset="./color" required="true()"/> </xforms:bind>

    Read the article

  • How to properly set path to media files in Django

    - by sasquatch90
    Hello. I've got a new project, and currently I'm trying to set it correctly. But somehow I can't make my media files work. Here's my current setting : MEDIA_ROOT = os.path.normpath( '/home/budzyk/rails/fandrive/site_media/' ) templates setting work on the other hand : TEMPLATE_DIRS = ( "/home/budzyk/rails/fandrive/templates", ) Catalog with media files is ../fandrive/site-media/ so why it's not working ? Here's my base.html template with styles imported, and firebug window when my page is loaded : <head> <title>{% block title %}{% endblock %}</title> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/style.css" /> {% block pagecss %}{% endblock %} <script type="text/javascript" src="{{ MEDIA_URL }}jquery/jquery-1.4.2.min.js"></script> </head> <body> <div id="wrapper"> http://img237.imageshack.us/img237/4909/21205809.jpg

    Read the article

  • cannot set a variable to base on user input post method

    - by user1318960
    Hello i´m trying to set info from a post method into a variable that sets a session named name the value that the user input. I get the following error: Notice: Undefined index: name in F:\xampp\htdocs\Impossible game\index.php on line 18 This is line 18: $session = $_POST['name']; <form action="ms1.php" method="POST"> Name <input type="text" name="name"> <input type="Submit" value="Begin"> </form> <?php $session = $_POST['name']; session_start(); $_SESSION['name'] = $session;

    Read the article

  • DataGridView error when set DataSource

    - by user264464
    I got an error when run datagridview.DataSource = dataView; dataview is correct. I can see data inside it when I debug program. I got next error "Object reference not set to an instance of an object." Any Ideas? code: this.datagridview = new System.Windows.Forms.DataGridView(); ... DataSet ds = new DataSet(); XmlReaderSettings settings = new XmlReaderSettings(); StringReader stringReader = new StringReader(retString); XmlReader xmlReader = XmlReader.Create(stringReader, settings); ds.ReadXml(xmlReader); DataView dataView = ds.Tables[0].DefaultView; dataView is not null. I am able to view it when debug

    Read the article

  • SELECT only a certain set of rows at a time

    - by prmatta
    I need to select data from one table and insert it into another table. Currently the SQL looks something like this: INSERT INTO A (x, y, z) SELECT x, y, z FROM B b WHERE ... However, the SELECT is huge, resulting in over 2 millions rows and we think it is taking up too much memory. Informix, the db in this case, runs out of virtual memory when the query is run. How would I go about selecting and inserting a set of rows (say 2000)? Given that I don't think there are any row ids etc.

    Read the article

  • How to set this if isset function

    - by Danny Florian
    I have the following code that sets a background if user has uploaded to database. If user has NOT uploaded an image then the result is a blank img src='' I need to set this as an if isset function so I can plug in an alternate image if user has not uploaded anything. Here is the current code: <div id="background"><?php echo isset($background_image) && file_exists(ROOT.$background_image)?"<img src='$background_image' alt='' />":'';?></div>

    Read the article

  • unable to set href inside click event of Jquery

    - by akshatrautela
    Hi I am trying to set href using Jquery inside click event of RadioButtonList but that doesnt work If I take the same code to document.ready event it works fine but not in click event. Please advice. $(document).ready(function() { url = "Results.aspx?latitude=" +latitude + "&Longitude=" + longitude; $("a[href='http://www.google.com/']").attr("href", url); // this works.. } $('.rbl input').click(function() { id = $(this).parent().children("input").val(); url = "Results.aspx?latitude=" + latitude + "&Longitude=" + longitude + "&ServiceCenterProductTypeId=" + id; //alert(url); $("a[href='http://www.google.com/']").attr("href", url); //this doesnt work.... }); });

    Read the article

  • result set using two different views (from an if statement)

    - by mailman1979
    Hi All, I have a bit of code that works with a result set called "result" (original I know) but depending on the incoming variable I'd like to fire the specific query depending. I have the below in an if statement but that just makes the "result" recordset gets those nasty red lines and it doesn't work. I'm sure this is easy to work out. if (area == "dashboard") { IQueryable<ViewGetNavigationMainItem> result = (from m in _entities.ViewGetNavigationMainItems where m.area.Trim() == area.Trim() where m.state == "Online" where m.parentID == parentID orderby m.sequence ascending select m); } else { //Get the Content Items IQueryable<ViewGetNavigationContentItem> result = (from m in _entities.ViewGetNavigationContentItems where m.navID == navID where m.parentID == parentID orderby m.contentOrder ascending select m); } maxRecords = result.Count(); foreach (var item in result) { etc etc etc

    Read the article

  • Find MySQL entries with same set of column B values for their common column A value

    - by nnsd44g
    I have: +----+------+------+ | id | A | B | +----+------+------+ | 1 | 1 | 1 | < | 2 | 1 | 2 | < | 3 | 2 | 2 | | 4 | 2 | 3 | | 5 | 3 | 1 | < | 6 | 3 | 2 | < | 7 | 4 | 4 | | 8 | 4 | 5 | +----+------+------+ I need to select the entries that have the same set of B values for their common A value. So, in this case, I need ids 1, 2 and 5, 6 because in those cases the sequence of B values is 1, 2. Is this possible? Thanks!

    Read the article

  • Region or ItemsSource for large data set in ListBox

    - by Ryan
    I'm having trouble figuring out what the best solution is given the following situation. I'm using Prism 4.1, MEF, and .Net 4.0. I have an object Project that could have a large number (~1000) of Line objects. I'm deciding whether it is better to expose an ObservableCollection<LineViewModel> from my ProjectViewModel and manually create the Line viewmodels there OR set the ListBox as it's own region and activate views that way. I'd still want my LineViewModel to have Prism's shared services (IEventAggregator, etc.) injected, but I don't know how to do that when I manually create the LineViewModel. Any suggestions or thoughts?

    Read the article

  • Set Hibernate session's flush mode in Spring

    - by glaz666
    I am writing integration tests and in one test method I'd like to write some data to DB and then read it. @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:applicationContext.xml"}) @TransactionConfiguration() @Transactional public class SimpleIntegrationTest { @Resource private DummyDAO dummyDAO; /** * Tries to store {@link com.example.server.entity.DummyEntity}. */ @Test public void testPersistTestEntity() { int countBefore = dummyDAO.findAll().size(); DummyEntity dummyEntity = new DummyEntity(); dummyDAO.makePersistent(dummyEntity); //HERE SHOULD COME SESSION.FLUSH() int countAfter = dummyDAO.findAll().size(); assertEquals(countBefore + 1, countAfter); } } As you can see between storing and reading data, the session should be flushed because the default FushMode is AUTO thus no data can be actually stored in DB. Question: Can I some how set FlushMode to ALWAYS in session factory or somewhere else to avoid repeating session.flush() call? All DB calls in DAO goes with HibernateTemplate instance. Thanks in advance.

    Read the article

  • Replace a DIV with another using effect and set cookie

    - by Alex
    Hi. I've got some complicated requirements and wondered if there's a way to accomplish this via jQuery: User comes to a web page for the first time today and we show DIV_1. After 30 seconds, we dissolve DIV_1 to DIV_2. We set a cookie on the user's machine that expires when s/he returns tomorrow. If the same user returns today, we only show DIV_2. Tomorrow, we repeat the process: The user will see DIV_1 and then it dissolves to DIV_2. How do you accomplish this via jQuery? Thank you.

    Read the article

  • How can I set breakpoints in an external JS script in Firebug

    - by Manu
    I can easily set breakpoints in embedded JS functions, but I don't see any way of accessing extarnal JS scripts via Firebug unless I happen to enter them during a debug session. Is there a way to do this w/o having to 'explore' my way into the script? @Jason: This is a good point, but in my case I do not have easy access to the script. I am specifically talking about the client scripts which are invoked by the ASP.Net Validators that I would like to debug. I can access them during a debug session through entering the function calls, but I could not find a way to access them directly.

    Read the article

  • session set for some Actions in Zend framework

    - by user202127
    I'm working on a website , in CV part users have some articles that only logged in users can download them.I want to make changes to the log in Action or preDispatch() to set session for guess users to download the articles, can some one tell me how it can be or give me some reference links. here is my preDispatch(): public function preDispatch() { $userInfo=$this->_auth->getStorage()->read(); $identity= $this->_auth->getIdentity(); if(!$this->_auth->hasIdentity()) { return $this->_helper->redirector('login','login'); } if(!isset($userInfo["member_id"]) || strlen($userInfo["member_id"])==0) { return $this->_helper->redirector('forbidden','login'); } $this->_accessType=2; }

    Read the article

  • Can't seem to be able to set ListViewItem.imageIndex

    - by TKL
    I have been scratching my head with this error for at least an hour, what the heck is wrong here? In a loop: if (selectedItems[x].ImageIndex == 3) { List<ListViewItem> dupes = CP.listCache.FindAll(delegate(ListViewItem item) { return item.Text == selectedItems[x].Text; }); if (dupes != null && dupes.Count == 1) dupes[0].ImageIndex = 0; } I can access the imageIndex, but not set it. ArgumentOutOfRange exception occurs.

    Read the article

  • Set primary key on hibernate generated sequence table

    - by bungrudi
    setup: hibernate 3.3, MySQL 5 I have an hibernate entity that have its PK generated using a sequence table. The annotation looks like this: @GenericGenerator(name = "SCENARIO_TABLE_GEN", strategy = "org.hibernate.id.enhanced.TableGenerator", parameters = { @Parameter(name = "initial_value", value = "5"), @Parameter(name = "force_table_use", value = "true"), @Parameter(name = "table_name", value = "SEQ_TABLE"), @Parameter(name = "value_column_name", value = "VALUE_COL"), @Parameter(name = "segment_column_name", value = "KEY_COL"), @Parameter(name = "segment_value", value = "SCENARIO") }) The problem is, that hibernate generated sequence table (SEQ_TABLE in my case, generated using hbm2ddl) does not have a primary keys. How do I tell hibernate that I want to have the primary key for the sequence table set on KEY_COL ?

    Read the article

  • Manipulating both unicode and ASCII character set in C#

    - by Murlex
    I have this mapping in my C# application string [,] unicode2Ascii = { { "&#3001;", "\x86" } }; ஹ - is the unicode value for a tamil literal "ஹ". This is the raw hex literal for the unicode value saved by MS Word as a byte sequence. I am trying to map these unicode value "strings" to a hex value under 255 (so as to accommodate non-unicode supported systems). I trying to use string.replace like this: S = S.replace(unicode2Ascii[0,0], unicode2Ascii[0,1]); However the resultant ouput has a ? instead of the actual hex 0x86 stored. Any pointer on how I could set the encoding for the second element of that array to something like windows-1252? Or is there a better way to do this conversion? thanks in advance

    Read the article

  • Set the mouseover Attribute of a div using JQuery

    - by Abs
    Hello all, I would like to set an attribute for a div. I have done this: $('#row-img_1').onmouseover = function (){ alert('foo'); }; $('#row-img_2').onmouseout = function (){ alert('foo2'); }; However, the above has not worked, it does not alert when mouse is over or when it moves out. I have also tried the $('#row-img_1').attr(); and I could not get this to work either. I am aware that I should be using a more effective event handling system but my divs are dynamically generated. Plus this is a small project. ;) Thanks all for any help.

    Read the article

  • Rails - Displaying Large Set of Data in a Table / Start new column after X rows

    - by ChrisWesAllen
    Hi, I trying to display a large set of checkboxes in my rails app and didnt knwo the syntax for displaying like 15 rows then after starting a new column. I have a model with about 120 entries. Currently, I have it being displayed in the view as.... <% for interest in Interest.find(:all) %> <%= check_box_tag Blah Blah Blah %> <%= interest.name %> <% end %> How can I make it so it makes a table and after every 15 or so rows make a new column???

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >