When looking up messages in a sasl log using rb:list() or rb:show(), rb seems to dump the output in the console and return 'ok'; is there any way to configure rb to get it to return the actual log message ?
Thanks
There's a dearth of info in the supporting PDFs and on the web. I happened to come across a post in a blog that mentioned that $.write() or $.writeln() will write a string to the javascript console. Quite useful. Does anyone know if this $ object has any additional properties or methods?
I know that if we want to display a double as a two decimal digit, one would just have to use
public void DisplayTwoDecimal(double dbValue)
{
Console.WriteLine(dbValue.ToString("0.00"));
}
But how to extend this to N decimal places, where N is determined by the user?
public void DisplayNDecimal(double dbValue, int nDecimal)
{
// how to display
}
Hi,
I need to create a RESTful webservice in C#. This is what I have right now:
namespace WebService
{
[ServiceContract]
public interface IService
{
[OperationContract(Name="Add")]
[WebGet(UriTemplate = "/")]
int Add();
}
public class Service:IService
{
public int Add()
{
// do some calculations and return result
return res;
}
}
}
Now, my question is How do i host this service at a location say (http://localhost/TestService) and how can i test the service in console application client?
Hello,
I'm experiencing something really strange with my javascript in chrome with Date().format.
If I use the console and type:
d = new Date(Date.parse("2010-05-28"))
d.format("yyyy-MM-dd");
""
d._toFormattedString();
"Fri May 28 2010 00:00:00 GMT+0200 (W. Europe Daylight Time)"
Anyone got any clue why I get an empty string? And it's only in Chrome, didn't happen in Chrome 4, and it doesn't happen in IE8/Firefox3.5
I already know C++ console programming. So shall i learn Qt for c++ or c# first?? I eventually plan to learn both anyways. Also, how long will each one take. The only programming language i know is c++.
Hello!
I was wondering if anybody here could help me out as I'm still very new to C#. I have a drive with folders w/in folders w/in folders that all contain files. Is there a way to recursively loop through the files and gather up all of these file names into a .txt file?
I'm not sure how to implement this into my Console app--so does anybody have any code that might help?
Hi. Am I the only one experiencing this issue? I'm using the html5media library and the test page they provide no longer plays in Firefox 3.6.3, though it plays on the latest Safari, Chrome, Opera, and IE. On FF 3.6.3, it shows the video and the audio with large X through them. I'm using this library on my site and noticed the issue as well. I'm not seeing any errors in the error console.
I want to develop a command line tool. I didn't build one before, but I used a few, (like mercurial). What steps do I need to take to know how to do that? So what is the problem:
Regular console application need to be invoked from the command line only from it's directory. Like: C:\Projects\CommanLineProject\MyProjectConsole.exe. I want to use it from the command line from any directory, like mercurial.
As I remember there is a magic command line option in Java that turn on writing of operations that are currently executed to console. The output was looked like byte code. I do not mean -verbose, because it prints only class loading, while this option outputs information like memory allocation etc.
Hi
I need to know if it is possible the current execution node? Ej:
..html
<script id="x"> //
console.log(document.currentNode.id); // << this must return "x"
</script>
..html
thanx
I have created a console application in VS2010 and I want to create a file in the current directory where the exe runs. I used the following code
fp = fopen("Pkts.csv", "w+");
But file is not getting created in the current directory. But when I specifies the path as
fp = fopen("C:\\Windows\\Pkts.csv", "w+");
the file gets created in the path specified. How to create the file in the current directory?
I am having trouble getting the value() injected into the app.config(). Here's the code (coffeescript)
window.app = angular.module("app", [])
app.value("template_path", "assets/angular/templates/users")
app.config(["$routeProvider","template_path" ($routeProvider, template_path) ->
console.log template_path
it is throwing an "Unknown provider: template_path from app" error
Could it be that the config() method cannot be injected with value() set values?
I am using 1.0.2
Thank you!
for (var i = 0; i < somearray.length; i++)
{
myclass.foo({'arg1':somearray[i][0]}, function()
{
console.log(somearray[i][0]);
});
}
How do I pass somearray or one of its indexes into the anonymous function ?
somearray is already in the global scope, but I still get somearray[i] is undefined
It starts to bore me that I always have to ask questions about trifles.
I simply need a list of all plugged in USB devices and have the user select one to let the console application receive any data the USB device sends.
I can then start playing around with the data in my program.
I don't want to use library's, only standard C++ functions, and the program should work in Windows 98.
hi
function liveUpdate(fld,value,id) {
$.ajax({
type: 'POST',
url: 'myurl.html',
data: { fld:value, 'id': id },
success: function(data){//console.log(data);
}
});
}
i want fld to be posted as fld's value not the variable name fld? i've tried to wrap around with eval but no luck
any ideas?
thanks
Hi,
I tried blink the rows of ASp:Gridview. Have succeded in IE but not working in FF and safari. FF error console says "Error: gridRef.childNodes is not a function" Can anybody tell me where exactly I am wrong...
The Javascript used is:
');
for (var i=0; i
and on my gridview_rowdatabound I have
e.Row.Attributes.Add("blinkingRow", "Y");
Why can't i define a variable recursively in a code block?
scala> {
| val fibs: Stream[Int] = 1 #:: fibs.scanLeft(1){_ + _}
| }
<console>:9: error: forward reference extends over definition of value fibs
val fibs: Stream[Int] = 1 #:: fibs.scanLeft(1){_ + _}
^
scala> val fibs: Stream[Int] = 1 #:: fibs.scanLeft(1){_ + _}
fibs: Stream[Int] = Stream(1, ?)
lazy keyword solves this problem, but i can't understand why it works without a code block but throws a compilation error in a code block.
I am trying to test a controller method with the following code:
it "should set an approved_at date and email the campaign's client" do
@campaign = Campaign.create(valid_attributes)
post :approve, id: @campaign.id.to_s
@campaign.reload
@campaign.approved_at.should_not be(nil)
end
However, when I run this test, I get the following error:
Failure/Error: @campaign.reload
ActiveRecord::RecordNotFound:
Couldn't find Campaign without an ID
When I run the analagous lines in the rails console, the reload works and the value is set as I need it to be. Why isn't reload working for me when I run the code in an rspec test?
What ways do I have in .net to run code from string?
Console.WriteLine("1 + 2 * 3"); // results is 7.
What other options do we have?
C# - Compile the code on runtime?
IronRuby / IronPython?
F#?
Hi,
I'm about to start an application which will have both console and GUI interfaces. What I wan't to achieve is COMPLETE decoupling of application logic from interface. In future, I may also add web interface, and I don't want to change anything in my application.
Is there a good example (perhaps some open source project) where I can learn how this should be done properly.... also I'd appreciate advices/guidelines on how to do this.
Thanks
If I get some value by using getline( cin, myStr ); a newline is printed after the information the user entered - logically as he pressed enter:
Please enter something: ABC <enter => \n>
This text is printed out by the program and should be in the same line as before
How to keep the newline after user input away?
I'm using MSVC 2010 and build a simple console app using iostream and string as main libraries.