w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
oracle sql navigator data-mining text-mining
You can use REGEXP_SUBSTR: SQL> SELECT txt, regex, regexp_substr(txt, regex, 1, 1, 'c', '3') result 2 FROM (SELECT q'¤@A'123'HEY'345''@B'K¤' txt, 3 q'¤^([^']*|('[^']*')*?)*?'([^']*[@#][^']*)'¤' regex 4 FROM dual); TXT REGEX RESULT -------------------- ---------------------------------------- --------- @A'123'HEY'345''@B'K ^([^']*|('[^']*')*?)*?'([^']*[@#][^']*)' @B

Categories : C#

How to display an image based on the coulmn value from the database in gridview?
if you have runat="server" you cant use eny logic unless you do it in your code behind file. Change it to img <img ID="Image4" src='<%# (Eval("is_selected").ToString()=="1" ? "~/images/tick.png" : "~/images/cross.png" %>' /> if you want to do it code behind: add OnItemDataBound="GridView2_ItemDataBound" to <asp:GridView> Add this to codeBehind public void GridView2_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item) { NameOfTheObject item = (NameOfTheObject)e.Item.DataItem; Image image = (HiddenField)e.Item.FindControl("Image4"); image.ImageUrl= item.is_selected==1 ? "~/images/tick.png" : "~/images/cross.png"; } }

Categories : Asp Net

how to acess my database elements using the for loop?
for($i=1;$i+1<prod_id;$i++) { $query = "SELECT * FROM products where prod_id=$i"; $result = mysqli_query($query, $con); $con is the Database connection details you can use wile loop to loop thru each rows while ($row = mysqli_fetch_array($result)) { ...... } }

Categories : PHP

Gridview returning empty even when there is data. I want to use data in the gridview to update another database
Per my comment above you may want to do something like: List<string> _OrderIds = new List<string>(); DataTable table = gvOrderLines.DataSource as DataTable; foreach (GridViewRow gvr in table.Rows) { Label myOrderIDLablel = (Label)gvr.FindControl("lblOrderID"); //find control since it is a template field _OrderIds.Add(myOrderIDLablel.Text); } I hope this get you headed in the right direction.

Categories : C#

I'm trying to upload image and binding Gridview to display image?
When creating a customer handler, a interface still needs to be inherited. Please try inheriting from the "IHttpHandler" class: public class HTTPHandler : IHttpHandler

Categories : C#

Storing and Retrieving Image Path From android application folder On Pre Created SQLite Database & Setting the image to Image View
I would only save the image name in the db and then get the resource identifier with context.getResources().getIdentifier(). Check out this similar question.

Categories : Android

GridView Hyperlink with ID from database
Try this: <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "~/Test.asp?id="+Eval("userID") %>' Text='<%# Eval("Name") %>'></asp:HyperLink>

Categories : Asp Net

ASP gridview not updating database
Add: <asp:Parameter Name="eID" Type="Int32" /> To: <UpdateParameters> <asp:Parameter Name="eFirstName" Type="String" /> <asp:Parameter Name="eLastName" Type="String" /> <asp:Parameter Name="eJobTitle" Type="String" /> <asp:Parameter Name="deptNumber" Type="String" /> <asp:Parameter Name="eUserName" Type="String" /> <asp:Parameter Name="ePassword" Type="String" /> <asp:Parameter Name="eEmail" Type="String" /> <asp:Parameter Name="ePhone" Type="String" /> <asp:Parameter Name="eDateHire" Type="DateTime" /> <asp:Parameter Name="eDateTerm" Type="DateTime" /> <asp:Parameter Name="securityID" Type="Int32" /> </UpdatePa

Categories : Asp Net

How to connect my gridview to database?
Use this method way for Bind Gridview with data from Database protected void BindGridview() { using (SqlConnection con = new SqlConnection("Data Source=DatabaseName;Integrated Security=true;Initial Catalog=***"))//Connection string { con.Open(); SqlCommand cmd = new SqlCommand("Select CustomerID,Date,Store,Amount,NoStub FROM Ticket where ColumnName='"+ YourDrodownId.SlectedValue +"'", con); SqlDataReader dr = cmd.ExecuteReader(); YourGridview.DataSource = dr; YourGridview.DataBind(); con.Close(); } } Then set the autogeneratecolumns property to false in our Gridview control and call this method in inside of your page load or were you want ! And Here is a full sample's with a code ! http://www.dotnetpools.com/Article/ArticleDetiail/?articleId=2 http://forums.asp.net/t/1904884.asp

Categories : C#

Image in Gridview
How about change img to div, and use image as background: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" ShowHeader="False" > <Columns> <asp:TemplateField> <ItemTemplate> <div style="background-image:url(<%# Eval("value") %>);width:300px;height:300px;background-repeat:no-repeat;"></div> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>

Categories : Asp Net

how i can insert data into database from gridview
Try this SqlConnection connStr = new SqlConnection ("Data Source=SERVER;Initial Catalog=HRPR;Persist Security Info=True;User ID=hr;Password=11"); SqlCommand com; protected void Button2_Click(object sender, EventArgs e) { SqlConnection connStr = new SqlConnection("Data Source=SERVER;Initial Catalog=HRPR;Persist Security Info=True;User ID=hr;Password=11"); connStr.Open(); foreach (DataGridViewRow row in dataGridView.SelectedRows) { com = new SqlCommand("INSERT INTO tblExmWrittn(column1,column2....) VALUES( '" + row.Cells[0].Value.ToString(); + "', '" + row.Cells[1].Value.ToString();+ "' , '" + row.Cells[2].Value.ToString();+ "' ,'" + row.Cells[3].Value.ToString();+ "','" + row.Cells[4].Value.ToString();+ "' ,'" + row.Cells[5].Value.ToString();+ "','"

Categories : C#

add image to datatable or gridview
You can use RowDataBound event to process each row: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { DataRowView drv = e.Row.DataItem as DataRowView; if (drv != null) { // your code here... } } } For more information about this event see here

Categories : C#

Getting gridview image in new activity
Since you are sending resources, you can send the resource id instead of the index it has in the array. Something like this: intent.putExtra("imageID", mThumbIds[position]); mContext.startActivity(intent); And in your activity: Bundle bdl = getIntent().getExtras(); int imageRes = bdl.getInt("imageID"); ImageView image = (ImageView) findViewById(R.id.imageview); image.setImageResource(imageRes); Hope that helps.

Categories : Android

Random image in GridView
Try following code before displaying or giving to Adapter. // Fisher–Yates shuffle static void shuffleArray(Integer[] intArr) { Random rnd = new Random(); for (int i = intArr.length - 1; i >= 0; i--) { int index = rnd.nextInt(i + 1); // Simple swap int temp = intArr[index]; intArr[index] = intArr[i]; intArr[i] = temp; } } You can also convert it to ArraryList<Integer> or List. Collections has its own method shuffle. List list = Arrays.asList( solutionArray ); Collections.shuffle(list); Edit Convert Integer[] to ArrayList. ArrayList<Integer> arrList = new ArrayList<Integer>(); for(int i = 1 ; i < intArr.length ; i++) { arrList.add(intArr[i]); } Collections.shuffle(arrList); To use arrList, use arrLi

Categories : Android

Text Below Image in GridView
Since MyView is pointing to convertView which could be null but after assigning a new view you have not updated MyView with new convertView. @Override public View getView(int position, View convertView, ViewGroup parent) { View MyView = convertView; if (convertView == null) { convertView = mInflater.inflate(R.layout.grid_item, parent,false); MyView = convertView; TextView tv = (TextView)MyView.findViewById(R.id.grid_item_text); tv.setText("Item"); ImageView imageView = (ImageView)MyView.findViewById(R.id.grid_item_image); //ImageView imageView = new ImageView(mContext); imageView.setImageResource(mThumbIds[position]); imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);

Categories : Android

Data Mining from HTML
Typically whenever you're retrieving data from a database in order to display information in the UI, it's best to avoid copy and paste "inheritance". Instead you might want to look into template based data binding. What specific approach to use is dependent on the technology you're using. In the above case it looks like it would make send to bind your dropdown to a data source

Categories : PHP

Topic mining algorithm in c/c++
If you wish to count the occurrences of each word in an array then you can do no better than O(n) (i.e. one pass over the array). However, if you try to store the word counts in a two dimensional array then you must also do a lookup each time to see if the word is already there, and this can quickly become O(n^2). The trick is to use a hash table to do your lookup. As you step through your word list you increment the right entry in the hash table. Each lookup should be O(1), so it ought to be efficient as long as there are sufficiently many words to offset the complexity of the hashing algorithm and memory usage (i.e. don't bother if you're dealing with less than 10 words, say). Then, when you're done, you just iterate over the entries in the hash table to find the maximum. In fact, I wo

Categories : C++

Web usage mining with rapidminer
This was asked in the rapidforum: yes, the RapidMiner 4.6 Community Edition together with its text mining plugin are suitable for web usage mining. The RapidMiner 4.6 operator LogFileSource allows to directly import web server log files. RapidMiner supports aggregations of web usage statistics, automated web page visitor session extraction, search robot filtering, mash-ups with web services to map ip addresses to countries, cities, and map coordinates, automated clustering of visits and/or click paths, frequent path item set mining and association rule generation, 2D and 3D visualization of web usage statistics, click path sequence analysis, personalized product recommendations for cross-selling, and many other things.

Categories : Misc

Update SQL Database from GridView TemplateField DropDownLists
The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_tbl_Job_tbl_status". The conflict occurred in database "HSE_proj", table "dbo.tbl_status", column 'Status_ID'. The statement has been terminated What this basically means is that this update would cause there to be a FOREIGN Key Violation. There are restrictions on your database that for every item in the table you are working on an item must exist in another specific table. In this case StatusID In the second part of your question: Cannot insert the value NULL into column 'Job_Department_ID', table 'HSE_proj.dbo.tbl_Job'; column does not allow nulls. UPDATE fails. The statement has been terminated. I would assume this has something to do with nullable fields. You cant have certain fields null so its evidently g

Categories : C#

Gridview does not show SQL Server database records
I've found the problem, public partial class OrderProccessing : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Session["email"] == null) { Response.Redirect("Default.aspx"); } else { string value = Session["email"].ToString(); Classes.AddAddress addcuid = new Classes.AddAddress(value); txtstaffname.Text = addcuid.addStaffName().ToString(); txtstaffID.Text = addcuid.fetchStaffID().ToString(); } } protected void refresh_Click(object sender, EventArgs e) { if (Cache["shipOrders"] != null) { myGrid.DataSource = Cache["ShipOrders"]; myGrid.DataBind(); lblOrderNo

Categories : Asp Net

gridview showing the same image in repetition
It's becuase you are returning the same view repeatedly. convertView is a reused view, so once it's been used and is no longer null, you are returning it without changing it. Change to this if (convertView == null) { // if it's not recycled, initialize some attributes icon = new ImageView(mContext); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = inflater.inflate(R.layout.grid_icon, parent, false); } icon=(ImageView)row.findViewById(R.id.album_image); icon.setScaleType(ImageView.ScaleType.CENTER_CROP); icon.setImageResource(mThumbIds[position]); //overlay View overlay = (View) convertView.findViewById(R.id.overlay); int opacity = 100; // from 0 to 255

Categories : Java

Gridview image data from sqlite
I hope I good understand what you want to do. You can do this using caching images - it will be the fastest way. (Caching images library - lazy list) Then you can put into new activity link into images (which is showing in gridview) and in new activity load that images. Or if you want to use database - load images into database as table of int which you can get from bitmap (or just from ImageView)

Categories : Android

WPF ListView-GridView : bind image
You can use a Data Binding ValueConverter for this Your converter class - public class MyImageConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string imageName = (string) value; return new BitmapImage(new Uri("../../images/" + imageName + ".png", UriKind.Relative)); } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } In your code-behind foreach (KeyValuePair<string, string> Column in Columns) { GridViewColumn gvc = new GridViewColumn(); Binding binding = new Binding(Column.Key); if (Column.Key == "Image") {

Categories : C#

Can I convert a bit value to display image in a ASP.NET GridView
I would recommend that you move this parsing logic out to a view model class that resolves the logic and returns the image url in a string property. That way it will be unit testable and much more manageable.

Categories : C#

Gridview change select row to an image?
Convert your select column to a TemplateField, then change the Button inside to an ImageButton. Make sure the Command="Select" stays, because that's what the GridView uses to fire and handle the SelectedIndexChanged event.

Categories : Asp Net

Add image to DataTable to diplay in GridView asp.net
By default GridView encodes HTML content of a cell. Add reference to RowDataBound event handler in your grid ASPX markup <asp:gridview id="GridView1" autogeneratecolumns="true" onrowdatabound="GridView1_RowDataBound" runat="server"> </asp:gridview> and then add following code: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[0].Text = Server.HtmlDecode(e.Row.Cells[0].Text); } } Note: I it's not a good idea in an ASP.NET application to reference a physical path as an IMG source - it will work only on your dev machine. Place images in a subfolder of your application and use relative virtual path. Oh and by the way, if columns in your GridV

Categories : C#

Use data mining in SQL Server 2008 R2
First you should get SQL Server Data Tools which runs in Visual Studio. You will need Analysis Services installed; if you don't have it just run the SQL Server installer again and look for the option to install it. After that you can take a look at this post I wrote a few months ago: http://www.sqlservercentral.com/Forums/Topic480010-147-1.aspx I wrote it specifically targeting the Neural Network models, but it contains details on several background steps you will need to do. Finally - since you're using an evaluation version, you may want to just go for SQL Server 2012 (that's what I use, so I know it works).

Categories : Sql Server

Data mining library for hadoop
Why not use Spark? It's a very efficient open source cluster computing system, both fast to run and fast to write. For distributed data mining, Spark is a very good tool. Hope helpes!

Categories : Hadoop

Sequential Pattern - Data Mining
In general, and keep in mind, this is inherently opinion based, data mining refers to the process of taking data that is in a relatively unusable format and converting it into a format that is more usable. For instance, if I have a huge .txt dump of unstructured text and I then extract relevant portions (according to some formal definition of relevant) and place it into a .bson store or something similar, that would be data mining, regardless of exactly how I do the extraction. However, since your data is already in a SQL database, I wouldn't consider this data mining. I would consider it SQL development, though again, this is largely opinion-based. A SQL database is already a highly useful way of storing data, so accessing that data isn't introducing a level of functionality that wasn'

Categories : SQL

Counting records from database and inserting data into a GridView
you can do it by simple join query in database . try following query : SELECT A.ID , SUM(CASE WHEN B.ID IS NOT NULL THEN 1 ELSE 0 END) AS TOTALNOOFPEOPLE FROM DEPARTMENT AS A LEFT OUTER JOIN PEOPLE AS B ON A.ID = B.DEPARTMENTID GROUP BY A.ID

Categories : C#

Bind images to GridView from database without using handler or httphandler
Is it possible? Yes. Is it a good idea? Not at all, and here's why. An HttpHandler is a way of providing a virtual URL for the image. This allows the browser to handle the GET requests on its own, in an order that's efficient, and asynchronously. This further means that the initial GET request isn't burdened down with conceivably MB's of images. The idea of a website is that it's more efficient to make a lot of smaller requests asynchronously than it is to make one massive request. Why? Because you're already at a disadvantage to provide the user with a good experience when disconnected from the server. Adding insult to that injury by making a massive request that could take minutes, isn't going to add to their joy.

Categories : C#

How to edit, update and delete in gridview when data comes from database?
There are lots of tutorials about asp gridview control in the net. You just have to search for it. To get you started, this link should give you the first steps. Additional link. Hope that helps!

Categories : Database

How to add Sound Effect on clicking an image in gridview
Change the two calls to mp = MediaPlayer.create(this, R.raw.ok); to mp = MediaPlayer.create(TestShapeActivity.this, R.raw.ok); or whatever the name of the activity you are in is. create() takes a Context but when you refer to this within the OnItemClickListener it is referring to the listener, not the activity. Learn more about the this keyword here.

Categories : Android

Display Image links as Images from DB in GridView
Try this: <asp:GridView ID="GridViews1" runat="server" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" onselectedindexchanged="GridViews1_SelectedIndexChanged"> <Columns> <asp:TemplateField> <ItemTemplate> <img src='<%# Eval("Photo") %>' alt='<%# Eval("Name") %>' /> </ItemTemplate> </asp:TemplateField> </Columns> <AlternatingRowStyle BackColor="White" /> <FooterStyle BackColor="#CCCC99" /> <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAl

Categories : C#

Windows forms - display image in gridview
I assume you mean DataGridView as GridView is a control in ASP.NET not Winforms. And to answer your question: yes it is possible. If you have DataGridViewImageColumn and want to show inside text you have to create textbox cell and replace it with default cell in that column: var row = new DataGridViewRow(); row.Cells[Stock.Index] = new DataGridViewTextBoxCell(); row.Cells[Stock.Index].Value = "Test";

Categories : C#

how to redirect to another page by using image button in gridview?
Try below: Changed (TextBox)GridViewRow.FindControl("text1"); line protected void imgbtnEdit_Click(object sender, ImageClickEventArgs e) { GridViewRow grdSelRow = GridView1.SelectedRow; TextBox textInt = (TextBox)GridViewRow.FindControl("text1"); if (textInt.Text == "Text") { Response.Redirect("Text.aspx"); } }

Categories : Asp Net

How to set border to every Gridview Image item dynamically
Inside your class ImageAdapter --> getView(...) method, add this line before return gridView; statement gridView.setBackgroundColor(Color.RED); Edit Also add android:layout_margin="10dp" in your image view... Take this for ref.. In the provided link border is applied to complete grid view , but its gives an idea of border setting, use my logic mentioned to achieve this.. Hope this helps..

Categories : Android

How to add dynamic tooltip to a image control which is in gridview?
If the text is the same for all the images you can assing a css class to the image control: <asp:ImageButton ID="imgbtnInfo" CssClass="imgtooltip" runat="server" /> and then call the tooltip function of the jQuery UI framework: $('.imgtooltip').tooltip(); In case each row has to have its own tooltip text, you can set the title property at server side. In your case, since you are using a GridView you could use the onrowdatabound event. <asp:gridview onrowdatabound="myGridView_RowDataBound" runat="server"> </asp:gridview> void myGridView_RowDataBound(Object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { // Set the title text e.Row.Cells[yourImageIndex].Title = "yourTooltipText"; } } If you k

Categories : C#

showing image in gridview from byte array
I know pictures are recorded as binaries to databases. In this aspect, your problem turns to a "converting binary to byte". If you can reach your picture info as binary data, you can convert it as taking 3 digits for 1 byte, and convert & show as bytes. http://en.wikipedia.org/wiki/ASCII

Categories : C#

Gridview image to give sqlite data
Try this:: Give your image tag with the ID of row.if you have 10 images then you have to give tag to image like imageView.SetTag(ID of Row); //Row No which is unique for all rows. Now when you click on Image pass the tag of that image to intent. and on receive intent get the tag and fire the query to sql to get data for that particular row id like: String sql ="SELECT * FROM Heroes where ID = "+TagID; Hope it Helps!!

Categories : Android



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