Search Results

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

Page 32/186 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • questions about multi threading for sockets/tcp-connections.

    - by Fantastic Fourier
    I have a server that connects to multiple clients using TCP/IP connections, using C in Unix. Since it won't have more than 20 connections at a time, I figured I would use a thread per connection/socket. But the problem is writing to the sockets as I'll be sending user prompted msgs to clients. Once each socket is handled by a thread, how do I interact with the created thread to write to the sockets? Should each thread just read from the sockets and I'll write to sockets in the main program? Not sure if that's a good way to go about it.

    Read the article

  • In VB.NET how do you specify Inherits/implements on a generic class with multi-constraints

    - by Romel Evans
    When I write the following statement in VB.Net (C# is my normal language), I get an "end of statement expected" referring to the "Implements" statement. <Serializable()> _ <XmlSchemaProvider("EtgSchema")> _ Public Class SerializeableEntity(Of T As {Class, ISerializable, New}) _ Implements IXmlSerializable, ISerializable ... End Class The C# version that I'm trying to emulate is: [Serializable] [XmlSchemaProvider("MySchema")] public class SerializableEntity<T> : IXmlSerializable, ISerializable where T : class, new() { .... } Sometimes I feel like I have 5 thumbs with VB.NET :)

    Read the article

  • Emulating HTTP POST via httpclient 3.x for multi options

    - by Frankie Ribery
    I want to emulate a HTTP POST using application/x-www-form-urlencoded encoding to send a option group that allows multiple selections. <select name="groups" multiple="multiple" size="4"> <option value="2">Administration</option> <option value="1">General</option> </select> Does adding 2 NameValuePairs (NVP) with the same name work ? My serverside log shows that only the first NVP was received. e.g PostMethod method = ...; NameValuePair[] nvpairs = { new NameValuePair( "groups", "2" ); new NameValuePair( "groups", "1" ); }; method.addParameter( nvpairs ); Only the groups=1 parameter was received. Thanks

    Read the article

  • Returning unique values of a multi-dimensional array with CodeIgniter PHP

    - by Michael Bradley
    Hi - I'm developing a property rentals website. The search results page will contain a list of property results. It is my intention to redefine the results, say by town, country, property type etc. So let's say for example the user searches 'France'. All of the relative properties will be returned and displayed in a list. However, I also need to reuse this array, to display only unique town names from the search results array. e.g. Montpellier, Lyon, Rennes, Nice etc. The idea is when use user click on 'Nice', only the 'Nice' properties would return. I would also like to display how many properties are in that town. The closest example as to what I want to achieve. http://www.miaandmaggie.com/dog-collars-leashes.html Any ideas how I can use my search array to display the unique towns of the search? Many thanks! M

    Read the article

  • Regex for multi-line HTML comments (preg_match_all)

    - by Ben
    I have an html document with multiple commented-out PHP arrays, e.g.: <!-- Array ( [key] => 0 ) --> Using PHP, I need to somehow parse the HTML for only these comments (there are other comments that will need to be ignored) and extract the contents. I've been trying to use preg_match_all but my regex skills aren't up to much. Could anyone point me in the right direction? Any help is much appreciated!

    Read the article

  • WordPress Multi Language Help

    - by Cameron
    I have a WordPress website that needs to have its articles in multiple languages. The authors will be writing the articles themselves so I don't need an automatic translation tool. The plan is that a user can choose a language from a drop-down list which will then show the different language. Any ideas on how I can do this?

    Read the article

  • Methods for ensuring security between users in multi-user applications

    - by Emilio
    I'm writing a multiuser application (.NET - C#) in which each user's data is separated from the others and there is no data that's common between users. It's critical to ensure that no user has access to another user's data. What are some approaches for implementing security at the database level and/or in the application architecture to to accomplish this? For example (and this is totally made up - I'm not suggesting it's a good or bad approach) including a userID column in all data tables might be an approach. I'm developing the app in C# (asp.net) and SQL Server 2008. I'm looking for options that are are either native in the tools I'm using or general patterns.

    Read the article

  • Looking for Suggestion on Multi-Consumer Service Development

    - by DaveDev
    How would I model a system that needs to be able to provide content in a format that would be consumable by iphone, Android or web browser (or whatever). All a new consumer would have to do is build a UI with rules on how to handle the data. I'm thinking something RESTful returning JSON or something. I'm really looking for suggestions on the kinds of things I'd need to learn in order to be able to implement a system on this scale. As an ASP.NET MVC developer, would that be the best framework/archetectrue to go with? Thanks

    Read the article

  • How to implement multi relationship in MS SQL?

    - by Ethan
    I’m trying to design a database to use with ASP.net MVC application. Here is the scenario: There are three entities and users can post their comments for each of these different entities. I just wonder how just put one table for Comments and link all other entities to it. Obviously, Comments table needs 3 references (foreign key) to those tables but as you know these foreign keys can’t be null and just one of them can be filled for each row. Is there any better way than implementing three different tables for each entity’s comments? Cheers Ethan

    Read the article

  • SQL Overlapping and Multi-Column Indexes

    - by durilai
    I am attempting to tune some stored procedures and have a question on indexes. I have used the tuning advisor and they recommended two indexes, both for the same table. The issue is one index is for one column and the other is for multiple columns, of which it includes the same column from the first. My question is why and what is the difference? CREATE NONCLUSTERED INDEX [_dta_index_Table1_5_2079723603__K23_K17_K13_K12_K2_K10_K22_K14_K19_K20_K9_K11_5_6_7_15_18] ON [dbo].[Table1] ( [EfctvEndDate] ASC, [StuLangCodeKey] ASC, [StuBirCntryCodeKey] ASC, [StuBirStOrProvncCodeKey] ASC, [StuKey] ASC, [GndrCodeKey] ASC, [EfctvStartDate] ASC, [StuHspncEnctyIndctr] ASC, [StuEnctyMsngIndctr] ASC, [StuRaceMsngIndctr] ASC, [StuBirDate] ASC, [StuBirCityName] ASC ) INCLUDE ( [StuFstNameLgl], [StuLastOrSrnmLgl], [StuMdlNameLgl], [StuIneligSnorImgrntIndctr], [StuExpctdGrdtngClYear] ) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] go CREATE NONCLUSTERED INDEX [_dta_index_Table1_5_2079723603__K23] ON [dbo].[Table1] ( [EfctvEndDate] ASC )WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

    Read the article

  • Lightweight multi os monitoring plateform

    - by user293995
    Hi, I have a project where the is windows, freebsd and linux servers. I have to monitor some services : mysql replication status www status status with regexp on a webpage space on disk Is there open source software to do this and rapid to deploy ? Thanks in advance Best regards

    Read the article

  • Passing big multi-dimensional array to function in C

    - by kirbuchi
    Hi, I'm having trouble passing a big array to a function in C. I declare: int image[height][width][3]={}; where height and width can be as big as 1500. And when I call: foo((void *)image,height,width); which is declared as follows: int *foo(const int *inputImage, int h, int w); I get segmentation fault error. What's strange is that if my values are: height=1200; width=290; theres no problem, but when they're: height=1200; width=291; i get the mentioned error. At 4 bytes per integer with both height and width of 1500 (absolute worst case) the array size would be of 27MB which imo isn't that big and shouldn't really matter because I'm only passing a pointer to the first element of the array. Any advice?

    Read the article

  • GIS: Converting multi polygons to multiple features

    - by Kangkan
    Hi, I am involved in a GIS project. I have a base map file (shape file) that contains the road layer for a large portion of a town. The problem is that the shape file contains only two features each containing around 500000 points each. The features are multipolygons containing a large no of polygons inside. I wish to convert it to numerous features each containing not more than one polygon. Is it possible? If yes, how?

    Read the article

  • Right way of making muti-site and multi-lingual website on codeigniter

    - by DR.GEWA
    Hi there. Beforehand let me thank you all !! Really guys you help a lot. When I will finish my web site and will have much time on watching how userbase is growing I will come here again and again to answer to another people questions(if I can ) So here is the problem. I made a web-site on CodeIgniter. A social network engine. Something like phpfox, classmates_com or facebook. It's right now somehow not multilingual, So the UI strings are in the view files, and next step will be move them to the language files. I want the user to have ability to change the language. So I assume that in database user will have row "lang_local" which would be by default set to en, and then to any other language he will change . So what is eating my nervs and enery is following. I will make on this engine several demographic social networks,and I would like to manage theese web-sites in centralized manner with one backend . So whenever I would like to make a new web-network, I just add the domain settings install the script in new folder and add it in database sites I see it like this on every table in database like users,comments,messages,categories ,etc I will have a row site_id , and on each query add/update/delete I add a WHERE SITE_ID=XXX and in table sites(site_id,site_name,domain_name) will have all domains , so that in backend I can filter data by website. Is this a good way? What if i will need then to be multiserver, what about load balancing? Who can tell me what would be a right,PROFESSIONAL way? My maximum user limit for a database is something like for start 10.000 in one-two year 100.000users

    Read the article

  • Get the current array key in a multi dimensional array

    - by johlton
    Hi *, I have a session array *$_SESSION['cart']* with some items in it. The structure ist like this (via *print_r*): Array ( [2-1] => Array ( [color] => 7 [articlenumber] => WRG70 10 [quantity] => 1 [price] => 17.50 ) [3-8] => Array ( [color] => 2 [articlenumber] => QRG50 02 [quantity] => 1 [price] => 13.50 ) ) Looping over the values for display is fine ... foreach($_SESSION['cart'] as $item_array) { foreach($item_array as $item => $value) { echo $value . ' | '; } } ... since it results in something like this: 7 | WRG70 10 | 1 | 17.50 | 2 | QRG50 02 | 1 | 13.50 | But Now: How can I output the matching key (e.g. '2-1') as well? I tried some array functions like key() & current but couldn't get it to work (one of these days). Any quick hint on this? Thanks a lot and best from Berlin Fabian

    Read the article

  • Multi-part template issue with Jinja2

    - by Alan Harris-Reid
    Hi, When creating templates I typically have 3 separate parts (header, body, footer) which I combine to pass a singe string to the web-server (CherryPy in this case). My first approach is as follows... from jinja2 import Environment, FileSystemLoader env = Environment(loader=FileSystemLoader('')) tmpl = env.get_template('Body.html') page_body = tmpl.render() tmpl = env.get_template('Header.html') page_header = tmpl.render() tmpl = env.get_template('Footer.html') page_footer = tmpl.render() page_code = page_header + page_body + page_footer but this contains repetitious code, so my next approach is... def render_template(html_file): from jinja2 import Environment, FileSystemLoader env = Environment(loader=FileSystemLoader('')) tmpl = env.get_template(html_file) return tmpl.render() page_header = render_template('Header.html') page_body = render_template('Body.html') page_footer = render_template('Footer.html) However, this means that each part is created in its own environment - can that be a problem? Are there any other downsides to this approach? I have chosen the 3-part approach over the child-template approach because I think it may be more flexible (and easier to follow), but I might be wrong. Anyone like to convince me that using header, body and footer blocks might be better? Any advice would be appreciated. Alan

    Read the article

  • Basic Java Multi-Threading Question

    - by Veered
    When an object is instantiated in Java, is it bound to the thread that instantiated in? Because when I anonymously implement an interface in one thread, and pass it to another thread to be run, all of its methods are run in the original thread. If they are bound to their creation thread, is there anyway to create an object that will run in whatever thread calls it?

    Read the article

  • .htaccess whit multi domains problem

    - by NeoNmaN
    i have this .htaccess rule RewriteCond %{HTTP_HOST} ^domain1.com RewriteRule (.*) http://www.domain2.com/$1 [R=301,L] RewriteCond %{HTTP_HOST} www.domain1.com RewriteRule (.*) http://www.domain2.com/$1 [R=301,L] and right now i hav this code RewriteCond %{HTTP_HOST} ^www\.(.*) RewriteRule (.*) http://%1/$1 [R=301,L] the problem is right now if i type www.domain1.com its return to domain1.com and not www.domain2.com i will have it to if i type www.domain1.com, domain1.com or domain3.com its will return to this domain ( www.domain2.com ) and if i type ( domain2.com ) its return to www.domain2.com i hob i can be help here tanks a lot.

    Read the article

  • Figure out if element is present in multi-dimensional array in python

    - by Terje
    I am parsing a log containing nicknames and hostnames. I want to end up with an array that contains the hostname and the latest used nickname. I have the following code, which only creates a list over the hostnames: hostnames = [] # while(parsing): # nick = nick_on_current_line # host = host_on_current_line if host in hostnames: # Hostname is already present. pass else: # Hostname is not present hostnames.append(host) print hostnames # ['[email protected]', '[email protected]', '[email protected]'] I thought it would be nice to end up with something along the lines of the following: # [['[email protected]', 'John'], ['[email protected]', 'Mary'], ['[email protected]', 'Joe']] My problem is finding out if the hostname is present in such a list hostnames = [] # while(parsing): # nick = nick_on_current_line # host = host_on_current_line if host in hostnames[0]: # This doesn't work. # Hostname is already present. # Somehow check if the nick stored together # with the hostname is the latest one else: # Hostname is not present hostnames.append([host, nick]) Are there any easy fix to this, or should I try a different approach? I could always have an array with objects or structs (if there is such a thing in python), but I would prefer a solution to my array problem.

    Read the article

  • Doxygen: grouping documentation by folder in a multi-project codebase

    - by John
    In one project, some pages were added - it was a new project in which doxygen was being tested properly - adding comments & pages - rather than simply auto-generating docs from our existing code-base. The problem is when doxygen is run on the main code-base, that project's pages show up at a top level. e.g they have a main-page and some sub-pages. But what we'd want is all those pages pushed down one level so you have main-project-main-project-pages. One question is what happens if multiple projects have a main-page? Do they get combined, or throw errors? Another question is if you can tell doxygen to use paths and containing folders to auto-generate groups or sections or page-hierarchies in some way? Going through all out projects to properly assign classes to groups is a mammoth task, so ideally everything in a directory would get put in a group of that name, as a way to make the documentation of non-doxygen codebases better. Sorry my question is a bit vague, the problem is even after reading the docs the terminology isn't totally clear yet. Hopefully the kind of question I'm asking is clear, if not I'll try to cobble an example file-structure together.

    Read the article

  • Multi Process Configuration

    - by user200937
    Hi, I have a product built out of multiple processes. Each process uses internally commons configuration. Does anyone have an idea how to manage the config? I.e. we do not want to duplicate variables so each process will be able to read them. Additionally, DB solution is no good, as we do not want to be dependent on DB for something like configuration. Thanks Yair

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >