Search Results

Search found 14871 results on 595 pages for 'cross reference'.

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

  • VB.net Cross-Thread

    - by PandaNL
    Hello, I have a cmd command that needs to be executed, when the command starts it starts to fill a progressbar. When the cmd command is done the progressbar needs to fill up to 100. This is the code i use, but it gives me an error when the progressbar.Value = 100 comes up. Public Class Form1 Dim teller As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerProgressbar.Tick teller += 1 ProgressBar1.Value = teller If ProgressBar1.Value = ProgressBar1.Maximum Then TimerProgressbar.Stop() End If End Sub This are the tow commands in another private sub where the app is crashing on ProgressBar1.Value = 100 TimerProgressbar.Stop() When i debug it and i try it out it crashes on ProgressBar1.Value = 100 But when i build it under Windows 7 it runs fine without crashing, however a few people reported me it crashes on there Windows xp system. VB gives me a suggestions about Cross Thread, but i don't know how i could make it work with this.

    Read the article

  • Cross platform unicode path handling

    - by Matt Joiner
    I'm using boost::filesystem for cross-platform path manipulation, but this breaks down when calls need to be made down into interfaces I don't control that won't accept UTF-8. For example when using the Windows API, I need to convert to UTF-16, and then call the wide-string version of whatever function I was about to call, and then convert any output back to UTF-8. While the wpath, and other w* forms of many of the boost::filesystem functions help keep sanity, are there any suggestions for how best to handle this conversion to wide-string forms where needed, while maintaining consistency in my own code?

    Read the article

  • Cross-platform GUI toolkits with WPF-style composition capabilities

    - by Alexey Romanov
    A huge advantage of WPF over, say, WinForms is its composability. To quote Programming WPF: One level up, WPF provides its “content model,” which allows any control to host any group of other controls. You don’t have to build special BitmapButton or IconComboBox classes; you put as many images, shapes, videos, 3D models, or whatever into a Button (or a ComboBox, ListBox, etc.) as suit your fancy. Are there any cross-platform GUI frameworks (preferably with Java bindings) out there which also let you do this?

    Read the article

  • is there any cross platform process manager tool

    - by lvlv
    I need a program that is able to launch a set of processes according to a schedule/configuration; the program would run in the background and restart the processes in case they crash. There are standard tools for this kind of task on both windows and unix - what I need is a cross platform program which could run on different operating systems using the same configuration. A portable C/C++ library which implements the basic functionality (i.e. create processes, signal process termination events and all that) would be ok too.

    Read the article

  • how to create Cross domain asp.net web service

    - by Prithvi Raj Nandiwal
    i have create a web service. i want to access this web service using Ajax jqury. i am able to access on same domain. but i want to access thia web service to another domain. Have any one idea. how to create cross domain web service in asp.net. any setting in web,config file so that i access it on another domain. my webservice [WebService(Namespace = "http://tempuri.org/")] [System.Web.Script.Services.ScriptService] public class Service : System.Web.Services.WebService { public Service () { } [WebMethod] public string SetName(string name) { return "hello my dear friend " + name; } } JavaScript $.ajax({ type: "GET", url:'http://192.168.1.119/Service/SetName.asmx?name=pr', ContentType: "application/x-www-form-urlencoded", cache: false, dataType: "jsonp", success: onSuccess });

    Read the article

  • cross-platform frameworks for storage + metadata?

    - by Jason S
    I don't quite know what to use for terminology, so bear with me... Are there any cross-platform frameworks out there that facilitate a kind of "virtual file storage" to encapsulate adding files along with a database of metadata? I'm thinking about something along the lines of iTunes or iPhoto, where the program manages a whole bunch of files (in those cases audio or image files) and has a database of metadata so you can organize/find those files easily. I'd like to cobble together something along those lines for files in general. edit: I am hesitant to store files in a database alone, e.g. MySQL, as there would be potentially tens of gigabytes in my application (this issue has been mentioned in several SO posts, see this one that gives several links to others). I'm looking at CouchDB though and maybe it has promise....

    Read the article

  • get XML from iframe cross domain with jquery

    - by Moli
    I need a little if help to solve this question. I need to get and XML from another server. My server can't make a request because of firewall. With javascript(jquery), What's the solution to make and ajax call cross-domain? I can make the request on client side but, How to get and xml node? Usign a proxy script does not work for me... Any idea? Many thanks!

    Read the article

  • Using $.getJSON to perform cross domain request problem.

    - by Ahmed
    I'm using the following code to make cross domain request using $.getJSON, request completed but with errors, I cannot exactly detect what is the thrown error. Based on callback param of request value I route it to a certain method which retrieves required JSON data. $.getJSON("http://wthsrvr:45452/Handler.ashx/?Callback=DocumentReadStatus", { userID: vuserID, documentID: vdocumentID, format: "json" }, function(result) { if (result.readStatus == '1') { alert("ACCEPTED"); } else if (result.readStatus == '0') { alert("NOT ACCEPTED"); } else { alert(result.readStatus); } }); FYI: while development of this locally, everything worked fine, but after solution deployment to server and trying to do the same, I got that problem. Also, I tried the same functionality with web service, I got the same problem while calling web service from server. I'm using ajaxSetup to detect thrown errors. $.ajaxSetup({ "error": function(XMLHttpRequest, textStatus, errorThrown) { alert("textStatus: " + textStatus); alert("errorThrown: " + errorThrown); alert("responseText: " + XMLHttpRequest.responseText); } });

    Read the article

  • Standard (cross-platform) way for bit manipulation

    - by Kiril Kirov
    As are are different binary representation of the numbers (for example, take big/little endian), is this cross-platform: some_unsigned_type variable = some_number; // set n-th bit, starting from 1, // right-to-left (least significant-to most significant) variable |= ( 1 << ( n - 1 ) ); // clear the same bit: variable &= ~( 1 << ( n - 1 ) ); In other words, does the compiler always take care of the different binary representation of the unsigned numbers, or it's platform-specific? And what if variable is signed integral type (for example, int) and its value is zero positive negative? What does the Standard say about this? P.S. And, yes, I'm interesting in both - C and C++, please don't tell me they are different languages, because I know this :) I can paste real example, if needed, but the post will become too long

    Read the article

  • CSS cross browser compatibility on Ubuntu

    - by bhefny
    Hello, I'm currently working in web development and my default desktop is Ubuntu and I'm kind of happy with the setup and applications I got going. But I need to test web pages for cross browser compatibility while still being on Ubuntu. I have gone through hell trying to get IE7 or IE8 (with wine) to run on ubuntu and when they finally worked they were very buggy and the graphics/scrolling was insanely slow. Of course there is the option of virtual box but again, too much GBytes just to run a small application! So to all the CSS gurus out there, how can I continue with my beloved Ubuntu and still deliver a good quality (tested) page. Thank you.

    Read the article

  • Cross Domain Cookies Problem (ASP.NET)

    - by Laserson
    Hi guys, i have a problem with cross-domain cookies. I read a lot of documentation about sharing cookies between subdomains. The main idea of all articles is set Domain property to something like ".mydomain.com". I've created two domains on local IIS server - test1.local.boo and test2.local.boo. They works great and visible with browser. I have the following code: Site test1 - Writes cookie: HttpCookie myCookie = new HttpCookie("TestCookie"); myCookie.Domain = ".local.boo"; myCookie["msg"] = "Welcome from Cookie"; Response.Cookies.Add(myCookie); Site test2 - Reads cookie: HttpCookie cookie = Request.Cookies["TestCookie"]; if (cookie != null) { Response.Write(cookie["msg"]); } else { Response.Write("FAILED"); } This code always shows FAILED message. So it means that second site can't read cookie from the same subdomain. Where is my mistake??

    Read the article

  • Retrieve a cross domain RSS(xml) through Javascript

    - by Ajay
    I have seen server side proxy workarounds for retrieving rss (xmls) from cross-domains. In fact this very question addressess my same problem but gives out a different solution. I have a constraint of do not use a proxy to retrieve rss feeds. And hence the Google AJAX Feed API solution also goes out of picture. Is there a client-only workaround for this problem. JSONP is the solution for requests that respond with JSON output. But here, I have RSS feeds which can respond with pure xml . How do I solve the problem.

    Read the article

  • System.Threading.Timer keep reference to it.

    - by Daniel Bryars
    According to [http://msdn.microsoft.com/en-us/library/system.threading.timer.aspx][1] you need to keep a reference to a System.Threading.Timer to prevent it from being disposed. I've got a method like this: private void Delay(Action action, Int32 ms) { if (ms <= 0) { action(); } System.Threading.Timer timer = new System.Threading.Timer( (o) => action(), null, ms, System.Threading.Timeout.Infinite); } Which I don't think keeps a reference to the timer, I've not seen any problems so far, but that's probably because the delay periods used have been pretty small. Is the code above wrong? And if it is, how to I keep a reference to the Timer? I'm thinking something like this might work: class timerstate { internal volatile System.Threading.Timer Timer; }; private void Delay2(Action action, Int32 ms) { if (ms <= 0) { action(); } timerstate state = new timerstate(); lock (state) { state.Timer = new System.Threading.Timer( (o) => { lock (o) { action(); ((timerstate)o).Timer.Dispose(); } }, state, ms, System.Threading.Timeout.Infinite); } The locking business is so I can get the timer into the timerstate class before the delegate gets invoked. It all looks a little clunky to me. Perhaps I should regard the chance of the timer firing before it's finished constructing and assigned to the property in the timerstace instance as negligible and leave the locking out.

    Read the article

  • Change dynamic web reference from web./app.config

    - by Snæbjørn
    I have a problem changing a dynamic web reference in the config file. Changing the url in the config file doesn't have any effect. I have to change the url in .settings and compile for it to change. I added the web reference using the wizard. Set the URL behavior to dynamic, which added the relevant XML tags in config file. In my solution I have the web API (web reference) in a separate project (class lib), so I referenced the project and copied the <applicationSettings> over. <applicationSettings> <StartupProject.Properties.Settings> <setting name="WebReference" serializeAs="String"> <value>http://someurl/somefile.asmx</value> </setting> </StartupProject.Properties.Settings> </applicationSettings> Note that it's <StartupProject.Properties.Settings> and not <WebRefProject.Properties.Settings>. Are there some limitations I'm not aware of or am I doing something wrong?

    Read the article

  • AS 3.0 reference problem

    - by vasion
    I am finding it hard to fugure out the reference system in AS 3.0. this is the code i have (i have trimmed it down in order to find the problem but to no avail) package rpflash.ui { import flash.display.Sprite; import flash.display.MovieClip; import flash.display.Stage; import nowplaying; import flash.text.TextField; public class RPUserInterface extends Sprite{ var np:nowplaying; public function RPUserInterface(){ } public function init(){ var np:nowplaying = new nowplaying(); this.addChild(np) } public function updateplayer(xml:XML){ var artist: String = xml.nowplaying.artist.toString(); var title: String = xml.nowplaying.title.toString(); trace("UI:update"); trace(this.np);// this gives me a null reference } } } and still i cannot access np!!! trace this.np gives me a null reference. i am not even trying to access it from a subling class. (btw i def want to know how to do that as well.)

    Read the article

  • Reference 3.5 assembly from 4.0 winforms phail

    - by Dean Lunz
    So I have this utility library that is compiled as a dll under .net 3.5 and it is used by my asp.net 3.5 website. I created a .net 4.0 winforms app to push data onto the website. I want to make use of the functionality in the utilities library from this winforms app. The problem lies in that when I make reference to the utilities library and use the code in it intellisense barks at me saying that it can't find the objects in that library. The thing is I would switch the winforms app to 3.5 which fixes the problem, but I am using Tasks which require 4.0. And because my website and utilities library both run 3.5 and my website is hosted at godaddy that currently only supports asp.net 3.5 so compiling my utilities library under 4.0 for my winforms app is not going to work because it breaks my website. I have tried the app.config trick ala useLegacyV2RuntimeActivationPolicy="true" ... But that did not help. Obviously I could start a new utilities project for 4.0 and and copy the code files from the existing utilities library then reference the new 4.0 utilities library in my winforms app but, that strikes me as being rather overkill when all I want to do is reference the library and use it's functionality. Not to mention that I would have two utility libraries both containing the exact same code, and if I update the code in one I will need to make sure that the other is also updated. I could use add file as link, but you get the idea. So is there anything else I could try or any other way to solve or get around this? Or am I just going to have to break down and create a identical clone of the utilities library for 4.0.

    Read the article

  • Variable reference problem when loading an object from a file in Java

    - by Snail
    I have a problem with the reference of a variable when loading a saved serialized object from a data file. All the variables referencing to the same object doesn't seem to update on the change. I've made a code snipped below that illustrates the problem. Tournament test1 = new Tournament(); Tournament test2 = test1; try { FileInputStream fis = new FileInputStream("test.out"); ObjectInputStream in = new ObjectInputStream(fis); test1 = (Tournament) in.readObject(); in.close(); } catch (IOException ex){ Logger.getLogger(Frame.class.getName()).log(Level.SEVERE, null, ex); } catch (ClassNotFoundException ex){ Logger.getLogger(Frame.class.getName()).log(Level.SEVERE, null, ex); } System.out.println("test1: " + test1); System.out.println("test2: " + test2); After this code is ran test1 and test2 doesn't reference to the same object anymore. To my knowledge they should do that since in the declaration of test2 makes it a reference to test1. When test1 is updated test2 should reflect the change and return the new object when called in the code. Am I missing something essential here or have I been misstaught about how the variable references in Java works?

    Read the article

  • Give a reference to a python instance attribute at class definition

    - by Guenther Jehle
    I have a class with attributes which have a reference to another attribute of this class. See class Device, value1 and value2 holding a reference to interface: class Interface(object): def __init__(self): self.port=None class Value(object): def __init__(self, interface, name): self.interface=interface self.name=name def get(self): return "Getting Value \"%s\" with interface \"%s\""%(self.name, self.interface.port) class Device(object): interface=Interface() value1=Value(interface, name="value1") value2=Value(interface, name="value2") def __init__(self, port): self.interface.port=port if __name__=="__main__": d1=Device("Foo") print d1.value1.get() # >>> Getting Value "value1" with interface "Foo" d2=Device("Bar") print d2.value1.get() # >>> Getting Value "value1" with interface "Bar" print d1.value1.get() # >>> Getting Value "value1" with interface "Bar" The last print is wrong, cause d1 should have the interface "Foo". I know whats going wrong: The line interface=Interface() line is executed, when the class definition is parsed (once). So every Device class has the same instance of interface. I could change the Device class to: class Device(object): interface=Interface() value1=Value(interface, name="value1") value2=Value(interface, name="value2") def __init__(self, port): self.interface=Interface() self.interface.port=port So this is also not working: The values still have the reference to the original interface instance and the self.interface is just another instance... The output now is: >>> Getting Value "value1" with interface "None" >>> Getting Value "value1" with interface "None" >>> Getting Value "value1" with interface "None" So how could I solve this the pythonic way? I could setup a function in the Device class to look for attributes with type Value and reassign them the new interface. Isn't this a common problem with a typical solution for it? Thanks!

    Read the article

  • How do I use an index in an array reference as a method reference in Perl?

    - by Robert P
    Similar to this question about iterating over subroutine references, and as a result of answering this question about a OO dispatch table, I was wondering how to call a method reference inside a reference, without removing it first, or if it was even possible. For example: package Class::Foo; use 5.012; #Yay autostrict! use warnings; # a basic constructor for illustration purposes.... sub new { my $class = shift; return bless {}, $class; } # some subroutines for flavor... sub sub1 { say 'in sub 1' } sub sub2 { say 'in sub 2' } sub sub3 { say 'in sub 3' } # and a way to dynamically load the tests we're running... sub sublist { my $self = shift; return [ $self->can('sub1'); $self->can('sub3'}; $self->can('sub2'); ]; } package main; my $instance = Class::Foo->new(a => 1, b => 2, c => 3); my $tests = $instance->sublist(); my $index = int(rand($#{$tests})); # <-- HERE So, at HERE, we could do: my $ref = $tests->{$index}; $instance->$ref(); but how would we do this, without removing the reference first?

    Read the article

  • How to reference SMF libraries when deploying on phone 7 (Release)

    - by aHaH
    Initially, at Visual Studio, I clicked debug instead of release to deploy my app on phone 7 device. No errors, works perfectly fine! Received multitude of errors that mention that some of the libraries don't seem to exist on the mobile phone. For example, extract from the entire list of errors include Warning 10 The referenced component 'Microsoft.SilverlightMediaFramework.Utilities' could not be found. Warning 3 Could not resolve this reference. Could not locate the assembly "Microsoft.SilverlightMediaFramework.Plugins". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. SLARToolKitWinPhoneSample In addition, im also using Slartookit to power up the AR capabilities. Deploying (Release) on the mobile prompts the following errors too. Error 11 The type or namespace name 'SLARToolKit' could not be found (are you missing a using directive or an assembly reference?) What should I do? Will updating the mobile solve this? Do I have to manually install? Or? Thanks

    Read the article

  • Visual C++ 2010, rvalue reference bug?

    - by Sergey Shandar
    Is it a bug in Visual C++ 2010 or right behaviour? template<class T> T f(T const &r) { return r; } template<class T> T f(T &&r) { static_assert(false, "no way"); return r; } int main() { int y = 4; f(y); } I thought, the function f(T &&) should never be called but it's called with T = int &. The output: main.cpp(10): error C2338: no way main.cpp(17) : see reference to function template instantiation 'T f<int&>(T)' being compiled with [ T=int & ] Update 1 Do you know any C++x0 compiler as a reference? I've tried comeau online test-drive but could not compile r-value reference. Update 2 Workaround (using SFINAE): #include <boost/utility/enable_if.hpp> #include <boost/type_traits/is_reference.hpp> template<class T> T f(T &r) { return r; } template<class T> typename ::boost::disable_if< ::boost::is_reference<T>, T>::type f(T &&r) { static_assert(false, "no way"); return r; } int main() { int y = 4; f(y); // f(5); // generates "no way" error, as expected. }

    Read the article

  • Write-Only Reference in C++?

    - by Robert Mason
    Is there a way to code a write-only reference to an object? For example, suppose there was a mutex class: template <class T> class mutex { protected: T _data; public: mutex(); void lock(); //locks the mutex void unlock(); //unlocks the mutex T& data(); //returns a reference to the data, or throws an exception if lock is unowned }; Is there a way to guarantee that one couldn't do this: mutex<type> foo; T& ref; foo.lock(); ref = foo.data(); foo.unlock(); //I have a unguarded reference to foo now On the other hand, is it even worth it? I know that some people assume that programmers won't deliberately clobber the system, but then, why do we have private variables in the first place, eh? It'd be nice to just say it's "Undefined Behavior", but that just seems a little bit too insecure.

    Read the article

  • Reference problem when returning an object from array in PHP

    - by avastreg
    I've a reference problem; the example should be more descriptive than me :P I have a class that has an array of objects and retrieve them through a key (string), like an associative array: class Collection { public $elements; function __construct() { $this->elements = array(); } public function get_element($key) { foreach($this->elements as $element) { if ($element->key == $key) { return $element; break; } } return null; } public function add_element ($element) { $this->elements[] = $element; } } Then i have an object (generic), with a key and some variables: class Element { public $key; public $another_var; public function __construct($key) { $this->key = $key; $this->another_var = "default"; } } Now, i create my collection: $collection = new Collection(); $collection->add_element(new Element("test1")); $collection->add_element(new Element("test2")); And then i try to change variable of an element contained in my "array": $element = $collection->get_element("test1"); $element->another_var = "random_string"; echo $collection->get_element("test1")->another_var; Ok, the output is random_string so i know that my object is passed to $element in reference mode. But if i do, instead: $element = $collection-get_element("test1"); $element = null; //or $element = new GenericObject(); $element-another_var = "bla"; echo $collection-get_element("test1")-another_var; the output is default like if it lost the reference. So, what's wrong? I have got the references to the variables of the element and not to the element itself? Any ideas?

    Read the article

  • Strange compilation error on reference passing argument to function

    - by Grewdrewgoo Goobergabbsoen
    Here's the code: #include <iostream> using namespace std; void mysize(int &size, int size2); int main() { int *p; int val; p = &val; cout << p; mysize(&val, 20); // Error is pointed here! } void mysize(int &size, int size2) { cout << sizeof(size); size2 = size2 + 6000; cout << size2; } Here's the error output from GCC: In function 'int main()': Line 10: error: invalid initialization of non-const reference of type 'int&' from a temporary of type 'int*' compilation terminated due to -Wfatal-errors. What does that imply? I do not understand the error message ... invalid initialization of a non-constant? I declared the prototype function above with two parameters to take, one a reference of an integer and one just an integer value itself. I passed the reference of the int (see line 10), yet this error keeps being thrown at me. What is the issue?

    Read the article

  • IE History Tracking, IFRAMES, and Cross Domain error...

    - by peiklk
    So here's the deal. We have a Flash application that is running within an HTML file. For one page we call a legacy reporting system in ASP.NET that is within an IFRAME. This page then communicates back to the Flash application using cross-domain scripting (document.domain = "domain" is set in both pages. THIS ALL WORKS. Now the kicker. Flash has history tracking enabled. This loads the history.js file that created a div tag to store page changes so the back and forward buttons work in the browser. Which works for Firefox and Chrome as they create a div tag. HOWEVER In Internet Explorer, history.js creates another IFRAME (instead of a DIV) called ie_historyFrame. When the ScriptResource.axd code attempts to access this with: var frameDoc = this._historyFrame.contentWindow.document; we get an "Access is Denied" error message. ARGH! We've tried getting a handle to this IFRAME and inserting the document.domain code. FAIL. We've tried editing the historytemplate.html file that flex also uses to include document.domain... FAIL. I've tried to edit the underlying ASP.NET page to disable history tracking in the ScriptManager control. FAIL. At my wit's end on this one. We have users who need to use IE to access this site. They are big clients who we cannot tell to just use Firefox. Any suggestions would be greatly appreciated.

    Read the article

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