Daily Archives

Articles indexed Monday March 15 2010

Page 9/125 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • scvmap, disco, xsd, wsdl, svcinfo and datasource files

    - by David Gray Wright
    We have a WEb Service named, let's say Foo. So there is a Foo.svc file and a code behind Foo.svc.cs. We add a silverlight project and wish to use the Foo.svc services so we add a Service Reference and call it's namespace FooBar. This creates the following files : Reference.cs Reference.svcmap Foo.xsd Foo.disco configuration.svcinfo Foo.wsdl Also various *.datasource files. Over time we update the Foo.svc and add more Web Services (methods and interfaces) and the number of files in the FooBar directory is growing. I have 26 Foo(nn).xsd files in this directory - where nn = 1 to 26. My configuration.svcinfo is upto configuration91.svcinfo. My question is this? Do any of these files need to be version controlled? Can they all be deleted each time you do a build \ deploy (as long as you do an update service reference)?

    Read the article

  • ANOVA with 3 fixed factors in R

    - by TKBell
    Im trying to run a model with a response variable p and 3 fixed factors to get ANOVA. this is how my code looks like : #run it as 3 fixed factor model p1=c(37,38,37,41,41,40,41,42,41) p2=c(42,41,43,42,42,42,43,42,43) p3=c(30,31,31,31,31,31,29,30,28) p4=c(42,43,42,43,43,43,42,42,42) p5=c(28,30,29,29,30,29,31,29,29) p6=c(42,42,43,45,45,45,44,46,45) p7=c(25,26,27,28,28,30,29,27,27) p8=c(40,40,40,43,42,42,43,43,41) p9=c(37,38,37,41,41,40,41,42,41) p10=c(35,34,34,35,35,34,35,34,35) p = cbind(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10) partnumber=c(rep(1,9),rep(2,9),rep(3,9),rep(4,9),rep(5,9),rep(6,9),rep(7,9),rep(8,9),rep(9,9),rep(10,9)) test=c(rep(c(rep(1:3,3)),10)) inspector = rep(c(rep(1,3),rep(2,3),rep(3,3)),10) fpartnumber = factor(partnumber) ftest = factor(test) finspector = factor(inspector) model=lm(p~fpartnumber*ftest*finspector) summary(model) anova(model) but when I run it I get this error : it says my variable length for fpartnumber is different , but when I checked the length of each variable and is 90. What is going on ? model=lm(y~fpartnumber*ftest*finspector) Error in model.frame.default(formula = yang ~ fpartnumber * ftest * finspector, : variable lengths differ (found for 'fpartnumber')

    Read the article

  • GetHashCode on null fields?

    - by Shimmy
    How do I deal with null fields in GetHashCode function? Module Module1 Sub Main() Dim c As New Contact Dim hash = c.GetHashCode End Sub Public Class Contact : Implements IEquatable(Of Contact) Public Name As String Public Address As String Public Overloads Function Equals(ByVal other As Contact) As Boolean _ Implements System.IEquatable(Of Contact).Equals Return Name = other.Name AndAlso Address = other.Address End Function Public Overrides Function Equals(ByVal obj As Object) As Boolean If ReferenceEquals(Me, obj) Then Return True If TypeOf obj Is Contact Then Return Equals(DirectCast(obj, Contact)) Else Return False End If End Function Public Overrides Function GetHashCode() As Integer Return Name.GetHashCode Xor Address.GetHashCode End Function End Class End Module

    Read the article

  • CSS/JavaScript/hacking: Detect :visited styling on a link *without* checking it directly OR do it fa

    - by Sai Emrys
    This is for research purposes on http://cssfingerprint.com Consider the following code: <style> div.csshistory a { display: none; color: #00ff00;} div.csshistory a:visited { display: inline; color: #ff0000;} </style> <div id="batch" class="csshistory"> <a id="1" href="http://foo.com">anything you want here</a> <a id="2" href="http://bar.com">anything you want here</a> [etc * ~2000] </div> My goal is to detect whether foo has been rendered using the :visited styling. I want to detect whether foo.com is visited without directly looking at $('1').getComputedStyle (or in Internet Explorer, currentStyle), or any other direct method on that element. The purpose of this is to get around a potential browser restriction that would prevent direct inspection of the style of visited links. For instance, maybe you can put a sub-element in the <a> tag, or check the styling of the text directly; etc. Any method that does not directly or indierctly rely on $('1').anything is acceptable. Doing something clever with the child or parent is probably necessary. Note that for the purposes of this point only, the scenario is that the browser will lie to JavaScript about all properties of the <a> element (but not others), and that it will only render color: in :visited. Therefore, methods that rely on e.g. text size or background-image will not meet this requirement. I want to improve the speed of my current scraping methods. The majority of time (at least with the jQuery method in Firefox) is spent on document.body.appendChild(batch), so finding a way to improve that call would probably most effective. See http://cssfingerprint.com/about and http://cssfingerprint.com/results for current speed test results. The methods I am currently using can be seen at http://github.com/saizai/cssfingerprint/blob/master/public/javascripts/history_scrape.js To summarize for tl;dr, they are: set color or display on :visited per above, and check each one directly w/ getComputedStyle put the ID of the link (plus a space) inside the <a> tag, and using jQuery's :visible selector, extract only the visible text (= the visited link IDs) FWIW, I'm a white hat, and I'm doing this in consultation with the EFF and some other fairly well known security researchers. If you contribute a new method or speedup, you'll get thanked at http://cssfingerprint.com/about (if you want to be :-P), and potentially in a future published paper. ETA: The bounty will be rewarded only for suggestions that can, on Firefox, avoid the hypothetical restriction described in point 1 above, or perform at least 10% faster, on any browser for which I have sufficient current data, than my best performing methods listed in the graph at http://cssfingerprint.com/about In case more than one suggestion fits either criterion, the one that does best wins.

    Read the article

  • View the Task's activity stack

    - by Mic
    Hi There, I just started developing a simple Android application while I'm still learning its platform. I'm using Eclipse IDE with the ADT plugin 0.9.6 and I need to know if it's possible to view the activity stack that is associated with a Task. Is there any way through the DDMS tool or through any other technique? Thanks in advance for your help/advice. Mic

    Read the article

  • Audio Conversion C#

    - by Will
    What is the best way to convert various audio formats to PCM? For example: mp3, evrc, ogg vox. Is there a library out there that will allow me to implement this relatively easily? EDIT: I guess my initial question wasn't really what I needed. Most of the libs I have found are file converters. What I need is a block converter, where I pass in a 1Kb block of vox data and it returns its converted PCM block. Of course I’ll have to tell the converter what type of data it is and various pieces of codec information. The solution I am going for is to save and VOIP formats into a common wav format and to play that conformed file in real time. I thought there should be an easy way to do this because all audio is eventually turned into PCM before it is outputted anyways.

    Read the article

  • Entity Framework and the XmlIgnoreAttribute

    - by Mikey Cee
    Say you have a one to one relationship in your entity model. The code generator will decorate it with the following attributes: [global::System.Xml.Serialization.XmlIgnoreAttribute()] [global::System.Xml.Serialization.SoapIgnoreAttribute()] public RelatedObject Relationship { get {...} set {...} } I want to serialize my parent object together with all its properties for which data has been loaded through an XML web service. Obviously, these related properties do not get serialized because of these attributes. So for my purposes I just want to remove these "don't serialize me" attributes. I can do a find and replace in the designer code, but any modifications I make in the designer will put these attributes back in. How do I permanently get rid of these attributes? VS 2008 / EF 3.5.

    Read the article

  • How to have a transparent number on top of a winform?

    - by Joan Venge
    So I have a winform that has some winforms controls on it. But in the center of it, I want to show a transparent number on top of everything. Say 60 pixels size. I tried a label and even tried to create a custom control but the transparency didn't work. Any ideas how to do this? This number will change programmatically at runtime several times.

    Read the article

  • Reliable cheap or free DNS service?

    - by superwormy
    I'm looking for a reliable free or cheap DNS service. I've used FreeDNS at FreeDNS.Afraid.org in the past, but it doesn't always seem reliable... sometimes people say they can't access my website (sometimes I can't access it either) by domain name, and yet if I type in the IP address it works fine, so I assume it's some sort of DNS problem. Are there any other cheap or free DNS services out there? I need something reliable that I can manage via a web interface (or scripts if they have an API) that I can use to manage the DNS for ~100 domain names. EDIT: To be clear, I'm looking for DNS hosting, not DNS servers to use for my WAN connection.

    Read the article

  • problem in basic implementation of MVVM pattern - Services

    - by netmajor
    I watch some video and read articles about MVVM pattern and start thinking how should I implement it in my Silverlight app. So at first I create Silverlight application. I think that for clear view I create 3 folders: View - for each user control page in my app, ViewModel - for c# class which will querying date and Model- Entity Data Model of my SQL Server or Oracle Database. And now I am confused, cause I want to implement *WCF/RIA Services/Web services* in my project. In which folder should I put in class of services? I see in examples that Services take date and filtering it and then output data was binding in View - so It looks as ViewModel. But I was sure that someone use Services in Model and that I want to do. But how? Can someone explain me implementing Services as Model? Is my point of view at MVVM is correctly?

    Read the article

  • detect page refresh jQuery or C# ASP.Net

    - by Marco
    Hello, I was searching for a way of detecting in my C# code if the page had been refreshed (f5). First I don’t know if a jQuery/JavaScript solution would be better than a fully C# ASP.Net. So... the first question would be: What would make you choose one over the other? And the third, and most important part, is if someone would help me with this. Some good tutorial, or article… anything. I tried some solutions out there… but maybe, because of my lack of knowledge they didn’t work. Thanks in advance.

    Read the article

  • help with regex pattern

    - by noname
    i have multiple strings containing a link like: <A HREF="http://www.testings2">testings2</A> <A HREF="http://www.blabla">blabla</A> <A HREF="http://www.gowick">gowick</A> i want to use a regex pattern that gets the uri within the href. i could do like: /".*?"/ but then the "" will come along. is there a way to just get the uri within the HREF="" without using preg_replace function? thanks!

    Read the article

  • create an english test

    - by thienthai
    hi everyone, i want to create an english test software using window form and C# something like bellow: Hi David, Thanks for your e-mail. I hope things get easier for you before the weekend. You’ve been (be) really busy this week! 1 _______ (you / make) your vacation plans yet? Last May, I 2 _________(go) to Japan with my family again. We 3 _______ (be) there three times now! But this time, we 4 _______ (not stay) with my aunt in Tokyo. Instead, we 5 ______(drive) around to different places. Then in July, my friend Angie and I 6 ________ (travel) to Peru. 7 _______ (you / ever / be) there? It’s one of the most interesting places I 8 _______ (ever / visit). The ruins of Machu Picchu are amazing. Write soon! Mariko how can i display it in window form that we can fill the brackets (____) directly everyone help me thanks.

    Read the article

  • Generating two thumbnails from the same image in Django

    - by Titus
    Hello, this seems like quite an easy problem but I can't figure out what is going on here. Basically, what I'd like to do is create two different thumbnails from one image on a Django model. What ends up happening is that it seems to be looping and recreating the same image (while appending an underscore to it each time) until it throws up an error that the filename is to big. So, you end up something like: OSError: [Errno 36] File name too long: 'someimg________________etc.jpg' Here is the code: def save(self, *args, **kwargs): if self.image: iname = os.path.split(self.image.name)[-1] fname, ext = os.path.splitext(iname) tlname, tsname = fname + '_thumb_l' + ext, fname + '_thumb_s' + ext self.thumb_large.save(tlname, make_thumb(self.image, size=(250,250))) self.thumb_small.save(tsname, make_thumb(self.image, size=(100,100))) super(Artist, self).save(*args, **kwargs) def make_thumb(infile, size=(100,100)): infile.seek(0) image = Image.open(infile) if image.mode not in ('L', 'RGB'): image.convert('RGB') image.thumbnail(size, Image.ANTIALIAS) temp = StringIO() image.save(temp, 'png') return ContentFile(temp.getvalue()) I didn't show imports for the sake of brevity. Assume there are two ImageFields on the Artist model: thumb_large, and thumb_small. If this isn't the correct way to do it, I'd appreciate any feedback. Thanks!

    Read the article

  • send credentials with url, possible?

    - by Dejan.S
    Hi. I got a web service that I protect with basic authentication and use ssl. to make it easy for the clients that are gone use this web service I want to skip the 401 and send the credentials with the url (I would like so the customer can access the web service with url from their code / web app), question is this possible? I know about headers but a lot of the clients gone use this do not got the proper developing team to do code. thanks

    Read the article

  • Dynamic mass hosting using mod_wsgi

    - by Virgil Balibanu
    Hi, I am trying to configure an apache server using mod_wsgi for dynamic mass hosting. Each user will have it's own instance of a python application located in /mnt/data/www/domains/[user_name] and there will be a vhost.map telling me which domain maps to each user's directory (the directory will have the same name as the user). What i do not know is how to write the WSGIScriptAliasMatch line so that it also takes the path from the vhost.map file. What i want to do is something like this: I can have on my server different domains like www.virgilbalibanu.com or virgil.balibanu.com and flaviu.balibanu.com where each domain would belog to another user, the user name having no neccesary connection to the domain name. I want to do this beacuse a user, wehn he makes an acoount receives something like virgil.mydomain.com but if he has his own domain he can change it later to that, for example www.virgilbalibanu.ro, and this way I would only need to chenage the line in the vhost.map file So far I have something like this: Alias /media/ /mnt/data/www/iitcms/media/ #all media is taken from here RewriteEngine on RewriteMap lowercase int:tolower # define the map file RewriteMap vhost txt:/mnt/data/www/domains/vhost.map #this does not work either, can;t say why atm RewriteCond %{REQUEST_URI} ^/uploads/ RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$ RewriteCond ${vhost:%1} ^(/.*)$ RewriteRule ^/(.*)$ %1/media/uploads/$1 #---> this I have no ideea how i could do WSGIScriptAliasMatch ^([^/]+) /mnt/data/www/domains/$1/apache/django.wsgi <Directory "/mnt/data/www/domains"> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> <DirectoryMatch ^/mnt/data/www/domains/([^/]+)/apache> AllowOverride None Options FollowSymLinks ExecCGI Order deny,allow Allow from all </DirectoryMatch> <Directory /mnt/data/www/iitcms/media> AllowOverride None Options Indexes FollowSymLinks MultiViews Order allow,deny Allow from all </Directory> <DirectoryMatch ^/mnt/data/www/domains/([^/]+)/media/uploads> AllowOverride None Options Indexes FollowSymLinks MultiViews Order allow,deny Allow from all </DirectoryMatch> I know the part i did with mod_rewrite doesn't work, couldn't really say why not but that's not as important so far, I am curious how could i write the WSGIScriptAliasMatch line so that to accomplish my objective. I would be very grateful for any help, or any other ideas related to how i can deal with this. Also it would be great if I'd manage to get each site to run in wsgi daemon mode, thou that is not as important. Thanks, Virgil

    Read the article

  • How to dock CPaneDialog to MainFrm and.. ?

    - by JongAm Park
    Hello, I have problem with CPaneDialog. I tested with SetPaneSize MFC feature pack sample projects. What is weird is that CPaneDialog can't be docked to MainFrm while CDockablePane can be. The CPaneDialog is also a child class of the CDockablePane, but it can't be. Only DockToWindow( &other_CPaneDialog_instance... ) is possible. If I call DockToPane(), the content of the CPaneDialog is not drawn or refreshed correctly. How can a CPaneDialog be docked to MainFrm window? Another problem is about drawing. If remove codes for tree control in the SetPaneSize sample, the content of the view1 ( an instance of CDockablePane) is not redrawn properly. After doing some experiment, I decided that something should be done in its OnSize and OnPaint method. (OnSize is more critical. ) Is this expected behaviour?

    Read the article

  • Iphone - How to load Chinese text

    - by Dave
    Hi, I have a file with Chinese text that I want to use in my xcode project (I'm planning to load it through a database as it is lot of text), the problem is I dont know how to add the font to my project so that its viewable when used on an iPhone? Thanks :)

    Read the article

  • Why does this pdo::mysql code crash on windows??

    - by user154107
    Why does this pdo::mysql code crash on windows??? <?php $username = "root"; $password = ""; try { $dsn = "mysql:host=localhost;dbname=employees"; $dbh = new PDO($dsn, $username, $password); $dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Connected to database<br />" ; $dbh->exec("DROP TABLE IF EXISTS vCard;"); $dbh->exec("DROP TABLE IF EXISTS emp;"); $table = "CREATE TABLE vCard( id INT(4) NOT NULL PRIMARY KEY, firstName VARCHAR (255), lastName VARCHAR (255), office VARCHAR (255), homePh VARCHAR (13), mobilePh VARCHAR (13))"; $dbh->exec($table); $dbh->beginTransaction(); $dbh->exec("INSERT INTO vCard(id, firstName, lastName, office, homePh, mobilePh) VALUES (4834, 'Randy', 'Lewis', 'SR. Front End Developer', '631-842-3375', '917-435-2245');"); $dbh->exec("INSERT INTO vCard(id, firstName, lastName, office, homePh, mobilePh) VALUES (0766, 'Frank', 'LaGuy', 'Graphic Designer', '631-789-8244', '917-324-9897');"); $dbh->exec("INSERT INTO vCard(id, firstName, lastName, office, homePh, mobilePh) VALUES (6684, 'Donnie', 'Dolemite', 'COO', '631-789-9482', '917-234-1222');"); $dbh->exec("INSERT INTO vCard(id, firstName, lastName, office, homePh, mobilePh) VALUES (8569, '', 'McLovin', 'Actor', '631-842-9786', '917-987-8944');"); $dbh->commit(); echo "Data entered successfully<br/><br/>"; $sql = "SELECT * FROM vCard"; // WHERE firstName = 'Donnie'"; $results = $dbh->query($sql); foreach ($results as $id){ echo "SSN: ". $id['id']." "; echo "First Name: ". $id['firstName']." "; echo "Last Name: ". $id['lastName']."<br/>"; } } catch (PDOException $e) { echo "Failed: " . $e->getMessage(); $dbh->rollback(); } ?> basically this line of code is what triggers Apache to crash.. $sql = "SELECT * FROM vCard"; If I try to select one value like 'id' it'll ... when I try to select more than one value "*" it crashes??????

    Read the article

  • SQL SERVER MAXDOP Settings to Limit Query to Run on Specific CPU

    This is very simple and known tip. Query Hint MAXDOP – Maximum Degree Of Parallelism can be set to restrict query to run on a certain CPU. Please note that this query cannot restrict or dictate which CPU to be used, but for sure, it restricts the usage of number of CPUs in a single [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Which SQL Server version to install on Windows Server 2008 R2

    - by Dan
    We have a test server running Windows Server 2008 R2 that I want to put SQL Server 2008 onto. I have an MSDN subscription and thought I could install (x64 version) SQL2008 but the installation warned me this wasn't compatible with this version of windows (reporting that I am running Windows 7). When I log onto my MSDN to download an update the only SQL Server R2 options I have are for Express edition or Enterprise evaluation (I am logged in to subscriber downloads). Is there no standard R2 edition or am I missing something?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >