Posts

Linq date and datetime comparer -

Linq date and datetime comparer - i need query of day, problem i'm getting error when seek compare value comes db (which datetime ), against datetime.today.date value. what i'm trying accomplish registers of day. list<client> _cliente = c in db.cliente bring together v in db.vendedor on c.idvendedor equals v.idvendedor v.fecha.date.equals(datetime.today.date) this i'm getting: 'the specified type fellow member 'date' not supported in linq entities. initializers, entity members, , entity navigation properties supported.' maybe can this: var today = datetime.today; var tomorrow = today.adddays(1); list<client> _cliente = c in db.cliente bring together v in db.vendedor on c.idvendedor equals v.idvendedor v.fecha >= today && v.fecha < tomorrow linq datetime date linq-to-...

java - Signature with HMAC SHA-256 and Base64Encoder -

java - Signature with HMAC SHA-256 and Base64Encoder - i tried lot creating signature access 1 web service. they required generate signature each request. for generating signature, have 1 message "abc" , 1 secrete key "xyz". according them signature should processed next ruby code require 'base64' require 'openssl' secret = "xyz" request = "abc" digest = openssl::digest::digest.new('sha256') signature = base64.encode64(openssl::hmac.digest(digest, secret, request)).chomp signature should 9zjsfvb3k5npnlf5he+gfyyaxnwcij6j8ycrpxw5gg0= not getting using java code below: secretkey secretkey = null; byte[] keybytes = keystring.getbytes("utf-8"); mac mac = mac.getinstance("hmachsa256"); secretkey = new secretkeyspec(keybytes,mac.getalgorithm()); mac.init(secretkey); byte[] text = basestring.getbytes("utf-8"); //mac.update(digest.digest()); byte[] ...

asp.net - WebSite dynamic port (VS2010) -

asp.net - WebSite dynamic port (VS2010) - how alter vwdport website (not web application) in visual studio 2010? found many articles says click project , in f4 properties window set “use dynamic ports” false...but problem don't see such alternative in properties window , think it's because using website , not webapplication / webproject. there other way it? thanks you can properties of web site project (f4) , alter "use dynamic port" settings , port. sorry, can post screen shot in german: asp.net visual-studio

restart - How to start an application in android when mobile is switched ON? -

restart - How to start an application in android when mobile is switched ON? - hai have application using background service.its running clearly.if mobile switch off,my service ound service off.when application started background service strated .i want restart service 1 time again when mobile switch off? possible? explain code update public class loginform extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview (r.layout.login); receiver = new connectionreceiver(); registerreceiver(receiver,new intentfilter(connectivitymanager.connectivity_action)); } } private class connectionreceiver extends broadcastreceiver{ private timer mtimer; private timertask mtimertask; @override public void onreceive(context context, intent intent) { networkinfo info = intent.getparcelableextra (connectivitymanager.extra_network_info); if(nul...

jpeg - jpg file difference : from wireshark tcp stream and from a C++ socket -

jpeg - jpg file difference : from wireshark tcp stream and from a C++ socket - i'm trying record jpeg image sent ethernet photographic camera in mjpg stream. image obtain borland c++ application (vspcip) looks identical in notepad++ tcp stream saved application wireshark (except number of characters : 15540 in file, , 15342 in wireshark file, whereas jpeg content-length announced 15342). have 198 non-displayable characters more expected both files have 247 lines. here 2 files : http://demo.ovh.com/fr/a61295d39f963998ba1244da2f55a27d/ which tool utilize (in notepad++ (i tried display in utf8 or ansi : files still match whereas don't have same number of characters) or editor) view non-displayable characters ? std::ofstream default opens file in text mode, means might translate newline characters ( '\n' binary 0x0a) carriage-return/newline sequence ( "\r\n" , binary 0x0d , 0x0a). open output file in binary mode , solve problem: std::ofstr...

Ruby: marshal and unmarshal a variable, not an instance -

Ruby: marshal and unmarshal a variable, not an instance - ok, ruby gurus, hard 1 describe in title, bear me explanation: i'm looking pass string represents variable: not instance, not collection of properties create object, actual variable: handle object. the reason dealing resources can located on filesystem, on network, or in-memory. want create uri handler can handle each of these in consistent manner, can have schemes eg. file:// http:// ftp:// inmemory:// you idea. it's lastly 1 i'm trying figure out: there way string representation of reference object in ruby, , utilize string create new reference? i'm interested in marshalling reference, not object. ideally there taking object#object_id , easy plenty get, , using create new variable elsewhere refers same object. i'm aware fragile , unusual utilize case: works within 1 ruby process long there existing variable maintain object beingness garbage collected, both true inmemory scheme i'm ...

iphone - php can't use SimpleXMLElement(500 server error), and can't echo out data -

iphone - php can't use SimpleXMLElement(500 server error), and can't echo out data - i have 2 problems. (1) wrote iphone app send updated gps info iphone periodically(maybe period=1s). wrote these lines in server's php <html> <body> <?php $xmlfile = file_get_contents("php://input"); echo $xmlfile."<br>"; echo "hello world!"; ?> </body> </html> and in iphone side, implement nsurlconnection delegate method connection: didreceivedata: by printing info out in xcode console test whether xml string has been sent server. , receive next in xcode console successfully, <html><body><openingtagofxml>the xml string sent.</openingtagofxml><br>hello world!</body></html> but, when running app, visit www.mywebsite.com/index.php(i.e. php shown above), only hello world! shown on page! suppose xml code can displayed out on client browser, too. why? becau...