276 questions
0
votes
0
answers
142
views
C program to find last three digits of a^b
So, for small numbers my code does work, but it doesn't work for big numbers, for instance 100^10. So someone could help me finding my mistakes, or point out some clues for me to fix my code.
#include ...
1
vote
0
answers
36
views
`DynamicObject` on right hand side of binary operation
I am trying to make my dynamic class behave as System.Int32 in arithmetic expressions. However, I seem to be unable to handle situation when a dynamic instance is being added to an integer:
dynamic i =...
1
vote
1
answer
108
views
How to overflow the result through inputs without editing code
#include <stdio.h>
#include <string.h>
char username[64], password[64], hostname[64];
int main(int argc, char **argv) {
char result[256];
if (argc != 4 ||
...
-4
votes
1
answer
198
views
Codeforces's problem 151A I've wrote this program in C language , I think it has some problem. Help me out please [closed]
151A codeforces link
Here is my code written in C language. It has some problem
#include<stdio.h>
#include<conio.h>
int main ()
{
int n,k,l,c,d,p,nl,np,mm,per,tl,to,sum;
...
2
votes
1
answer
434
views
How to pass a dynamic list from IronPython to C#
I want to get a python app to pass a generic list to my C# code. I've created a demo app that duplicates the problem I'm seeing.
I have this python code (Python 2.7), MainApp.py, that calls a C# DLL (....
4
votes
1
answer
1k
views
Transform an expression tree taking IQueryable<T> into one taking IEnumerable<T>
I have an Expression<Func<IQueryable<TIn>,TOut>>, and I'd like to transform it into Expression<Func<IEnumerable<TIn>,TOut>>. Actually, my end goal is to compile the ...
2
votes
1
answer
141
views
DLR: Put statement and declaration objects to CodeCompileUnit or CodeCompileUnit-like objects
IronRuby and IronPython have custom built-ins, standard modules and you can write code straight out of hand(Directly using statements and declarations in the code), instead of using namespaces and ...
1
vote
0
answers
98
views
Why does dynamic call dispatch prefer double conversion to invoking object overload?
I am working on arbitrary object tree conversion to some specific format, using dynamic dispatch (to simplify handling generics). The object tree is generated by interop code, wraps some values into ...
0
votes
1
answer
81
views
RunTimeBinderException when passing int[] to method having parameter type dynamic
Below code work perfectly fine unless I change GetCount parameter type from ICollection to dynamic - it throws RuntimrBinderException Why at runtime Count property is not available ?
static void Main(...
0
votes
1
answer
2k
views
What it means - "IronPython is an implementation of the Python programming language"
I know question looks to be broad and subjective, but am stuck with this definition of IronPython everywhere - "IronPython is an implementation of the Python programming language" Please feel free to ...
2
votes
0
answers
247
views
Using `dynamic` keyword in Unity 2017 with VS 2017 [duplicate]
Unity 2017 introduced an experimental .NET 4.6 Mono backend. Given that Mono seems to support the dynamic language runtime, I'm wondering whether we can finally use dynamic in Unity games (even if it'...
1
vote
1
answer
1k
views
Why is TryGetMember not invoked on my DynamicObject?
I have the following class for binding to dynamically generated columns on a WPF DataGrid. The column binding has to be a property name, and I can add appropriately named properties to a DynamicObject:...
1
vote
1
answer
178
views
Without a roadmap, can DLR be used with IronPython, assuming it will continue to be packaged in future .NET Versions
DLR or Dynamic Language Runtime hasn't seen any activity after mid 2010, still around its v1.0 release since then.
I need DLR and IronPython to run my Python code using Numpy and at the same time ...
0
votes
0
answers
287
views
Passing data to and fro during run time between C# Winform and Python Script, using Ironpython
When I click the button On winform, this get executed:
using (var outStream = new ScriptOutputStream(win.txtOutput))
{
ExecuteScript(outStream);
}
This is the function to run the script.
...
2
votes
0
answers
565
views
accessing dynamic objects in F#
I'm parameterizing some linq queries, and ended up using dynamic linq. Initially I had some trouble extracting the data from the dynamic objects it created but I managed to extract it using FSharp. ...