Search Results

Search found 43978 results on 1760 pages for 'add filter'.

Page 9/1760 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Adding items to a generic list (novice)

    - by Crash893
    I'm some what embarrassed to even ask this but I know there is a better way to do this I just don't know how List<int> numbers = new List<int>(22); numbers.Add(3); numbers.Add(4); numbers.Add(9); numbers.Add(14); numbers.Add(15); numbers.Add(19); numbers.Add(28); numbers.Add(37); numbers.Add(47); numbers.Add(50); numbers.Add(54); numbers.Add(56); numbers.Add(59); numbers.Add(61); numbers.Add(70); numbers.Add(73); numbers.Add(78); numbers.Add(81); numbers.Add(92); numbers.Add(95); numbers.Add(97); numbers.Add(99);

    Read the article

  • How can I filter data based on items in a list?

    - by user2964366
    How can I filter entries containing any specific word in a list of words? For example, I have a list of road names in Singapore. Amoy Street, Singapore Ann Siang Hill Anson Road Arab Street Armenian Street, Singapore BBaghdad Street (Singapore) Balestier Road Banda Street Bartley Road Beach Road, Singapore Bencoolen Street Bernam Street Boat Quay Boon Tat Street Boundary Road, Singapore Bras Basah Road Bugis Street Bukit Batok Road Bukit Pasoh Road Bukit Timah Road CCantonment Road, Singapore Choa Chu Kang Road Clarke Quay Clementi Road Club Street Collyer Quay Connaught Drive Craig Road (Singapore) Cross Street and many more My spreadsheet has a large number of entries like the following, which may or may not contain road names mentioned in my list: Saw an accident at Thomson Road Found this by accident 6 vehicles crashed at Balestier Road I wanna crash now. So tired. Bus collides with bicycle at Arab Street. Accident at City Road. You can crash my house later. How do I filter to return entries that contains any road name identified in the list of names? How do I introduce an array/list of road names into Microsoft Excel and then relate it to a filter function?

    Read the article

  • Creating a Predicate Builder extension method

    - by Rippo
    I have a Kendo UI Grid that I am currently allowing filtering on multiple columns. I am wondering if there is a an alternative approach removing the outer switch statement? Basically I want to able to create an extension method so I can filter on a IQueryable<T> and I want to drop the outer case statement so I don't have to switch column names. private static IQueryable<Contact> FilterContactList(FilterDescriptor filter, IQueryable<Contact> contactList) { switch (filter.Member) { case "Name": switch (filter.Operator) { case FilterOperator.StartsWith: contactList = contactList.Where(w => w.Firstname.StartsWith(filter.Value.ToString()) || w.Lastname.StartsWith(filter.Value.ToString()) || (w.Firstname + " " + w.Lastname).StartsWith(filter.Value.ToString())); break; case FilterOperator.Contains: contactList = contactList.Where(w => w.Firstname.Contains(filter.Value.ToString()) || w.Lastname.Contains(filter.Value.ToString()) || (w.Firstname + " " + w.Lastname).Contains( filter.Value.ToString())); break; case FilterOperator.IsEqualTo: contactList = contactList.Where(w => w.Firstname == filter.Value.ToString() || w.Lastname == filter.Value.ToString() || (w.Firstname + " " + w.Lastname) == filter.Value.ToString()); break; } break; case "Company": switch (filter.Operator) { case FilterOperator.StartsWith: contactList = contactList.Where(w => w.Company.StartsWith(filter.Value.ToString())); break; case FilterOperator.Contains: contactList = contactList.Where(w => w.Company.Contains(filter.Value.ToString())); break; case FilterOperator.IsEqualTo: contactList = contactList.Where(w => w.Company == filter.Value.ToString()); break; } break; } return contactList; } Some additional information, I am using NHibernate Linq. Also another problem is that the "Name" column on my grid is actually "Firstname" + " " + "LastName" on my contact entity. We can also assume that all filterable columns will be strings.

    Read the article

  • Creating a 'Custom Designer' Visual Studio 2010 Add-in

    - by Daniel I-S
    A major part of our work is creating and manipulating certain XML files, for which have a custom editor. The editor is starting to get creaky and we are looking at building a replacement. Since VS2010 has recently arrived, ostensibly with an improved add-in architecture (MEF?), I am interested in the possibility of building the editor as a custom editor within Visual Studio. It would have to appear in the same way as the code editor or the Designer - a tab item, of which there can be many open at once, containing the GUI we use to edit the files. It would integrate with VS's Edit menu. It could use the output window to display messages. It would appear the same as any other editor within Visual Studio. Right now, I am looking for examples of add-ins that work in a similar way - ideally with source code - to see whether this model would suit our requirements. I am also looking for any documentation or tutorials relevant to creating a VS2010 add-in, or information about VS2008 add-ins if this is still relevant. Any input is welcome. Thanks!

    Read the article

  • Creating a (ClickOnce) setup for VSTO Outlook Add-in

    - by Ward Werbrouck
    So I created an Outlook Add-in and used the click-once setup to deploy it. The setup runs fine when the user is administrator, but otherwise: no go. Running the setup with "run as..." and logging in as admin works, but than the add-in is installed under the admin, not the current user. The addin doesn't show up in outlook. I tried following this guide: http://blogs.msdn.com/mshneer/archive/2008/04/24/deploying-your-vsto-add-in-to-all-users-part-iii.aspx But I get stuck at part I: http://blogs.msdn.com/mshneer/archive/2007/09/04/deploying-your-vsto-add-in-to-all-users-part-i.aspx I follow the examples and start excel as described: Now start Excel application. Examine the registry keys in HKCU hive e.g. you will find two interesting registry keys that appear under your HKCU hive: HKCU\Software\Microsoft\Office\TestKey registry key containing registry value TestValue You now also have HKCU\Software\Microsoft\Office\12.0\User Settings\TestPropagation registry key with Count value set to 1 But on my machine, the keys are not created... What can I try next?

    Read the article

  • Rules Manager and Expression Filter getting removed

    - by Mike Dietrich
    I doubt that many people are using the Oracle features "Rules Manager" and "Expression Filter" as usually people handle these things (such as ensuring that a zip code or a car number plate has a certain format) within the application code and not inside the database. Oracle Beehive for instance uses that just on the side.  Anyway, just learned today that Rules Manager and Expression Filter components will get removed once our next database release most likely called Oracle Database 12c will get released. So before upgrading to Oracle Database 12c you can remove EXF and RUL components (SELECT COMP_ID FROM DBA_REGISTRY WHERE COMP_ID IN ('EXF','RUL'); ). You'd simply do that by executing the following script before upgrade:SQL> @?/rdbms/admin/catnoexf.sqlThis will clean up Rules Manager and Expression Filter components inside the database. You could run ?/rdbms/admin/catnorul.sql before but I believe catnoexf.sql will clean up everything already. And you'll find all this information plus guidelines for migration of existing content in MOS Note: 1233535.1 - Obsolescence Notice: Rules Manager and Expression Filter Features of Oracle Database -M.

    Read the article

  • Manually updating FF Add-ons

    - by cpp_fanatic
    My application installs my Firefox add-on (by copying an my.xpi to [FF_inst_dir]\extensions). This application interact with my FF add-on. This application periodically has updates (.xpi with new version). When my application is updating it does next: Remove folder and content [FF_inst_dir]\extensions\MyExtension Copy new my.xpi to [FF_inst_dir]\extensions However, when I restart FF I see: FF ask me about install add-on. I agree. FF remove my.xpi (it's ok) FF remove folder and content [FF_inst_dir]\extensions\MyExtension I think that FF try to remove old plugin. Thus, I havn't installed plugin. How it can be installed correct?

    Read the article

  • problem with trying to create ssms add-in

    - by Karl
    I'm trying to create an add-in for SSMS 2008 and/or 2008 R2 but I've run into a problem straight away. I can get my add-in to work and on SSMS start-up get it to simply show a message box. However, after downloading various code-samples, when trying to reference Microsoft.SqlServer.Management.UI.VSIntegration.ServiceCache I get a null reference exception: Commands2 commands = (Commands2)ServiceCache.ExtensibilityModel.Commands; I get this problem when using SSMS 2008 or SSMS 2008 R2. I'm working on Visual Studio 2010. It's a bit frustrating because I'm keen to learn more about SSMS add-ins but can't seem to get past the few samples out there. Any advice/tips appreciated. Thanks

    Read the article

  • Android ArrayList Calendar add and get is different

    - by Raku ShinShou
    I put increment date of the calendar and add into arraylist, but when i loop them out, the date is all same. Calendar a = Calendar.getInstance(); ArrayList<Calendar> b = new ArrayList<Calendar>(); for (int i=0; i<3; i++) { a.add(Calendar.DATE, i>0 ? 1 : 0); b.add(a); } for (int i=0; i<b.size(); i++){ Log.d("xxx", "test=" + b.get(i)); } suppose i wan 10/11/2012, 11/11/2012, 12/11/2012 but it come out like 12/11/2012, 12/11/2012, 12/11/2012 Anyone know how to solve this?

    Read the article

  • Add a :filter param to the end of a url

    - by bob
    Hello, I am building an application that requires a search to go deeper than the initial level. I am using nested scopes to accomplish this and params in the URL For example, when a user searches for "handbag" it creates a query like the following. http://localhost:3000/junks?search=handbag&condition=&category=&main_submit=Go! I want to add a :filter param to the end of this url and reload the page with the new url. http://localhost:3000/junks?search=handbag&condition=&category=&main_submit=Go!&filter=lowest_price As shown above the &filter=lowest_price is added to the query. I have already written controller code to handle this and I know it works as long as the query is like the 2nd link above. my views code <div class = "filter_options"> <p> <strong>Filter by:</strong> <%= link_to_unless_current "Recent", :filter => 'recent' %> | <%= link_to_unless_current "Lowest Price", :filter => 'lowest_price' %> | <%= link_to_unless_current "Highest Price", :filter => 'highest_price' %> </p> </div> This is how I have it currently, which works if my URL does not have a search string attached to it. Unfortunately, this will go to a http://localhost:3000/junks?filter=lowest_price even if there is a search string. I would like to know how to create my links so that they add onto the search string shown in the 2nd code example. Additionally, if a search string with a filter is already present, it would only change that filter and resubmit the search string with the new filter. I hope I am being clear.

    Read the article

  • Subterranean IL: Exception handler semantics

    - by Simon Cooper
    In my blog posts on fault and filter exception handlers, I said that the same behaviour could be replicated using normal catch blocks. Well, that isn't entirely true... Changing the handler semantics Consider the following: .try { .try { .try { newobj instance void [mscorlib]System.Exception::.ctor() // IL for: // e.Data.Add("DictKey", true) throw } fault { ldstr "1: Fault handler" call void [mscorlib]System.Console::WriteLine(string) endfault } } filter { ldstr "2a: Filter logic" call void [mscorlib]System.Console::WriteLine(string) // IL for: // (bool)((Exception)e).Data["DictKey"] endfilter }{ ldstr "2b: Filter handler" call void [mscorlib]System.Console::WriteLine(string) leave.s Return } } catch object { ldstr "3: Catch handler" call void [mscorlib]System.Console::WriteLine(string) leave.s Return } Return: // rest of method If the filter handler is engaged (true is inserted into the exception dictionary) then the filter handler gets engaged, and the following gets printed to the console: 2a: Filter logic 1: Fault handler 2b: Filter handler and if the filter handler isn't engaged, then the following is printed: 2a:Filter logic 1: Fault handler 3: Catch handler Filter handler execution The filter handler is executed first. Hmm, ok. Well, what happens if we replaced the fault block with the C# equivalent (with the exception dictionary value set to false)? .try { // throw exception } catch object { ldstr "1: Fault handler" call void [mscorlib]System.Console::WriteLine(string) rethrow } we get this: 1: Fault handler 2a: Filter logic 3: Catch handler The fault handler is executed first, instead of the filter block. Eh? This change in behaviour is due to the way the CLR searches for exception handlers. When an exception is thrown, the CLR stops execution of the thread, and searches up the stack for an exception handler that can handle the exception and stop it propagating further - catch or filter handlers. It checks the type clause of catch clauses, and executes the code in filter blocks to see if the filter can handle the exception. When the CLR finds a valid handler, it saves the handler's location, then goes back to where the exception was thrown and executes fault and finally blocks between there and the handler location, discarding stack frames in the process, until it reaches the handler. So? By replacing a fault with a catch, we have changed the semantics of when the filter code is executed; by using a rethrow instruction, we've split up the exception handler search into two - one search to find the first catch, then a second when the rethrow instruction is encountered. This is only really obvious when mixing C# exception handlers with fault or filter handlers, so this doesn't affect code written only in C#. However it could cause some subtle and hard-to-debug effects with object initialization and ordering when using and calling code written in a language that can compile fault and filter handlers.

    Read the article

  • Combo box filter on Extjs4.1.3

    - by saravanakumar
    I have created a window with combo box. Combo configuration is xtype :'combo', fieldLabel : 'Command', labelAlign : 'right', id :'commandInputComboId', store : commandStore, displayField: 'command', valueField : 'id', width : 500, enableKeyEvents : true, allowblank : false, queryMode: 'local', typeAhead : true, triggerAction: 'all', query filter works for normal data. But I have data with escape chars like &lt; because I need to show it as '<' for ex my data is <get-all-users> Filter apply only when I type &lt; not for <. How can apply filter on this data?

    Read the article

  • How to recreate Windows Live Mail filter rules in Thunderbird?

    - by FernandoSBS
    I have some filters in Windows Live Mail that I'm trying to port to thunderbird without success. It seems Thunderbird filter is very limited. Here is an ex of a filter i'm trying to recreate: Apply this rule after the message arrives Where the From line contains '[email protected]' or '[email protected]' or 'Programa TAM Fidelidade' and Where the message body contains 'esteja visualizando' and 'por ser cadastrado no Programa TAM Fidelidade' Move it to the Deleted items folder and Stop processing more rules In Thunderbird I can´t combine a list of "or"s with some "and"s, because it only allows you to select "message matches ALL of the criteria below" or "ANY of the below". Am I missing something or it really is very limited?

    Read the article

  • HTML Comment-out Add-In

    - by Velika
    Here is an old add in to quickly comment out HTML code. Maybe I am missing it, but it seems like there is a shortcut in VS2010 to scratch your tail with one click but commenting out HTML code is still awkward as hell. What's the easiest way to get a function like this working? Can I expect any add-ins that were written for older versions of VS to work in VS2010 w/o an upgrade?

    Read the article

  • Visual Studio Add in.

    - by Eric Brown - Cal
    I was looking to write/get a visual studio add in. I want to be able to write descriptive log calls at the top and bottom of a function. like this log.debug("TheClass.TheMethod(string TheStringParam ="+TheStringParam+") - in"); log.debug("TheClass.TheMethod(string TheStringParam ="+TheStringParam+") - out"); Is there an adin that does this? Is there source anywhere for an add in like Ghost Doc that does reflection(or whatever) to parse the parameters and such? Thanks, Eric-

    Read the article

  • Question about ADD on ASM 8086

    - by Tal
    Hello, I'm studying ASM 8086 theoretically on highschool. (that means that I study ASM 8086 on a notebook, and never got to run it over a computer). And I don't understand - what will happen if I do this: MOV AL, F2h ADD AL, 20h What will the computer do? (what will be the value of AL,AX, CF,ZF?) and what will happen if I do this: MOV AH,F2h ADD AH,20h Thank you !!

    Read the article

  • Calling an Excel Add-In method from C# application or vice versa

    - by Jude
    I have an Excel VBA add-in with a public method in a bas file. This method currently creates a VB6 COM object, which exists in a running VB6 exe/vbp. The VB6 app loads in data and then the Excel add-in method can call methods on the VB6 COM object to load the data into an existing Excel xls. This is all currently working. We have since converted our VB6 app to C#. My question is: What is the best/easiest way to mimic this behavior with the C#/.NET app? I'm thinking I may not be able to pull the data from the .NET app into Excel from the add-in method since the .Net app needs to be running with data loaded (so no using a stand-alone C# class library). Maybe we can, instead, push the data from .NET to Excel by accessing the VBA add-in method from the C# code? The following is the existing VBA method accessing the VB6 app: Public Sub UpdateInDataFromApp() Dim wkbInData As Workbook Dim oFPW As Object Dim nMaxCols As Integer Dim nMaxRows As Integer Dim j As Integer Dim sName As String Dim nCol As Integer Dim nRow As Integer Dim sheetCnt As Integer Dim nDepth As Integer Dim sPath As String Dim vData As Variant Dim SheetRange As Range Set wkbInData = wkbOpen("InData.xls") sPath = g_sPathXLSfiles & "\" 'Note: the following will bring up fpw app if not already running Set oFPW = CreateObject("FPW.CProfilesData") If oFPW Is Nothing Then MsgBox "Unable to reference " & sApp Else . . . sheetCnt = wkbInData.Sheets.Count 'get number of sheets in indata workbook For j = 2 To sheetCnt 'set counter to loop over all sheets except the first one which is not input data fields With wkbInData.Worksheets(j) Set SheetRange = .UsedRange End With With SheetRange nMaxRows = .Rows.Count 'get range of sheet(j) nMaxCols = .Columns.Count 'get range of sheet(j) Range(.Cells(2, 2), .Cells(nMaxRows, nMaxCols)).ClearContents 'Clears data from data range (51 Columns) Range(.Cells(2, 2), .Cells(nMaxRows, nMaxCols)).ClearComments End With With oFPW 'vb6 object For nRow = 2 To nMaxRows ' loop through rows sName = SheetRange.Cells(nRow, 1) 'Field name vData = .vntGetSymbol(sName, 0) 'Check if vb6 app identifies the name nDepth = .GetInputTableDepth(sName) 'Get number of data items for this field name from vb6 app nMaxCols = nDepth + 2 'nDepth=0, is single data item For nCol = 2 To nMaxCols 'loop over deep screen fields nDepth = nCol - 2 'current depth vData = .vntGetSymbol(sName, nDepth) 'Get Data from vb6 app If LenB(vData) > 0 And IsNumeric(vData) Then 'Check if data returned SheetRange.Cells(nRow, nCol) = vData 'Poke the data in Else SheetRange.Cells(nRow, nCol) = vData 'Poke a zero in End If Next 'nCol Next 'nRow End With Set SheetRange = Nothing Next 'j End If Set wkbInData = Nothing Set oFPW = Nothing Exit Sub . . . End Sub Any help would be appreciated.

    Read the article

  • [VS2008] - Run Add-in from PrebuildEvent

    - by JBL
    I'm writing an VS 2008 add-in to synchronize Setup project Version with startup project assembly version. It works fine. But I was wondering if it was possible to call add-in from the Prebuild Event of my setup project. It works fine by command line window, but I didn't find any syntax to make it work in prebuildEvent. Is Someone has an idea ? Thanks

    Read the article

  • how to add item to Spinner's ArrayAdapter?

    - by allen-c
    i had a EditText , a button and a spinner . When click the button , the spinner will add a new item with name you entered in the EditText. But here is the question, my adapter.add() method seems doesn't work...here is my code: public class Spr extends Activity { Button bt1; EditText et; ArrayAdapter<CharSequence> adapter; Spinner spinner; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); bt1 = (Button)this.findViewById(R.id.bt1); et = (EditText)this.findViewById(R.id.et); spinner = (Spinner)this.findViewById(R.id.spr); adapter = ArrayAdapter.createFromResource( this, R.array.planets_array, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); bt1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String temp = et.getText().toString(); adapter.add(temp); adapter.notifyDataSetChanged(); spinner.setAdapter(adapter); } }); spinner.setOnItemSelectedListener(new Spinner.OnItemSelectedListener(){ @Override public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { Toast.makeText(parent.getContext(), "The planet is " + parent.getItemAtPosition(pos).toString(), Toast.LENGTH_LONG).show(); } @Override public void onNothingSelected(AdapterView<?> arg0) { }}); } }

    Read the article

  • Add two 32-bit integers in Assembler for use in VB6

    - by Emtucifor
    I would like to come up with the byte code in assembler (assembly?) for Windows machines to add two 32-bit longs and throw away the carry bit. I realize the "Windows machines" part is a little vague, but I'm assuming that the bytes for ADD are pretty much the same in all modern Intel instruction sets. I'm just trying to abuse VB a little and make some things faster. So... if the string "8A4C240833C0F6C1E075068B442404D3E0C20800" is the assembly code for SHL that can be "injected" into a VB6 program for a fast SHL operation expecting two Long parameters (we're ignoring here that 32-bit longs in VB6 are signed, just pretend they are unsigned), what is the hex string of bytes representing assembler instructions that will do the same thing to return the sum? The hex code above for SHL is, according to the author: mov eax, [esp+4] mov cl, [esp+8] shl eax, cl ret 8 I spit those bytes into a file and tried unassembling them in a windows command prompt using the old debug utility, but I figured out it's not working with the newer instruction set because it didn't like EAX when I tried assembling something but it was happy with AX. I know from comments in the source code that SHL EAX, CL is D3E0, but I don't have any reference to know what the bytes are for instruction ADD EAX, CL or I'd try it. I tried flat assembler and am not getting anything I can figure out how to use. I used it to assemble the original SHL code and got a very different result, not the same bytes. Help?

    Read the article

  • Outlook.com Sweep rule vs Filter rule

    - by Mahesha999
    New outlook.com introduced new sweep option. With it, you can create a filter to move messages from particular sender to a particular folder after certain days the mail comes. This rules gets added to the Filter list. However we cannot edit this rule by clicking Edit in front of it in that list. The dialog appears saying you should delete the rule and create the new one. I don't understand why sweep rules are considered differently from Filter rules? I have 68 filter rules. What if I want to add such time clause to these filter rules so that instead of moving the incoming mails immediately to a certain folder, they will be kept in Inbox for say 10 days and then they will be moved. Such time clause cannot be added to the filter rules. So should I delete all these 68 filters and create new Sweep rules?

    Read the article

  • Where can I find Object Model Documentation for Microsoft Expression Web Add-ins

    - by JonStonecash
    I am working on an add-in for Microsoft Expression Web. I have gotten enough information on the web to know that I have to add references to Microsoft.Expression.Interop.WebDesigner, Microsoft.Expression.Interop.WebDesignerPage, and Microsoft.Expression.Interop.WebDesigner. The problem is that there does not seem to be any official documentation on the classes within these dll-s. There is even a Microsoft Connect issue about the lack of documentation. I have been using the object browser in Visual Studio 2008 and Reflector but that is pretty thin soup. Does anyone know where there is some reasonable documentation. I am not looking for a sample "hello world" implementation. I want some more substance and depth.

    Read the article

  • Visual Studio Add-in to view open files

    - by pfunk
    I frequently have 10 or more files open in Visual Studio at one time. I am looking for an add-in that will duplicate the functionality of the "Windows" Window, but in a NON-Modal, dockable type window. In other words a window with a list of the files open in the IDE, that I can dock next to the Solution explorer or something, and just click on to switch to that open file (if anyone has ever used Textpad, the Document Selector is exactly what I am talking about). Anyone seen an Add-in like that? Note: I am NOT talking about another Window Layout manager

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >