Search Results

Search found 5942 results on 238 pages for 'total starnger'.

Page 198/238 | < Previous Page | 194 195 196 197 198 199 200 201 202 203 204 205  | Next Page >

  • tcp/ip accept not returning, but client does

    - by paquetp
    server: vxworks 6.3 calls the usual socket, bind, listen, then: for (;;) { client = accept(sfd,NULL,NULL); // pass client to worker thread } client: .NET 2.0 TcpClient constructor to connect to server that takes the string hostname and int port, like: TcpClient client = new TcpClient(server_ip, port); This is working fine when the server is compiled and executed in windows (native c++). intermittently, the constructor to TcpClient will return the instance, without throwing any exception, but the accept call in vxWorks does not return with the client fd. tcpstatShow indicates no accept occurred. What could possibly make the TcpClient constructor (which calls 'Connect') return the instance, while the accept call on the server not return? It seems to be related to what the system is doing in the background - it seems more likely to get this symptom to occur when the server is busy persisting data to flash or an NFS share when the client attempts to connect, but can happen when it isn't also. I've tried adjusting priority of the thread running accept I've looked at the size of the queue in 'listen'. There's enough. The total number of file descriptors available should be enough (haven't validated this yet though, first thing in the morning)

    Read the article

  • How do I do a count on that meet a specific condition, dependent on several has_many relationships i

    - by Angela
    I have a Model Campaign. A Campaign has many Events. Each Event has an attribute :days. A Campaign also has_many Contacts. Each Contact as a :date_entered attribute. The from_today(contact,event) method returns a number, which is the number of days from the contact's :date_entered till today minus the event's :days. In other words, a positive number shows the number of days from today till the :days of the event is elapsed. If it is negative, if means that the number of days that has elapsed since the :date_entered is greater than the :days attribute of an event. In other words, the event is overdue. What I would like to be able to do is do campaign.overdue and this would result in a total number of contacts that have an overdue event. It shouldn't count multiple events for a single contact, just one contact. How do I do that? It seems like I would need to cycle through all the events for every contact and keep a counter but I'm assuming that there is a better way.

    Read the article

  • JQuery DataTables link item

    - by rogcg
    I'm trying to link the items from a specific column, but each one will be linked for a different id from the json string. Unfortunately I can't find a way to do this using the API (I know there is a lot of ways to do that without using the API ), but I'm looking for a way to link a item from a column (each one with a link for a specific id). So here is my code, I use getJSON to get the JSON from the server, and I load the data from this JSON to the table like this: $.getJSON("/method/from/server/", function(data) { var total = 0; $("#table_body").empty(); var oTable = $('#mytable').dataTable( { "sPaginationType" : "full_numbers", "aaSorting": [[ 0, "asc" ]] }); oTable.fnClearTable(); $.each(data, function(i, item) { oTable.fnAddData( [ item.contact_name, item.contact_email ] ); }); }); What I want to do, is for each row, link the contact_name to its id, which is also in the JSON, and can be accessed inside this $.each loop by using item.contact_id. Is there a way to do this using DataTables API, if yes, could you explain me and provide a good resource that will help me with this? Thanks.

    Read the article

  • select2: "text is undefined" when getting json using ajax

    - by user3046715
    I'm having an issue when getting json results back to select2. My json does not return a result that has a "text" field so need to format the result so that select2 accepts "Name". This code works if the text field in the json is set to "text" but in this case, I cannot change the formatting of the json result (code outside my control). $("#e1").select2({ formatNoMatches: function(term) {return term +" does not match any items." }, ajax: { // instead of writing the function to execute the request we use Select2's convenient helper url: "localhost:1111/Items.json", dataType: 'jsonp', cache: true, quietMillis: 200, data: function (term, page) { return { q: term, // search term p: page, s: 15 }; }, results: function (data, page) { // parse the results into the format expected by Select2. var numPages = Math.ceil(data.total / 15); return {results: data.Data, numPages: numPages}; } } }); I have looked into the documentation and found some statements you can put into the results such as text: 'Name', but I am still getting "text is undefined". Thanks for any help.

    Read the article

  • FDs not closed in FUSE filesystem

    - by cor
    Hi, I have a problem while implementing a fuse filesystem in python. for now i just have a proxy filesystem, exactly like a mount --bind would be. But, any file created, opened, or read on my filesystem is not released (the corresponding FD is not closed) Here is an example : yume% ./ProxyFs.py `pwd`/test yume% cd test yume% ls mdr yume% echo test test yume% ls mdr test yume% ps auxwww | grep python cor 22822 0.0 0.0 43596 4696 ? Ssl 12:57 0:00 python ./ProxyFs.py /home/cor/esl/proxyfs/test cor 22873 0.0 0.0 6352 812 pts/1 S+ 12:58 0:00 grep python yume% ls -l /proc/22822/fd total 0 lrwx------ 1 cor cor 64 2010-05-27 12:58 0 - /dev/null lrwx------ 1 cor cor 64 2010-05-27 12:58 1 - /dev/null lrwx------ 1 cor cor 64 2010-05-27 12:58 2 - /dev/null lrwx------ 1 cor cor 64 2010-05-27 12:58 3 - /dev/fuse l-wx------ 1 cor cor 64 2010-05-27 12:58 4 - /home/cor/test/test yume% Does anyone have a solution to actually really close the fds of the file I use in my fs ? I'm pretty sure it's a mistake in the implementation of the open, read, write hooks but i'm stucked... Let me know if you need more details ! Thanks a lot Cor

    Read the article

  • Radio buttons change variable in JavaScript

    - by dmanexe
    I have two fields which calculate a total, but I have a radio button pair that determines a variable within the equation. Here's the radio button code: <input type="radio" name="estimate_pool_shape" value="1" /> Angle <input type="radio" name="estimate_pool_shape" value=".86392" /> Freeform Immediately after that, this JavaScript is then calculating the surface area of the pool based of these fields and script: (Length <input type="text" size="5" name="estimate_pool_length" onBlur="conv2inches(document.forms.mainform);" />) x (Width <input type="text" name="estimate_pool_width" size="5" onBlur="conv2inches(document.forms.mainform);" />) The following JavaScript already works to update the fields, I just need the variable it uses to set the field values to change based on the radio buttons. function conv2inches(mainform) { var oin; var oinches; if(isNaN(mainform.estimate_pool_width.value)||isNaN(mainform.estimate_pool_length.value)){ alert("Please enter numbers only"); return false; } oin = ((mainform.estimate_pool_width.value) + (mainform.estimate_pool_length.value) * %%%RADIO BUTTON VARIABLE HERE%%%); oinches = (oin); if(oinches==0){ alert("Please enter valid values into the boxes"); } mainform.estimate_pool_sqft.value = oinches; return false; }

    Read the article

  • Why cant Git merge file changes with a modified parent/master.

    - by Andy
    I have a file with one line in it. I create a branch and add a second line to the same file. Save and commit to the branch. I switch back to the master. And add a different, second line to the file. Save and commit to the master. So there's now 3 unique lines in total. If I now try and merge the branch back to the master, it suffers a merge conflict. Why cant Git simple merge each line, one after the other? My attempt at merge behaves something like this: PS D:\dev\testing\test1> git merge newbranch Auto-merging hello.txt CONFLICT (content): Merge conflict in hello.txt Automatic merge failed; fix conflicts and then commit the result. PS D:\dev\testing\test1> git diff diff --cc hello.txt index 726eeaf,e48d31a..0000000 --- a/hello.txt +++ b/hello.txt @@@ -1,2 -1,2 +1,6 @@@ This is the first line. - New line added by master. -Added a line in newbranch. ++<<<<<<< HEAD ++New line added by master. ++======= ++Added a line in newbranch. ++>>>>>>> newbranch Is there a way to make it slot lines in automatically, one after the other?

    Read the article

  • Android Signal 11 (SIGSEGV)

    - by Naturjoghurt
    I read many posts here and on other sites, but can not find the problem creating my Error: I use an AsyncTask because I want to easily manipulate the UI Thread before and after Execution. In doInBackground I create a ThreadPoolExecutor and execute Runnables. If I only execute 1 Runnable with the Executor, there is no Problem, but if I execute another Runnable I get following Error: 06-26 18:00:42.288: A/libc(25073): Fatal signal 11 (SIGSEGV) at 0x7f486162 (code=1), thread 25106 (pool-1-thread-2) 06-26 18:00:42.304: D/dalvikvm(25073): GC_CONCURRENT freed 119K, 2% free 8908K/9056K, paused 4ms+4ms, total 45ms 06-26 18:00:42.327: I/System.out(25073): In Check All with Prefix: a and Length: 4 06-26 18:00:42.390: I/DEBUG(126): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 06-26 18:00:42.390: I/DEBUG(126): Build fingerprint: 'google/yakju/maguro:4.2.2/JDQ39/573038:user/release-keys' 06-26 18:00:42.390: I/DEBUG(126): Revision: '9' 06-26 18:00:42.390: I/DEBUG(126): pid: 25073, tid: 25106, name: pool-1-thread-2 >>> de.uni_duesseldorf.cn.distributed_computing2 <<< 06-26 18:00:42.390: I/DEBUG(126): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 7f486162 ... 06-26 18:00:42.538: I/DEBUG(126): memory map around fault addr 7f486162: 06-26 18:00:42.538: I/DEBUG(126): 60292000-60391000 06-26 18:00:42.538: I/DEBUG(126): (no map for address) 06-26 18:00:42.538: I/DEBUG(126): bed14000-bed35000 [stack] I set up the ThreadPoolExecutor like this: // numberOfPackages: Number of Runnables to be executed public void initializeThreadPoolExecutor (int numberOfPackages) { int corePoolSize = Runtime.getRuntime().availableProcessors(); int maxPoolSize = numberOfPackages; long keepAliveTime = 60; final BlockingQueue workingQueue = new LinkedBlockingQueue(); executor = new ThreadPoolExecutor(corePoolSize, maxPoolSize, keepAliveTime, TimeUnit.SECONDS, workingQueue); } I have no clue, why it fails when starting the second Thread. Maybe Memory Leaks? Any Help appreciated. Thanks in Advance

    Read the article

  • Grails - ElasticSearch - QueryParsingException[[index] No query registered for [query]]; with elasticSearchHelper; JSON via curl works fine though

    - by v1p
    I have been working on a Grails project, clubbed with ElasticSearch ( v 20.6 ), with a custom build of elasticsearch-grails-plugin(to support geo_point indexing : v.20.6) have been trying to do a filtered Search, while using script_fields (to calculate distance). Following is Closure & the generated JSON from the GXContentBuilder : Closure records = Domain.search(searchType:'dfs_query_and_fetch'){ query { filtered = { query = { if(queryTxt){ query_string(query: queryTxt) }else{ match_all {} } } filter = { geo_distance = { distance = "${userDistance}km" "location"{ lat = latlon[0]?:0.00 lon = latlon[1]?:0.00 } } } } } script_fields = { distance = { script = "doc['location'].arcDistanceInKm($latlon)" } } fields = ["_source"] } GXContentBuilder generated query JSON : { "query": { "filtered": { "query": { "match_all": {} }, "filter": { "geo_distance": { "distance": "5km", "location": { "lat": "37.752258", "lon": "-121.949886" } } } } }, "script_fields": { "distance": { "script": "doc['location'].arcDistanceInKm(37.752258, -121.949886)" } }, "fields": ["_source"] } The JSON query, using curl-way, works perfectly fine. But when I try to execute it from Groovy Code, I mean with this : elasticSearchHelper.withElasticSearch { Client client -> def response = client.search(request).actionGet() } It throws following error : Failed to execute phase [dfs], total failure; shardFailures {[1][index][3]: SearchParseException[[index][3]: from[0],size[60]: Parse Failure [Failed to parse source [{"from":0,"size":60,"query_binary":"eyJxdWVyeSI6eyJmaWx0ZXJlZCI6eyJxdWVyeSI6eyJtYXRjaF9hbGwiOnt9fSwiZmlsdGVyIjp7Imdlb19kaXN0YW5jZSI6eyJkaXN0YW5jZSI6IjVrbSIsImNvbXBhbnkuYWRkcmVzcy5sb2NhdGlvbiI6eyJsYXQiOiIzNy43NTIyNTgiLCJsb24iOiItMTIxLjk0OTg4NiJ9fX19fSwic2NyaXB0X2ZpZWxkcyI6eyJkaXN0YW5jZSI6eyJzY3JpcHQiOiJkb2NbJ2NvbXBhbnkuYWRkcmVzcy5sb2NhdGlvbiddLmFyY0Rpc3RhbmNlSW5LbSgzNy43NTIyNTgsIC0xMjEuOTQ5ODg2KSJ9fSwiZmllbGRzIjpbIl9zb3VyY2UiXX0=","explain":true}]]]; nested: QueryParsingException[[index] No query registered for [query]]; } The above Closure works if I only use filtered = { ... } script_fields = { ... } but it doesn't return the calculated distance. Anyone had any similar problem ? Thanks in advance :) It's possible that I might have been dim to point out the obvious here :P

    Read the article

  • How can I perform this query between related tables without using UNION?

    - by jeremy
    Suppose I have two separate tables that I watch to query. Both of these tables has a relation with a third table. How can I query both tables with a single, non UNION based query? I want the result of the search to rank the results by comparing a field on each table. Here's a theoretical example. I have a User table. That User can have both CDs and books. I want to find all of that user's books and CDs with a single query matching a string ("awesome" in this example). A UNION based query might look like this: SELECT "book" AS model, name, ranking FROM book WHERE name LIKE 'Awesome%' UNION SELECT "cd" AS model, name, ranking FROM cd WHERE name LIKE 'Awesome%' ORDER BY ranking DESC How can I perform a query like this without the UNION? If I do a simple left join from User to Books and CDs, we end up with a total number of results equal to the number of matching cds timse the number of matching books. Is there a GROUP BY or some other way of writing the query to fix this?

    Read the article

  • Mgmt wants to re-title my position: Any help...? [closed]

    - by JohnFlyTN
    Management here wants to re-title my position, since I'm doing quite a bit of different work than was originally planned. They want my input. After a quick glance over my skill set and job duties, what would we need to describe this position as? I'll just list things I'm at least proficient in, I will not list things I have a passing knowledge of. About me : ~10 years software development. Languages : C, C++, Perl, PHP, C#, TCL, Unix shell scripting, SQL (TSQL, PLSQL) Systems : MS-Dos, Windows 3.1 to 7 for client, NT 4 to 2008 for server, OS/2, IBM MVS & z/OS, Linux ( multiple distros), AIX Current position: I do all sorts of in-house software. The range is single user apps to large systems spanning multiple OS's. One of the larger projects I've designed and coded is about 100k lines of C#, and a database where I have been the sole designer and maintainer. I have near total freedom to design as I see fit, restraints are usually budgetary. Skills required to replace me in my current role: Windows and Unix admin, Database design, .NET up to 3.5 (C#, ASP.NET), C++, Perl, good skills in designing large and efficient data processing systems. Given this small level of information what would you see this as being titled? (is more information required to render a decision?)

    Read the article

  • jQuery - Compatibility Problem with Internet Explorer 7 and Opera

    - by Marius
    Hello there, I have this counter which counts + 1 every time somebody shares content from the site. When it happens, the social icon that was clicked will bounce. It works in Firefox,Chrome, IE8, and Opera, however the bouncing animation is wrong in opera. $.fn.countExternal = function(animSpeed, num) { // for each counter this.each(function(){ // select all the digit containers var span = $(this).children(); // count the num of digit containers var len = $(span).length; // get the current count u = $(span).text(); // copy variable and add increment(s) v = num + ''; // foreach digit container... for (i=v.length - 1; i >= 0; i--) { // ...check which digits are not affected by the increment(s) if (v.charAt(i) == u.charAt(i)) { break; } } // slice from the total number of digit containers the digits containers which needs updating. slce = len - (v.length - (i + 1)) var updates = $(span).slice(slce); // loop through each digit container and fade out ... $(updates).fadeTo(animSpeed, 0,function(){ $(updates).each(function(index){ f = i + 1 + index; // ...then pick the right digit and update the digit... $(this).text(v.charAt(f)); // ...before fading back in. Cycle complete. $(this).fadeTo(animSpeed, 1); }); }); }); }; }) (jQuery); Demo (NSFW) is here (look underneath the social sharing icons). Any idea how I can solve the IE, and possibly the Opera compatibility problem? Thank you for your time.

    Read the article

  • Where to add an overloaded operator for the tr1::array?

    - by phlipsy
    Since I need to add an operator& for the std::tr1::array<bool, N> I wrote the following lines template<std::size_t N> std::tr1::array<bool, N> operator& (const std::tr1::array<bool, N>& a, const std::tr1::array<bool, N>& b) { std::tr1::array<bool, N> result; std::transform(a.begin(), a.end(), b.begin(), result.begin(), std::logical_and<bool>()); return result; } Now I don't know in which namespace I've to put this function. I considered the std namespace as a restricted area. Only total specialization and overloaded function templates are allowed to be added by the user. Putting it into the global namespace isn't "allowed" either in order to prevent pollution of the global namespace and clashes with other declarations. And finally putting this function into the namespace of the project doesn't work since the compiler won't find it there. What had I best do? I don't want to write a new array class putted into the project namespace. Because in this case the compiler would find the right namespace via argument dependent name lookup. Or is this the only possible way because writing a new operator for existing classes means extending their interfaces and this isn't allowed either for standard classes?

    Read the article

  • Cocoa button won't display image

    - by A Mann
    Just started exploring Cocoa so pretty much a total noob. I've written a very simple game. Set it up in Interface Builder and got it working fine. It contains a number of buttons and I'm now trying to get the buttons to display images. To start with I'm trying to get an image displayed on just one of the buttons which is called tile0 . The image file (it's nothing but a green square at the moment, but I'm just trying to get that working before I attempt anything more exotic) is sitting in the same directory as the class file which controls the game. I have the following code sitting in my wakeFromNib method: NSString *myImageFileName = [[NSString alloc] init]; myImageFileName = @"greenImage.jpg"; NSImage *myImage = [[NSImage alloc] initByReferencingFile:myImageFileName]; [tile0 setImage: myImage]; Trouble is, the game runs fine, but the image isn't appearing on my button. Is there someone who could kindly tell me if I'm doing something obviously wrong? Many Thanks.

    Read the article

  • Why does Eclipse skip lines when I debug JBoss?

    - by ZeKoU
    Hi, I am trying to debug web service call which uses JMS in the background.I have JBoss running in debug mode. What happens is that when I press F6 in Eclipse (to execute current line) it skips certain lines. I have this method: @Override public void log(MsgPayload payload) { 1 Date startTime = new Date(); logger.info("Publishing with BufferedPublisher.java start time:"+startTime); 3 publisher.send(payload); Date endTime = new Date(); logger.info("Publishing with BufferedPublisher.java end time:"+endTime); long mills = endTime.getTime()-endTime.getTime(); double secs = mills/1000.0; logger.info("Publishing with BufferedPublisher.java total time (seconds):"+secs); } So what happens? I have breakpoint at line 1. When I press F6 it skips that line and goes to line 3. When I press F6 again it goes to the end of the method. Half of the code is never executed..??? My question is why. I am assuming my source is not well attached to the real code that is being executed.But how do I change this? Thanks.

    Read the article

  • Design for fastest page download

    - by mexxican
    I have a file with millions of URLs/IPs and have to write a program to download the pages really fast. The connection rate should be at least 6000/s and file download speed at least 2000 with avg. 15kb file size. The network bandwidth is 1 Gbps. My approach so far has been: Creating 600 socket threads with each having 60 sockets and using WSAEventSelect to wait for data to read. As soon as a file download is complete, add that memory address(of the downloaded file) to a pipeline( a simple vector ) and fire another request. When the total download is more than 50Mb among all socket threads, write all the files downloaded to the disk and free the memory. So far, this approach has been not very successful with the rate at which I could hit not shooting beyond 2900 connections/s and downloaded data rate even less. Can somebody suggest an alternative approach which could give me better stats. Also I am working windows server 2008 machine with 8 Gig of memory. Also, do we need to hack the kernel so as we could use more threads and memory. Currently I can create a max. of 1500 threads and memory usage not going beyond 2 gigs [ which technically should be much more as this is a 64-bit machine ]. And IOCP is out of question as I have no experience in that so far and have to fix this application today. Thanks Guys!

    Read the article

  • Counting XML elements in file on Android

    - by CSharperWithJava
    Take a simple XML file formatted like this: <Lists> <List> <Note/> ... <Note/> </List> <List> <Note/> ... <Note/> </List> </Lists> Each node has some attributes that actually hold the data of the file. I need a very quick way to count the number of each type of element, (List and Note). Lists is simply the root and doesn't matter. I can do this with a simple string search or something similar, but I need to make this as fast as possible. Design Parameters: Must be in java (Android application). Must AVOID allocating memory as much as possible. Must return the total number of Note elements and the number of List elements in the file, regardless of location in file. Number of Lists will typically be small (1-4), and number of notes can potentially be very large (upwards of 1000, typically 100) per file. I look forward to your suggestions.

    Read the article

  • How do you convert an unsigned int[16] of hexidecimal to an unsigned char array without losing any information?

    - by user1068636
    I have a unsigned int[16] array that when printed out looks like this: 4418703544ED3F688AC208F53343AA59 The code used to print it out is this: for (i = 0; i < 16; i++) printf("%X", CipherBlock[i] / 16), printf("%X",CipherBlock[i] % 16); printf("\n"); I need to pass this unsigned int array "CipherBlock" into a decrypt() method that only takes unsigned char *. How do correctly memcpy everything from the "CipherBlock" array into an unsigned char array without losing information? My understanding is an unsigned int is 4 bytes and unsigned char 1 byte. Since "CipherBlock" is 16 unsigned integers, the total size in bytes = 16 * 4 = 64 bytes. Does this mean my unsigned char[] array needs to be 64 in length? If so, would the following work? unsigned char arr[64] = { '\0' }; memcpy(arr,CipherBlock,64); This does not seem to work. For some reason it only copies the the first byte of "CipherBlock" into "arr". The rest of "arr" is '\0' thereafter.

    Read the article

  • Modeling Buyers & Sellers in a Rails Ecommerce App

    - by MikeH
    I'm building a Rails app that has Etsy.com style functionality. In other words, it's like a mall. There are many buyers and many sellers. I'm torn about how to model the sellers. Key facts: There won't be many sellers. Perhaps less than 20 sellers in total. There will be many buyers. Hopefully many thousands :) I already have a standard user model in place with account creation and roles. I've created a 'role' of 'seller', which the admin will manually apply to the proper users. Since we'll have very few sellers, this is not an issue. I'm considering two approaches: (1) Create a 'store' model, which will contain all the relevant store information. Products would :belong_to :store, rather than belonging to the seller. The relationship between the user and store models would be: user :has_one store. My main problem with this is that I've always found has_one associations to be a little funky, and I usually try to avoid them. The app is fairly complex, and I'm worried about running into a cascade of problems connected to the has_one association as I get further along into development. (2) Simply include the relevant 'store' information as part of the user model. But in this case, the store-related db columns would only apply to a very small percentage of users since very few users will also be sellers. I'm not sure if this is a valid concern or not. It's very possible that I'm thinking about this incorrectly. I appreciate any thoughts. Thanks.

    Read the article

  • Run multiple MySQL queries based on a series of ifs

    - by OldWest
    I am just getting started on this complex query I need to write and was hoping for any suggestions or feedback regarding table structure and the actual query itself.. I've already created my tables and populated test data, and now just trying to sort out how and what is possible within MySQL. Here is an outline of the problem: End result: Listing of rates based on specific queried criteria (see below): Age: [ 27 ] Spouse Age: [ 25 ] Num of Children: [ 3 ] Zip Code: [ 97128 ] The problem I am running into is each company that provides rates has a unique way of dealing with the rate. And I am looking for the best approach for multiple queries based on the company (one query with results for each company more or less all combined into one result set). Here are some facts: - Each company deals with zip code ranges which assist in the query result. - Each company has a different method of calculating the rate based on the Applicant, Spouse, Num of Children: Example, a) Company A determines rate by: Applicant + Spouse + Child(ren) = rate (age is pertinent to the applicant within a range). b) Company B determines the rate by total number of applicants like: 1, 2, 3, 4, 5, 6+ = rate (and age is ignored). First off, what would I call this type of query? Multiple nested query? And should I intertwine php within it to determine the If()s ... I apologize if this thread lacks sufficient data, so please tell me anything you would like to see.

    Read the article

  • complex regular expression task

    - by Don Don
    Hi, What regular expressions do I need to extract section title(s) in a text file? So, in the following sample text, I'd like to extract "Communication and Leadership" "1.Self-Knowledge" "2. Humility" "(3) Clear Thinking". Many thanks. Communication and Leadership True leaders understand that, rather than forcing their followers into a preconceived mold, their job is to motivate and organize followers to collectively accomplish goals that are in everyone's interests. The ability to communicate this to co-workers and followers is critical to the effectiveness of leadership. 1.Self-Knowledge Superior leaders are able to devote their skills and energies to leadership of a group because they have worked through personal issues to the point where they know themselves thoroughly. A high level of self-knowledge is a prerequisite to effective communication skills, because the things that you communicate as a leader are coming from within. 2. Humility This subversion of personal preference requires a certain level of humility. Although popular definitions of leaders do not always see them as humble, the most effective leaders actually are. This humility may not be expressed in self-effacement, but in a total commitment to the goals of the organization. Humility requires an understanding of one's own relative unimportance in comparison to larger systems. (3) Clear Thinking Clarity of thinking translates into clarity of communication. A leader whose goals or personal analysis is muddled will tend to deliver unclear or ambiguous directions to followers, leading to confusion and dissatisfaction. A leader with a clear mind who is not ambivalent about her purposes will communicate what needs to be done in a s traightforward and unmistakable manner.

    Read the article

  • Cannot serialize this List<T> extension

    - by Jaxidian
    I'm trying to push a subset of a collection of data through WCF to be consumed by WCF - think paged data. As such, I want this collection to have one page's worth of data as well as a total number of results. I figured this should be trivial by creating a custom object that extends List. However, everything I do results in my TotalNumber property coming across as 0. All of the data gets serialized/deserialized just fine but that single integer won't come across at all. Here's my first attempt that failed: [Serializable] public class PartialList<T> : List<T> { public PartialList() { } public PartialList(IEnumerable<T> collection) : base(collection) { } [DataMember] public int UnpartialTotalCount { get; set; } And here's my second attempt that failed in the exact same way: [Serializable] public class PartialList<T> : List<T>, ISerializable { public PartialList() { } public PartialList(IEnumerable<T> collection) : base(collection) { } [DataMember] public int UnpartialTotalCount { get; set; } protected PartialList(SerializationInfo info, StreamingContext context) { UnpartialTotalCount = info.GetInt32("UnpartialTotalCount"); } public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("UnpartialTotalCount", UnpartialTotalCount); } } What's the deal here??

    Read the article

  • Defining and using controller methods in ember.js

    - by OriginalEXE
    first of all, I am total noob when it comes to OOP in JS, this is new to me so treat me like a noob. I am building my first ember.js application and I am stuck (not the first time but I would get unstuck by myself, this is a tough one though). I have two models: forms entries Entries is of course in (one to many) relationship to forms, so each form can have as many properties. Form properties: id : DS.attr( 'number' ), title : DS.attr( 'string' ), views : DS.attr( 'number' ), conversion : DS.attr( 'number' ), entries : DS.hasMany( 'entry' ) Entry properties: id : DS.attr( 'number' ), parent_id: DS.belongsTo( 'form' ) Now, I have forms route that displays all forms in tabled view, and each table row has some info like form id, name etc. and that works great. What I wanted to do is display the number of entries each form has. I figured I should do that via controller, so here is my controller now: // Form controller App.FormController = Ember.ObjectController.extend({ entriescount: function() { var entries = this.get( 'store').find( 'entry' ); return entries.filterBy( 'parent_id', this.get( 'id' ) ).get( 'length' ); }.property( '[email protected]_id') }); Now for some reason, when I use {{entriescount}} in {{#each}} loop, this returns nothing. It also returns nothing in single form route. Note that in both cases, {{title}} for example works. I am wondering, am I going the right way by using controller for this, and how do I get controller to output the data. Thanks

    Read the article

  • PHP sleep() excution sequence while echoeing.

    - by Babiker
    I have the following: echo time()."<br>"; sleep(1); echo time()."<br>"; sleep(1); echo time()."<br>"; I wrote the preceding code with intention to echo time()."<br>" ln 1,echo time()."<br>" ln 4, wait a final second and then echo the final time()."<br>". Altough the time bieng echoed is correct when it comes to the intervals between time(), all echo functions are echoeing after the total of the waiting period/parameters in each sleep function. This is how the script runs: Excutes. Waits 2 secons. echoes 1275540664 1275540665 1275540666 Notice the correct incrementation in time() being echoed. My question is why is it not behaving like expected to where it echoes, waits a second, echoes again, waits one final second and then echos the last parameter? I know my question is a little confusing due to my wording, but i will try my hardest to answer any comments regarding this, thanks.

    Read the article

  • Accessing and inheriting Windows Message for other Windows Message in Delphi

    - by HX_unbanned
    I am using WMSysCommand messages to modify Caption bar button ( Maximize / Minimize ) behaivor and recent update requiered to use WMNCHitTest, but I do not want to split these two related messages in multiplie procedures because of lengthy code. Can I access private declaration ( message ) from other message? And if I can - How to do it? procedure TForm1.WMNCHitTest(var Msg: TWMNCHitTest) ; begin SendMessage(Handle, HTCAPTION, WM_NCHitTest, 0); // or other wParam or lParam ???? end; procedure TForm1.WMSysCommand; begin if (Msg.CmdType = SC_MAXIMIZE or 61488) or (Msg.Result = htCaption or 2) then // if command is Maximize or reciever message of Caption Bar click begin if CheckWin32Version(6, 0) then Constraints.MaxHeight := 507 else Constraints.MaxHeight := 499; Constraints.MaxWidth := 0; end else if (Msg.CmdType = SC_MINIMIZE or 61472) or (Msg.Result = htCaption or 2) then // if command is Minimize begin if (EnsureRange(Width, 252, 510) >= (510 / 2)) then PreviewOpn.Caption := '<' else PreviewOpn.Caption := '>'; end; DefaultHandler(Msg); // reset Message handler to default ( Application ) end; Soo ... do I think correctly and sipmly do not know correct commands or I am thinking total bullsh*t? Regards. Thanks for any help...

    Read the article

< Previous Page | 194 195 196 197 198 199 200 201 202 203 204 205  | Next Page >