Hi,
Can someone please let me know by some code how I can call a function located in the Form class from another class?
Some code will be of great help!
thanks
I need to resize images and resample them so they don't end up all jagged (I think that's called aliasing).
I found some code (sorry, lost the link) that does this in pure VB6 code but it's a bit slow (2-5 seconds) and I'm displaying pictures in real time so I need something faster.
I seem to recall seeing some examples of doing this with the GDI+ library. An example in VB6 would be ideal, but I can probably work with a simple example with Windows API calls in another language.
In Python, I want to make selected instance attributes of a class be readonly to code outside of the class. I want there to be no way outside code can alter the attribute, except indirectly by invoking methods on the instance. I want the syntax to be concise. What is the best way? (I give my current best answer below...)
Hello.
I like the VS option of Add Class that creates .cpp and .h file for me with a class template in it. But currently i am storing my source files in other folder than project file. Is there a way to to tell VS that i want to create those .cpp and .h files in a specific folder?
I am seeing problems uploading large files e.g. 100MB. Files go to Amazon S3 successfully, but after that scripts are waiting for if($flag == 1) and do not execute the rest of the code. Can anyone tell me the solution for this?
if($s3->putObjectFile($uploadDIR, $bucket, $name, S3::ACL))
{
$flag = 1;
}
if($flag == 1)
{
//continue code
}
I'm writing javascript code for a web emulator containing function keys. The user is able to press keyboard function keys to process something in the emulator, I used stopPropagation and preventDefault javascript function to stop/cancel browsers invoking their function key shortcut (e.g. F1 will invoke Firefox to open its help page) and the code works fine under Firefox and Chrome. But Opera didn't work. I'm using latest Opera 10.5 here. Can anyone help ?
Hi,
I'm writing an application that will ship in two versions: Android and PC version.
Is there a simple way to access files from the shared code?
Using java.io is simple, but I don't know how to access android resources or assets using it. And I can't write methods that operate on FileInputStreams instead, because some files contain references to another ones, so I need a way to access them from the method code.
Any suggestions?
I was given this chunk of code to place in my html page but I know nothing about javascript so I have no idea where to place it and what kind of tag to place it in.
Can someone please help me.
Thanks
Code:
$('input[type=radio]').change(function() {
$('input[type=radio]').each(function(index) {
$(this).closest('tr').removeClass('selected');
});
$(this).closest('tr').addClass('selected');
});
Hi all,
I'd like to determine the environment's current codepage at runtime from a Unix shell script. What's the most reliable way of doing this?
I'm looking into parsing environment variable $LC_ALL, but it isn't always set to a useful value, and its format seems to vary (can be <locale, or <locale.<code page, or <locale.<code page@<modifier etc...).
Is there a better way? I'm essentially after a shell equivalent of what I'd get if I called nl_langinfo(CODESET) from C.
Getting the customer's to_s method by looping through
Is there a Ruby idiom to write the code in 1 line (or shorter than 3 lines of code)?
def method
string = ""
@customers.each { |customer| string += customer.to_s + "\n" }
string
end
I know that everything we do in programming can be described as design pattern(even abstract method has design pattern called template method)
public class Guicer extends AbstractModule {
private static Injector injector = Guice.createInjector(new Guicer());
public static void setInjector(Injector injector) {
Guicer.injector = injector;
}
public static T getInstance(Class c) {
return injector.getInstance(c);
}
@Override
protected void configure() {
}
}
What design patterns are used in this code?
I want to setup values for a combobox in vb.net through code. But I don't know what's the code for setting it up. please help.
I want to do something like this:
if combobox1.selecteditem="1" then
combobox2.values=("x", "y", "z")
end if
I am using the code from MS to print a form however it looks like the form needs to be visible with a Show/ShowDialog() to work.
I am trying to use the code for a form that I don't want to show.
Any ideas?
I'm working at a java application that performs some xslt transformation.
I would like to match nodes into the xslt document, using a parameter provided by java.
Which is the right way to do something like:
<xsl:template match="//m:properties/*[contains($pattern,name())]">
because when I launch my application, it claims it's not able to compile the stylesheet, since pattern is not defined but I'm setting it using the setParameter method and I was able to use another parameter defined in the same way but in a different context.
Thanks in advance
Fil
hi i am having threading issues in my vsto project
// code for function
var threadUpdate = new Thread(_fun){IsBackgroud = true};
threadUpdate.Start();
threadList.add(threadUpdate);
// code for progressbar
Progressbar pb = new Prgressbar(){Title =@"abc"}
pb.Show()
it was working in perfect condition before i add wpf progress bar.
as the plugin has been running as single thread
can i ask how can running multi threading in outlook
thanks
I have a solution containing an Excel AddIn project and an Excel Template project. Is there any design pattern (or hack) that can allow the ThisAddIn instance to access properties and methods of the ThisWorkbook instance, and vice versa?
Hey all,
i use some code for inline cell editing from Apples TaggedLocations Example and im now stuck.
At the demo Code they save the changes at textFieldDidEndEditing, this works because they asume to edit only the first element in a table view.
I have to edit every row at the table view, so my problem is how to get indexPath.row to update the correct object stored in a mutableArray.
Or did i miss something?
Thanks for your help!
After executing this code:
var runtime = IronRuby.Ruby.CreateRuntime();
var engine = IronRuby.Ruby.CreateEngine();
var scrope = engine.CreateScope();
engine.ExecuteFile("libtest.rb");
How can I get all the methods of a ruby class in c# code?
I'm getting datetime in JSON format as -
"\/Date(1261413600000+0530)\/"
From code behind, I'm using DataContractJsonSerializer.ReadObject method to deserialize data.
Converted data time is not correct.
How to parse correct JSON date time from code behind?
I need a way of generating a word document (from a template or something) and inserting an image at a specific place. Does anyone have any pointers on the best way to do this?
I worked on a project that used Office Automation in .NET 1.1 a few years ago, and it was really unspeakably poor. I'm assuming OA has either been improved or been superceeded by a better solution, but I'm not finding much advice on google.
In C#, is it possible to have same parameters yet override each other(they are different in the return types)
public override Stocks[] Search(string Field,string Param){ //some code}
public override Stocks Search(string Field, string Param){//some code}
C# returns compilation error
Is it possible to let the users choose / change dynamically the columns displayed in a object list in Django administration ?
Things can surely be implemented "from scratch" by modifying the 'change_list.html' template but I was wondering if somebody has already had the same problem and/or if any django-pluggin can do that.
Thanks in advance,
i wonder how long it will take to master Symfony and use it to code?
i already know mvc + oop and have used CodeIgniter before to code.
are we talking about days, weeks or months giving that i will dedicate 8-12 hours a day to learn it.
Hi,
I'm making a game in Flash for school. I have a few dialog boxes that work just fine! Now I need a bigger one with more buttons and with the same code, I can't even get a trace reaction...
My code:
On the button itself:
okButton.addEventListener(MouseEvent.CLICK,MovieClip(parent).clickMyButton);
In the AS file:
public function clickMyButton(event:MouseEvent) {
trace("Halloooo");
}
Another question:
How can I close (remove from stage) a child dialog box (movie clip)