Daily Archives

Articles indexed Monday May 10 2010

Page 24/113 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Using LINQ to SQL with multiple databases

    - by Stuart Ferguson
    I am working on a new project and hoping to use LINQ to SQL for the data access but have come across the following issue. I need to have my application access 3 databases with similar but not the same table structure, for example Database1 and Database 2 has a table called tblCustomer with 2 columns CustomerKey and CustomerName Database2 has a table called tblCustomer with 3 columns CustomerKey, CustomerName and CustomerPostCode I am looking for a solution that will allow me a query all three databases without the need for 3 GetCustomerList functions as Database1 and Database2 could use the same function as are the same structure, with an override function for database 3 to bring back the additional field. Is there a way i can declare a base datacontext class to handle Database 1 and 2 with an inherited version for Database 3. Thanks In Advance Stuart Ferguson

    Read the article

  • how can we call one class's method through another class's object in php

    - by hello
    I want to know that is there any method in PHP by which i can call one class's method from another class object. let me clear here is one class class A() { public function showData(){ //here is method of class A } } // here is another class class B(){ public function getData(){ //some method in class B } } //now i create two objects $objA= new class A(); $objB=new class B(); now i want to call this $objB->showData();<--- is that possible .. by any how method( using public, inheritence,child parent etc...) please help me

    Read the article

  • How to implement RSA-CBC?

    - by tq0fqeu
    I don't konw more about cipher, I just want to implement RSA-CBC which maybe mean that the result of RSA encrypt in CBC mode, and I have implemented RSA. any code languages will be ok, java will be appreciated thx

    Read the article

  • Date format in SQLite - iphone - How ?

    - by sagar
    I know that - SQLite doesn't support Day name & month name. I have gone through this question. I have created two custom functions for it. My custom function for Converting Day name from day number ( %w day of week 0-6 with sunday==0 ) +(NSString*)dayNameStringFromDayNo:(NSString*)dayNo{ return ([dayNo isEqualToString:@"0"])?@"Sunday": ( ([dayNo isEqualToString:@"1"])?@"Monday": ( ([dayNo isEqualToString:@"2"])?@"Tuesday": ( ([dayNo isEqualToString:@"3"])?@"Wednesday": ( ([dayNo isEqualToString:@"4"])?@"Thursday": ( ([dayNo isEqualToString:@"5"])?@"Friday": @"Saturday" ) ) ) ) ); } My custom method for getting month name from month no string ( %m month: 01-12 ) +(NSString*)monthNameFromNumber:(NSString*)no{ return ([no isEqualToString:@"01"])?@"January": ( ([no isEqualToString:@"02"])?@"February": ( ([no isEqualToString:@"03"])?@"March": ( ([no isEqualToString:@"04"])?@"April": ( ([no isEqualToString:@"05"])?@"May": ( ([no isEqualToString:@"06"])?@"June": ( ([no isEqualToString:@"07"])?@"July": ( ([no isEqualToString:@"08"])?@"August": ( ([no isEqualToString:@"09"])?@"September": ( ([no isEqualToString:@"10"])?@"October": ( ([no isEqualToString:@"11"])?@"November":@"Decemeber" ) ) ) ) ) ) ) ) ) ); } But what about date following format. Sat 6th February How to get this kind of output ? Do I have to again create a custom function for it ? Thanks in advance for sharing your knowledge. Sagar.

    Read the article

  • Apache proxy to Lighttpd: changing $_SERVER['HTTP_HOST'] in php

    - by watain
    I have a WordPress blog running on lighttpd-1.4.19, listening on at www00:81. On the same host, apache-2.2.11 listens on port 80, which creates a proxy connection from http://blog.mydomain.org:80 to http://blog.mydomain.org:81. The Apache virtualhost looks as follows: <VirtualHost *:80> ServerName blog.mydomain.org ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://blog.mydomain.org:81/ ProxyPassReverse / http://blog.mydomain.org:81/ </VirtualHost> Using debug.log-request-handling = "enable" I get the following log entry when I browse http://blog.mydomain.org:80 (notice the Host headers): 2010-05-10 08:47:14: (request.c.294) fd: 6 request-len: 853 GET / HTTP/1.1 Host: blog.mydomain.org:81 [...] 2010-05-10 08:47:15: (request.c.294) fd: 8 request-len: 754 GET /wp-content/uploads/2010/01/image.gif?w=280 HTTP/1.1 Host: www00:81 My problem: as far as I know, the PHP environment variable $_SERVER['HTTP_HOST'] is set to that Host header variable. Unfortunately, WordPress uses that variable in their system to create URLs to pictures on the blog. These URLs won't be accessible behind a firewall of course. How can I force the host header to be blog.mydomain.org instead of blog.mydomain.org:81, respectively www00:81? I already added set server.name = "blog.mydomain.org" to my lighttpd.conf, but this didn't work. Any suggestions are appreciated, thank you.

    Read the article

  • how to diffrentiate between same field names of two tables in a select query??

    - by developer
    i have more than two tables in my database and all of them contains same field names like table A table B table C field1 field1 field1 field2 field2 field2 field3 field3 field3 . . . . . . . . . . . . I have to write a SELECT query which gets almost all same fields from these 3 tables.Iam using something like this :- select a.field1,a.field2,a.field3,b.field1,b.field2,b.field3,c.field1,c.field2,c.field3 from table A as a, table B as b,table C as c where so and so. but when i print field1's value it gives me the last table values. How can i get all the values of three tables with the same field names??? do i have to write individual query for every table OR there is any ways of fetching them all in a single query????

    Read the article

  • DirectShow EVR resizing window problem

    - by Daniel
    So I've been looking into the world of media playback for windows and I've started making a C# Media Player using DirectShow. I started off using the VRM-7 windowed video renderer and it was brilliant except it had a couple of small problems (multi monitors, fullscreen). But after some research I found that it's deprecated and I should be using VRM9. So I changed it to use VRM9 windowless then found out that was an old post rofl _< so finally I'm using Vista/Win7 (or XP .net 3) Enhanced Video Renderer (EVR) which is apparently the most up to date Microsoft video renderer and has all the flashy performance/quality things added to it. (tbh I haven't noticed any difference but maybe I need a blue-ray or HQ video to notice it). With using EVR everything is working fine except resizing the video. Its really laggy/choppy/teary and probably something to do with its frame queueing mechanism. To demonstrate my problem open up windows media player classic. View - Options - Playback - output Chose the "EVR" DirectShow Video renderer Now restart wmp class and play a video, while it's playing click and drag a corner to resize it. You'll notice its horribly laggy. This is the exact same problem i am having. But if you chose "EVR Custom Pres. *" or EVR Sync *" resizing works beautifully! So i tried googling around for anything about EVR resizing issues and how to fix it but i couldn't believe how little i could find. I'm guessing "Custom Pres." stands for "Custom Presenter" which sounds like they made their own. Also you'll notice on the right hand size when you swap between EVR and the other EVR's the Resizer drop down on the right greys out. So basically I wan't to know how I can fix this retarded resizing problem and is there any decent documentation out there? There is a fair bit for VMR7/9 but not much for EVR. I downloaded the DirectX SDK which apparently has samples but it was a waste of 500mb of bandwidth as it had nothing relevant. Perhaps there is some way to force it not queueing up frames if that is the problem? If you want code say the word and I'll paste some in. But it's really quite simple and nothing much happens, i'm convinced it's a problem with the EVR renderer. EDIT: Oh and one other thing, what does VLC use? If you go into vlc options and change the renderer to anything but default, they all suck. So is it using VMR7? Or its own?

    Read the article

  • Powershell .CopyHere if it already exists work around

    - by Bruce227
    Hi, I run the following to unzip and want to over write the current files if they exist but the microsoft solution found here(http://msdn.microsoft.com/en-us/library/ms723207%28VS.85%29.aspx) doesn't seem to work. I haven't found anything that says it works so is there a work around to select the 'yes to all' option? $zipPackage = (new-object -com shell.application).NameSpace($zipfilename) $destinationFolder = (new-object -com shell.application).NameSpace($destination) $destinationFolder.CopyHere($zipPackage.Items(),16) Thanks

    Read the article

  • Using two embedded fonts on one string

    - by Igor
    Hello, i would like to know how to use two embedded fonts in Flex in tag i am dynamically loading rss description into it and would like to have first character and characters unsupported by other font be in that first font. i limited the range of char of that second font so all unsupported chars and first char should be in that first font. thanks in advance , Igor. if my writing was unclear please let me know.

    Read the article

  • why could i not submit the form via php's curl?

    - by home
    $ua_s = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'; $c = curl_init($the_url); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($c, CURLOPT_USERAGENT, $ua_s); curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_POSTFIELDS, $post_string); $cont = curl_exec($c); curl_close($c); send all needed fields but fail to submit it properly. wrote html form to test - all is well if done so in browser:

    Read the article

  • Symfony MarkDown

    - by Rui Gonçalves
    Hi there! I'm trying to add some MarkDown capabilities to my symfony project (symfony version 1.3.3). To accomplish that, I had already included the MarkDown library into lib/vendor directory. Also, I added the need configuration in the autoload.yml for the previous library. However, I'm getting a fatal PHP error: Call to undefined function Markdown(). How can I resolve this problem? Thanks in advance for all the help, Best regards!

    Read the article

  • When can we mock an object and its methods?

    - by Shailendra
    I am novice to the Moq and unit testing. I have to write unit tests to a lot of classes which has the objects of other classes. can i mock the methods of the class objects. Here is the exact scenerio- I have a class two classes A and B and A has a private object of B and in a method of A i am internally calling the method of B and then doing some calculation and returning the result. Can i mock the method of B in this scenerio? Please try to give me full detail about the conditions where i can mock the methods and functions of the class. Thanx

    Read the article

  • How to retrieve row count of one-to-many relation while also including original entity?

    - by kaa
    Say I have two entities Foo and Bar where Foo has-many Bar's, class Foo { int ImportantNumber { get; set; } IEnumerable<Bar> Bars { get; set; } } class FooDTO { Foo Foo { get; set; } int BarCount { get; set; } } How can I efficiently sum up the number of Bars per Foo in a DTO using a single query, preferrably only with the Criteria interface. I have tried any number of ways to get the original entity out of a query with ´SetProjection´ but no luck. The current theory is to do something like SELECT Foo.*, BarCounts.counts FROM Foo LEFT JOIN ( SELECT fooId, COUNT(*) as counts FROM Bar GROUP BY fooId ) AS BarCounts ON Foo.id=BarCounts.fooId but with Criterias, and I just can't seem to figure out how.

    Read the article

  • SMTP Server Issue in intersystem cache

    - by nayanak
    I am facing an issue when I am sending Email from intersystems cache. I am able to send the mail, with out any problem the first time. But the second time when I am trying to send the smtp server is not responding properly. The first Helo command is sent. I recieve the confirmation 220 from the server. But I do not recieve the Message 250. So the next command is giving me the error 503, 5.5.2 "Send helo first" message. I am unable to find out why the server is not responding the second time.

    Read the article

  • Running PHP scripts as the owner of the PHP file: security issues

    - by thomasrutter
    I'm using suexec to ensure that PHP scripts (and other CGI/FastCGI apps) are run as the account holder associated with the relevant virtual host. This allows for securing each users' scripts from reading/writing by other users. However, it occurs to me that this opens up a different security hole. Previously, the web server ran as an unprivileged user, with read-only access to user's files (unless the user changed the file permissions for some reason). Now, the web user can also write to user's files. So while I've prevented different users taking advantage of each other's scripts, I've made it so that in the event that some application has a remote code injection vulnerability, it now has not only read access but also write access to all that user's scripts and website. How can I deal with this? One idea I've had is to create a second user account for each user account in the system, so that each user has their own user account, and all their scripts are run under another user account. But that seems cumbersome.

    Read the article

  • Airport Express with a PC

    - by Margaret Ashcraft
    I have and airport express and my IMac works fine with the internet connection, but my husband's PC in the basement has problems. The wireless connection comes and goes. One minute it says good connection the next unavailable. I have a PC laptop that will pick up the connection in the basement just fine.

    Read the article

  • COM port cannot be opened in asp.net

    - by Pandiya Chendur
    I following this article for sending SMS it is a winform application.. I have referenced all the Dll's to my asp.net application..... I use an aspx page to detect a mobile device connected to a PC..... But it alwys shows COM 'n' Port could not be opened..... using SMS; using GsmComm.GsmCommunication; using GsmComm.PduConverter; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { GsmCommMain comm = new GsmCommMain(6, 9600, 300); comm.Open(); if (!comm.IsConnected()) { Response.Write("No Phone Connected"); } else { SmsSubmitPdu pdu = new SmsSubmitPdu("test", "+919999999999", ""); CommSetting.comm.SendMessage(pdu); } } }

    Read the article

  • How can I debug VGA Out on an iPad?

    - by Elliot
    The Dock Connector to VGA Adapter (required for VGA out on the iPad) uses the Dock Connector, so I can't have my laptop connected at the same time. I remember reading something about a Remote debugger, but despite lots of searching, I'm unable to find it. How can I run the debugger to test VGA output of my iPad app?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >