Lets assume that a rule (or rule of thumb, anyway), has been imposed in my coding environment that any method on a class that doesn't use, modify, or otherwise need any instance variables to do its work, be made static. Is there any inherent compile time, runtime, or any other disadvantage to doing this?
Is there any way to copy a really large file (from one server to another) in Powershell AND display it's progress?
There are solutions out there to use Write-Progress in conjunction with looping to copy many files and display progress. However I can't seem to find anything that would show progress of a single file.
Any thoughts?
I'm looking to compare two varchars in SQL, one would be something like Cafe and the other Café is there a way in SQL that will allow the two values to be compared. For instance:
SELECT *
FROM Venue
WHERE Name Like '%cafe%'
So if there is a venue with the name Big Bobs Café Extraordinaire it would be included in the result set?
Hey !
I am making an application which is a user interface to access 2 types of databases - SQLite and MSSQL server.
The thing is, SQLite doesnt need to be "installed" since its just a flatfile database, but on the other hand, SQLserver (Express/normal) need to be installed before use. My Question is simple:
Is there a way by which i can find out if an instance of SQLserver has been installed on the local machine by using a C# program?
When should it be considered dangerous to use a private field all over the place in the methods of your class? I mostly just create the variable and set it to a default value like null. Then in my methods reference it and set it to an instance of that object type from the methods.
I don't know if my question makes sense but let me know if it doesn't and I'll clarify.
I dont see any direct mention on using multiple slugs (or any behavior for that matter) for single model. Is there a way to use the sluggable behavior to generate two separate slugs for a model?
For example i need to generate two slugs for every record a product_id consisting of a slugified company name and sku and a distributor_id consisting of a different slugified company name.
Obviously i could write this myself fairly easily, im just wondering if this can be done quickly with Sluggable.
Hello
after doing the parsing with a script in Haskell I got a file with the 'appearance' of lists of strings. However when I call the file content with the function getContents or hGetContents, ie, reading the contents I get something like: String with lines (schematically what I want is: "[" aaa "," bbb "" ccc "]" - ["aaa", "bbb" "ccc"]). I have tried with the read function but without results. I need to work with these lists of strings to concatenating them all in a single list. Thanks.
In Visual Studio with Resharper I can set the project to background build as I type. A red icon on the status bar appears the instance I code something wrong. Green if all is good. It does this by compiling all the time.
Is there a way to enable this in Eclipse?
I've banging my head for hours, it seems simple enough, but here goes:
I'd like to create a view using multiple select statements that outputs a Single record-set
Example:
CREATE VIEW dbo.TestDB
AS
SELECT X AS 'First'
FROM The_Table
WHERE The_Value = 'y'
SELECT X AS 'Second'
FROM The_Table
WHERE The_Value = 'z'
i wanted to output the following recordset:
Column_1 | Column_2
'First' 'Second'
any help would be greatly appreciated!
-Thanks.
And how do I convert it to a datetime.datetime instance in python?
It's the output from the New York State Senate's API: http://open.nysenate.gov/legislation/.
hii..I want to edit single row.i used
$this-data = $this-BuildingProperty-read(null,$id);
but it didnt fetch the values of this id.
so what can i do. Give me any suggestion.
Let's say I want make some of my sources publicly available via my blog or other web location.
How do I properly indicate what Open Source license I've applied to the sources? For instance, with the MIT License or The Code Project Open License, should I put something at he top of the source files or should I have something on the web page, or both?
I have a scenario where I need to send a series of data across 2 clients.
The data includes Serialized XML that will contain commands that the other client will need to react to.
I will also need to send images across the wire as I need to provide a chat facility in the form of video/audio chat.
I would like a single communication medium for both, as the number of messages/commands might be a few.
WCF or Sockets?
I have an iframe with scrolling=yes. Is it possible to fully hide scrollbar using CSS for the Mozilla FireFox browser?
For instance, on the Internet Explorer I'm using this: Overflow-x: hidden; Overflow-y: hidden; - and it hides scrollbars, but FireFox ignores this CSS.
I'm trying to display the picture associated with a user in my database (the picture field's data type is image) on a page - unfortunately the code below fails to do that.
HTML
<img src="/User/Picture/1" />
Controller Action
public byte[] Picture(int id){
UserRepository r = new UserRepository();
return r.Single(id).logo.ToArray();
}
Update
If you were forced to use a single char on a split method, which char would be the most reliable?
Definition of reliable: a split character that is not part of the individual sub strings being split.
Is it possible to tell the Qt MOC that I would like to declare the class and implement it in a single file rather than splitting them up into an .h and .cpp file?
Hi
I writing a WCF Service that need transfer large files, so i using streaming, but from the other hand i need to do username specific initializations.
The problem is that getting the username and perform initialization every time is very expensive. If i could turn on session, i could just save initialized data in local variables in the service instance.
Is there a way to turn on both streaming and session in netTcpBinding?
Hi I have an Outlook form that I'd like to provide ready access to by adding a button or link to it on the outlook toolbar. How can I customize the toolbar to do this?
Essentially, a single click of the button on the toolbar should bring up the custom form.
This should work in Outlook 2003 and 2007 (preferably). If it only works in 2007 that would be acceptable.
Thanks!
What is the difference when a class extend from Handler and Thread?
As described in developer.android.com
...
Each Handler instance is associated with a single thread and that thread's message queue.
...
Does the thread has no message queue ?
Any benefit for a class extend from Handler?
Hi All,
I have a div that contains many spans and each of those spans contains a single href.
Basically it's a tag cloud. I have a textbox with a keyup event that filters the tag cloud div (It actually just hides the tags if not in filter condition).
Is there a way to get a count of the tags shown as the keyup event occurs?
Thanks,
rodchar