Search Results

Search found 14958 results on 599 pages for 'non technical'.

Page 49/599 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • "Socket operation on non-socket" error due to strange sytax

    - by Robert S. Barnes
    I ran across the error Socket operation on non-socket in some of my networking code when calling connect and spent a lot of time trying to figure out what was causing it. I finally figured out that the following line of code was causing the problem: if ((sockfd = socket( ai->ai_family, ai->ai_socktype, ai->ai_protocol) < 0)) { See the problem? Here's what the line should look like: if ((sockfd = socket( ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) { What I don't understand is why the first, incorrect line doesn't produce a warning. To put it another way, shouldn't the general form: if ( foo = bar() < baz ) do_somthing(); look odd to the compiler, especially running with g++ -Wall -Wextra? If not, shouldn't it at least show up as "bad style" to cppcheck, which I'm also running as part of my compile?

    Read the article

  • SQL returns non-array value in PHP

    - by DeadMG
    $request = 'SELECT * FROM flight WHERE Id = \''.$_SESSION['LFLightRadio'].'\''; $data = mysql_fetch_array(mysql_query($request, $SQL)); echo '<table class="table">'; foreach($data as $key => $value) { echo '<th class="head" align="center" height="19">'.$key.'</th>'; } echo '<tr>'; foreach($data as $key => $value) { echo '<td class="cell" align="center" height="19">'.$value.'</td>'; } echo '</tr></table>'; I know that the LFlightRadio value is set, and is a value returned by the Id value of a previously returned row from the flight database. So within "flight", a record definitely exists with this Id. But, this still gives me a non-array result, so that when I try to use foreach on it, it errors out. Suggestions?

    Read the article

  • Forcing a method to be non-transactional in JPA (Eclipselink)

    - by rhinds
    Hi, I am developing an application using Eclipselink and as part of the app I need to be able to manipulate some of the objects which involves changing data without it being persisted to the database (i merging/changing objects for some batch generation processes). I am reluctant to change the data in the Entity objects, as there is a risk that even though i have not marked the methods as @Transactional, this method could in the future be inadvertantly called from within a transactional method and these changes could be persisted. So my question is, is there anyway to get around this? Such as force a method to always be non-transactional regardless; terminate any transactionality as soon as the method is started; etc. I know there is a .detach() method that can detach the objects from the Entity Manager, however, there are many objects and this seems like a potentially error prone fail-safe on my code.

    Read the article

  • non-scalar type requested

    - by lego69
    can somebody please help me with an error conversion from `A' to non-scalar type `B' requested I have class A and derived from it B, but I have problems with these rows: A a(1); A *pb = new B(a); B b = *pb; //here I have an error thanks in advance for any help class A { protected: int player; public: A(int initPlayer = 0); A(const A&); A& operator=(const A&); virtual ~A(){}; virtual void foo(); void foo() const; operator int(); }; class B: public A { public: B(int initPlayer): A(initPlayer){}; ~B(){}; virtual void foo(); };

    Read the article

  • Non-object when adding code into html

    - by Luke
    Hello. I am getting the following error: Fatal error: Call to a member function error() on a non-object in /home/gamepla3/public_html/football/result.php on line 177 The line for this is <?php echo $form->error("homescore"); ?> I'm failing to see how this could be the case? The thing worked fine before I added working code into my html document so it looked better. Now I can't get it working?? EDIT. When the code is not within HTML, it works fine. Once I have it within the HTML, it throws back an error? Has anyone seen anything like this before?

    Read the article

  • trying to get property of non object curl issue

    - by user550265
    I have a curl setup as follows to access a json object $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://sitename.com"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookiefilename.txt'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host:sitename.com')); $output = curl_exec($ch); curl_close($ch); $output = json_decode($output); echo $output->property; I get the error 'trying to access property of non object'.

    Read the article

  • how to use a non standard tld with android

    - by CommentLuv
    I have rooted my android and am able to edit the hosts file to redirect .com and other standard tld's to my local server with no problems. non standard tld's do not work though. eg. my shop orders system is at http://fired.wok which works find on local machines when added to my windows and linux hosts files but is not resolvable from within my android device. I can use firedwok.co.uk) in the hosts file to point to my local machine but I'd much rather have fired.wok to work so I can use an android tablet to enter orders and deliveries. so, how to make android work with a tld like .wok ?

    Read the article

  • How to ORDER BY non-column field?

    - by Phil Bolduc
    I am trying to create an Entity SQL that is a union of two sub-queries. (SELECT VALUE DISTINCT ROW(e.ColumnA, e.ColumnB, 1 AS Rank) FROM Context.Entity AS E WHERE ...) UNION ALL (SELECT VALUE DISTINCT ROW(e.ColumnA, e.ColumnB, 2 AS Rank) FROM Context.Entity AS E WHERE ...) ORDER BY *??* LIMIT 50 I have tried: ORDER BY Rank and ORDER BY e.Rank but I keep getting: System.Data.EntitySqlException: The query syntax is not valid. Near keyword 'ORDER' I do not think it is a problem with the Rank column. I do think it is how I am trying to apply an order by to two different esql statements joined by union all. Could someone suggest: How to apply a ORDER BY to this kind of UNION/UNION ALL statment How to order by the non-entity column expression. Thanks.

    Read the article

  • Handle error at non-UI thread

    - by DreamTeam Mobile
    For some reason unhandled exception which occur at non-UI thread don't handled by App_UnhandledException handler. This approach works well for Windows Phone apps to globally handle, track and analyze exceptions but doesn't work for Windows 8 apps. this.UnhandledException += App_UnhandledException; //doesn't handle private void Button_Click_1(object sender, RoutedEventArgs e) { var task = new Task(() => { throw new NullReferenceException("Test exc in UI thread"); }); task.Start(); } Please, advise.

    Read the article

  • HTML5 video element non-seekable when using Django development server

    - by Ory Band
    Hey everyone. I've got a Django app serving a webpage with an HTML5 element. There's a wierd "feature", turning the video element to be non-seekable: video.seekable returns a timeRanges object with length=0, whereas it should be length=1. This means I can't edit the video. JavaScript can't do anything either. The thing is, when I upload the problematic webpage, statically - no Django, just plain HTML/JS/CSS - to my website for testing, it works fine - length=1. However, if I try to serve the same static page on my Django dev server still gives the same problem. I am using Django's static serving for dev/debug purposes - Do you have any idea what is causing this, or how can I fix it? Thanks.

    Read the article

  • how to revert non-corrupted mssql database with stopat

    - by Yisman
    i have a good, working valid non-corrupted database in mssql that i want to revert to a point in time how is that done? the standard RESTORE command requires a full backup as a starting point, and then log backups thereafter. i cant understand why this must be done from a backup. if my db is good and the logs are OK, why cant i just revert with a STOPAT from the live logs in the db? one dba suggested that whenever i want to restore i should THEN make a log backup and then RESTORE with STOPAT. i believe it would work but sounds a little backwards any better ideas? thank you very much

    Read the article

  • Mysql - Join matches and non-matches

    - by jwzk
    This is related to my other question: http://stackoverflow.com/questions/2579249/managing-foreign-keys I am trying to join the table of matches and non-matches. So I have a list of interests, a list of users, and a list of user interests. I want the query to return all interests, whether the user has the interest or not (should be null in that case), only where the user = x. Every time I get the query working its only matching interests that the user specifically has, instead of all interests whether they have it or not.

    Read the article

  • Warning of "Control may reach end of non-void function"

    - by Cloud_cal
    I ran a C++ program in Xcode, and encountered a warning of "Control may reach end of non-void function". Here is the code: Node* search(Node* head, int x) { if(!head) return NULL; else if(x == head->key) return head; else if(x < head->key) search(head->lchild, x); else search(head->rchild, x); } I got the same warning when compiling it in Linux, but got the correct result. But in Xcode, the result was wrong. By the way, I got the correct answer and no warning in Visual Studio.

    Read the article

  • Why does a non-constant offsetof expression work?

    - by Chris J. Kiick
    Why does this work: #include <sys/types.h> #include <stdio.h> #include <stddef.h> typedef struct x { int a; int b[128]; } x_t; int function(int i) { size_t a; a = offsetof(x_t, b[i]); return a; } int main(int argc, char **argv) { printf("%d\n", function(atoi(argv[1]))); } If I remember the definition of offsetof correctly, it's a compile time construct. Using 'i' as the array index results in a non-constant expression. I don't understand how the compiler can evaluate the expression at compile time. Why isn't this flagged as an error?

    Read the article

  • PHP Inotify Non-blocking way

    - by demic0de
    I am reading a file in linux which is a log file that keeps on updating weather the file has changed and output it to the webpage. i do it using php inotify but my problem is that it is blocking. How can i make php inotify non-blocking so i can do other stuff while it is monitoring the text file?. <?php $fd = inotify_init(); $watch_descriptor = inotify_add_watch($fd, '/tmp/temp.txt', IN_MODIFY); touch('/tmp/temp.txt'); $events = inotify_read($fd); $contents = file_get_contents('/tmp/temp.txt'); echo $contents; inotify_rm_watch($fd, $watch_descriptor); fclose($fd) ?> Or can i do this in java?..Thanks.

    Read the article

  • Non-empty list with null elements returned from Hibernate query

    - by John
    Hi, I'm new to hibernate so not sure if this is an expected behaviour, anyway: Session session = (Session)entityManager.getDelegate(); Criteria criteria = session.createCriteria(myRequest.class); criteria.add(Restrictions.eq("username", username)); criteria.setProjection(Projections.max("accesscount")); List<myRequest> results = criteria.list(); The returned results is a non-empty list with a single null element. I can't think of any reason why it should behave this way, any idea if this is the expected behaviour or have I done something wrong? System is on hibernate/Syabse. Thanks.

    Read the article

  • sIFR encoding the non-breaking space char - %20

    - by Jay Carroll
    Gotta be something I'm doing wrong when converting the ttf with OpensIFRr, but I'm seeing %20 chars for non-breaking spaces in all sIFR'd text. I'm using the jQuery sIFR plugin (3.04) with the following: <div><h1>My Example Text</h1></div> ... <script type="text/javascript"> <!-- var $j = jQuery; $j(document).ready(function(){ $j('h1').sifr({ path: '/fonts/', font: 'fancy_script' }); }); //--> </script> Happens no matter which font I use, TIA... -Jay

    Read the article

  • How should I Test a Genetic Algorithm

    - by James Brooks
    I have made a quite few genetic algorithms; they work (they find a reasonable solution quickly). But I have now discovered TDD. Is there a way to write a genetic algorithm (which relies heavily on random numbers) in a TDD way? To pose the question more generally, How do you test a non-deterministic method/function. Here is what I have thought of: Use a specific seed. Which wont help if I make a mistake in the code in the first place but will help finding bugs when refactoring. Use a known list of numbers. Similar to the above but I could follow the code through by hand (which would be very tedious). Use a constant number. At least I know what to expect. It would be good to ensure that a dice always reads 6 when RandomFloat(0,1) always returns 1. Try to move as much of the non-deterministic code out of the GA as possible. which seems silly as that is the core of it's purpose. Links to very good books on testing would be appreciated too.

    Read the article

  • Modelling Business Logic with NON-Techies

    - by cbmeeks
    The setup: Winform/ASP.NET MVC projects. Learning NHibernate SQL-Server driven apps I work with clients that have no idea how to model an application. That's what I'm for. However, we have lots of conflicts with validation, mis-understandings, etc. For example, the client will ask for an order entry screen. The screen should require a "product". That's fine and dandy. However, the client didn't know to tell me that the user can't order a product of "Class A" unless it's Tuesday. Or, they need a time entry screen. 2 days before it's rolled into production, they casually forgot to mention that certain activities are only valid for certain situations. These situations being a week of coding. That's of course, some crude examples (not by much!). But the problem is getting these non-technical clients to layout their business logic. They somehow didn't realize that the "Class A" problem would come up two weeks later, etc. I'm all for agile programming but is there an easy way to somehow make business logic like this extremely easy to implement and change on almost a daily basis? I of course am splitting the project into hopefully intelligent pieces, using NHibernate, etc. But making this BI logic so dynamic is really making it hard to project timelines, etc. Any suggestions? I know there will never be a perfect client (or a perfect provider) but how do you guys deal with the constant mis-understandings? Thanks.

    Read the article

  • Non-wiki CMS for an online user guide

    - by Russell Leggett
    For a large web application I'm building, I need to create an extensive user guide. The first thought was a wiki, but what I've seen lacks the ease of customization I've seen in CMSs, and has a lot of extra features I don't need. The number of users editing the document is small and closed, but it needs to be editable by non-technical users. The number of pages will likely be between 50-100. It also needs to be searchable. It would also be a plus if it had nice readable urls to link to from our web app. Right now, my best guess is WordPress, but that seems a lot more geared towards blogging with just a handful of pages, than having several pages, and possibly no blogs. There isn't a language requirement, although we have the most experience with Java and PHP. We aren't looking to have to do any major coding other than customizing for visuals, so hopefully the language will not be too important. Again, I'm not looking for the best general purpose CMS, just something that would be easiest for a user guide.

    Read the article

  • How to explain bad software to non-technical people?

    - by mtutty
    In discussing software development with non-technical people (customers, business owners, project sponsors, etc.), I often resort to analogies and metaphors. It's relatively easy and effective to use a "house" or other metaphor for describing the size and complexity of new development. However, we often inherit someone else's code or data, and this approach doesn't seem to hold up as well when trying to explain why we're gutting something that already seems to work. Of course we can point to cycle time and cost to be saved in the future but this generally means nothing to business folks. I know doctors can say "just take this pill," but I'm not sure that software devs have the same authority. Ideas? EDIT: Let me add a bit to the discussion. The specific project I'm talking about has customers that don't realize (or care) about specific aspects of the system we're retiring (i.e., they think it was just fine): The system would save a NEW RECORD every time someone updated a field The system contained tables for reference data. These tables had new records added every day, even though they were duplicates of previous records. And there was no way to tie the reference data used for a particular case at the time it was closed. This is like 99% of the data in the old system. The field NAMES also have spaces, apostrophes and other inappropriate characters in them, making everything harder to work with. In addition to the incredible amount of duplicate data, they have around 1000 XLS files with data they want added to the system. Previously, they would do a spreadsheet for each case in the database, IN ADDITION TO what they typed into the database. Getting rid of this old, unneeded information and piping in the XLS data comprises about 80% of the total project effort, and was not something we could accurately predict. I'm trying to find a concrete way to describe how bad this thing was, mostly so that the customer will understand why the migration process has been so time-consuming. The actual coding was done pretty quickly and the new system works fine, but without the old data they won't be happy. Sorry to get into the weeds, but most of the answers I've seen so far are pretty basic scope/schedule/cost things. I've been doing this for 15 years, so this really is more of a reflective, philosophical question - but without some of the details it can be difficult to really appreciate the awful beauty of this problem.

    Read the article

  • How can we unify business goals and technical goals?

    - by BAM
    Some background I work at a small startup: 4 devs, 1 designer, and 2 non-technical co-founders, one who provides funding, and the other who handles day-to-day management and sales. Our company produces mobile apps for target industries, and we've gotten a lot of lucky breaks lately. The outlook is good, and we're confident we can make this thing work. One reason is our product development team. Everyone on the team is passionate, driven, and has a great sense of what makes an awesome product. As a result, we've built some beautiful applications that we're all proud of. The other reason is the co-founders. Both have a brilliant business sense (one actually founded a multi-million dollar company already), and they have close ties in many of the industries we're trying to penetrate. Consequently, they've brought in some great business and continue to keep jobs in the pipeline. The problem The problem we can't seem to shake is how to bring these two awesome advantages together. On the business side, there is a huge pressure to deliver as fast as possible as much as possible, whereas on the development side there is pressure to take your time, come up with the right solution, and pay attention to all the details. Lately these two sides have been butting heads a lot. Developers are demanding quality while managers are demanding quantity. How can we handle this? Both sides are correct. We can't survive as a company if we build terrible applications, but we also can't survive if we don't sell enough. So how should we go about making compromises? Things we've done with little or no success: Work more (well, it did result in better quality and faster delivery, but the dev team has never been more stressed out before) Charge more (as a startup, we don't yet have the credibility to justify higher prices, so no one is willing to pay) Extend deadlines (if we charge the same, but take longer, we'll end up losing money) Things we've done with some success: Sacrifice pay to cut costs (everyone, from devs to management, is paid less than they could be making elsewhere. In return, however, we all have creative input and more flexibility and freedom, a typical startup trade off) Standardize project management (we recently started adhering to agile/scrum principles so we can base deadlines on actual velocity, not just arbitrary guesses) Hire more people (we used to have 2 developers and no designers, which really limited our bandwidth. However, as a startup we can only afford to hire a few extra people.) Is there anything we're missing or doing wrong? How is this handled at successful companies? Thanks in advance for any feedback :)

    Read the article

  • Delphi 2009 - Strip non alpha numeric from string

    - by Brad
    I've got the following code, and need to strip all non alpha numeric characters. It's not working in delphi 2009 ` unit Unit2; //Used information from // http://stackoverflow.com/questions/574603/what-is-the-fastest-way-of-stripping-non-alphanumeric-characters-from-a-string-in interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; Type TExplodeArray = Array Of String; TForm2 = class(TForm) Memo1: TMemo; ListBox1: TListBox; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } Function Explode ( Const cSeparator, vString : String ) : TExplodeArray; Function Implode ( Const cSeparator : String; Const cArray : TExplodeArray ) : String; Function StripHTML ( S : String ) : String; function allwords(data:string):integer; end; var Form2: TForm2; allword, allphrase: TExplodeArray; implementation {$R *.dfm} Function TForm2.StripHTML ( S : String ) : String; Var TagBegin, TagEnd, TagLength : Integer; Begin TagBegin := Pos ( '<', S ); // search position of first < While ( TagBegin > 0 ) Do Begin // while there is a < in S TagEnd := Pos ( '>', S ); // find the matching > TagLength := TagEnd - TagBegin + 1; Delete ( S, TagBegin, TagLength ); // delete the tag TagBegin := Pos ( '<', S ); // search for next < End; Result := S; // give the result End; Function TForm2.Implode ( Const cSeparator : String; Const cArray : TExplodeArray ) : String; Var i : Integer; Begin Result := ''; For i := 0 To Length ( cArray ) - 1 Do Begin Result := Result + cSeparator + cArray [i]; End; System.Delete ( Result, 1, Length ( cSeparator ) ); End; Function TForm2.Explode ( Const cSeparator, vString : String ) : TExplodeArray; Var i : Integer; S : String; Begin S := vString; SetLength ( Result, 0 ); i := 0; While Pos ( cSeparator, S ) 0 Do Begin SetLength ( Result, Length ( Result ) + 1 ); Result[i] := Copy ( S, 1, Pos ( cSeparator, S ) - 1 ); Inc ( i ); S := Copy ( S, Pos ( cSeparator, S ) + Length ( cSeparator ), Length ( S ) ); End; SetLength ( Result, Length ( Result ) + 1 ); Result[i] := Copy ( S, 1, Length ( S ) ); End; //Copied from JclStrings function StrKeepChars(const S: AnsiString; const Chars: TSysCharSet): AnsiString; var Source, Dest: PChar; begin SetLength(Result, Length(S)); UniqueString(Result); Source := PChar(S); Dest := PChar(Result); while (Source < nil) and (Source^ < #0) do begin if Source^ in Chars then begin Dest^ := Source^; Inc(Dest); end; Inc(Source); end; SetLength(Result, (Longint(Dest) - Longint(PChar(Result))) div SizeOf(AnsiChar)); end; function ReplaceNewlines(const AValue: string): string; var SrcPtr, DestPtr: PChar; begin SrcPtr := PChar(AValue); SetLength(Result, Length(AValue)); DestPtr := PChar(Result); while SrcPtr < {greater than less than} #0 do begin if (SrcPtr[0] = #13) and (SrcPtr[1] = #10) then begin DestPtr[0] := '\'; DestPtr[1] := 't'; Inc(SrcPtr); Inc(DestPtr); end else DestPtr[0] := SrcPtr[0]; Inc(SrcPtr); Inc(DestPtr); end; SetLength(Result, DestPtr - PChar(Result)); end; function StripNonAlphaNumeric(const AValue: string): string; var SrcPtr, DestPtr: PChar; begin SrcPtr := PChar(AValue); SetLength(Result, Length(AValue)); DestPtr := PChar(Result); while SrcPtr < #0 do begin if SrcPtr[0] in ['a'..'z', 'A'..'Z', '0'..'9'] then begin DestPtr[0] := SrcPtr[0]; Inc(DestPtr); end; Inc(SrcPtr); end; SetLength(Result, DestPtr - PChar(Result)); end; function TForm2.allwords(data:string):integer; var i:integer; begin listbox1.Items.add(data); data:= StripHTML ( data ); listbox1.Items.add(data); ////////////////////////////////////////////////////////////// data := StrKeepChars(data, ['A'..'Z', 'a'..'z', '0'..'9']); // Strips out everything data comes back blank in Delphi 2009 ////////////////////////////////////////////////////////////// listbox1.Items.add(data); data := stringreplace(data,' ',' ', [rfReplaceAll, rfIgnoreCase] ); //Replace two spaces with one. listbox1.Items.add(data); allword:= explode(' ',data); { // Converting the following PHP code to Delphi $text = ereg_replace("[^[:alnum:]]", " ", $text); while(strpos($text,' ')!==false) $text = ereg_replace(" ", " ", $text); $text=$string=strtolower($text); $text=explode(" ",$text); return count($text); } for I := 0 to Length(allword) - 1 do listbox1.Items.Add(allword[i]); end; procedure TForm2.Button1Click(Sender: TObject); begin //[^[:alnum:]] allwords(memo1.Text); end; end. ` How else would I go about doing this? Thanks

    Read the article

  • How much one can trust the information published in the wikipedia? [closed]

    - by AKN
    Wikipedia has answers for many question almost in all categories. Let it be Technical Sports Personalities Important events (this day, that day) Scientific terms etc... I know the source of contents are from volunteers (Please correct me if I'm wrong here). But what measures they have to ensure that contents are properly written. Even if they have admin/moderator and all that, they may not be experts in all areas. So how do they validate the appropriateness of the content?

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >