Search Results

Search found 335 results on 14 pages for 'vu tun anh'.

Page 6/14 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • ASP.NET MVC - Javascript array always passed to controller as null

    - by Xuan Vu
    I'm having some problem with passing a javascript array to the controller. I have several checkboxes on my View, when a checkbox is checked, its ID will be saved to an array and then I need to use that array in the controller. Here are the code: VIEW: var selectedSearchUsers = new Array(); $(document).ready(function () { $("#userSearch").click(function () { selectedSearchUsers.length = 0; ShowLoading(); $.ajax({ type: "POST", url: '/manage/searchusers', dataType: "json", data: $("#userSearchForm").serialize(), success: function (result) { UserSearchSuccess(result); }, cache: false, complete: function () { HideLoading(); } }); }); $(".userSearchOption").live("change", function () { var box = $(this); var id = box.attr("dataId"); var checked = box.attr("checked"); if (checked) { selectedSearchUsers.push(id); } else { selectedSearchUsers.splice(selectedSearchUsers.indexOf(id), 1); } }); $("#Send").click(function () { var postUserIDs = { values: selectedSearchUsers }; ShowLoading(); $.post("/Manage/ComposeMessage", postUserIDs, function (data) { }, "json"); }); }); When the "Send" button is clicked, I want to pass the selectedSearchUsers to the "ComposeMessage" action. Here is the Action code: public JsonResult ComposeMessage(List values) { //int count = selectedSearchUsers.Length; string count = values.Count.ToString(); return Json(count); } However, the List values is always null. Any idea why? Thank you very much.

    Read the article

  • How to use XmlPeek task?

    - by Nam Gi VU
    I've read in the MSDN MSBuild Task Reference about XmlPeek task at http://msdn.microsoft.com/en-us/library/ff598684(v=VS.100).aspx but I cannot use it in my MSBuild script. If you have used this before, please show me how!

    Read the article

  • My profile avatar doesn't work! [closed]

    - by Nam Gi VU
    How can I change my avatar on stackoverflow.com? I click the change picture link in my profile but it link to gravatar website, then I select the picture for my gravatar associated with my email. But my avatar on stackoverflow.com still not changes after 24hours as announced. Somebody has a work-around? Please help!

    Read the article

  • How to import a macro file (previously exported as .bas file) to Microsoft Word using command line?

    - by Nam Gi VU
    I'm writing a command-line program that has a step in which I need to replace text in a Word file. The replacing task is accomplished using Word macro. What I need to do now is to call this macro from command-line. At the moment we can do this by using the -mMacroName parameter of 'winword.exe', i.e. \winword.exe -mMacroName. But this need the macro to be already available as a global macro. Since I need to run the program on another computer, I need to import the above replacing macro programatically... and I don't know how to do this. Please help.

    Read the article

  • Is there a tool to navigate targets and properties 's definition?

    - by Nam Gi VU
    I'm working on a bundle of MSBuild script files and many many times I have the need of locating the definition of a called target or a property being used. At the moment, I have to search to the target/property 's name text and view the file containing that text - only then I can read the definition of the target/property I'm looking for. This remind me of the feature of class/variable navigation of Visual Studio: we can choose "Go to definition" or "Find references" when select a class name or a variable. Is there a similar way to work with MSBuild target/property/item? Hope to hear from all of you! Nam.

    Read the article

  • How to get import custom tasks more than once without warning message?

    - by Nam Gi VU
    I'm using some custom tasks from MSBuild Extension Pack (MEP). My projects are splitted among many files. In those files I import the MEP tasks using (twice or three times in two/three files). I receive the warning message when doing this like: ... warning MSB4011: "C:\Program Files\MSBuild\ExtensionPack\MSBuild.ExtensionPack.tasks" cannot be imported again. It was already imported at "D:...\Tasker.proj (5,3)". This is most likely a build authoring error. This subsequent import will be ignored. Does anyone know how to get rid of this warning message? Please help!

    Read the article

  • When does Visual Studio call target AfterBuild & BeforeBuild? And how is it handled when these targe

    - by Nam Gi VU
    Hi Fiburt, Today I meet a similar problem and it reminds me about this thread. In Visual Studio, if we open the .csproj file, we see that they tell us to uncomment the two targets AfterBuild and BeforeBuild so as to execute them after and before the build of the current project accordingly. My questions are: Where are these two targets called in Visual Studio? And how is it handled if the targets are not defined (be commented out) ?

    Read the article

  • How to record user interaction in Flash app?

    - by Trung Vu
    I am looking for a way to capture the user interactions with a text input control in Flash over a period of time (not a screen cast)? For example: If the user enter some text, then delete, then enter something, I would be able to store that interaction as it happens and replay that later. Any help would be extremely useful Thanks

    Read the article

  • std::vector optimisation required

    - by marcp
    I've written a routine that uses std::vector<double> rather heavily. It runs rather slowly and AQTime seems to imply that I am constructing mountains of vectors but I'm not sure why I would be. For some context, my sample run iterates 10 times. Each iteration copies 3 c arrays of ~400 points into vectors and creates 3 new same sized vectors for output. Each output point might be the result of summing up to 20 points from 2 of the input vectors, which works out to a worst case of 10*400*3*2*20 = 480,000 dereferences. Incredibly the profiler indicates that some of the std:: methods are being called 46 MILLION times. I suspect I'm doing something wrong! Some code: vector<double>gdbChannel::GetVector() { if (fHaveDoubleData & (fLength > 0)) { double * pD = getDoublePointer(); vector<double>v(pD, pD + fLength); return v; } else { throw(Exception("attempt to retrieve vector on empty line")); ; } } void gdbChannel::SaveVector(GX_HANDLE _hLine, const vector<double> & V) { if (hLine != _hLine) { GetLine(_hLine, V.size(), true); } GX_DOUBLE * pData = getDoublePointer(); memcpy(pData, &V[0], V.size()*sizeof(V[0])); ReplaceData(); } ///This routine gets called 10 times bool SpecRatio::DoWork(GX_HANDLE_PTR pLine) { if (!(hKin.GetLine(*pLine, true) && hUin.GetLine(*pLine, true) && hTHin.GetLine(*pLine, true))) { return true; } vector<double>vK = hKin.GetVector(); vector<double>vU = hUin.GetVector(); vector<double>vTh = hTHin.GetVector(); if ((vK.size() == 0) || (vU.size() == 0) || (vTh.size() == 0)) { return true; } ///TODO: confirm all vectors the same lenghth len = vK.size(); vUK.clear(); // these 3 vectors are declared as private class members vUTh.clear(); vThK.clear(); vUK.reserve(len); vUTh.reserve(len); vThK.reserve(len); // TODO: ensure everything is same fidincr, fidstart and length for (int i = 0; i < len; i++) { if (vK.at(i) < MinK) { vUK.push_back(rDUMMY); vUTh.push_back(rDUMMY); vThK.push_back(rDUMMY); } else { vUK.push_back(RatioPoint(vU, vK, i, UMin, KMin)); vUTh.push_back(RatioPoint(vU, vTh, i, UMin, ThMin)); vThK.push_back(RatioPoint(vTh, vK, i, ThMin, KMin)); } } hUKout.setFidParams(hKin); hUKout.SaveVector(*pLine, vUK); hUTHout.setFidParams(hKin); hUTHout.SaveVector(*pLine, vUTh); hTHKout.setFidParams(hKin); hTHKout.SaveVector(*pLine, vThK); return TestError(); } double SpecRatio::VValue(vector<double>V, int Index) { double result; if ((Index < 0) || (Index >= len)) { result = 0; } else { try { result = V.at(Index); if (OasisUtils::isDummy(result)) { result = 0; } } catch (out_of_range) { result = 0; } } return result; } double SpecRatio::RatioPoint(vector<double>Num, vector<double>Denom, int Index, double NumMin, double DenomMin) { double num = VValue(Num, Index); double denom = VValue(Denom, Index); int s = 0; // Search equalled 10 in this case while (((num < NumMin) || (denom < DenomMin)) && (s < Search)) { num += VValue(Num, Index - s) + VValue(Num, Index + s); denom += VValue(Denom, Index - s) + VValue(Denom, Index + s); s++; } if ((num < NumMin) || (denom < DenomMin)) { return rDUMMY; } else { return num / denom; } } The top AQTime offenders are: std::_Uninit_copy , double *, std::allocator 3.65 secs and 115731 Hits std::_Construct 1.69 secs and 46450637 Hits std::_Vector_const_iterator ::operator !=1.66 secs and 46566395 Hits and so on... std::allocator<double>::construct, operator new, std::_Vector_const_iterator<double, std::allocator<double> >::operator ++, std::_Vector_const_iterator<double, std::allocator<double> >::operator * std::_Vector_const_iterator<double, std::allocator<double> >::operator == each get called over 46 million times. I'm obviously doing something wrong to cause all these objects to be created. Can anyone see my error(s)?

    Read the article

  • How to create copying items from property values?

    - by Nam Gi VU
    Let's say I have a list of sub paths such as <PropertyGroup> <subPaths>$(path1)\**\*; $(path2)\**\*; $(path3)\file3.txt; </subPaths> </PropertyGroup> I want to copy these files from folder A to folder B (surely we already have all the sub folders/files in A). What I try was: <Target Name="Replace" DependsOnTargets="Replace_Init; Replace_Copy1Path"> </Target> <Target Name="Replace_Init"> <PropertyGroup> <subPaths>$(path1)\**\*; $(path2)\**\*; $(path3)\file3.txt; </subPaths> </PropertyGroup> <ItemGroup> <subPathItems Include="$(subPathFiles.Split(';'))" /> </ItemGroup> </Target> <Target Name="Replace_Copy1Path" Outputs="%(subPathItems.Identity)"> <PropertyGroup> <src>$(folderA)\%(subPathItems.Identity)</src> <dest>$(folderB)\%(subPathItems.Identity)</dest> </PropertyGroup> <Copy SourceFiles="$(src)" DestinationFiles="$(dest)" /> </Target> But the Copy task didn't work. It doesn't translate the *** to files. What did I do wrong? Please help!

    Read the article

  • mvc bind/post boolean to radiobutton

    - by Xuan Vu
    Hi all, I have a column in my Model with a NULLABLE boolean value. Now on my View (for editing), I would like to bind that to two radiobuttons: Yes & No. If the value is null, then just have the two radiobutton un-checked. How would I go to do that? Thanks.

    Read the article

  • [MSBuild] Problem with setting properties 's values.

    - by Nam Gi VU
    Let's consider the below example. There, I have: target MAIN call target t then call target tt. target t call target ttt, target tt call target tttt. target t define property aa, target ttt modify aa. target tttt try to print property aa 's value. in short we have: MAIN - {t - {ttt-modify aa, define aa}, tt - tttt - print aa} But in target tttt, we can't "see" aa's updated value (by ttt)! Please help me to make that value visible to target tttt. Thank you! The whole script is as below: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="MAIN" > <Target Name="MAIN" > <CallTarget Targets="t" /> <CallTarget Targets="tt" /> </Target> <Target Name="t"> <Message Text="t" /> <PropertyGroup> <aa>1</aa> </PropertyGroup> <CallTarget Targets="ttt" /> </Target> <Target Name="tt"> <Message Text="tt" /> <CallTarget Targets="tttt" /> </Target> <Target Name="ttt"> <PropertyGroup> <aa>122</aa> </PropertyGroup> <Message Text="ttt" /> </Target> <Target Name="tttt"> <Message Text="tttt" /> <Message Text="tttt:$(aa)" /> </Target> </Project>

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >