Search Results

Search found 15621 results on 625 pages for 'creating'.

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

  • Creating a Variable From Two Others

    - by John
    Hello, In the HTML table below, I would like to add a third column that equals $row["countSubmissions"] times 10 plus $row["countComments"]. How could I do this? Thanks in advance, John $sqlStr = "SELECT l.loginid, l.username, COALESCE(s.total, 0) AS countSubmissions, COALESCE(c.total, 0) AS countComments FROM login l LEFT JOIN ( SELECT loginid, COUNT(1) AS total FROM submission GROUP BY loginid ) s ON l.loginid = s.loginid LEFT JOIN ( SELECT loginid, COUNT(1) AS total FROM comment GROUP BY loginid ) c ON l.loginid = c.loginid GROUP BY l.loginid ORDER BY countSubmissions DESC LIMIT 10"; $result = mysql_query($sqlStr); $arr = array(); echo "<table class=\"samplesrec1edit\">"; while ($row = mysql_fetch_array($result)) { echo '<tr>'; echo '<td class="sitename1edit1"><a href="http://www...com/.../members/index.php?profile='.$row["username"].'">'.stripslashes($row["username"]).'</a></td>'; echo '<td class="sitename1edit2">'.stripslashes($row["countSubmissions"]).'</td>'; echo '<td class="sitename1edit2">'.stripslashes($row["countComments"]).'</td>'; echo '</tr>'; } echo "</table>";

    Read the article

  • Creating a new log file each day in C#

    - by Jason T.
    As the title implies how can I create a new log file each day in C#? Now the program may not necessarily run all day and night but only get invoked during business hours. So I need to do two things. 1) How can I create a new log file each day? The log file will be have the name in a format like MMDDYYYY.txt 2) How can I create it just after midnight in case it is running into all hours of the night?

    Read the article

  • Creating temporary tables in MySQL Stored Procedure

    - by burntblark
    The following procedure gives me an error when I invoke it using the CALL statement: CREATE DEFINER=`user`@`localhost` PROCEDURE `emp_performance`(id VARCHAR(10)) BEGIN DROP TABLE IF EXISTS performance; CREATE TABLE performance AS SELECT time_in, time_out, day FROM attendance WHERE employee_id = id; END The error says "Unknown table 'performance' ". This is my first time actually using stored procedures and I got my sources from Google. I just cant figure out what I am doing wrong.

    Read the article

  • PHP Zip Archive sporadically creating multiple files

    - by user516558
    I have a PHP script (running PHP 5.2 on Apache 2.2) that creates a zip archive of files for a user to download. Everything seems to work just fine; the only issue I have is that periodically multiple files will be created before the ZIP archive is successfully finished. Example: archive-name.zip archive-name.zip.a09600 archive-name.zip.b09600 archive-name.zip.c09600 This does not happen every single time; only periodically - the file is still created but sometimes these extra 'files' are left on the server after it finishes. The code that creates the ZIP archive is as follows: $zip_archive = new ZipArchive(); $zip_archive->open($archiveFullName,ZIPARCHIVE::CREATE); if(!file_exists($archiveFullName)) { foreach ($completed_file_arr as $zip_file) { $isFiller = substr($zip_file,-8) == "_err.txt"; if(!$isFiller) { $zip_archive->addFile($zip_file,$localname); } else $zip_archive->addFromString ($zip_file, "The requested source file could not be found."); } } while(!$zip_archive->close()) sleep(1); //ensure that the ZIP file finishes closing

    Read the article

  • Creating temporary user accounts - Django

    - by RadiantHex
    Hi folks, I need to setup temporary User models for each visitors, where the visitors are obviously tied by session data. I might not be aware of it, but does Django support attaching data to Anonymous users? The only way, I am currently aware of, is to use the session dictionary part of the request object. Help would be very much appreciated!

    Read the article

  • Exception thrown when creating database

    - by Bob
    For some reason, I can't get embedded firebird sql to work on Windows using C#/.NET. Here's my code: string BuildConnectionString() { FbConnectionStringBuilder builder = new FbConnectionStringBuilder(); builder.DataSource = "localhost"; builder.UserID = "SYSDBA"; builder.Password = "masterkey"; builder.Database = "database.fdb"; builder.ServerType = FbServerType.Embedded; return builder.ConnectionString; } private void OnConnectClicked(object sender, EventArgs e) { string cString = BuildConnectionString(); FbConnection.CreateDatabase( cString ); FbConnection connection = new FbConnection( cString ); connection.Open(); //CreateTable(); //FillListView(); connection.Close(); } When I call FbConnection.CreateDatabase, I get the following exception: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) I'm very new to SQL and Firebird in general, so I'm not sure how to resolve this issue. Anyone?

    Read the article

  • Creating Simple desktop database application

    - by KoolKabin
    Hi guys, I am here to write a small database application that will be running in desktop (offline mode). I am using MSAccess 2007 as my database file and trying to write code in vb.net. I used to write the code vb6 an usually had global variables for storing database connection and executing every query from that. I am trying to upgrade myself from vb6 to vb.net. do i need to read some more simple starter books also?

    Read the article

  • Creating array from two arrays

    - by binoculars
    I'm having troubles trying to create a certain array. Basicly, I have an array like this: [0] => Array ( [id] => 12341241 [type] => "Blue" ) [1] => Array ( [id] => 52454235 [type] => "Blue" ) [2] => Array ( [id] => 848437437 [type] => "Blue" ) [3] => Array ( [id] => 387372723 [type] => "Blue" ) [4] => Array ( [id] => 73732623 [type] => "Blue" ) ... Next, I have an array like this: [0] => Array ( [id] => 34141 [type] => "Red" ) [1] => Array ( [id] => 253532 [type] => "Red" ) [2] => Array ( [id] => 94274 [type] => "Red" ) I want to construct an array, which is a combination of the two above, using this rule: after 3 Blues, there must be a Red: Blue1 Blue2 Blue3 Red1 Blue4 Blue5 Blue6 Red2 Blue7 Blue8 Blue9 Red3 Note that the their can be more Red's than Blue's, but also more Blue's than Red's. If the Red's run out, it should begin with the first one again. Example: let's say there are only two Red's: Blue1 Blue2 Blue3 Red1 Blue4 Blue5 Blue6 Red2 Blue7 Blue8 Blue9 Red1 ... ... If the Blue's run out, the Red's should append until they run out too. Example: let's say there are 5 Blue's, and 5 Red's: Blue1 Blue2 Blue3 Red1 Blue4 Blue5 Red2 Red3 Red4 Red5 Note: the arrays come from mysql-fetches. Maybe it's better to fetch them while building the new array? Anyway, the while-loops got to me, I can't figure it out... Any help is much appreciated!

    Read the article

  • Creating WebService test harness

    - by user232337
    Hello, I am trying to create a test harness for our QA staff to test our internal web services. I would like to create a web app that will allow them to enter a uri then submit. The web app will then interrogate the uri to get the appropriate parameters expected and returns with a generated input form. I know, this would be similar to SOAPUI and others. However, I feel it would be earier for them to be able to just use a form with entry fields and click a button to invoke the service and get the results back for display in the web app. In addition, I could create some custom logic that allows them to generate specific behavior they need. Has anybody done anything like this? I have searched and have found similar functionality but nothing close enough to help me. If you need more details please let me know. Any help would be greatly appreciated. Thanks in advance! Ryan

    Read the article

  • Creating many native GUI frontends for a cross-platform application

    - by Hugh Young
    I've been away from GUI programming for quite some time so please pardon my ignorance. I would like to attempt the following: Write a Mac OSX app but still be able to port to Win/Linux (i.e. C++ core with Obj-C GUI) Avoid Qt/other toolkits on OSX (i.e. talk to Cocoa directly - I feel that many Qt apps I use stick out like sore thumbs compared to the rest of my system) Not as important, but it would be nice to avoid Visual Studio if it means I can have the freedom to use newer C++ features even on Windows if they help create better code. I believe this configuration might get me what I'm looking for: Core C++ Static Library OSX GUI (Cocoa) Windows GUI (Qt+MinGW?) OR (no new C++ features, Visual Studio + ManagedC++/C#/????) Linux GUI (Qt) Once again, sorry for my ignorance but is this possible? Is this sane? Are there any real-world open source examples accomplish something like this?

    Read the article

  • Creating a Doctrine query with a different number of ids

    - by frapet
    Is it possible to create a Doctrine query with a differnt number of ids coming from a submitted form? And if yes how? What I am trying to do is this: .... if ($input->isValid()) { $q = Doctrine_Query::create() ->from('Imm_Model_Images i') ->whereIn('i.ImageID = ?', array($input->ids)); $result = $q->fetchArray(); PS: ids come form the submitted form in an array as ids[]. Added Edit: chaged the above line: ->whereIn('i.ImageID = ?', array($input->ids)); with: ->whereIn('i.ImageID = array($input->ids)'); ...and it seems to work.

    Read the article

  • Problem with php GD image not creating

    - by ThinkingInBits
    With the following code, my browser is returning 'image not created or saved'. I assure you the location of the image exists. So the line within the if statement is returning false for some reason, and yes GD is installed. Any ideas? if ($img = @imagecreatefromjpeg("/var/www/images/upload/1/1.jpg")) { $image_width = imagesx($img); $image_height = imagesy($img); $target_width = 150; $target_height = 150; if ($image_width > $image_height) { $percentage = ($target_width / $image_width); } else { $percentage = ($target_height / $image_height); } $new_image_width = round($image_width * $percentage); $new_image_height = round($image_height * $percentage); $imgResized = imagecreatetruecolor($new_image_width, $new_image_height); imagecopyresampled($imgResized, $img, 0, 0, 0, 0, $new_image_width, $new_image_height, $image_width, $image_height); imagejpeg($imgResized, $this->path, 100); imagedestroy($img); imagedestroy($imgResized); $this->storeThumbnailLocation(); } else { die ("image was not created or saved"); }

    Read the article

  • Creating Pages with unique PageMaps

    - by Michael Krauklis
    I have a wicket Application that has long lived Pages. I would like each instance of this Page to be created with a unique PageMap for reasons I won't get into here, but when I try to specify a PageMap on the constructor of my Page I end up getting OOM and StackOverflow errors. Here is the code: public <CTOR>() { super(Session.get().newPageMap("" + System.currentTimeMillis())); ... I'm using a custom BookmarkablePageLink (custom in that it does not pass on the current PageMap name to the new Page) to effectively abandon the old Page/PageMap and create a new one with a new PageMap. The errors seem to be coming from page serialization after only two or three pages have been created. Can anyone find issue with this approach?

    Read the article

  • Windows [C++] - Creating new folders if they don't exist for fopen

    - by Gbps
    I have a C++ program that takes user input for fopen in order to initiate a file write. Could someone help me find a function which will return a FILE* and use the Windows specific version of mkdir in order to create the folder structure for fopen to never fail to open a new file in the specified location because one of the folders does not exist. Thanks a bunch!

    Read the article

  • C++ - Creating folder method

    - by Matthew
    I have the following method in C++: void create_folder(LPCWSTR full_folder) //Method to create folder in case it does not exist { if(!CreateDirectory(full_folder,attr)) //Checking whether the folder already exists { switch (GetLastError()) { case ERROR_ALREADY_EXISTS: printf("The folder already exists!\n\n"); break; case NULL: printf("The folder does not exist!\n\n"); printf("The folder was created successfully!\n\n"); break; } } } In case the folder already exists, the correct message is displayed on the screen. However, if the folder does NOT exist, nothing is displayed on the screen, that is, the part identified by case NULL is not executed. How can I solve this problem? In other words, how can I get the code after the case NULL to run if the folder does not exist?

    Read the article

  • SQL Server Express: Failed to add primary key after creating a database table

    - by Syd
    Scenario: I have created a database table. And when I tried to add a primary key (using the SQL Server Management Studiio) to the table, it failed with an error message "Saving changes is not permitted. The changes you have made requrie the following tables to be dropped and re-created. You have either made changes to a table that can't be recreated or enabled the option Prevent savign changes that require the table to be re-created." The environment is Windows 7. I have earlier installed it on a Windows XP SP2 and it worked. And yes, my table is empty (freshly created). My current workaround is to run the "Drop and Create" script. The other alternative is to create the primary key before I save the table. Is this a bug or a limitation with the Express version?

    Read the article

  • Creating a popup tool bar in a full screen NSOpenGLView (OSX Cocoa)

    - by Mike2012
    I have a Cocoa app in which one of my NSOpenGLViews can go into full screen mode (I do this with the method enterFullScreenMode:withOptions:). I would like to create a little widget that when you mouse over it, a toolbar pops up with some different controls. I am wondering what would be the best way to implement this widget? At first I thought about using a panel but I don't think you can bring up any windows when in full screen mode. Also, it seems that you can't add a subview to an NSOpenGLView? Are these two assumptions correct? What else could I use to accomplish this?

    Read the article

  • Creating a new variable in C from only part of an existing u_char

    - by Alex Kloss
    I'm writing some C code to parse IEEE 802.11 frames, but I'm stuck trying to create a new variable whose length depends on the size of the frame itself. Here's the code I currently have: int frame_body_len = pkt_hdr->len - radio_hdr->len - wifi_hdr_len - 4; u_char *frame_body = (u_char *) (packet + radio_hdr->len + wifi_hdr_len); Basically, the frame consists of a header, a body, and a checksum at the end. I can calculate the length of the frame body by taking the length of the packet and subtracting the length of the two headers that appear before it (radio_hdr->len and wifi_hdr_len respectively), plus 4 bytes at the end for the checksum. However, how can I create the frame_body variable without the trailing checksum? Right now, I'm initializing it with the contents of the packet starting at the position after the two headers, but is there some way to start at that position and end 4 bytes before the end of packet? packet is a pointer to a u_char, if it helps. I'm a new C programmer, so any and all advice about my code you can give me would be much appreciated. Thanks!

    Read the article

  • Creating an OpenGL texture with alpha using NSBitmapImageRep

    - by BROK3N S0UL
    I am loading a PNG using: theImage = [NSBitmapImageRep imageRepWithContentsOfFile:imagePath]; from which I can successfully create a gl texture and render correctly without any transparency. However, when I switch blending on using: glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE); The texture renders with the correct transparent background, but the image colours are incorrect. I have tried several options in the blend function, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_DST_ALPHA, etc. I was taught maybe I need to reorder the bits in the image data, maybe the channels have been mixed up, but I would not expect it to render correctly when blending is off in that case. Alternatively, I could use libPNG I guess, but I would like to try using a NSBitmapImageRep if it is possible.

    Read the article

  • Problem in creating Temporary File in android?

    - by Rajapandian
    Hi, In my MediaPlayer application for streaming Video i am using the following code File temp = File.createTempFile("mediaplayertmp", "dat"); while running it throws exceptions like Parent directory of file in not writable:/sdcard/ mediaplayertmp43912.dat I dont how to handle this problem,and i want to know that when we execute that code means where the file will be created.any one knows the solution means please help with some code.

    Read the article

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