Posts

SQL rows dissapear when join added -

select tblartworktemplates.id, tblartworktemplates.datecreated, tblspecifications.txtpagination, tblspecifications.flatsizew width, tblspecifications.flatsizel length, tblspecifications.flatsizeuom uom, (select count(1) expr1 tblartworkuploads (templateid = tblartworktemplates.id)) uploadcount, (select count(1) talks tblartworktemplatemessages (templateid = tblartworktemplates.id)) talkcount, tblartworktemplates.lasteditping, tblusers.username expr1 tblusers inner join tblartworktemplates inner join tblspecifications on tblartworktemplates.specid = tblspecifications.id on tblusers.id = tblartworktemplates.editpinguserid (tblartworktemplates.userid = 70) the tblusers join causing rows disapear when tbla...

How to return specific list result from linq to entities -

hi experts currenly write code: public ilist<tresult> getcustomquery<tresult>(int orderid, func<order, tresult> selector) { using(repositorydatacontext = new northwindentities()) { ilist<tresult> res = (from od in repositorydatacontext.order_details join o in repositorydatacontext.orders on od.orderid equals o.orderid join p in repositorydatacontext.products on od.productid equals p.productid join c in repositorydatacontext.customers on o.customerid equals c.customerid o.orderid > orderid select new { o.orderid, od.unitprice, ...

applying a filter on a string in python -

i have user typing in username , want valid strings pass through, meaning characters in [a-za-z0-9]. pretty new python , unsure of syntax. here's example of want in code, check through username , return false upon illegal character.: def _checkinput(input): char in input: if !(char in [a-za-z0-9]): return false return true thanks! you need isalnum : >>> name = raw_input('enter name: ') enter name: foo_bar >>> name.isalnum() false >>> name = raw_input('enter name: ') enter name: foobar >>> name.isalnum() true

javascript - parent-child window in java script -

i want stop program flow until receive input child window. code parent window: <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1252"> <title>mainpage</title> <script language="javascript"> function openpage(){ window.open("ok.htm","warning",'fullscreen=0,height=150,width=300,left=500,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,top=200'); //this place want program wait till input change in document.fm.w.value form child window/////// alert(document.fm.w.value);/// alert should contain new value acorrding selection of button in child window//// } </script> </head> <body> <form name="fm"> <input type="hidden" size="40" id="w" value="wwww"> <input type="button" value= "press" id="q" name= "q" oncli...

asp.net - Selective JSON Serialization using ASMX Web Service -

i have webservice use json formatted custom classes, example: public class custom { private int _myprivateproperty; public int tobeaccessedonlyincode { { return _myprivateproperty; } set { _myprivateproperty = value; } } public int tobeserialized { { return _myprivateproperty * 1000; } } } the above example illustration purposes. the problem don't want return original object format in json response, need original format in code. i have tried [datacontract]/[datamemeber] attributes in class, leaving out tobeonlyaccessedincode property, have tried using [nonserialized] attribute above private object container. no avail. is there way in can prevent field being serialized json when using built in asmx scriptserializer? i've spent few hours lookin...

symfony1 - Backup MySQL via php, in a Symfony application -

i'm trying php script backup database. here's i've tried far : $command = "mysqldump -u [username] -p [password] [databasename] | gzip > db.sql.gz"; $this->output = system($command); how password , username databases.yml ? how can script sends me backup file, instead of saving on server (à la phpmyadmin) ? you can create symfony task. if pass in environment (i.e. dev, prod) or connection access doctrine connection manager , create connection. can use connection make database dump or connection details connection manager. you can use doctrine insert sql task template task. i've done similar in past.

.net - How can I add rows to a DataGridView control in C#? -

i have created 3 columns on datagridview control, don't know how add rows. please help. possibly duplicate of: how add data datagridview or how add row datagridview or how add rows , columns datagrid? or how can add 1 row datagridview? please use search bar located on top right corner of site if think question may have been covered.