Search Results

Search found 42453 results on 1699 pages for 'question'.

Page 23/1699 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Adobe Flash player Secuirty Pop-Up question

    - by kapildalwani
    I am building a Audio Recording tool using Flash and Wowza. I dont want to start the recording until the use clicks the Allow Button is the Security Pop-up question represented here http://www.macromedia.com/support/documentation/en/flashplayer/help/help05.html In Audio I dont get this until I attach the stream to it. In Video can get thsi question when I attach the camera to Video. I want to avoid making a connection until the user clicks Accept and this doesn't happen until I make the connection request in Audio. I am able to display the http://www.macromedia.com/support/documentation/en/flashplayer/help/help09.html pop-up using SecurityManager Is there a way I can call the pop-up from my code. http://www.macromedia.com/support/documentation/en/flashplayer/help/help05.html

    Read the article

  • Multi-part question about multi-threading, locks and multi-core processors (multi ^ 3)

    - by MusiGenesis
    I have a program with two methods. The first method takes two arrays as parameters, and performs an operation in which values from one array are conditionally written into the other, like so: void Blend(int[] dest, int[] src, int offset) { for (int i = 0; i < src.Length; i++) { int rdr = dest[i + offset]; dest[i + offset] = src[i] > rdr? src[i] : rdr; } } The second method creates two separate sets of int arrays and iterates through them such that each array of one set is Blended with each array from the other set, like so: void CrossBlend() { int[][] set1 = new int[150][75000]; // we'll pretend this actually compiles int[][] set2 = new int[25][10000]; // we'll pretend this actually compiles for (int i1 = 0; i1 < set1.Length; i1++) { for (int i2 = 0; i2 < set2.Length; i2++) { Blend(set1[i1], set2[i2], 0); // or any offset, doesn't matter } } } First question: Since this apporoach is an obvious candidate for parallelization, is it intrinsically thread-safe? It seems like no, since I can conceive a scenario (unlikely, I think) where one thread's changes are lost because a different threads ~simultaneous operation. If no, would this: void Blend(int[] dest, int[] src, int offset) { lock (dest) { for (int i = 0; i < src.Length; i++) { int rdr = dest[i + offset]; dest[i + offset] = src[i] > rdr? src[i] : rdr; } } } be an effective fix? Second question: If so, what would be the likely performance cost of using locks like this? I assume that with something like this, if a thread attempts to lock a destination array that is currently locked by another thread, the first thread would block until the lock was released instead of continuing to process something. Also, how much time does it actually take to acquire a lock? Nanosecond scale, or worse than that? Would this be a major issue in something like this? Third question: How would I best approach this problem in a multi-threaded way that would take advantage of multi-core processors (and this is based on the potentially wrong assumption that a multi-threaded solution would not speed up this operation on a single core processor)? I'm guessing that I would want to have one thread running per core, but I don't know if that's true.

    Read the article

  • Question on multi-probe Local Sensitive Hashing

    - by Yijinsei
    Hey guys sorry to be asking this kind noob question, but because I really need some guidance on how to use Multi probe LSH pretty urgently, so I did not do much research myself. I realize there is a lib call LSHKIT available that implemented that algorithm, but I have trouble trying to figure out how to use it. Right now, I have a few thousand feature vector 296 dimension, each representing an image. The vector is used to query an user input image, to retrieve the most similar image. The method I used to derive the distance between vector is euclidean distance. I know this might be a rather noob question, but do you guys have knowledge on how should i implement multi probe LSH? I am really very grateful to any answer or response.

    Read the article

  • MVC architectural question - Where should payment processing go?

    - by Keltex
    This question is related to my ASP.NET MVC 2 development, but it could apply to any MVC environment and a question of where the logic should go. So let's say I have a controller that takes an online payment such as a shopping cart application. And I have the method that accepts the customers' credit card information: public class CartController : Controller CartRepository cartRepository = new CartRepository() [HttpPost] public ActionResult Payment(PaymentViewModel rec) { if(!ModelState.IsValid) { return View(rec); } // process payment here return RedirectToAction("Receipt"); } At the comment process payment here should the payment processing be handled: In the controller? By the repository? Someplace else?

    Read the article

  • RESTful Question/Answer design?

    - by Kirschstein
    This is a toy project I'm working on at the moment. My app contains questions with multiple choice answers. The question url is in the following format, with GET & POST mapping to different actions on the questions controller. GET: url.com/questions/:category/:difficulty => 'ask' POST: url.com/questions/:category/:difficulty => 'answer' I'm wondering if it's worth redesigning this into a RESTful style. I know I'd need to introduce answers as a resource, but I'm struggling to think of a url that would look natural for answering that question. Would a redesign be worthwhile? How would you go about structuring the urls?

    Read the article

  • noob question : reading xml from url link by using php

    - by mireille raad
    Hello, I am trying to build an authentication plugin that uses php/xml. My application can communicate to another application by sending this : http://tst.example.net/remote/validate_user.jhtml?ticket=$ticket_value in return i get a formatted xml document. i want to be able to parse that document. I googled and read a bit around here , but what i could find is that using php_simplexml i can do the following $xml = simplexml_load_file("test.xml"); echo $xml-getName() . ""; foreach($xml-children() as $child) { echo $child-getName() . ": " . $child . ""; } my question is : i don't have a test.xml file, it is a url that i am reading/parsing, any way how to get the info from the url, not a file. I know this is a very noobish question, i would appreciate the help

    Read the article

  • JQuery $.getJSON appends a question mark to the request URL

    - by David Neale
    I have the folliwng JSON request code on an ASP.NET MVC web application: var userID = 'id=' + $('#namesList').val(); $.getJSON('/Person/GetPerson/', userID, function(data) { $('#collar').text(data.collarNumber); $('#name').text(data.Name); $('#email').text(data.EmailAddress); }); This creates a request such as: http://localhost:48610/Person/GetPerson/?id=6. Why is there a question mark in there? I get the server error The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32'.... If I make the request manually without the question mark it works fine.

    Read the article

  • Design pattern question: encapsulation or inheritance

    - by Matt
    Hey all, I have a question I have been toiling over for quite a while. I am building a templating engine with two main classes Template.php and Tag.php, with a bunch of extension classes like Img.php and String.php. The program works like this: A Template object creates a Tag objects. Each tag object determines which extension class (img, string, etc.) to implement. The point of the Tag class is to provide helper functions for each extension class such as wrap('div'), addClass('slideshow'), etc. Each Img or String class is used to render code specific to what is required, so $Img->render() would give something like <img src='blah.jpg' /> My Question is: Should I encapsulate all extension functionality within the Tag object like so: Tag.php function __construct($namespace, $args) { // Sort out namespace to determine which extension to call $this->extension = new $namespace($this); // Pass in Tag object so it can be used within extension return $this; // Tag object } function render() { return $this->extension->render(); } Img.php function __construct(Tag $T) { $args = $T->getArgs(); $T->addClass('img'); } function render() { return '<img src="blah.jpg" />'; } Usage: $T = new Tag("img", array(...); $T->render(); .... or should I create more of an inheritance structure because "Img is a Tag" Tag.php public static create($namespace, $args) { // Sort out namespace to determine which extension to call return new $namespace($args); } Img.php class Img extends Tag { function __construct($args) { // Determine namespace then call create tag $T = parent::__construct($namespace, $args); } function render() { return '<img src="blah.jpg" />'; } } Usage: $Img = Tag::create('img', array(...)); $Img->render(); One thing I do need is a common interface for creating custom tags, ie I can instantiate Img(...) then instantiate String(...), I do need to instantiate each extension using Tag. I know this is somewhat vague of a question, I'm hoping some of you have dealt with this in the past and can foresee certain issues with choosing each design pattern. If you have any other suggestions I would love to hear them. Thanks! Matt Mueller

    Read the article

  • Expression Studio 4 Premium & SketchFlow question; WTH

    - by Refracted Paladin
    Through work I have an Visual Studio Premium with MSDN subscription that I love. However, my biggest disappointment of the last 12 months was discovering that our 2nd from the top level subscription was not enough to get me Sketchflow! This is, most decidedly, NOT SHINY, and I am borderline distraught! What are my options? Upgrading to an Ultimate subscription for Sketchflow is out of the question. Am I forced, then, to stay with Blend 3 or Purchase Blend 4 seperately? If this is not a question I should ask here please inform and I'll delete. I just tend to default to SO for all questions that Google can't answer and Google did not answer this one.

    Read the article

  • Layout Question - OnItemClickListener not working now

    - by user244190
    Ok, after figuring out the earlier question 'Layout Question', now my OnItemClickListener, and ItemLongClickListener(ContextMenu) have stopped working. With just the TextView it works fine xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/txtVehName" android:hint="@string/VEH_NAME" android:textSize="18dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dip" android:layout_alignParentBottom="true" > </TextView> <RadioButton android:id="@+id/rbDefault" android:text="" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" > </RadioButton> </RelativeLayout> Anyone have any ideas as to why this would stop working? thanks

    Read the article

  • Question about Linux Device Drivers.

    - by smwikipedia
    I have just installed the Xubuntu. My box runs quite slower than before when installed with a Win7. I am wondering if I am missing some device drivers. I can use gnome-device-manager to list my devices. In the device list view, I saw several blue question mark on the left side of devices. Based on my windows experience, the question mark should indicate the device is not properly configured. Is it the same with gnome-device-manager? And most importantly, how could I know for sure whether or not the corresponding device drivers have been installed? Many thanks.

    Read the article

  • Modern Web Development + General question

    - by ritu
    I have been given a nasty wake up a while ago when I discovered that my 10 years of experience was really equivalent of about 4 (got trapped in a big company doing the same thing over and over without realizing it) and is now paying a huge price. Question 1: I did servlets/JSP programming back in the day (2001-2003). Since then there have been libraries like GWT, YUI, etc. Is JSP still the preferred way of building web apps using Java? Question 2: Because I enjoyed what I was doing and needed to pay the bills, I didn't realize that the ground below me has shifted. How do avoid this in the future? My years of C system programming doesn't seem to matter a lot now to the young guys who talk about design patterns.

    Read the article

  • simple process rollback question

    - by OckhamsRazor
    hi folks! while revising for an exam, i came across this simple question asking about rollbacks in processes. i understand how rollbacks occur, but i need some validation on my answer. The question: my confusion results from the fact that there is interprocess communication between the processes. does that change anything in terms of where to rollback? my answer would be R13, R23, R32 and R43. any help is greatly appreciated! thanks!

    Read the article

  • A question about indexes regarding to the gain of inserts & updates in database

    - by Mestika
    Hi, I’m having a question about the fine line between the gain of an index to a table there is growing steadily in size every month and the gain of queries with an index. The situation is, that I’ve two tables, Table1 and Table2. Each table grows slowly but regularly each month (with about 100 new rows for Table1 and a couple of rows for Table2). My concrete question is whether to have an index or to drop it. I’ve made some measurement that an covering index on Table2 improve my SELECT queries and some rather much but again, I’ve to consider the pros and cons but having a really hard time to decide. For Table1 it might not be necessary to have an index because the SELECT queries there is not that common. I would appreciate any suggestion, tips or just good advice to what is a good solution. By the way, I’m using IBM DB2 version 9.7 as my Database system Sincerely Mestika

    Read the article

  • Programming Contest Question: Counting Polyominos

    - by Martijn Courteaux
    Hi, An example question for a programming contest was to write a program that finds out how much polyominos are possible with a given number of stones. So for two stones (n = 2) there is only one polyominos: XX You might think this is a second solution: X X But it isn't. The polyominos are not unique if you can rotate them. So, for 4 stones (n = 4), there are 7 solutions: X X XX X X X X X X XX X XX XX XX X X X XX X X XX The application has to be able to find the solution for 1 <= n <=10 PS: Using the list of polyominos on Wikipedia isn't allowed ;) EDIT: Of course the question is: How to do this in Java, C/C++, C#

    Read the article

  • preg_match basics question.

    - by Yo-L
    Hi all. Got some trouble with my preg_match. The code. $text = 'tel: 012 213 123. mobil: 0303 11234'; $regex_string = '/(tel|Tel|TEL)[\s|:]+(.+)[\.|\n]/'; preg_match($regex_string , $text, $match); And I get this result in $match[2] "012 213 123. mobil: 023 123 123" First question. I want the regex to stop at the .(dot) but it doesent. Can someone explain to why it isnt? Second question. preg_match uses () to get their match. Is it possible to skip the parentheses surrounding the different "Tel" and still get the same functionality? Thnx all stackoverflow is great :D

    Read the article

  • SWIG-Lua question on class returning another class

    - by John Smith
    I am concreting a question I had earlier. I have two classes in C++ and I use SWIG to wrap them. A method in one class can return a pointer to the other class. How can I get Lua to see it as more than just a userdata? More concretely: I have class fruit { int numberofseeds; //some other stuff about fruit constructors etc... public: getseedcount() { return numberofseeds; } } class tree { fruit * apple; public: //constructors and whatnot fruit * getfruit() { return apple; } } I wrap these two class with SWIG so I can access them in Lua So I can get in Lua the object x=pomona.tree(grannysmith). My question now is: How can I arrange for things so that when I type y=x:getfruit() I will get a pomona:fruit type object? Where I can write something line y:getseedcount()? At the moment all I get is userdata which not edible.

    Read the article

  • A question about Drupal Node and Views

    - by Sushi
    I have created an "Add Question" content-type node which lets users ask questions. The questions have a title, image attachment option, and the content. I am showing the questions which have image as a block by filtering it as "Content: Photofield - list True" in Views. This way, only the questions which have images attached to the question appear in this block. Photofield by the way is the content type. I want to create a new block which only shows the questions which have no attached image. I have done filtering this block view by keeping filters as "Content: Photofield - list False" but in vain. There's also some expose option and I did some messing around with it too without coming to the result I want. Can anyone help?

    Read the article

  • Dynamically loading modules in Python (+ threading question)

    - by morpheous
    I am writing a Python package which reads the list of modules (along with ancillary data) from a configuration file. I then want to iterate through each of the dynamically loaded modules and invoke a do_work() function in it which will spawn a new thread, so that the code runs in a separate thread. At the moment, I am importing the list of all known modules at the beginning of my main script - this is a nasty hack I feel, and is not very flexible, as well as being a maintenance pain. This is the function that spawns the threads. I will like to modify it to dynamically load the module when it is encountered. The key in the dictionary is the name of the module containing the code: def do_work(work_info): for (worker, dataset) in work_info.items(): #import the module defined by variable worker here... t = threading.Thread(target=worker.do_work, args=[dataset]) # I'll NOT dameonize since spawned children need to clean up on shutdown # Since the threads will be holding resources #t.daemon = True t.start() Question 1 When I call the function in my script (as written above), I get the following error: AttributeError: 'str' object has no attribute 'do_work' Which makes sense, since the dictionary key is a string (name of the module to be imported). When I add the statement: import worker before spawning the thread, I get the error: ImportError: No module named worker This is strange, since the variable name rather than the value it holds are being used - when I print the variable, I get the value (as I expect) whats going on? Question 2 As I mentioned in the comments section, I realize that the do_work() function written in the spawned children needs to cleanup after itself. My understanding is to write a clean_up function that is called when do_work() has completed successfully, or an unhandled exception is caught - is there anything more I need to do to ensure resources don't leak or leave the OS in an unstable state? Question 3 If I comment out the t.daemon flag statement, will the code stil run ASYNCHRONOUSLY?. The work carried out by the spawned children are pretty intensive, and I don't want to have to be waiting for one child to finish before spawning another child. BTW, I am aware that threading in Python is in reality, a kind of time sharing/slicing - thats ok Lastly is there a better (more Pythonic) way of doing what I'm trying to do?

    Read the article

  • c++ polymorphism and other function question

    - by aharont
    i have got this code: class father{ public: virtual void f() { cout<<1;} }; class son:public father{ public: void f() {cout<<2;} }; void test (father x){x.f();} int main(){ son s; test(s); } the question says: the output is '1', what is the rule about polymorphism that the programmer forgot and how can i fix it so the output would be '2'? there is another rule that the programmer forgot when he wrote the father class, and he need to add an empty function to avoid problems from other sons of the father class. what is the rule and what is the missing function? another question write the g function so the next code would run with no crashes int x=11; g(x)=22;

    Read the article

  • question about class derivation in c++?

    - by jack22
    hi, i want to know some things about class derivation in c++ so i have super class x and an inherited class y and i did this class x{ public:a; private:b; protected:c; } class y:public x{ public:d; } in this case how y can access a,b,and c and by how i mean(public,protected,private) the second case: class x{ public:a; private:b; protected:c; } class y:private x{ public:d; } the same question? the third case: class x{ public:a; private:b; protected:c; } class y:private x{ public:d; } again the same question? sorry i think i wrote too much bye

    Read the article

  • Developing web app, question for mobile developers

    - by Stephen Kellett
    I'm going to develop a web app that I expect some people will also end up wanting to view on their phones. The UI will be fairly straightforward (no frames, just CSS/HTML). May have a bit of Flash, but not for the first version. My question is, for testing viewing of the web app on mobile devices what devices would you recommend that I test on (and thus, most likely, have to purchase)? Windows Mobile iPhone Android Other? or can I use emulators for any/all of these? Note that I'm not developing a platform (android, iPhone) specific app, just a web application that I expect will also be accessed from a mobile phone. I apologise if this seems like a niave/stupid question, but this hobby project is totally away from my commercial experience and I just don't know the answers to these questions, hence asking here. Thanks for reading.

    Read the article

  • simple obj-c naming question

    - by Highstead
    This question is more to figure out how to look up classes and objects in objective-c but i lack the knowledge to figure out how to look this up so i pose the question here. In .Net if i had a MyObject.MyValue the MyValue would be called a property, and I could look this up in MSDN. In java i would check the javadocs online (and that property would have to be a value). With objective-c that is called a ? and if i wanted to look it up i would look where? Example: //Object.??? UIImage.backgroundColor = [UIColor blueColor];

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >