Search Results

Search found 27946 results on 1118 pages for 'output buffer empty'.

Page 82/1118 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • PHP Image content type problem

    - by Mirko
    Hi everybody, I have a specific problem, and cant get over it. For my latest project I need a simple PHP script that display an image according to its ID sent through URL. Here's the code: header("Content-type: image/jpeg"); $img = $_GET["img"]; echo file_get_contents("http://www.somesite.hr/images/$img"); The problem is that the image doesn't show although the browser recognizes it (i can see it in the page title), instead I get the image URL printed out. It doesn't work neither on a server with remote access allowed nor with one without. Also, nothing is printed or echoed before the header. I wonder if it is a content type error, or something else. Thanks in advance.

    Read the article

  • How do I replace NOT EXISTS with JOIN?

    - by YelizavetaYR
    I've got the following query: select distinct a.id, a.name from Employee a join Dependencies b on a.id = b.eid where not exists ( select * from Dependencies d where b.id = d.id and d.name = 'Apple' ) and exists ( select * from Dependencies c where b.id = c.id and c.name = 'Orange' ); I have two tables, relatively simple. The first Employee has an id column and a name column The second table Dependencies has 3 column, an id, an eid (employee id to link) and names (apple, orange etc). the data looks like this Employee table looks like this id | name ----------- 1 | Pat 2 | Tom 3 | Rob 4 | Sam Dependencies id | eid | Name -------------------- 1 | 1 | Orange 2 | 1 | Apple 3 | 2 | Strawberry 4 | 2 | Apple 5 | 3 | Orange 6 | 3 | Banana As you can see Pat has both Orange and Apple and he needs to be excluded and it has to be via joins and i can't seem to get it to work. Ultimately the data should only return Rob

    Read the article

  • Problem with dynamically added script element - attribute src is empty

    - by Stazh
    Hi there, I have a problem with dynamically added script element (using jQuery). Code for adding new script element to DOM is this: var pScript = document.createElement("script"); pScript.type = "text/javascript"; pScript.src = sFile; // Add element to the end of head element $("head").append(pScript); The script is added with no problem, and the code runs perfectly. But, the problem occurs when I try to find the newly added script. I use this code to iterate through all script elements: var bAdd = true; $("script").each(function() { if(this.src == sFile) bAdd = false; }); (I need this code to prevent adding script that is already loaded) Problem is that all other script elements have src attribute set, but the newly added (dynamically) has not... Any idea?

    Read the article

  • empty sharepoint user profile property throw an exception

    - by James123
    I have a user profile property. user not assigned any value that property. If I use below code. It is thorwing exception " object reference not set to an instance of an object " userprof["OptOut"].ToString() I tried all types like if (userprof["OptOut"] != null) OR if(userprof["OptOut"].Value != null) nothing worked out for me. Here userProf object has value. userprof["OptOut"].Value is null How to handle this?

    Read the article

  • Checking an empty Core Data relationship (SQLite)

    - by rwat
    I have a to-many relationship in my data model, and I'd like to get all the objects that have no corresponding objects in the relationship. For example: Customer - Purchases I want to get all Customers that have 0 Purchases. I've read somewhere that I could use "Purchases[SIZE] = 0", but this gives me an unsupported function expression error, which I think means it doesn't work with a SQLite backing store (which I don't want to switch from, due to some performance constraints). Any ideas?

    Read the article

  • mysql insert and buffers, is this possible

    - by Grumpy
    how is this possible first i do insert into table2 select * from table1 where table1.id=1 ( 50k records should be moved 6 indexes has to be updated ) second delete from table1 where id=1 ( 50k records are removed ) How is it possible that only 45k of records are moved? Im scratching my head over this and cant find a right answer Is it possible that the insert is still active and delete already started

    Read the article

  • get_post_meta return empty string

    - by Jean-philippe Emond
    I guest it is a little issues but I running a SQL to get some post id. $result = $wpdb->get_results("SELECT wppm.post_id FROM wp_postmeta wppm INNER JOIN wp_posts wpp ON wppm.post_id=wpp.ID WHERE wppm.meta_key LIKE 'activity'"); (count: 302) After that, I get all id and I run get_post_meta like that: foreach($result as $id){ $activity = get_post_meta($id); var_dump($activity); foreach($activity as $key=>$value){ if(is_array($value) && $key=="age"){ var_dump($value); } } } (var_dump result: string "") samething if I run with: $activity = get_post_meta($id,'activity',true); Where we need to get a result. What is wrong? Thank you for your help!!! [Bonus Question] If the "activity" meta_key as an array Value. and I get directly like: $result = $wpdb->get_results("SELECT wppm.meta_value FROM wp_postmeta wppm INNER JOIN wp_posts wpp ON wppm.post_id=wpp.ID WHERE wppm.meta_key LIKE 'activity'"); How I parse it? Thanks again!

    Read the article

  • Why is this c++ string concatenation missing a space?

    - by danutenshu
    I am working with c++ strings, and am a beginner at programming. I am expecting: 99 Red Balloons But I am receiving: 99 RedBalloons Why is that? #include <string> #include <iostream> using namespace std; int main() { string text = "9"; string term( "9 "); string info = "Toys"; string color; char hue[4] = {'R','e','d','\0'}; color = hue; info = "Balloons"; text += (term + color + info); cout << endl << text << endl; return 0; }

    Read the article

  • Clean way to assign value unless empty

    - by atmorell
    Hello, I often need to assign a variable, if the source value is set. So far I have done it like this: filters[:red] = params[:search][:red] unless params[:search][:red].nil? This works but looks a bit clumsy. There must be a more DRY way of getting this result. Any suggestions? Best regards. Asbjørn Morell.

    Read the article

  • The post->success->data variable is empty..

    - by Asaf
    Hello, I tried sending some data like so: <form action="http://www.someurl.com/something.php" id="login"> <input type="textbox" id="UserName" value="user"> <input type="textbox" id="Password" value="password"> <input type="submit" value="submit"> </form> <div id="result"></div> <script type="text/javascript"> $('form#login').submit(function() { $.post($('form#login').attr('action'), $('form#login').serialize(), function(data) { $('#result').html(data+'222') }); return false; }); </script> Now, the value of #result div change to 222... that is: the post was successful but for some reason there is no data, and when I go directly to something.php and post manually, it does bring back data (am I mistaken or does the post(success(data)) variable returns the whole page returned after you post something? if so, how could it be?) Thank you very much for your help

    Read the article

  • emacs/Python: running python-shell in line buffered vs. block buffered mode

    - by Begbie00
    Hi all - In a related question and answer here, someone hypothesized that python-shell within emacs(23.2) was block-buffered instead of line-buffered. The recommended fix was to add sys.stdout.flush() to the spot in my script where I want stdio to flush its contents to the python-shell. Is there someway to trick python-shell (running in emacs 23.2 on Windows, not Linux) into either a) thinking it's attached to a TTY or b) using line-buffered instead of block-buffered mode? I don't see why I'd be able to do this in IDLE but not emacs. I'd rather customize emacs than add sys.stdout.flush() throughout my scripts. Call me lazy :-). Thanks, Mike

    Read the article

  • PHP explode and set to empty string the missing pieces

    - by Marco Demaio
    What's the best way to accomplish the following. I have strings in this format: $s1 = "name1|type1"; //(pipe is the separator) $s2 = "name2|type2"; $s3 = "name3"; //(in some of them type can be missing) Let's assume namen/typen are strings and they can not contain a pipe. Since I need to exctract the name/type separetly, I do: $temp = explode($s1, '|'); $name = $temp[0]; $type = ( isset($temp[1]) ? $temp[1] : '' ); Is there an easier (smarter whatever faster) way to do this without having to do isset($temp[1]) or count($temp). Thanks!

    Read the article

  • How to return output from .Net Dll to the calling Application

    - by sachin
    I have to create one VB.Net Dll for VB.Net Application.In DLL there will be function to calculate the fee based on some parameter which I pass when call the function from appllication, output of calculated fee would be this type **Validations are not selected. Rate information: IN:11/14/20113:12:38 PM; OUT:11/15/20113:12:38 PM; Fee:3; Description:$3 Fixed IN:11/14/20113:12:38 PM; OUT:11/15/20113:12:38 PM; Fee:1; Description:$1 Fixed Sub Total: IN: 11/14/20113:12:38 PM; OUT: 11/15/20113:12:38 PM; Fee:4; Description: Rate Group1 Rate information: IN:11/14/20113:12:38 PM; OUT:11/15/20113:12:38 PM; Fee:3; Description:$3 Fixed Sub Total: IN: 11/14/20113:12:38 PM; OUT: 11/15/20113:12:38 PM; Fee:3; Description: Rate Group1** Can anybody tell me how can I return output of this type to the application ,so that I can use it in that application.

    Read the article

  • Mimic Coldfusion's debug output in PHP?

    - by TekiusFanatikus
    I'm trying to mimic Coldfusion's debug output in PHP. Here's an example of what it looks like (ie. Execution Time section): I've turned to XDebug. Ideally, the exception stack error output would be what I'd be looking for. However, it only shows up when an exception occurs. I also tried something like (in our CMS-ish app) this (original question here): $content.= "<?php xdebug_start_trace('e:/xdebug/trace');?>"; $content.= "<?php require('".$page['file_'.LG]."'); ?>"; $content.= "<?php xdebug_stop_trace();?>"; ... $content.= "<?php echo readfile('e:/xdebug/trace.xt');?>"; However, I get an insane, browser crashing HTML table dropped at the bottom of page. Not very efficient. My php.ini config: xdebug.trace_format = 2 xdebug.collect_vars = 1 xdebug.collect_params = 4 xdebug.dump_globals = 1 xdebug.dump.SERVER = 'REQUEST_URI' xdebug.show_local_vars = 1 xdebug.show_mem_delta = 1 I'm just wondering if someone has already done something similar?

    Read the article

  • Disable MSBuild output of "Processing /ORDER options..."

    - by Jippers
    The output file from our project build has gone from 6MB to over 75MB in text. Diff'ing the last good build and the first time it blew up, there's a section in the output file like this in the latest: Processing /ORDER options External code objects not listed in the /ORDER file: ?onCallDisconnected@CallStateConnected@CallImpl@space@@UAEXV?$shared_ptr@VCallImpl@space@@@boost@@V?$shared_ptr@VGenericCall@space@@@5@K@Z ; framework.lib(CallStates.obj) ??_DBoolSetting@space@@QAEXXZ ; framework.lib(SettingValueImpl.obj) ...... continues for ~50MB ??$?0U?$pair@$$CBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@J@std@@@?$allocator@U_Node@?$_Tree_nod@V?$_Tmap_traits@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@JU?$less@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@J@std@@@2@$0A@@std@@@std@@@std@@QAE@ABV?$allocator@U?$pair@$$CBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@J@std@@@1@@Z ; CallStatistics.obj Finished processing /ORDER options I'm not sure how this got in there, but anyone know how to turn it off?

    Read the article

  • Jquery get links where id is empty

    - by gulbaek
    Hi I need to change the font color on the first link. <a href="/default.aspx" class="content">Frontpage</a> <a href="/default.aspx" class="content" id="product_randomnumber_link">Frontpage</a> But I just can't figure out a way to only select the first a.

    Read the article

  • OpenGL ES Polygon with Normals rendering (Note the 'ES!')

    - by MarqueIV
    Ok... imagine I have a relatively simple solid that has six distinct normals but actually has close to 48 faces (8 faces per direction) and there are a LOT of shared vertices between faces. What's the most efficient way to render that in OpenGL? I know I can place the vertices in an array, then use an index array to render them, but I have to keep breaking my rendering steps down to change the normals (i.e. set normal 1... render 8 faces... set normal 2... render 8 faces, etc.) Because of that I have to maintain an array of index arrays... one for each normal! Not good! The other way I can do it is to use separate normal and vertex arrays (or even interleave them) but that means I need to have a one-to-one ratio for normals to vertices and that means the normals would be duplicated 8 times more than they need to be! On something with a spherical or even curved surface, every normal most likely is different, but for this, it really seems like a waste of memory. In a perfect world I'd like to have my vertex and normal arrays have different lengths, then when I go to draw my triangles or quads To specify the index to each array for that vertex. Now the OBJ file format lets you specify exactly that... a vertex array and a normal array of different lengths, then when you specify the face you are rendering, you specify a vertex and a normal index (as well as a UV coord if you are using textures too) which seems like the perfect solution! 48 vertices but only 8 normals, then pairs of indexes defining the shapes' faces. But I'm not sure how to render that in OpenGL ES (again, note the 'ES'.) Currently I have to 'denormalize' (sorry for the SQL pun there) the normals back to a 1-to-1 with the vertex array, then render. Just wastes memory to me. Anyone help? I hope I'm missing something very simple here. Mark

    Read the article

  • Write to a binary file?

    - by rick irby
    Here is data structure w/ variables: struct Part_record { char id_no[3]; int qoh; string desc; double price: }; --- (Using "cin" to input data) --- Part_record null_part = {" ", 0," ",0.0}; --- --- file.seekg( -(long)sizeof(Part_record), ios::cur); file.write( ( char *)&part, sizeof(Part_record) ); The three variables, qoh, Id_no & price, write out correctly, but the "desc" variable is not right. Do I need to initialize Part_record some other way? It should be 20 characters in length. If you have enough info here, pls share your advice,thanks.

    Read the article

  • How do I validate that a list box is not empty (client side)

    - by chris
    I'm working with ASP.NET 3.5. I have a list box that users must add items to (I've written the code for this). My requirement is that at least one item must be added to the listbox or they cannot submit the form. I have several other validators on the page and they all write to a ValidationSummary control. I would like this listbox validation to write to the Validation Summary control as well. Any help is greatly appreciated. Thank you.

    Read the article

  • How to read and write a STL C++ string?

    - by cambr
    #include<string> ... string in; //How do I store a string from stdin to in? // //gets(in) - 16 cannot convert `std::string' to `char*' for argument `1' to //char* gets (char*)' // //scanf("%s",in) also gives some weird error Similarly, how do I write out in to stdout or to a file??

    Read the article

  • Why initialize an object to empty

    - by ProgEnthu
    I am learning windows programming with the help of MSDN.Why would somebody initialize an object like the following? WNDCLASS wc = { }; Will this zero all the memory of the object? Whole source code is following: #ifndef UNICODE #define UNICODE #endif #include <windows.h> LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow) { // Register the window class. const wchar_t CLASS_NAME[] = L"Sample Window Class"; WNDCLASS wc = { }; wc.lpfnWndProc = WindowProc; wc.hInstance = hInstance; wc.lpszClassName = CLASS_NAME; RegisterClass(&wc); // Create the window. HWND hwnd = CreateWindowEx( 0, // Optional window styles. CLASS_NAME, // Window class L"Learn to Program Windows", // Window text WS_OVERLAPPEDWINDOW, // Window style // Size and position CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, // Parent window NULL, // Menu hInstance, // Instance handle NULL // Additional application data ); if (hwnd == NULL) { return 0; } ShowWindow(hwnd, nCmdShow); // Run the message loop. MSG msg = { }; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return 0; } LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_DESTROY: PostQuitMessage(0); return 0; case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1)); EndPaint(hwnd, &ps); } return 0; } return DefWindowProc(hwnd, uMsg, wParam, lParam); }

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >