w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Create an array of custom Object to fill it and take his content to fill a UITableView
In - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath you do not initialize cells for your TableView. Add the below code to this method before the code that you already have static NSString *CellIdentifier = @"Cell Identifier"; UITableViewCell *cell; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } and make sure you return cell; at the end of that method Also make sure you implement the rest of the necessary TableView delegate methods: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

Categories : Objective C

making a cell border exactly like Excel's fill handle?
I was able to hack that up with the combination of black box with white borders along with absolute positioning after relative outer div. Looks like this: Full demo: http://jsfiddle.net/68KAZ/1/ HTML (for the cursor cell) <td style="border: 3px solid black;"> <div id="ExcelCursorOuter"><div id="ExcelCursor"></div></div> </td> CSS: #ExcelCursorOuter { position: relative; } #ExcelCursor { position: absolute; top: 8px; right: -5px; background: #000; width: 5px; height: 5px; border: 1px solid #fff; border-right: 0px; border-bottom: 0px; }

Categories : HTML

Fill SVG only if existing fill colour is certain value
Your brackets are in the wrong place if($('path, rect, circle', this).attr('fill') == '#DCDCFF') { And the jsfiddle seems rather strange as in the first circle case you're using val rather than attr i.e. if ($('circle', this).val('fill') should be if ($('circle', this).attr('fill') shouldn't it? And finally if you only want it to work on one rect then you should give that rect an id attribute (below I've assumed id="r") and then change the code like this... $(function () { $('g').mouseenter(function () { if ($('circle', this).attr('fill') == 'yellow') { $('circle', this).attr('fill', 'pink'); } if ($('#r', this).attr('fill') == 'red') { $('#r', this).attr('fill', 'yellow'); } }).mouseleave(function

Categories : Jquery

Image fill is not working properly
from the code you have pasted, it's working properly. Are you able to link to the site where this is live and not working? Cache issue? See jsfiddle: http://jsfiddle.net/FNQZn/ .feature-image { width:150px; height:150px; display:block; position:relative; overflow:hidden; } .feature-image img { position:absolute; top:-50; left:0; width:100%; }

Categories : CSS

Fill Parent on listview not working
It solve the problem. Thanks for all to share the suggestion. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/parentRelativeLayout" android:layout_width="fill_parent" android:layout_height="match_parent" > <ScrollView android:id="@+id/parentScrollView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@color/light_white" android:orientation="vertical" > <RelativeLayout android:id="@+id/relativeLayoutforAds" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerHorizontal="true" /> </Sc

Categories : Android

jQuery div to fill viewport and resize not working
resize working fine in your example. i have test your code its working fine. please try it by adding ready event : $(document).ready(function(){ //put your jquery code here }); Specify a function to execute when the DOM is fully loaded. The handler passed to .ready() is guaranteed to be executed after the DOM is ready, so this is usually the best place to attach all other event handlers and run other jQuery code. When using scripts that rely on the value of CSS style properties, it's important to reference external stylesheets or embed style elements before referencing the scripts.

Categories : Jquery

9 patch fill area not working with multiple scale areas
I don't know what is your image,but I think it is better to exclude the red rectangle from image. Then use a layout and put your background image, for its background, and add Image element in that layout for displaying your red rectangle.

Categories : Android

d3 svg to fill screen
I'm very new to D3! So can't give more info..but I found this JQuery Answer which you could use to first get at the width then just plug it in. http://stackoverflow.com/a/1038765/709872 Apparently without JQuery to help it's more complicated! Hope this points you in the right direction.

Categories : Javascript

Flood fill in GDI+
You say you keep a list of drawable objects (shapes, lines and whatnot). Well, assuming you implement flood fill, what is the resulting object you wish to get? The way I see it, it is either a Bitmap, or a polygon (array of Point). Because flood fill algorithms operate on bitmaps, you can draw all your current objects onto a temporary buffer Bitmap, and then do flood fill on this bitmap. The resulting fill area can either be saved to a Bitmap, or using other algorithms, traced back to a polygon (or series of polygons). http://en.wikipedia.org/wiki/Flood_fill#Vector_implementations

Categories : C#

Fill UL Space with 2nd to last Li?
Is there a reason you are floating the last li right instead of left? If you keep the floats left you shouldn't have the spacing problem. If this doesn't help, I think you're going to need to give more details as to what you want to accomplish. Okay, I suspect there's more that you haven't yet told us, but take a look at this quick and dirty sample and let me know how close it comes to your goal: <html> <head> <style> .NavBar > ul { list-style:inside none; margin:0; padding:0; width:100%; } .NavBar > ul > li { list-style:inside none; display:block; float:left; position:relative; margin:0; padding:0; width: 10%; background-color: #FFDDDD; } .NavBar > ul > li > a:hover { background:#111; } .NavBar > ul > li:last-child { float: right; backgr

Categories : HTML

How to fill right in org-mode?
Starting with this state: | 8 | 6 | 7 | 5 | 3 | 0 | 9 | | | | | | | | | #+TBLFM: @2=@1*2 You get to this state: | 8 | 6 | 7 | 5 | 3 | 0 | 9 | | 16 | 12 | 14 | 10 | 6 | 0 | 18 | #+TBLFM: @2=@1*2 by pressing C-c C-c while on the line with TBLFM.

Categories : Emacs

fill the div with divs in a row (css)
I'm not sure if this is what you want..You'll need javascript though (I know you didn't tag it here): http://jsfiddle.net/QheN7/ Screen capture: CSS: .container{ overflow:auto; border:1px solid #000; width:600px; } .child{ float:left; height:20px; } .child:nth-child(odd){ background-color:#aaa; } .child:nth-child(even){ background-color:#666; } HTML: <div class="container"> <div class="child"></div> <div class="child"></div> <div class="child"></div> <div class="child"></div> <div class="child"></div> <div class="child"></div> </div> <button>Add div</button> JS: $(function(){ function setWidth(){ var container = $('.co

Categories : CSS

Fill a HDD with charcter 0
Using the built in (in Windows that is) format command with some parameters will do exactly what you want. format e: /fs:NTFS /p:2 See also http://pcsupport.about.com/od/toolsofthetrade/ht/write-zeros-format-command.htm for more info.

Categories : Python

WPF : Fill the outside of a rectangle
You can use a combination of OpacityMask and DrawingBrush: XAML: <Grid Background="Gray"> <Image Name="image"Source="..."> <Image.OpacityMask> <DrawingBrush x:Name="mask"/> </Image.OpacityMask> </Image> </Grid> Code-behind: private void UpdateOpactiyMask() { Point topLeft = new Point(); Point bottomRight = new Point(image.ActualWidth, image.ActualHeight); GeometryDrawing left = new GeometryDrawing(); left.Brush = borderBrush; left.Geometry = new RectangleGeometry(new Rect(topLeft, new Point(SelectedArea.Left, bottomRight.Y))); GeometryDrawing right = new GeometryDrawing(); right.Brush = borderBrush; right.Geometry = new RectangleGeomet

Categories : C#

fill dgv in the background.
Your new code is identical to the initial version. Me.Invoke is forcing UpdatingForm to be executed in UI thread. You can split in 2 parts. Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork Me.ProductsTableAdapter.Fill(Me.NorthwindDataSet.Products) End Sub Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted Me.ProductsBindingSource.ResetBindings(False) End Sub check as well Asynchronous Data Loading using TableAdapter with Cancel Feature

Categories : Vb.Net

How to fill with my own strings
All the work is done in the ADAPTER here your DataAdapter. The cells are constructed in the method GetView, each cells is recycled : if convertView is null you create a new cell to use or else you use convertView. i assume you must change some code in your DataHolder public DataHolder(Context parent) { adapter = ArrayAdapter.createFromResource(parent, R.array.choices, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); } For now you must understand that the array of choices is provided statically : R.array.choices One solution would be to pass your data when constructing the viewHolders here : viewHolder.data = new DataHolder(myContext); should looks like something like this : viewHolder.data = new

Categories : Android

How to fill a ScrolledComposite?
Just add these lines at the end of the constructor: this.setMinSize(comp.computeSize(SWT.DEFAULT, SWT.DEFAULT)); this.setExpandHorizontal(true); this.setExpandVertical(true); Notes: Remember to dispose() all resources you create yourself (Color, Font, ...) Consider using system resources (no need to dispose) by using display.getSystemColor(SWT.COLOR_WHITE) and display.getSystemFont().

Categories : Java

flood fill getting and RGB Value
You need to declare before you use them (you can't declare them inline in the parameter list) byte r,g,b; m_pScreenDib ->GetRGB(mid.x,mid.y, (byte)& r,(byte)& g,(byte)& b);

Categories : C++

How to fill in missing months?
Study outer join. Run the following once: CREATE TABLE months ( mm char(2), name char(10) ); INSERT INTO months VALUES ('01', 'January'); INSERT INTO months VALUES ('02', 'Febuary'); INSERT INTO months VALUES ('03', 'March'); INSERT INTO months VALUES ('04', 'April'); INSERT INTO months VALUES ('05', 'May'); INSERT INTO months VALUES ('06', 'June'); INSERT INTO months VALUES ('07', 'July'); INSERT INTO months VALUES ('08', 'August'); INSERT INTO months VALUES ('09', 'September'); INSERT INTO months VALUES ('10', 'October'); INSERT INTO months VALUES ('11', 'November'); INSERT INTO months VALUES ('12', 'December'); And run this: SELECT m.mm AS ord, m.name AS month, count(e.date) AS count FROM months m LEFT OUTER JOIN events e ON strftime('%m', e.date)

Categories : Sqlite

Android Fill Partial Arc
I Know it could be a little bit late but I came with this approach from a iOS project, first draw contour and then draw the filling arc protected void onDraw(Canvas canvas) { super.onDraw(canvas); float width = (float)getWidth(); float height = (float)getHeight(); float radius; //Get radius from the bigger size if (width > height){ radius = height/2; }else{ radius = width/2; } //Create Paint Object Paint paint = new Paint(); paint.setColor(Color.RED); paint.setFilterBitmap(true); paint.setAntiAlias(true); paint.setStrokeWidth(5); paint.setStyle(Paint.Style.STROKE); //Create Contour Object Path path = new Path(); float center_x, center_y; center_x = width/2; center_y = height/2;

Categories : Java

Fill available space with or without flexbox
From your question I understand that you want to fill the entire page with boxes without any space. This is what, exactly you wanted.

Categories : Javascript

Image Scaling to fill div CSS
You need the image div inside the imagewrapper. The secret is in the padding-bottom, this is specifying a 2:1 ratio. Experiment ;) #imagewrapper { position: relative; padding-bottom: 50%; height: 0; } #image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

Categories : Jquery

How fill all fields in the class?
Is there any tool that can traversal through all fields and set primitives, 0 for Number (0.0 for Float, Double, 0 for Integer, 0L for Long, but not null as default), something like "test" for String? Also I want that tool to populate Collections (List, Set, Map). AFAIK, there is nothing that will save you much effort over doing it the simple way. It is a trivial matter to declare the fields with an initializer, or to do some simple default initialization in the constructor(s). It is probably a good idea to use primitive types rather than wrapper types; e.g. int rather Integer. One advantage is that fields with primitive types are default initialized to 0, 0.0 or false ... saving you the bother.

Categories : Java

CSS before selector fill available space
Try using calc() Sample FIDDLE .container:before{ content: ''; height: 100%; background: red; position: absolute; top:0; right: 0; width: calc(((100% - 1170px)/2)); }

Categories : HTML

How to fill a gtk grid with buttons?
Like this: // insert 9 buttons to a grid, 3x3. void fill_grid_with_buttons(GtkWidget *grid) { GtkWidget *button; int i, j; for (i = 0; i < 3; i += 1) { for (j = 0; j < 3; j += 1) { button = gtk_button_new_with_label ("label"); gtk_grid_attach (GTK_GRID (grid), button, i, j, 1, 1); } } }

Categories : C

Div fill height of parent div?
You can stretch the leftbar with absolute positioning and setting the top/bottom values: * { padding: 0px; margin: 0px; } #container { position: relative; margin: 85px auto 0px auto; background: #444444; min-height: 500px; width: 900px; } #topbar { width: 900px; height: 85px; background: #555555; } #leftbar { position: absolute; top: 85px; bottom: 0; width: 250px; background: red; } Fiddle: http://jsfiddle.net/robertp/CQ7pf/

Categories : HTML

Stretch to fill
  • in menu
  • The smartest thing to do is make them (the a's) display: block, but then they still don't fill your entire li, because the li contains padding. Remove the padding from the lis. Only give them a size if you need, and apply all the other markup, especially padding, to the a elements themselves.

    Categories : HTML

    Unclickable fill in Circle?
    Add clickable: false to the CircleOptions passed to the constructor: var circle = new google.maps.Circle({ strokeColor: '#0000FF', strokeWeight: 2, fillOpacity: 0, clickable: false, map: map, center: new google.maps.LatLng(lat, lon), radius: 100 });

    Categories : Google Maps

    Fill in a field without label
    the fill_in method's first argument must be a css selection. for example: #id, li, .class. So you can change t('label.transaction.confirmation.code') to the text field id or [title='#{t('label.transaction.confirmation.code')}']

    Categories : Ruby On Rails

    select box fill textarea
    With the way you are accessing the value you should change to object from array, because you are trying to access an array with the property name which doesn't work that way, you can only use index on array, but you can do it on an object by doing centerLocations["text" + address]: var centerLocations = { text1: 'some text1', text2: 'some text2', text3: 'some text3' }; Fiddle 2 ways you can do it with array or object. using Array(only if your index of option matches that of the array item index) var centerLocations = [ 'some text1' //you can even get rid of text1, text2 etc.. , 'some text2' , 'some text3' ]; $('#ctrTitles').change(function () { $("#TextArea1").val(centerLocations[this.selectedIndex]); //with your original structure you would do //$("#TextA

    Categories : Javascript

    In SSRS fill every row with value in matrix
    I think I know what you are talking about. If you have instances where inner joins are getting rid of some row operations you can change them to left joins and always include the row values in the TSQL. I hope this is what you are reffering to and here is a simple example of how I would handle an issue where there was a person with no orders in a matrix environment. declare @Person Table ( personID int identity, person varchar(8)); insert into @Person values ('Brett'),('Sean'),('Chad'),('Michael'); declare @Orders table ( OrderID int identity, PersonID int, Desciption varchar(32), Amount int); insert into @Orders values (1, 'Shirt', 20),(2, 'Shirt', 22),(3, 'Shirt', 20); Select person , OrderID , Desciption , Amount from @Person p join @Orders o on p.personID = o.Pers

    Categories : Reporting Services

    Fill DataGridView in C# with Oracle?
    Here is an example Source : http://www.etechpulse.com/2012/10/bind-array-list-elements-to-grid-view.html Code Behind: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindGridview(); } } // Single Dimensional array private void BindGridview() { string[] arrlist = // your function that gets the arraylist DataTable dt = new DataTable(); // you need to do the following for each column dt.Columns.Add("Name"); for (int i = 0; i < arrlist.Count(); i++) { dt.Rows.Add(); dt.Rows[i]["Name"] = arrlist[i].ToString(); } gva

    Categories : C#

    Fill in values in XML Template
    A simple regex can help here var newXml = Regex.Replace(xml, "<%=(.+?)%>", m => MyFxn(m.Groups[1].Value)); //replace this function with yours which returns the real values. It's //just a demo.... string MyFxn(string s) { var dict = new Dictionary<string, string>(){ {"user.name","name1"}, {"user.address.street","street1"} }; return dict[s]; }

    Categories : C#

    Error from OdbcDataAdapter.Fill
    Not sure where you get connection object from your question but you can do as below. don't create class level connections, you can create it when you want and properly dispose it at the end. public DataTable GetDataTableFromAdapter(string queryString) { DataTable dt = new DataTable(); using (OdbcConnection connection = new OdbcConnection(ConnectionString)) { using (OdbcDataAdapter adapter = new OdbcDataAdapter(queryString, connection)) { connection.Open(); adapter.Fill(dt); } } return dt; } Call it as DataTable dt = GetDataTableFromAdapter("select [item], [upcno] from [table]");

    Categories : C#

    How to fill each cv::Mat Column with a different value in OpenCV C++?
    GpuMat offers much of the same functionality as cv::Mat. You can create a submatrix with col() and use setTo() to fill it with data: cv::gpu::GpuMat gm(3,3,CV_8UC1); for (int i = 0; i < gm.cols; ++i) { auto column = gm.col(i); auto val = cv::Scalar(i + 1); // This value is just to reflect your example. column.setTo(val); }

    Categories : C++

    clipboard fill url request
    You can access the clipboard and alter it, copy it, paste it, but you can only paste what is in the clipboard via a paste event. This has to do with Security issues. Flash Player requires that the getData() be called in a paste event handler. In AIR, this restriction only applies to content outside of the application security sandbox. See http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/Clipboard.html#getData() for more explanation.

    Categories : Actionscript

    Confused about how to fill an array
    You can do it like this. But i wonder why you are generating 2 random numbers Random rnd = new Random(); int x = rnd.Next(0, 3); int y = rnd.Next(0, 3); int[,] array=new int[2,2]; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { array[i,j] = yourvalue; } }

    Categories : C#

    Fill char*[] from strtok
    commands[i] = NULL; for (int u=0; u<length; u++) printf("%s ", commands[i]); Take a very good look at that code. It uses u as the loop control variable but prints out the element based on i. Hence, due to the fact you've set commands[i] to NULL in the line before the loop, you'll just get a series of NULLs. Use commands[u] in the loop rather than commands[i]. In addition to that: void* setCommands(int length){ char* commands[length]; : return *commands; } will only return one pointer, the one to the first token, not the one to the array of token pointers. You cannot return addresses of local variables that are going out of scope (well, you can, but it may not work). And, in any case, since that one pointer most likely points to yet another local varia

    Categories : C

    Dynamic fill ListView in WPF
    Ok, the solution is: public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var config = value as ColumnConfig; if (config != null) { var grdiView = new GridView(); for (int i = 0; i < config.Columns.Count; i++) { var column = config.Columns[i]; var binding = new Binding("["+i +"]"); grdiView.Columns.Add(new GridViewColumn { Header = column.Header, DisplayMemberBinding = binding}); } return grdiView; } return Binding.DoNothing; } and you can bind to List<List<string>>

    Categories : C#

    How I can manage to fill listview with .dbf
    here you go. try below one. string filename= //yourfilePath; string constr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ filename +";Extended Properties=dBASE IV;User ID=Admin;Password=;"; DataTable dt = new DataTable(); using (OleDbConnection con = new OleDbConnection(constr)) { var sql = "select * from " + filename ; OleDbCommand cmd = new OleDbCommand(sql, con); con.Open(); DataSet ds = new DataSet(); ; OleDbDataAdapter da = new OleDbDataAdapter(cmd); da.Fill(ds); dt =ds.Tables[0] } here how to pass data to listview or dataGrid.; mylistview.ItemsSource = dt.DefaultView; Condition you have to create View to your List

    Categories : C#



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