Search Results

Search found 27691 results on 1108 pages for 'multi select'.

Page 42/1108 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Create multi-part message in MIME format Freemarker template

    - by Mat Banik
    How do you create email message that contains text and HTML version for the same content? Of course I would like to know how to setup the freemarker template or the header of the message that will be send. When I look on the source of message multi-part message in MIME format that I receive in inbox every once in while this is what is in there: This is a multi-part message in MIME format. ------=_NextPart_000_B10D_01CBAAA8.F29DB300 Content-Type: text/plain Content-Transfer-Encoding: 7bit ...Text here... ------=_NextPart_000_B10D_01CBAAA8.F29DB300 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html><body> html code here ... </body></html>

    Read the article

  • Named pipe is not flushing in Python

    - by BrainCore
    I have a named pipe created via the os.mkfifo() command. I have two different Python processes accessing this named pipe, process A is reading, and process B is writing. Process A uses the select function to determine when there is data available in the fifo/pipe. Despite the fact that process B flushes after each write call, process A's select function does not always return (it keeps blocking as if there is no new data). After looking into this issue extensively, I finally just programmed process B to add 5KB of garbage writes before and after my real call, and likewise process A is programmed to ignore those 5KB. Now everything works fine, and select is always returning appropriately. I came to this hack-ish solution by noticing that process A's select would return if process B were to be killed (after it was writing and flushing, it would sleep on a read pipe). Is there a problem with flush in Python for named pipes?

    Read the article

  • Question on multi-probe Local Sensitive Hashing

    - by Yijinsei
    Hey guys sorry to be asking this kind noob question, but because I really need some guidance on how to use Multi probe LSH pretty urgently, so I did not do much research myself. I realize there is a lib call LSHKIT available that implemented that algorithm, but I have trouble trying to figure out how to use it. Right now, I have a few thousand feature vector 296 dimension, each representing an image. The vector is used to query an user input image, to retrieve the most similar image. The method I used to derive the distance between vector is euclidean distance. I know this might be a rather noob question, but do you guys have knowledge on how should i implement multi probe LSH? I am really very grateful to any answer or response.

    Read the article

  • Sqlite: Selecting records spread over total records

    - by Martin
    I have a sql / sqlite question. I need to write a query that select some values from a sqlite database table. I always want the maximal returned records to be 20. If the total selected records are more than 20 I need to select 20 records that are spread over the total records. It is also important that I always select the first and last value from the table when sorted on the date. I know how to accomplish this in code but it would be perfect to have a sqlite query that can do the same. The query Im using now is really simple and looks like this: "SELECT value,date,valueid FROM tblvalue WHERE tblvalue.deleted=0 ORDER BY DATE(date)" Hope I explained what I need, thanks for your help!

    Read the article

  • Multi-part gzip file random access (in Java)

    - by toluju
    This may fall in the realm of "not really feasible" or "not really worth the effort" but here goes. I'm trying to randomly access records stored inside a multi-part gzip file. Specifically, the files I'm interested in are compressed Heretrix Arc files. (In case you aren't familiar with multi-part gzip files, the gzip spec allows multiple gzip streams to be concatenated in a single gzip file. They do not share any dictionary information, it is simple binary appending.) I'm thinking it should be possible to do this by seeking to a certain offset within the file, then scan for the gzip magic header bytes (i.e. 0x1f8b, as per the RFC), and attempt to read the gzip stream from the following bytes. The problem with this approach is that those same bytes can appear inside the actual data as well, so seeking for those bytes can lead to an invalid position to start reading a gzip stream from. Is there a better way to handle random access, given that the record offsets aren't known a priori?

    Read the article

  • Limiting selected rows count with a stored procedure parameter in MySQL

    - by ssobczak
    I have a procedure SelectProc wich contains SELECT statement. I want to add a procedure param LimitRowsCount and use it as following: CREATE PROCEDURE SelectProc (IN LimitRowsCount INTEGER UNSIGNED) BEGIN SELECT (...) LIMIT LimitRowsCount; END but this approach doesn't work. The SELECT itself contains nested subqueries so I can't create view from it. Is there a way more propper then dynamic SQL (prepared statements) ?

    Read the article

  • Selecting a radio button when a dropdown value changes

    - by Tim F.
    My setup is something like this: radiobutton1 - selection1 radiobutton2 - selection2 textinput1 I want radiobutton1 to be selected whenever selection1 is changed, and I want radiobutton2 to be selected whenever either selection2 or textinput1 is changed. There has to be a simple javascript solution here... I just can't find it. Here's my actual code ("$semopt" is a string holding the html code for the options on the first selection input): <input type='radio' name='semester' value='existing'/>Existing semester: <select name='sem_id'">$semopt </select><br/> <input type='radio' name='semester' value='new'/>New Semester: <select name='sem_name'"> <option value='Fall'>Fall</option> <option value='Spring'>Spring</option> </select> <input name='sem_year' value='$thisyear' size='5'"/><br/>

    Read the article

  • COUNT(*) vs. COUNT(1) vs. COUNT(pk): which is better?

    - by zneak
    Hello guys, I often find these three variants: SELECT COUNT(*) FROM Foo; SELECT COUNT(1) FROM Foo; SELECT COUNT(PrimaryKey) FROM Foo; As far as I can see, they all do the same thing, and I find myself using the three in my codebase. However, I don't like to do the same thing different ways. To which one should I stick? Is any one of them better than the two others?

    Read the article

  • Screening (multi)collinearity in a regression model

    - by aL3xa
    I hope that this one is not going to be "ask-and-answer" question... here goes: (multi)collinearity refers to extremely high correlations between predictors in the regression model. How to cure them... well, sometimes you don't need to "cure" collinearity, since it doesn't affect regression model itself, but interpretation of an effect of individual predictors. One way to spot collinearity is to put each predictor as a dependent variable, and other predictors as independent variables, determine R2, and if it's larger than .9 (or .95), we can consider predictor redundant. This is one "method"... what about other approaches? Some of them are time consuming, like excluding predictors from model and watching for b-coefficient changes - they should be noticeably different. Of course, we must always bare in mind specific context/goal of analysis... Sometimes, only remedy is to repeat a research, but right now, I'm interested in various ways of screening redundant predictors when (multi)collinearity occurs in a regression model.

    Read the article

  • Screening (multi)collinearity in a reggresion model

    - by aL3xa
    I hope that this one is not going to be "ask-and-answer" question... here goes: (multi)collinearity refers to extremely high correlations between predictors in the regression model. How to cure them... well, sometimes you don't need to "cure" collinearity, since it doesn't affect regression model itself, but interpretation of an effect of individual predictors. One way to spot collinearity is to put each predictor as a dependent variable, and other predictors as independent variables, determine R2, and if it's larger than .9 (or .95), we can consider predictor redundant. This is one "method"... what about other approaches? Some of them are time consuming, like excluding predictors from model and watching for b-coefficient changes - they should be noticeably different. Of course, we must always bare in mind specific context/goal of analysis... Sometimes, only remedy is to repeat a research, but right now, I'm interested in various ways of screening redundant predictors when (multi)collinearity occurs in a regression model.

    Read the article

  • Multi-tab application (C#)

    - by Zach
    Hi, I'm creating a multi-tabbed .NET application that allows the user to dynamically add and remove tabs at runtime. When a new tab is added, a control is added to it (as a child), in which the contents can be edited (eg. a text box). The user can perform tasks on the currently visible text box using a toolbar/menu bar. To better explain this, look at the picture below to see an example of what I want to accomplish. It's just a mock-up, so it doesn't actually work that way, but it shows what I want to get done. Essentially, like a multi-tabbed Notepad. View the image here: http://picasion.com/pic15/324b466729e42a74b9632c1473355d3b.gif Is this possible in .NET? I'm pretty sure it is, I'm just looking for a way that it can be implemented.

    Read the article

  • Is it possible to use multi keyboards with multi keyboard layouts simultaneously?

    - by mono
    Considering to switch to dvorak layout, but this terminal is used by multi users as the same user account. It is unacceptable to ask all people to switch layout, plus it is hard to use dvorak layout with a keyboard qwerty-ly labeled. But there are spare (USB,qwerty) keyboards, so if I plug another keyboard in and be able to use multi layouts on different psyical keyboard simultaneously (I will rearrange letters on keys), the problem get solved. solution for either windows or linux is fine. anyway thanks all.

    Read the article

  • Using Maven shade plugin in a multi module project

    - by Manoj
    I have a scenario where-in I need to create an uber jar of a multi module maven project including all modules and their dependencies. I tried using maven shade plugin. but it seems to work only when I use it at the module level. If I add the plugin entry in parent pom then the build breaks (it tries to shade the parent pom) [INFO] Replacing original artifact with shaded artifact. [INFO] Replacing null with C:\Projects\foo.bar\target\foobar-0.0.1-SNAPSHOT-shaded.pom [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error creating shaded jar: null It does seem to make sense since the <packaging> for the parent maven project is pom. But there should be some way to create an uber jar for a multi module project... Any ideas people???

    Read the article

  • Multi-Threaded Application - Help with some pseudo code!!

    - by HonorGod
    I am working on a multi-threaded application and need help with some pseudo-code. To make it simpler for implementation I will try to explain that in simple terms / test case. Here is the scenario - I have an array list of strings (say 100 strings) I have a Reader Class that reads the strings and passes them to a Writer Class that prints the strings to the console. Right now this runs in a Single Thread Model. I wanted to make this multi-threaded but with the following features - Ability to set MAX_READERS Ability to set MAX_WRITERS Ability to set BATCH_SIZE So basically the code should instantiate those many Readers and Writers and do the work in parallel. Any pseudo code will really be helpful to keep me going!

    Read the article

  • Insert into Table from #tempTable fails

    - by AJ
    I am simply taking the data from a Table and insert it into #tempTable then delete the data, and insert it back to the table. I get "Insert Error: Column name or number of supplied values does not match table definition." Error. Here are the lines I am running. SELECT * INTO #tempTable FROM dbo.ProductSales SELECT * FROM #tempTable DELETE FROM dbo.ProductSales INSERT INTO dbo.ProductSales SELECT * FROM #tempTable Any Idea?

    Read the article

  • Multi-threaded downloader in C# question

    - by blez
    Currently I have multi-threaded downloader class that uses HttpWebRequest/Response. All works fine, it's super fast, BUT.. the problem is that the data needs to be streamed while it's downloading to another app. That means that it must be streamed in the right order, the first chunk first, and then the next in the queue. Currently my downloader class is sync and Download() returns byte[]. In my async multi-threaded class I make for example, list with 4 empty elements (for slots) and I pass each index of the slot to each thread using the Download() function. That simulates synchronization, but that's not what I need. How should I do the queue thing, to make sure the data is streamed as soon as the first chunk start downloading.

    Read the article

  • assigning selected="selected" to dynamic option list

    - by leemjac
    In an "edit article" page i have a select list which displays author first and last name, as well as authorId as the value. As well as the article context and headline and so on (fetched with a different method) - though this method also holds the authorId of the specific article. I need to have the Author of the Article selected in the option list, instead of it defaulting to the first option in the select list. what i have: echo''; //loop through author names in option list $authors_name foreach($authors_name as $nameRow){ echo'<option class="authorId" value = "' . $nameRow['AuthorID'] . '">'. $nameRow['FirstName'].' '.$nameRow['LastName'] .''; } echo'</select>'; and the jquery: var currID = ('#selectAuthor').val(); if(('.authorId').val() == currID){ $('.authorId').addClass('new_class') $('.new_class').prop('selected',true); } OR var currID = ('#selectAuthor').val(); if($("select option[value=currID]").attr('selected','selected')); Any help would be greatly appreciated, I hope what I am trying to do is clear. Thanks in advance I have simplified it with just regular input and checked it in jsfiddle.net here is the HTML '; <option value = "2">Name val 2</option> <option value = "5">Name val 5</option> <option value = "1">Name val 1</option> and here is the jquery var currID = $('#selectAuthor').val(); if($("select option[value='+currID+']").prop('selected',true));? and even then it doesn't apply selected="selected" to option with value="1"

    Read the article

  • jQuery success:function{} issue

    - by ufw
    I have several 'select' elements on the page. When I choose some of options, the ajax request is being sent to server and the element adjacent to this 'select' must be updated with response value. I expected the following code to be working: $(".vars").live("change", function() { //selected something in <select> list $.ajax({ type: "POST", url "someurl.php", data: {somedata}, success: function(html) { $this.next().html(html); //this does not update .next() element. } }); }); If I replace $(this).next().html(html); with alert(html); I can see the ajax request was successful. Moreover, it works only if there is only one 'select' on the page, otherwise the empty pop-up appears.

    Read the article

  • mySQL query: How to insert with UNION?

    - by Industrial
    Hi everybody, I am kind of new to mySQL:s union functions, at least when doing inserts with them. I have gotten the following to work based upon a example found on the net: INSERT INTO tableOne(a, b) SELECT a, $var FROM tableOne WHERE b = $var2 UNION ALL SELECT $var,$var Ok, nothing strange about that. But what happens when I want to insert a third value into the database that has nothing to do with the logic of the Select being done? Like : INSERT INTO tableOne(a, b, c ) How could that be done?

    Read the article

  • Use of where in multiple joins to remove rows - linq

    - by bergin
    hi, I have a table of orders. the status is on the soilorders which is joined to the orders. I only want to return orders where the joined soilorder does not have status "Removed". I had thought that join sso in db.SoilSamplingOrders on ord.order_id equals sso.order_id where sso.status.Equals("Removed")!=true but then no records are returned! thanks for any help (query below) var query = from ord in db.Orders join sso in db.SoilSamplingOrders on ord.order_id equals sso.order_id where sso.status.Equals("Removed")!=true join cust in db.Customers on ord.customer_id equals cust.customer_id select new Listing { assigned_to = sso.assigned_to, company = cust.company, order_id = ord.order_id, order_created = ord.order_created, customer_id = ord.customer_id, order_created_by_employ_id = ord.order_created_by_employ_id, first_farm_on_order = (from f in db.SoilSamplingSubJobs where f.order_id == ord.order_id select new ListingSubJob { first_farm_on_order = f.farm }). AsEnumerable().First().first_farm_on_order, total_fields = (from f in db.SoilSamplingSubJobs where f.order_id == ord.order_id select new { f.sssj_id }).AsEnumerable().Count(), total_area = (float?) (from f in db.SoilSamplingSubJobs where f.order_id == ord.order_id && f.area_ha != null select f.area_ha ).Sum() ?? 0 , total_area_ph_density = (float?)(from f in db.SoilSamplingSubJobs where f.order_id == ord.order_id && f.ph != null select f.ph).Sum() ?? 0, };

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >