Search Results

Search found 17734 results on 710 pages for 'values'.

Page 76/710 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • C# regularly return values from a different thread

    - by sdds
    Hello, I'm very new to multithreading and lack experience. I need to compute some data in a different thread so the UI doesn't hang up, and then send the data as it is processed to a table on the main form. So, basically, the user can work with the data that is already computed, while other data is still being processed. What is the best way to achieve this? I would also be very grateful for any examples. Thanks in advance.

    Read the article

  • right click values for Gridview column

    - by peter
    I have grid named 'GridView1' and displaying columns like this <asp:GridView ID="GridView1" OnRowCommand="ScheduleGridView_RowCommand" runat="server" AutoGenerateColumns="False" Height="60px" Style="text-align: center" Width="869px" EnableViewState="False"> <Columns> <asp:BoundField HeaderText="Topic" DataField="Topic" /> <asp:BoundField DataField="Moderator" HeaderText="Moderator" /> <asp:BoundField DataField="Expert" HeaderText="Expert" /> <asp:BoundField DataField="StartTime" HeaderText="Start" > <HeaderStyle Width="175px" /> </asp:BoundField> <asp:BoundField DataField="EndTime" HeaderText="End" > <HeaderStyle Width="175px" /> </asp:BoundField> <asp:TemplateField HeaderText="Join" ShowHeader="False"> <ItemTemplate> <asp:Button ID="JoinBT" runat="server" CommandArgument="<%# Container.DataItemIndex %>" CommandName="Join" Text="Join" Width="52px" /> </ItemTemplate> <HeaderStyle Height="15px" /> </asp:TemplateField> </Columns> </asp:GridView> Here what is my requirement is whenever we right click on each row in gridview ,it should display three option join meeting(if we click it will go to meeting.aspx),,view details(will go to detail.aspx),,Subscribe(subscribe.aspx) just like when we click right any where we can see view,sortby,refresh like that..Do we need to implement javascript here

    Read the article

  • Django | How to pass form values to an redirected page

    - by MMRUser
    Here's my function: def check_form(request): if request.method == 'POST': form = UsersForm(request.POST) if form.is_valid(): cd = form.cleaned_data try: newUser = form.save() return HttpResponseRedirect('/testproject/summery/) except Exception, ex: # sys.stderr.write('Value error: %s\n' % str(ex) return HttpResponse("Error %s" % str(ex)) else: return render_to_response('index.html', {'form': form}, context_instance=RequestContext(request)) else: form = CiviguardUsersForm() return render_to_response('index.html',context_instance=RequestContext(request)) I want to pass each and every field in to a page call summery and display all the fields when user submits the form, so then users can view it before confirming the registration. Thanks..

    Read the article

  • Compare string with all values in array

    - by Hallik
    I am trying to fumble through python, and learn the best way to do things. I have a string where I am doing a compare with another string to see if there is a match: if paid[j].find(d)>=0: #BLAH BLAH If 'd' were an array, what is the most efficient way to see if the string contained in paid[j] has a match to any value in 'd'?

    Read the article

  • Regular Expression to Match Specific "Values" in Isolated Group

    - by Gandarez
    If have this regular expression to test (\&TRUNC)[\(]{1,}(.+)[\)]{1,} And I have this "tester" ((((&TRUNC((1800,000 / 510)) * 510) * 920) + (2 * (510 * 700)) + ((&TRUNC((1800,000 / 510)) - 1) * 2 * 510 * 80)) / 1000000) * 85,715 My expected value is (inside the personal command "&TRUNC(command)") (1800,000 / 510) I got this value 1800,000 / 510)) * 510) * 920) + (2 * (510 * 700)) + ((&TRUNC((1800,000 / 510)) - 1) * 2 * 510 * 80)) / 1000000 How can I get only expected value in a separated group? PS:. The expressions inside the command called for me as "&TRUNC(command)" is variable.

    Read the article

  • C++ constructor problem, values not being set

    - by 2Real
    Hi, I'm new to C++ and I'm trying to figure out this problem I'm having with my constructor for one of my classes. What happens is... all my variables are initialized properly except two (health and type). #pragma once #include <irrlicht.h> #include <vector> #include <cassert> using namespace irr; using namespace core; using namespace scene; enum { PLAYER = 0, NPC = 1, SOLDIER = 2, CHAINGUNNER = 3 }; class Model { public: Model(void); Model(int id, std::vector<ISceneNode*> modelVec, int modType); ~Model(void); std::vector<int> path; std::vector<ISceneNode*> model; int endNode; int type; int animate; int health; u32 lastAnimation; private: int mId; }; #include "Model.h" Model::Model(void) { //assert(false); } Model::Model(int id, std::vector<ISceneNode*> modelVec, int modType) { path = std::vector<int>(); model = modelVec; endNode = 0; type = modType; animate = 0; health = 100; lastAnimation = 0; mId = id; } Model::~Model(void) {} I create a model with Model soldier(id, model, SOLDIER) Everything is set properly except type and health. I've tried many different things, but I cannot figure out my problem. I'm not sure but the default constructor is being called. It doesn't make sense because I make no called to that constructor. Thanks,

    Read the article

  • how to get the values dynamically in js

    - by jeessy
    hi having problem with my id iam making my website for health product. already we have a 10 products with corresponding amounts in this section customer choose the product through drop down box. in next we are getting service charges from customer by clicking radio buttons. we have a three radio buttons with name=add and three amount value like 5$ 7$ 9$. It is working fine. for example: customer selected 3 produts in the sense that total amount around 20$ after customer clicks this radio button(any) and submit button that amount will add with totally in next page ie 25$ what i want is that radio button amount should add with get payment then display the page dynamically. function checkRadio (frmName, rbGroupName) { var radios = document[frmName].elements[rbGroupName]; for (var i=0; i < radios.length; i++) { if(radios[i].checked) { return true; } } return false; } $(document).ready(function(){ $("input[name='rmr']").click(function() { updatePayment($(this).val()); if (!!$(this).attr("checked") == true) { $("#finalamount").html( parseInt($("#totalamount").val(), 10) * parseInt($(this).val(), 10)); } }); } this code is right or wrong. thanks in adv

    Read the article

  • Splitting a string which contain multiple symbols to get specific values

    - by Eon Rusted du Plessis
    I cannot believe I am having trouble with this following string String filter = "name=Default;pattern=%%;start=Last;end=Now"; This is a short and possibly duplicate question, but how would I split this string to get: string Name = "Default"; string Pattern = "%%" ; string start = "Last" ; string end = "Now" ; Reason why I ask is my deadline is very soon, and this is literally the last thing I must do. I'm Panicking, and I'm stuck on this basic command. I tried: pattern = filter.Split(new string[] { "pattern=", ";" }, StringSplitOptions.RemoveEmptyEntries)[1]; //Gets the pattern startDate = filter.Split(new string[] { "start=", ";" }, StringSplitOptions.RemoveEmptyEntries)[1]; //Gets the start date I happen to get the pattern which I needed, but as soon as I try to split start, I get the value as "Pattern=%%" What can I do? Forgot to mention The list in this string which needs splitting may not be in any particular order . this is a single sample of a string which will be read out of a stringCollection (reading these filters from Properties.Settings.Filters

    Read the article

  • how to send only selected chebox values to the next page using jquery

    - by kumar
    Hello friends, I am using this code to check wheather my checkbox is checked or not.. $('#btnMassEdit').click(function() { $('#ExceptionDetails input[type=checkbox]').each(function() { if ($(this).attr('checked')) { $('#specialist-tab').tabs('url', 3, '<%=Url.Action("getmasseditexceptions", "Expense", new { @GUI_SPEC_STAT_DSPL = GUI_SPEC_STAT_DSPL, @C_EXCPT_CATG = C_EXCPT_CATG, @C_EXCPT_TYPE = C_EXCPT_TYPE })%>').tabs('enable', 3).tabs('select', 3); return false; } else { alert("please select atleast one exception"); return false; } }); }); I am getting the exceptions but i need only which ever is checkecd i need to send it next page.. but here its only checking for first exception and sending all the other exceptin even that is not checked.. thanks

    Read the article

  • Getting Values from fetched Core Data

    - by user571905
    Hi there, Thanks to the wonderful people on this forum, I have overcome most of my Core Data woes. However one persists, and I'm certain it is a simple fix. I have a recipe app that parses an XML doc on load and puts the data in Core Data. Then I search that Core Data for particular recipes, ingredients, etc. Everything is working with one exception... I cannot do anything with the data I retrieve. For example, I search the core data for "eggplant" and get this at the end of the process: "<RecipeData: 0x6112a40> (entity: RecipeData; id: 0x6113880 <x-coredata:///RecipeData/tCDE9A0EE-DA3F-4BD0-AEF8-3C038586991D4> ; data: {\n ingredients = \"Eggplant|Cheese|Tomatoes|\";\n name = \"Eggplant Parm\";\n time = 40;\n})" How do I get the info out of there? I tried looping through, but that causes the app to crash: for (NSString* key in selectedRecipe) { id value = [selectedRecipe objectForKey:key]; NSLog(@"IN LOOP: %@", value); } Any suggestions? Thank you for your time.

    Read the article

  • SetMatrix() does not copy all values to HLSL

    - by Tili
    Hi, I want to use the contents of a vector of D3DXMatrices to my shader. m_pLightMatrices->SetMatrixArray(&currentLightMatrices[0].m[0][0],0,numLights); As we know the internals of a vector this poses no problems (as it is just a dynamic array). Now when I access this matrix in hlsl to fill up a struct I get this strange behavior: struct LightTest { float3 LightPos; float LightRange; float4 LightDiffuse; float3 LightAtt; }; float4x4 currentLight = gLights[0]; LightTest lt; lt.LightPos = currentLight._m00_m01_m02; //{0,0,0} lt.LightDiffuse = currentLight[1].rgba; //{0,0,0,0} lt.LightRange = currentLight._m03; //this gives me a value lt.LightAtt = currentLight[2].xyz; //{0,0,0} While debugging I see that my matrix is nicely filled with the variables I want. When I try to hardcode check what is in the struct I get all zero's, except the LightRange. As you can see I tried different methods of accessing the float4x4 but without any other results. Why oh why is hlsl not copying all my variables ?

    Read the article

  • Setting parameters after obtaining their values in stored procedures

    - by user1260028
    Right now I have an upload field while uploads files to the server. The prefix is saved so that it can later be obtained for retrieval. For this I need to attach the ID of the form to the prefix. I would like to be able to do this as such: @filePrefix = SCOPE_IDENTITY() + @filePrefix; However I am not so sure this would work because the record has not been created yet. If anything I could call an update function which obtains the ID and then injects it into the row after it has been created. To speed things up, I don't want to do this on the server but rather do this on the database. Regardless of what the approach is, I would still like to know if something like the above is possible (at least for future reference?) So if we replace that with @filePrefix = 5 + @filePrefix; would that be possible? SQL doesn't seem to like the current syntax very much...

    Read the article

  • remove a varchar2 string from the middle of table data values

    - by Michelle Daniel
    Data in the file_name field of the generation table should be an assigned number, then _01, _02, or _03, etc. and then .ldf (example 82617_01.pdf). Somewhere, the program is putting a state name and sometimes a date/time stamp, between the assigned number and the 01, 02, etc. (82617_ALABAMA_01.pdf or 19998_MAINE_07-31-2010_11-05-59_AM.pdf or 5485325_OREGON_01.pdf for example). We would like to develop an SQL statement to find the bad file names and fix them. In theory it seems rather simple to find file_names that include a varchar2 data type and remove it, but putting the statement together is beyond me. Any help or suggestions apprecuiated. Something like ........... UPDATE GENERATION SET FILE_NAME (?) WHERE FILE_NAME (?...LIKE '%STRING%');?

    Read the article

  • Passing report values to a query

    - by Beavis
    I'm a novice with Microsoft Access as my background is mostly .NET. I'm sure what I'm trying to accomplish is dead simple but I need some direction. I have a report and a query. The query returns a single numeric value based on a single numeric criteria. Select total from table where id = [topic] I have placed a text box on my report so I can feed the id to this query and in return get the total. It seems like DLookUp is what I want but no matter how I construct it, I get an "#Error" in the text box when I run the report. Currently my DLookUp looks like this (I just hard-coded now for simplicity): =DLookUp("[total]","myquery","[topic] = 3") How can I pass a value from a field on my report to a query so I can return the query's single numeric value? Thanks.

    Read the article

  • Route Values for Area (MVC3)

    - by Jim
    Hi, I am using areas in MVC version 3. My logoff and logon action methods are routing to the area, and I need them to route to the normal controller that is not in an area. I have tried the following host://AREA/CONTROLLER/METHOD instead of host://CONTROLLER/METHOD. @if(Request.IsAuthenticated) { <text>Welcome <b>@Context.User.Identity.Name</b> [ @Html.ActionLink("Log Off", "LogOff", "Account", new { area = "" }) ]</text> } else { @:[ @Html.ActionLink("Log On", "LogOn", "Account", new { area = "" }) ] }

    Read the article

  • Improved way to build nested array of unique values in javascript

    - by dualmon
    The setup: I have a nested html table structure that displays hierarchical data, and the individual rows can be hidden or shown by the user. Each row has a dom id that is comprised of the level number plus the primary key for the record type on that level. I have to have both, because each level is from a different database table, so the primary key alone is not unique in the dom. example: id="level-1-row-216" I am storing the levels and rows of the visible elements in a cookie, so that when the page reloads the same rows the user had open are can be shown automatically. I don't store the full map of dom ids, because I'm concerned about it getting too verbose, and I want to keep my cookie under 4Kb. So I convert the dom ids to a compact json object like this, with one property for each level, and a unique array of primary keys under each level: { 1:[231,432,7656], 2:[234,121], 3:[234,2], 4:[222,423], 5:[222] } With this structure stored in a cookie, I feed it to my show function and restore the user's previous disclosure state when the page loads. The area for improvement: I'm looking for better option for reducing my map of id selectors down to this compact format. Here is my function: function getVisibleIds(){ // example dom id: level-1-row-216-sub var ids = $("tr#[id^=level]:visible").map(function() { return this.id; }); var levels = {}; for(var i in ids ) { var id = ids[i]; if (typeof id == 'string'){ if (id.match(/^level/)){ // here we extract the number for level and row var level = id.replace(/.*(level-)(\d*)(.*)/, '$2'); var row = id.replace(/.*(row-)(\d*)(.*)/, '$2'); // *** Improvement here? *** // This works, but it seems klugy. In PHP it's one line (see below): if(levels.hasOwnProperty(level)){ if($.inArray(parseInt(row, 10) ,levels[level]) == -1){ levels[level].push(parseInt(row, 10)); } } else { levels[level] = [parseInt(row, 10)]; } } } } return levels; } If I were doing it in PHP, I'd build the compact array like this, but I can't figure it out in javascript: foreach($ids as $id) { if (/* the criteria */){ $level = /* extract it from $id */; $row = /* extract it from $id */; $levels[$level][$row]; } }

    Read the article

  • Perl, get all hash values

    - by Mike
    Let's say in Perl I have a list of hash references, and each is required to contain a certain field, let's say foo. I want to create a list that contains all the mappings of foo. If there is a hash that does not contain foo the process should fail. @hash_list = ( {foo=>1}, {foo=>2} ); my @list = (); foreach my $item (@hash_list) { push(@list,$item->{foo}); } #list should be (1,2); Is there a more concise way of doing this in Perl?

    Read the article

  • Combining array values in multilevel array

    - by James Huckabone
    I have an array like so: array( 'a'=>array( 'a'=>3, 'f'=>5, 'sdf'=>0), 't'=>array( 'a'=>1, 'f'=>2, 'sdf'=>5), 'pps'=>array( 'a'=>1, 'f'=>2, 'sdf'=>3) ); Notice how the sub-arrays are the same for each top-level array. If I wanted to, what's the easiest way to combine the sub-arrays so that I'm left with a one-dimensional array like: array( 'a'=>5, 'f'=>9, 'sdf'=>8 );

    Read the article

  • Help with MySQL and CASE WHEN with a range of values

    - by kickdaddy
    I have an accounts table and a records table where accounts have multiple records. I would like to break down the account totals by "count of records" range. i.e. show the breakdown of Count of Records | Count 0-25 | 100 25 - 50 | 122 50 - 100 | 300 etc. I am using the following query, but I can't get it to group by "grp" which is what I want, any help on the best way to modify query? Thanks! SELECT count(*) as ct, CASE WHEN COUNT(*) < 25 THEN '1-25' WHEN COUNT(*) >= 25 < 50 THEN '25-50' WHEN COUNT(*) >= 50 < 100 THEN '50-100' WHEN COUNT(*) >= 100 < 250 THEN '100-250' WHEN COUNT(*) >= 250 < 500 THEN '250-500' WHEN COUNT(*) >= 500 < 1000 THEN '500-1000' ELSE '1000+' END AS grp FROM records r,accounts a WHERE r.account_id=a.id ORDER BY ct

    Read the article

  • An array with values 4 days apart

    - by Luke
    I have a piece of code that generates soccer/football fixtures. The idea is that for every round of fixtures, the date will be 4 days further than the last round. So round one will be 3rd may, round two will be 7th may, round three 11th may, etc. I am not sure how to do this? The code that currently makes the fixtures are as follows: $totalRounds = $teams - 1; $matchesPerRound = $teams / 2; $rounds = array(); for ($i = 0; $i < $totalRounds; $i++) { $rounds[$i] = array(); } for ($round = 0; $round < $totalRounds; $round++) { for ($match = 0; $match < $matchesPerRound; $match++) { $home = ($round + $match) % ($teams - 1); $away = ($teams - 1 - $match + $round) % ($teams - 1); // Last team stays in the same place while the others // rotate around it. if ($match == 0) { $away = $teams - 1; } $rounds[$round][$match] = "$user[$home]~$team[$home]@$user[$away]~$team[$away]"; } } The teams would be the total users in the league. So if there are 8 teams, there will be 7 rounds. And i will want each round 4 days apart. And that date will be within each fixture within each round. Any further information needed just ask! Thanks, really stuck on this

    Read the article

  • jQuery selector - style values

    - by kender
    I got a series of divs like this: <div class="message" style="padding-left: 0px;">...</div> <div class="message" style="padding-left: 20px;">...</div> <div class="message" style="padding-left: 20px;">...</div> <div class="message" style="padding-left: 40px;">...</div> <div class="message" style="padding-left: 20px;">...</div> And I would like to make a selector that would get me the divs with padding greater then 20px. Would it be possible with just using jquery? Or I should modify my html tree and add some attribute that would distinguish those elemenents with high padding value?

    Read the article

  • PHP loop through multidimensional array and change values

    - by stevenpepe
    I have a multidimensional array below and I want to loop through it and change the value of [menu_cats] from a number to a string, which is being pulled from a database selection. Is this possible? The name of the array is 'result'. Array ( [0] => Array ( [0] => Array ( [menu_cats] => 1 [item] => Introduction [link] => needs ) [1] => Array ( [menu_cats] => 1 [item] => Needs Assessment [link] => needs/needs.php ) ) [1] => Array ( [0] => Array ( [menu_cats] => 2 [item] => Introduction [link] => knowledge ) [1] => Array ( [menu_cats] => 2 [item] => Administer Knowledge Pre-Test [link] => knowledge/pre_test.php ) ) )

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >