Search Results

Search found 4646 results on 186 pages for 'multi'.

Page 39/186 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • .net (winforms, not asp) multi-server deployment

    - by poiuyttr
    I have a small .NET WinForms application, and couple of linux servers, DEV and CL1,CL2..CLN (DEV is development server and CL* are servers which belons to our clients, they are in private networks and it's a kind of production servers) I want an update mechanism so that (1) i develop a new version and publish it to a DEV (2) users of DEV-server install latest version from DEV (3) users of CL2 (employees of client2) install stable version from CL-2 directly (4) application checks for updates using server it was installed from (so, if it was installed from CL-2, it should check CL-2 for updates) (5) i should be able to propogate the update to a selected CL-server (using just file copy & maybe sed; not republishing), if i want that (and if i don't, that CL-server will have an old version until manually i update it) I tried to use clickonce, but looks like it meets only first two requirements. What should i do?

    Read the article

  • iPhone: Get value in multi-dimentional array

    - by Nic Hubbard
    I have an array that is many levels deep and I am wondering what is the best way to get one of the child element values that is deep in my array. I assume I need to use a recursive method, but what is the best way to do this? Or is there a faster way to do this? The array comes from an XML Parser that I am using which builds everything into an array like this (using NSLog to show the structure): { children = ( { children = ( { children = ( { children = ( ); data = 12; element = AssetID; } ); data = ""; element = "ns1:GetUserIdByUsernameResponse"; } ); data = ""; element = "SOAP-ENV:Body"; } ); data = ""; element = "SOAP-ENV:Envelope"; } What I would like to get at is the AssetID data, which in this case is 12.

    Read the article

  • Multi dimensional array with get image data

    - by Dave
    I'm really confused with an array im making, its gotten a bit confusing to follow but i believe its the only way for me to approach what im trying to do. My idea here is to store getImageData in an array so i can link each image to an array of data. This is how i create my array: var listObj = { id: uid, extra: [ ctx2.getImageData(abposx,abposy,imgwidth,imgheight) ] }; pixeld.push(listObj); So now im trying to run through the array "pixeld" to find the uid but i don't know how the syntax should be.... this is what i tried: for (j = (pixeld.length-1); j > -1; --j){ if(pixeld[j].extra.data[3] !==0){ //line 220 matches.push(pixeld[j].id); } } The problem is i get this error: Uncaught TypeError: Cannot read property '3' of undefined on line 220 I have marked which line is 220 in the for loop. Any one know what my mistake is ?

    Read the article

  • Multi valued profile property mapping to AD in Sharepoint

    - by keeno
    I'm trying to map my skills and responsibilities profile sections to one of the custom properties in Active Directory (extensionattribute1 , 2, etc). I'm entering comma seperated values in AD and it's importing the values fine but sees the comma seperated values as one value on import. i.e. 'C#,asp.net,javascript' rather than 'C#', 'asp.net', 'Javascript'. Any ideas. I'm almost there it's just not spliting the values correctly on import. thanks in Advance

    Read the article

  • SQL tables using VARCHAR with UTF8 (with respect to multi byte character length)

    - by Elius
    Like in Oracle VARCHAR( 60 CHAR ) I would like to specify a varchar field with variable length depending on the inserted characters. for example: create table X (text varchar(3)) insert into X (text) VALUES ('äöü') Should be possible (with UTF8 as the default charset of the database). On DB2 I got this Error: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001 (Character data, right truncation occurred; for example, an update or insert value is a string that is too long for the column, or a datetime value cannot be assigned to a host variable, because it is too small.) I'm looking for solutions for DB2, MsSql, MySql, Hypersonic.

    Read the article

  • R multi plot log-log Label Problem

    - by ACEnglish
    I'm trying to make a graph of a table and graph it in log space. First of all, plot(dat) gives me the grid of graphs Second of all, plot(dat, log="xy") gives me the correct plots of data in log space However, plot(dat, log="xy") ruins the main diagonal's labels of names(dat) R version 2.11.0

    Read the article

  • How to get thread status..in Multi threading..

    - by Qutbuddin Kamaal
    Hi, May be it sound dumb but if I want some computed value from other thread and other value from one more thread and this two value in my main thread how can I,if In case second thread completed before first one.it will create problem..so I just want is there any way that I can get the thread status means its still running or stop. Thanks

    Read the article

  • Multi "column" DataGridView C#

    - by Wesley
    I have a DataGridView that's bound to a DataSet. It has columns DateCreated, Weight, DateUsed. Those three columns do not take up much horizontal space on DataGridView that is nearly full screen. Is it possible to have those columns wrap back to the top if the view is wide enough to support a second group of those colums. So across the header it would read DateCreated, Weight, DateUsed, DateCreated, Weight, DateUsed. Then when a row is clicked, only 3 cells would be highlighted, not all six. Is there something that can provide this functionality?

    Read the article

  • LINQ Changeset multi-threading

    - by Xodarap
    I'm using LINQ to SQL and after I submit some changes I want to spawn a thread which looks through all the changes and updates our lucene index as necessary. My code looks vaguely like: (new Thread(() => { UpdateIndex(context.GetChangeSet()); }).Start(); Sometimes though I get an InvalidOperationException, which I think is because context.GetChangeSet() is not thread-safe, and so if the change set is modified in one thread while another thread is enumerating through it, problems arise. Is there a "thread-safe" version of GetChangeSet()? Or some way I can do ChangeSet.clone() or something?

    Read the article

  • Rails multi level model security

    - by rballz
    I have the need to do the following in Rails to mirror a desktop application: a User and an Office 'owns' a record, if you don't own the record on a user or office level you're kicked into the public realm. user gets read,write,delete to the model record office gets read/write/delete to the model record other or public gets read/write/delete to the model record e.g. UserA owns a model record with read/write/delete OfficeA owns a model with read/write other/public gets read I was wondering if a plugin/gem existed to grant this functionality?

    Read the article

  • multi-valued property query in GAE

    - by Tim
    class Person{ @Persistent private List tags = ArrayList() } I want to let the user query a person based on his/her tag, so I had my query filter like this: tags.contains(tagValue1) and if the user want to search for multiple tags, I would just add to the filter so if the user is searching for 3 tags, then the query would be tags.contains(tagValue1) && tags.contains(tagValue2) && tags.contains(tagValue3) I think this approach is wrong, because the datastore then needs to have an index that have the tags property three times... and if the user search for more than 3 tags at a time then it will be broken. What's the proper way to do this? Do you guys have any suggestions?

    Read the article

  • Traverse multi dimensional array recusively without using foreach

    - by ejaz
    I have an array like this and the code using foreach loop. $arr = array( array ( array( 'CAR_TIR', 'Tires', 100 ), array( 'CAR_OIL', 'Oil', 10 ), array( 'CAR_SPK', 'Spark Plugs', 4 ) ), array ( array( 'VAN_TIR', 'Tires', 120 ), array( 'VAN_OIL', 'Oil', 12 ), array( 'VAN_SPK', 'Spark Plugs', 5 ) ), array ( array( 'TRK_TIR', 'Tires', 150 ), array( 'TRK_OIL', 'Oil', 15 ), array( 'TRK_SPK', 'Spark Plugs', 6 ) ) ); function recarray($array) { foreach($array as $key=>$value) { if(is_array($value)) { RecArray($value); } else { echo "key = $key value = $value"; } } } recarray($arr); I have to traverse the array using recursion and without using foreach. I would appreciate it if any one can help me

    Read the article

  • iPhone "multi-threading" question

    - by MrDatabase
    I have a simple iPhone game consisting of two "threads": the main game loop where all updating and rendering happen 30 times per second (NSTimer)... and the "thread" that calls the accelerometer delegate 100 times per second. I have a variable "xPosition" that's updated in the accelerometer delegate function and used in the game loop. Is there a possibility of the two "threads" trying to use xPosition at the same time (hence causing a crash or some other problem). If so how can I fix this w/ minimal impact to the game's performance? I've been using this set-up for many months of development and incremental testing and I've never run into any problems. Cheers!

    Read the article

  • .htaccess trickery multi-language website

    - by user1658741
    I have a website right now that uses two languages (french and english) The way it works right now is that if someone goes to mysite.com/folder/file.php for example, file.php is simply a script that figures out which language to use, get's it's own path and filename(file.php) and serves up mysite.com/en/folder/file.php (if the language is english). However what shows up in the URL is still mysite.com/folder/file.php. For any folder and any file the same script is used. If I want to add a new file I have to add the file to the folder the user types into the browser as well to the en and fr folders. Could I do some .htaccess trickery so that whatever URL is typed, one .php file gets open that checks the language and what folder/file was requested and then serves up the correct language file? here's the php file that is served up for any files in the URL. <?php // Get current document path which is mirrored in the language folders $docpath = $_SERVER['PHP_SELF']; // Get current document name (Used when switching languages so that the same current page is shown when language is changed) $docname = GetDocName(); //call up lang.php which handles display of appropriate language webpage. //lang.php uses $docpath and $docname to give out the proper $langfile. //$docpath/$docname is mirrored in the /lang/en and /lang/fr folders $langfile = GetDocRoot()."/lang/lang.php"; include("$langfile"); //Call up the proper language file to display function GetDocRoot() { $temp = getenv("SCRIPT_NAME"); $localpath=realpath(basename(getenv("SCRIPT_NAME"))); $localpath=str_replace("\\","/",$localpath); $docroot=substr($localpath,0, strpos($localpath,$temp)); return $docroot; } function GetDocName() { $currentFile = $_SERVER["SCRIPT_NAME"]; $parts = Explode('/', $currentFile); $dn = $parts[count($parts) - 1]; return $dn; } ?>

    Read the article

  • Lookups in Multi-Tenant Database

    - by Huthaifa Afanah
    I am developing a SaaS application and I am looking for the best way to design lookup tables, taking in consideration: The look-up tables will have predefined data shared among all the tenants Each tenant must have the ability to extend the look-up table with his own data e.g adding a car class not defined I am thinking about adding TenantID column to each lookup and add the predefined data with setting that column to some value which represents the "Super Tenant" that belongs to the system itself

    Read the article

  • How to design model for multi-tiered data?

    - by Chris
    Say I have three types of object: Area, Subarea and Topic. I want to be able to display an Area, which is just a list of Subareas and the Topics contained in those Subareas. I never want to be able to display Subareas separately - they're just for breaking up the Topics. Topics can, however, appear in multiple Areas (but probably under the same Subarea). How would I design a model for this? I could use ForeignKey from Topic to Subarea and from Subarea to Area, but it seems unnecessarily complex given that I never want to interact with subareas themselves. Also, none of these objects are ever altered or added to by the user. They're just for me to represent information. Maybe there is a better way to represent it all?

    Read the article

  • Passing Data to Multi Threads

    - by alaamh
    I study this code from some book: #include <pthread.h> #include <stdio.h> /* Parameters to print_function. */ struct char_print_parms { /* The character to print. */ char character; /* The number of times to print it. */ int count; }; /* Prints a number of characters to stderr, as given by PARAMETERS, which is a pointer to a struct char_print_parms. */ void* char_print(void* parameters) { /* Cast the cookie pointer to the right type. */ struct char_print_parms* p = (struct char_print_parms*) parameters; int i; for (i = 0; i < p->count; ++i) fputc(p->character, stderr); return NULL; } /* The main program. */ int main() { pthread_t thread1_id; pthread_t thread2_id; struct char_print_parms thread1_args; struct char_print_parms thread2_args; /* Create a new thread to print 30,000 ’x’s. */ thread1_args.character = 'x'; thread1_args.count = 30000; pthread_create(&thread1_id, NULL, &char_print, &thread1_args); /* Create a new thread to print 20,000 o’s. */ thread2_args.character = 'o'; thread2_args.count = 20000; pthread_create(&thread2_id, NULL, &char_print, &thread2_args); usleep(20); return 0; } after running this code, I see different result each time. and some time corrupted result. what is wrong and what the correct way to do that?

    Read the article

  • C# Multi threading- Move objects between threads

    - by Grant
    Hi, i am working with a winforms control that is both a GUI element and also does some internal processing that has not been exposed to the developer. When this component is instantiated it may take between 5 and 15 seconds to become ready so what i want to do is put it on another thread and when its done bring it back to the gui thread and place it on my form. The problem is that this will (and has) cause a cross thread exception. Normally when i work with worker threads its just with simple data objects i can push back when processing is complete and then use with controls already on the main thread but ive never needed to move an entire control in this fashion. Does anyone know if this is possible and if so how? If not how does one deal with a problem like this where there is the potential to lock the main gui?

    Read the article

  • How to implement a multi-threaded asynchronous operation?

    - by drowneath
    Here's how my current approach looks like: // Somewhere in a UI class // Called when a button called "Start" clicked MyWindow::OnStartClicked(Event &sender) { _thread = new boost::thread(boost::bind(&MyWindow::WorkToDo, this)); } MyWindow::WorkToDo() { for(int i = 1; i < 10000000; i++) { int percentage = (int)((float)i / 100000000.f); _progressBar->SetValue(percentage); _statusText->SetText("Working... %d%%", percentage); printf("Pretend to do something useful...\n"); } } // Called on every frame MyWindow::OnUpdate() { if(_thread != 0 && _thread->timed_join(boost::posix_time::seconds(0)) { _progressBar->SetValue(100); _statusText->SetText("Completed!"); delete _thread; _thread = 0; } } But I'm afraid this is far from safe since I keep getting unhandled exception at the end of the program execution. I basically want to separate a heavy task into another thread without blocking the GUI part.

    Read the article

  • Build system for multi-language project

    - by Epcylon
    I am getting ready to embark on a project mainly for experimenting with languages, but also with a hint of usefulness. It will consist of a server-application, written in Erlang, and client-libraries in a number of languages. Initially I will want to write clients in Java, Ruby and Python. The actual protocol for communication will be Thrift. I'm looking for a build system that will allow me to build the server and all the client libraries in one go, running unit-tests in each language, then packaging up a releasable artifact of some sort in whatever way is the "standard" for each language. That means a Jar for Java, a RubyGem and a distribute/setuptools tarball for Python. Erlang probably has something too, but I'm not yet familiar with that. It should also be able to run the Thrift compiler to generate the various Thrift-stubs in each language. On the pad at the start is Maven. I'm fairly certain Maven can do all I need, but I fear it's too Java-centric, and leaves me with a ton of work for every new language I need to add.

    Read the article

  • Elegant way to aggregate multi-dimensional array by index key

    - by Stephen J. Fuhry
    How can I recursively find the total value of all children of an array that looks something like this? [0] => Array ( [value] => ? // 8590.25 + 200.5 + 22.4 [children] => Array ( [0] => Array ( [value] => ? // 8590.25 + 200.5 [children] => Array ( [0] => Array ( [value] => 8590.25 // leaf node ) [1] => Array ( [value] => 200.05 // leaf node ) ) ) [1] => Array ( [value] => 22.4 // leaf node ) ) )

    Read the article

  • Passing a multi-line string as an argument to a script in Windows

    - by Zack Mulgrew
    I have a simple python script like so: import sys lines = sys.argv[1] for line in lines.splitlines(): print line I want to call it from the command line (or a .bat file) but the first argument may (and probably will) be a string with multiple lines in it. How does one do this? Of course, this works: import sys lines = """This is a string It has multiple lines there are three total""" for line in lines.splitlines(): print line But I need to be able to process an argument line-by-line. EDIT: This is probably more of a Windows command-line problem than a Python problem. EDIT 2: Thanks for all of the good suggestions. It doesn't look like it's possible. I can't use another shell because I'm actually trying to invoke the script from another program which seems to use the Windows command-line behind the scenes.

    Read the article

  • How to multi-thread this?

    - by WilliamKF
    I wish to have two threads. The first thread1 occasionally calls the following pseudo function: void waitForThread2() { if (thread2 is not idle) { return; } notifyThread2IamReady(); while (thread2IsExclusive) { } } The second thread2 is forever in the following pseudo loop: for (;;) { Notify thread1 I am idle. while (!thread1IsReady()) { } Notify thread1 I am exclusive. Do some work while thread1 is blocked. Notify thread1 I am busy. Do some work in parallel with thread1. } What is the best way to write this such that both thread1 and thread2 are kept as busy as possible on a machine with multiple cores. I would like to avoid long delays between notification in one thread and detection by the other. I tried using pthread condition variables but found the delay between thread2 doing 'notify thread1 I am busy' and the loop in waitForThread2() on thear2IsExclusive() can be up to almost one second delay. I then tried using a volatile sig_atomic_t shared variable to control the same, but something is going wrong, so I must not be doing it correctly.

    Read the article

  • Multi-model form problem

    - by raphael_turtle
    (I'm just learning rails so....) I have a photo model and a gallery model, habtm associations and a join table. I'm making a photo gallery. The gallery page has a title field and description field. User creates gallery title, then goes to the photo page and checkboxes each image they want in that gallery. I get the error "undefined method `to_i' for ["1", {"title"="1"}]:Array" when trying to save/update a photo with a gallery title(with the checkbox) <% form_for @photo, :html => {:multipart => true } do |f| %> <%= f.error_messages %> <p> <%= f.label :title %> <%= f.text_field :title %> </p> <p> <%= f.label :description %> <%= f.text_area :description %> </p> <p> <%= f.label :image %> <%= f.file_field :image %> </p> <% for gallery in @photo.galleries %> <% fields_for "painting[gallery_attributes][]", gallery do |g| %> <div> <%= g.check_box :title %> <%= gallery.title %> </div> <% end %> <% end %> <p><%= submit_tag 'Update' %></p> <% end %> How much of this is horribly wrong? Can someone point me in the right direction?, I can't find any tutorials relating to this for 2.3 and above.

    Read the article

  • OpenCV (c++) multi channel element access

    - by Vic
    I'm trying to use the "new" 2.0 c++ version of OpenCV, but everything is else like in simple C version. I have some problem with changing the values in image. The image is CV_8UC3. for (int i=0; i<image.rows; i++) { for (int j=0; j<image.cols; j++) { if (someArray[i][j] == 0) { image.at<Vec3i>(i,j)[0] = 0; image.at<Vec3i>(i,j)[1] = 0; image.at<Vec3i>(i,j)[2] = 0; } } } It's not working. What am I doing wrong??? Thank you!

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >