w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]
You can't host net.tcp under IIS 6, it supports only HTTP(s). So you are limited with HTTP bindings only (basic, ws or 2007). In order to provide net.tcp and other protocols, WAS is required. You can activate it standalone, but I advice you to install it both with IIS 7 (it is installed as a part of it), because IIS 7 gives a convinient service management platform in addition. Another solution it so change the hosting environment to make it self-hosted or service-hosted, using ServiceHost class instance, which supports tcp protocol.

Categories : Wcf

when a base class pointer point to a base class object whether the compiler will use dynamic binding?
It can choose whichever, or neither, depending on how smart it is and how well it can detect. The rule is polymorphism must work. How this is achieved is an implementation detail. If the same end-result can be achieved with both dynamic or static binding, as is the case here, both are valid options for the compiler. In your case, the function doesn't have to be called at all - the generated code could be just as well identical to code generated by int main() { cout << "base class"; }

Categories : C++

How to get records starting with a specific letter in Lucene
Wildcard Searches Lucene supports single and multiple character wildcard searches within single terms (not within phrase queries). To perform a single character wildcard search use the "?" symbol. To perform a multiple character wildcard search use the "*" symbol. The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search: te?t Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search: test* example, with regex RegexQuery query = new RegexQuery(newTerm("^a.*$")); query.setRegexImplementation(new JavaUtilRegexCapabilities()); return searcher.search(query, null, 1000).totalHits; http:/

Categories : Java

Regular Expression in c# to find letter then with capital letter for letter and Shift press form of other charecter?
Try following: var input = @"manoj kumar ma oj"; var pattern = new Regex(@"([a-z])\"); var replaced = pattern.Replace(input, m => m.Groups[1].ToString().ToUpper()); Console.WriteLine(replaced); UPDATE Map digits to shift-pressed form: string text= @"man1oj kumar ma o9j"; char[] shiftPressForms = ")!@#$%^&*(".ToCharArray(); Regex pattern = new Regex(@"([a-z])\"); Regex pattern_digit = new Regex(@"d"); string replaced = pattern.Replace(text, m => m.Groups[1].ToString().ToUpper()); replaced = pattern_digit.Replace(replaced, m => shiftPressForms[int.Parse(m.Value)].ToString()); Console.WriteLine(replaced);

Categories : C#

Make a DBGrid go to records based on a letter pressed
This is called incremental search and in the Embarcadero CodeCentral site exist a sample of how create a DBGrid - Incremental search / filter

Categories : Delphi

How to get records in mysql where first letter equals 'X', when dealing with spanish characters?
You can use the SQL LIKE wildcard '_' this way : SELECT * FROM recording AS r WHERE r.title LIKE '_P%' It will accept any character before the P letter. (And only one character) If you don't wan't to match words such as 'Ap...', you could use the SQL regex function (Google it, it's quite well documented), or check it afterward using PhP if the case is rare enough. Edit : Ok, so you want to match titles with several special characters behind the first letter. In that case, using the regexp function (SQL side or PhP side, depends on your needs) should be the best way

Categories : Mysql

Binding ListView to database
Consider this code : var items = (from p in db.tbl_film select p).ToList(); foreach (var item in items) { // Create your ListViewItem here // Then add it to your listView here. } If you want to retrieve multiple records, you shouldn't have to use FirstOrDefault() because, as it says, you get only the first record.

Categories : C#

sqlite database records in listview
Use activity context ArrayAdapter<Category> adapter = new ArrayAdapter<Category>(CateogryActivity.this, android.R.layout.simple_list_item_1,category); setListAdapter(adapter); When to call activity context OR application context?

Categories : Android

Editing Datable before binding to listview in vb.net
First, if possible i would modify your sql-query in Fetchbooks instead to replace 0 with N.A.. I assume you are querying the database. However, if you want to do it in memory: For Each row As DataRow In dt.Rows For Each col As DataColumn In dt.Columns If row.IsNull(col) OrElse row(col).ToString = "0" Then row(col) = "N.A." End If Next Next

Categories : Vb.Net

ListView Item binding does not work
Bind the listview Like this public GetCategories() { var db = new ProductContext(); IQueryable<Category> query = db.Categories; ListView1.DataSource=query; ListView1.DataBind(); } call this method in page load Remove SelectionMethod="GetCategories" from html other vise it will show errors. Hope it will help you

Categories : Asp Net

Simple ListView data binding
You must specify source otherwise, like in your case, it will look for the property in current context which by default, if nothing else is specified, will be DataContext. Try something like this: <ListView ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=Rows}"> Like that you specify that it should look for Rows in current Window

Categories : C#

Problems Binding ViewModel to Listview
You have to specify an ItemsSource for the ListView. Try this: <ListView ItemsSource="{Binding Exchanges}" Grid.Row="0" Grid.Column="0" SelectionMode="Single" > <ListView.View> <GridView> <GridViewColumn DisplayMemberBinding="{Binding}" Header = "Exchange"> </GridViewColumn> </GridView> </ListView.View> </ListView>

Categories : C#

Binding ListView SelectedItem between two or more ListViews
Why don't you subscribe to the selection event of each list view and call UnselectAll on the others.

Categories : C#

Wpf binding button with listview.Item
RoutedEvents don't work so easily with DataTemplates, because you don't have a code behind where your event code could be placed. While there are ways to do that, you can just use Commands to do the same. In the view model for each item (i just assume you use MVVM) create properties called UpVoteCommand and DownVoteCommand of type ICommand, DelegateCommands are quiet handy for this. Bind them to the Command property and remove the Click handler in your DataTemplate. [EDIT] Small example of a possible Viewmodel for one entry in the list, which can be up or downvoted. class MyEntryViewModel : INotifyPropertyChanged { public MyEntryViewModel() { UpVoteCommand = new DelegateCommand(OnUpVoteCommand); } public int Votes { get {return mVotes;} set {

Categories : C#

Logic in ListView For Binding Items
You can do this in XAML: <ListView x:Name="carList" VerticalAlignment="Top"> <ListView.View> <GridView> <GridViewColumn Header="Car" DisplayMemberBinding="{Binding Name}" Width="Auto"/> <GridViewColumn DisplayMemberBinding="{Binding Make}" Header="Make" Width="Auto"/> <GridViewColumn Header="Year" Width="Auto"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Year}"> <TextBlock.Style> <Style TargetType="TextBlock"> <Style.Triggers> <DataT

Categories : C#

Binding image in listview just displaying string
When binding to an Image control you need to bind to a BitmapSource. This should be pretty straight forward. Change the type of the property (or add a new one) to BitmapSource and then in the get do something like this: ... get { return new BitmapImage(new Uri("{PathToImage}")); } where PathToImage is a recognizable path to the image you want to display.

Categories : C#

Binding List of objects to ListView not working
_modules is a field, and you cannot bind to fields. Make a property which exposes the value of _modules: public IEnumerable<Module> Modules { get { return _modules; } } and bind to this property instead: <ListBox x:Name="lstModules" Width="190" ItemsSource="{Binding Modules}">

Categories : Wpf

Binding data in listview itemtemplate using style
Create your Observable collection as a property (getter/setter): ObservableCollection<Product> _products; public ObservableCollection<Product> products { get{return _products;} set { _products=value; PropertyChanged("products"); } } The property changed event will be need to indicate that the collection has changed,its needed when your using ObservableCollection. You'll need to read more about it.You can add items to the products collection by using : products.Add(Product_object) And your xaml code will have the itemsSource as follows: <ListView x:Key="ListBoxTemplate" HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Visible" ItemsSource="{Binding products}"> <ListView.ItemTemplate> &l

Categories : C#

ListView binding cast items to ListViewItem
I think you have over complicated it. If you use Snoop you can see that when you bind a ListView to a collection via ItemSource it ends up populated with a collection of ListViewItems where each ListViewItem has two things. a DataContext set to the data (e.g. ActivityItem) a ContentPresenter filled with the controls defined in your DataTemplate This means that in theory you can browse both collections from x in listView.Items select x as ListViewItem or from x in listView.Items select x.DataContext as ActivityItem However if you simply want a filtered list then can I suggest changing your binding, <ListView x:Name="ActivityItemsList" ItemsSource="{Binding FilteredItems}" and public class MyViewModel :INotifyPropertyChanged { public IEnumer

Categories : C#

Metro App ListView Binding Item Issue
SOLVED thanks to Microsoft: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/83c2534e-82df-4707-8ecb-f093e7f58e33 public MainPage() { this.InitializeComponent(); NavigationCacheMode = NavigationCacheMode.Required; this.Loaded += MainPage_Loaded; } void MainPage_Loaded(object sender, RoutedEventArgs e) { lvProductVariants.ItemsSource = null; // Reset Bind(); }

Categories : C#

Android: Binding dates to listview alongside other data
This was solved by passing the cursor to the DateViewBinder as a parameter. Here is the code with changes: Fill Tasks Changes SimpleCursorAdapter tasks = new SimpleCursorAdapter(this, R.layout.tasklist_layout, tasksCursor, from, to); final DateViewBinder binder = new DateViewBinder(formatforddisplay, R.id.DATE, tasksCursor); tasks.setViewBinder(binder); setListAdapter(tasks); DateViewBinder Changes public DateViewBinder(SimpleDateFormat formatfromBatchOverview, int targetViewId, Cursor taskscursor) { mFormat = formatfromBatchOverview; mTargetViewId = targetViewId; cursor = taskscursor; }

Categories : Android

Binding button click in ListView template MvvMCross
MvxRelayCommand in vNext got shortened to MvxCommand in v3 - just to save typing. Your last problem seems to be that you are binding Click btnClick.OrderBtnClick - but your MenuItemWrap class doesn't have a btnClick property - so you actually want to bind Click Click ?

Categories : C#

At the moment when I click on keyboard letter, it appears in EditText1, next letter in EditText2
Set a counter at Action_down event tracking function. If counter is 1, then set it like editText1.setText("keypressed"); if counter is 2 then, editText2.setText("keypressed"); etc.. Sice we can add strings dynamically to editText this must work! have a try dude!

Categories : Android

How can I get sets of 2 entries where each set starts with a different letter and no letter is repeated from a sqlite database?
You can do this with the substr function and a correlated subquery: SELECT * FROM YourTable a WHERE wordField IN (SELECT wordField FROM YourTable AS b WHERE substr(a.wordField ,1,1) = substr(b.wordField ,1,1) ORDER BY wordField LIMIT 2) Demo: SQL Fiddle You can use the ORDER BY to adjust which 2 records are returned. Like ORDER BY RANDOM() if that's supported.

Categories : SQL

Changing letter typed by Keyboard by other letter and show it in UITexfield
Yes, use method – textField:shouldChangeCharactersInRange:replacementString: in UITextFieldDelegate. f.e. - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { NSString* encodedString = [self encode:string]; textField.text = [textField.text stringByReplacingCharactersInRange:range withString: encodedString]; self.decodedTextField.text = [self.decodedTextField.text stringByReplacingCharactersInRange:range withString:string]; return NO; } it is just example, you should implement replacement more careful.

Categories : IOS

Populate country list with respective two letter and three letter code in c#
If you really must retrieve this information using C#, this is how I'd do it: var regions = CultureInfo.GetCultures(CultureTypes.AllCultures) .Where(c => !c.IsNeutralCulture && c.LCID != 0x7f) .Select(c => new RegionInfo(c.LCID)) .GroupBy(r => r.TwoLetterISORegionName) // This is an alternative to using Distinct .Select(g => g.First()) // It's probably not very efficient, but the list is so small anyway. .OrderBy(r => r.TwoLetterISORegionName) .ToList(); (The culture with the LCID 0x7f is the InvariantCulture, which doesn't have an associated RegionInfo.) This gives only 127 countries on my computer. Your method gives a lot more results because there are many instances of multiple CultureInfos that share the same RegionInfo

Categories : C#

java.lang.NullPointerException : displaying records from database in an expandable listview
It should be like below. Also post the stack trace so that we can help you further public class DisplayActivity extends ListActivity { DBAdapter db; @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_display_cursor); db=new DBAdapter(this); Button viewbutton=(Button)findViewById(R.id.button2); viewbutton.setOnClickListener(new OnClickListener() { @override public void onClick(View v) { // do something } }); } Edit: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activit

Categories : Android

Search & replace row by row, letter by letter in table using Python
A little fuzzy on some of your details but it appears the code is attempting to compare a Field data object (created w/for r in row) with the elements in some input set, which you seem to imply is a string. Aside from the type mismatch of Field vs string, I believe that a Row object is not iterable the way you've written it. You can get the fields with something like: fldList = list() for fld in arcpy.ListFields(r'C:Workspacesomedata.shp'): fldList.append(fld.name) and then iterate of fldList using something like: for fld in fldList: fldValue = row.getValue(fld) ....do some regex/string parsing ....if condition met, use row.setValue(fld, newValue) and rows.update(row)

Categories : Python

Select value only with letter is starting letter in autocomplete datalist
Use source option to implement your own search: var dataSource = ['mary', 'reeta', 'james']; $("input").autocomplete({ minLength: 1, source: function(request, response) { var matcher = new RegExp( '^' + $.ui.autocomplete.escapeRegex(request.term), "i" ); var filteredData = $.grep( dataSource, function(value) { return matcher.test( value.label || value.value || value ); }); response(filteredData); } }); example http://jsfiddle.net/AU92X/8/ Or you can even make it global just by rewriting $.ui.autocomplete.escapeRegex: var dataSource = ['mary', 'reeta', 'james']; $("input").autocomplete({ minLength: 1, source: dataSource }); var escapeRegexp = $.ui.autocomplete.escapeRegex; $.extend( $.ui.autocomplete, { escapeRegex

Categories : HTML

SED word ending with a letter and deleting that letter
This will work: sed -e '/s$/!d' -e 's/s$//' Or this: sed '/s$/!d;s/s$//' Or this: sed -n '/s$/{s/s$//;p;}'

Categories : Unix

Why the capital letter is greater than small letter in .Net?
The doc I could find says that: This method performs a word (case-sensitive and culture-sensitive) comparison using the current culture. So, it is not quite the same as Java's .compareTo() which does a lexicographical comparison by default, using Unicode code points, as you say. Therefore, in .NET, it depends on your current "culture" (Java would call this a "locale", I guess). It seems that if you want to do String comparison "à la Java" in .NET, you must use String.CompareOrdinal() instead. On the opposite, if you want to do locale-dependent string comparison in Java, you need to use a Collator. Lastly, another link on MSDN shows the influence of cultures on comparisons and even string equality.

Categories : C#

Master-detail in XAML with - managing ListView selection through binding/commands whilst allowing cancellation
I believe your answer is in the Prism book by implementing IConfirmNavigationRequest? Confirming or Cancelling Navigation You will often find that you will need to interact with the user during a navigation operation, so that the user can confirm or cancel it. In many applications, for example, the user may try to navigate while in the middle of entering or editing data. In these situations, you may want to ask the user whether he or she wants to save or discard the data that has been entered before continuing to navigate away from the page, or whether the user wants to cancel the navigation operation altogether. Prism supports these scenarios via the IConfirmNavigationRequest interface. From the Prism book 8: Navigation

Categories : Wpf

c# deriving from a base apicontroller - in the base class the Request object is null
This has nothing to do with inheritance, it's to do with the fact the ApiController hasn't been initialized yet and you are trying to access the Request object from the constructor. If you need to initialize something in your controller you should override the Initialize method and do it in there (remember to call into the base!).

Categories : C#

Base SDK Missing, apple fix does not fly -> XCode Base SDK popup only shows iphoneos, but I am expecting to see Latest IOS (...)
Yes this happens all the time when downloading sample code. Don't stress. You can click on validate settings in newer versions of xcode, and in older ones you can manually update it under your architectures settings but it may take some fiddling.

Categories : Iphone

To get the letter when i click on the that letter
If you want to get the letter using only PHP then $_GET or $_REQUEST will be your method. Other than this you could look at adding a click event to the link using something like jquery which would give you the letter client side. Whatever page is at /members/ (hopefully a php page) you should be be able to access the letter (filter) with $_GET['filter'] or $_REQUEST['filter']

Categories : Javascript

First letter is capital letter
I assume this is not GWT since you have used var to declare the variables. There can be various ways to do this in javascript. one way is var newpagename = pagename.charAt(0).toUpperCase() + pagename.slice(1);

Categories : Google Apps Script

Abstract base member variable in base class
A base class, even an abstract one, will be included in its entirety within any derived classes. The new allTheStuff name hides the old one, but does not suppress its inclusion; the base class version can still be accessed using Abstract::allTheStuff. Worse, the function doAllTheWork will end up accessing the base class allTheStuff because it can't possibly know there's an identically-named member variable in a subclass. If you want this kind of behaviour, you have a few decent options: Don't put any meaningful code or data in the base class; leave it as a pure interface. This may result in code duplication (but you may be able to factor it out into new base classes or shared helper functions). Use a dynamically sizable container type as the Blob, so you can dynamically ask for more or

Categories : C++

C# - Numeric Variable Types - Base 2/Base 10 notations
First off - this has nothing to do with base 2 vs. base 10. All of your values are represented using base 10. Base 2 is not used whatsoever in this code. looks like I'm missing some link of understanding that takes place in how calculation was taking care of. Both float and double using a floating point representation for numbers, which is not 100% accurate. When you display the value, there is rounding taking place. Since float has inherently less precision, it's rounded to fewer decimal points, which can make it "appear" more accurate in some cases (even though it's actually less precise). In your case, the reason the "x" group and the "c" group display differently is that you're declaring your x1 and x2 variables like so: double x1 = 0.2F; double x2 = 1.0F; This is, effect

Categories : C#

How do I replace a capital letter followed by a period with the capital letter only?
You should use a positive look behind to match it and replace it with nothing. MyText = "William SR. won the race." MyText = MyText.gsub(/(?<=[A-Z])./, '') Here is an example of it on Rubular. You could just use gsub! if you know you want to do the replacement in place instead of making a copy.

Categories : Ruby

base 64 png string to base 64 jpg using java or javascript
Maybe this will help you, Getting binary (base64) data from HTML5 Canvas (readAsBinaryString) its specified that "The toDataURL method will fail if the browser thinks you've drawn to the canvas any data that was loaded from a different origin, so this approach will only work if your image files are loaded from the same server as the HTML page whose script is performing this operation." also refer this http://www.nihilogic.dk/labs/canvas2image/

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.