Posts

Featured post

How i fill combobox items in Radgridview manually using in vb.net -

how fill combobox items in radgridview manually without using datasource in vb.net have radgridview in form.(radgridview1) radgridview1 contained 3 column , column number 3 combobox type. want fill each combobox in column 3 data using code: unp ipe angle box other profile. don't know how it. you can use gridtemplatecolumn following. <telerik:gridtemplatecolumn itemstyle-wrap="true" itemstyle-verticalalign="middle" itemstyle-horizontalalign="center" allowfiltering="false" headerstyle-horizontalalign="center" headerstyle-width="3%" itemstyle-width="3%" headertext="profile"> <itemtemplate> <telerik:radcombobox> <items> <telerik:radcomboboxitem text="unp" value="unp" />

c - Calling a function within a loop -

i trying simple addition function take number x array , add variable i it, iteration variable inside loop. instead of adding each variable individually , producing output of : 3, 2, 7 it produces values of 3, 5, 13. #include <stdio.h> int add(int x[], int y); int main(void) { int i; int a[3] = {3, 1, 5}; for(i=0; i<3; i++) { printf("%d \t", i); printf("%d, %d, equals %d \n", a[i], i, add(a[i], i)); } return 0; } int add(int x[], int y){ return x+y; } try int add(int x, int y){ return x+y; }

vb.net - Unbound DataGridView add row with checkbox error -

this windows forms program. have unbound datagridview control 4 columns; feature id string, parts string, flats string , showonest boolean. columns defined in form designer , boolean column is, indeed, set checkbox tristate set false. the user selects product list box , code executed populate grid grdfeat.rows.clear() = 0 curproduct.lstfeatures.count - 1 (curproduct.lstfeatures(i)) grdfeat.rows.add(.featureid, .parts, .flats, .showonest) end next if allowusertoaddrows false, everthing good. setting allowusertoaddrows true, however, results in following error: formatexception value '' cannot converted type 'boolean'. the error not triggered in code. it's displayed in new tab titled "no source available". it seems pretty clear process adds new editing row trying set checkbox string value, or perhaps null. i'm new (a few months) vb.net, suspect i'm overlooking simple setting somewhere, after several hours of trying

html - Why isn't this media query display none not working? -

i'm trying have mobile-style.css hide background @ 640px. works on chrome not in firefox nor mobile safari? works offline firefox not on server? very strange. <link href="css/style.css" rel="stylesheet" type="text/css" media="all" /> <link href="css/style-mobile.css" rel="stylesheet" type="text/css" media="all" /> <link href="css/muscle-map.css" rel="stylesheet" type="text/css" media="all" /> </head> <body> <div id="muscle-map"> <img id="background" src="crops/00. blank figures.jpg" /> <img id="biceps-a" src="crops/05.a biceps.png" /> <img id="biceps-b" src="crops/05.b biceps.png" /> <img id="obliques" src="crops/04. obliques.png"

Save a file and then open it using javafx -

i have file stored in project directory. make few changes , save using filechooser saved dialog box. after saving want file automatically opened in system. succeeded in saving file not getting how open automatically without user choosing open dialog box. code saving file written below. string input = ""; try { outputstream outstream = null; ipfile = thread.currentthread().getcontextclassloader().getresourceasstream("upgradeworkbench/resources/ip_template.sh"); stage stage = new stage(); stage.settitle("save"); byte[] buffer = null; buffer = new byte[ipfile.available()]; ipfile.read(buffer); filechooser filechooser = new filechooser(); filechooser.setinitialfilename("ip_template"); filechooser.getextensionfilters().addall( new filechooser.extensio

swift - Table view disappears in custom animation -

i wrote following function implement custom animation: func animateit() { println("here") var mainstoryboard = uistoryboard(name: "main", bundle: nil) var anavigationcontroller2 = mainstoryboard.instantiateviewcontrollerwithidentifier("tnavigationcontroller") as! uinavigationcontroller var ainfo = anavigationcontroller2.viewcontrollers[0] as! ainfovc self.view.addsubview(ainfo.view) self.view.bringsubviewtofront(ainfo.view) self.tabbarcontroller?.tabbar.hidden = false uiview.animatewithduration(2.0, animations: { ainfo.view.frame.origin.x += self.view.frame.width }) { (finished) -> void in ainfo.view.removefromsuperview() } } the ' ainfovc ' has table view, disappears when above animation starts. similar functions work other view controller has not table view. thanks in advance.

sql - Transaction With db context in C# -

i trying commit transaction c# context: private testdbentities context =new testdbentities(connectionstring); this.context.connection.open(); system.data.common.dbtransaction transaction = this.context.connection.begintransaction(); dbcommand command = this.context.connection.createcommand(); command.commandtext = "some insert/update query"; command.executenonquery(); transaction.commit(); but error message: "the query syntax not valid. near identifier table_name, line 1, column 8." query seems fine when directly execute directly on sql management studio. there solution? sqlconnection conn = new sqlconnection(); sqlcommand command1 = new sqlcommand(); sqlcommand command2 = new sqlcommand(); sqltransaction trans = conn.begintransaction(); command1.transaction = trans; command2.transaction = trans; try { command1.executenonquery(); command2.