Search Results

Search found 6630 results on 266 pages for 'cname record'.

Page 176/266 | < Previous Page | 172 173 174 175 176 177 178 179 180 181 182 183  | Next Page >

  • Accessing and binding events to an ASP.NET Grid view using Jquery

    - by Sayem Ahmed
    I have an ASP page which displays a text box when it loads. It takes an input number, send it to the server through post back, and then displays some record in a grid view. After a number is input into the box, the server fetches some data from a database and add records to the grid view. It also contains a link column, whose URL is set to "#", so that the page isn't redirected when it is clicked. Now I want to bind a jquery "click" event to that link. How can I do that ? I have tried that to do myself but failed, because it is not available when the DOM is loaded (since it only contains rows when a number is input through the box), and is being modified through ASP.NET Ajax post back.

    Read the article

  • MySQL Need help constructing query: join multiple tables into single row

    - by Jed Daniels
    Hello stackoverflowers, Forgive me if this question has been asked and answered, I've searched and found a few that look similar but I'm too much of a novice with SQL to adapt them to my needs. Also forgive me if I don't use the correct terminology, I know it can be annoying when someone asks a question and they don't even know enough to be able to ask for what they need. I'm helping a friend gather some data, and need to perform a query that results in a single row per record, but instead I get multiple rows. Here is an example of what I'm querying right now (simplified, hopefully not too much): SELECT * FROM `table_one` AS t1 INNER JOIN `table_two` AS t2 ON t1.id = t2.id INNER JOIN `table_three` AS t3 ON t1.id = t3.id WHERE 1 The result is: id text number 5 Subtotal 17 5 Tax 3 5 Total 20 What I need is to create a query that results in something more like this: id text number text number text number 5 subtotal 17 Tax 3 Total 20 Any assistance/guidance would be much appreciated. Thanks! --jed

    Read the article

  • PHP: PDOStatement simple MySQL Select doesn't work.

    - by Alan
    Hi I have the following PHP code doing a very simple select into a table. $statement = $db->prepare("SELECT * FROM account WHERE fbid = :fbid"); $statement->bindParam(":fbid",$uid, PDO::PARAM_STR,45); $out = $statement->execute(); $row = $statement->fetch(); $out is true (success) yet $row is null. If I modify the code as follows: $statement = $db->prepare("SELECT * FROM account WHERE fbid = $uid"); $out = $statement->execute(); $row = $statement->fetch(); $row contains the record I'm expecting. I'm at a loss. I'm using the PDO::prepare(), bindParams() etc to protect against SQL Injection (maybe I'm mistaken on that). Please halp.

    Read the article

  • Multi-part gzip file random access (in Java)

    - by toluju
    This may fall in the realm of "not really feasible" or "not really worth the effort" but here goes. I'm trying to randomly access records stored inside a multi-part gzip file. Specifically, the files I'm interested in are compressed Heretrix Arc files. (In case you aren't familiar with multi-part gzip files, the gzip spec allows multiple gzip streams to be concatenated in a single gzip file. They do not share any dictionary information, it is simple binary appending.) I'm thinking it should be possible to do this by seeking to a certain offset within the file, then scan for the gzip magic header bytes (i.e. 0x1f8b, as per the RFC), and attempt to read the gzip stream from the following bytes. The problem with this approach is that those same bytes can appear inside the actual data as well, so seeking for those bytes can lead to an invalid position to start reading a gzip stream from. Is there a better way to handle random access, given that the record offsets aren't known a priori?

    Read the article

  • Buddy List: Relational Database Table Design

    - by huntaub
    So, the modern concept of the buddy list: Let's say we have a table called Person. Now, that Person needs to have many buddies (of which each buddy is also in the person class). The most obvious way to construct a relationship would be through a join table. i.e. buddyID person1_id person2_id 0 1 2 1 3 6 But, when a user wants to see their buddy list, the program would have to check the column 'person1_id' and 'person2_id' to find all of their buddies. Is this the appropriate way to implement this kind of table, or would it be better to add the record twice.. i.e. buddyID person1_id person2_id 0 1 2 1 2 1 So that only one column has to be searched. Thanks in advance.

    Read the article

  • Reading a text file

    - by Luke
    I am trying to achieve a situation where i load a file into the program. I can use streamreader for this. Each record will be 7 lines long. Therefore lines 1,8,15,22,etc will all hold the same value. As will 2,9,16,23, etc and so on. What is the best way to achieve this? So that when i load the records in the listview, it recognises what i just said. Thanks

    Read the article

  • Remove Duplicates from List of HashMap Entries

    - by HonorGod
    I have a List<HashMap<String,Object>> which represents a database where each list record is a database row. I have 10 columns in my database. There are several rows where the values of 2 particular columns are equals. I need to remove the duplicates from the list after the list is updated with all the rows from database. What is the efficient way? FYI - I am not able to do distinct while querying the database, because the GroupName is added at a later stage to the Map after the database is loaded. And since Id column is not primary key, once you add GroupName to the Map. You will have duplicates based on Id + GroupName combination! Hope my question makes sense. Let me know if we need more clarification.

    Read the article

  • Help with a Join in Rails 3

    - by Adam Albrecht
    I have the following models: class Event < ActiveRecord::Base has_many :action_items end class ActionItem < ActiveRecord::Base belongs_to :event belongs_to :action_item_type end class ActionItemType < ActiveRecord::Base has_many :action_items end And what I want to do is, for a given event, find all the action items that have an action item type with a name of "foo" (for example). So I think the SQL would go something like this: SELECT * FROM action_items a INNER JOIN action_item_types t ON a.action_item_type_id = t.id WHERE a.event_id = 1 AND t.name = "foo" Can anybody help me translate this into a nice active record query? (Rails 3 - Arel) Thanks!

    Read the article

  • ASP.NET MVC: Accessing ModelMetadata for items in a collection

    - by DanM
    I'm trying to write an auto-scaffolder for Index views. I'd like to be able to pass in a collection of models or view-models (e.g., IEnumerable<MyViewModel>) and get back an HTML table that uses the DisplayName attribute for the headings (th elements) and Html.Display(propertyName) for the cells (td elements). Each row should correspond to one item in the collection. When I'm only displaying a single record, as in a Details view, I use ViewData.ModelMetadata.Properties to obtain the list of properties for a given model. But what happens when the model I pass to the view is a collection of model or view-model objects and not a model or view-model itself? How do I obtain the ModelMetadata for a particular item in a collection?

    Read the article

  • Java: versioned data structures?

    - by Jason S
    I have a data structure that is pretty simple (basically a structure containing some arrays and single values), but I need to record the history of the data structure so that I can efficiently get the contents of the data structure at any point in time. Is there a relatively straightforward way to do this? The best way I can think of would be to encapsulate the whole data structure with something that handles all the mutating operations by storing data in functional data structures, and then for each mutation operation caching a copy of the data structure in a Map indexed by time-ordering (e.g. a TreeMap with real time as keys, or a HashMap with a counter of mutation operations combined with one or more indexes stored in TreeMaps mapping real time / tick count / etc. to mutation operations) any suggestions?

    Read the article

  • Capture Flash Audio in 4.7 Edge?

    - by emcmanus
    Is there a way to capture plugin (Flash) audio before it gets to the sound card? I'd like to record plugin audio, hopefully without actually playing the sound. Capturing audio at the device level is an absolute last resort, as the application would pick up all system audio rather than just the Webkit plugin. I'm aware of the recent switch back from QTMultimedia; is this possible with phonon? I spent the night looking for some way to access the phonon graph via QWebFrame (or any of the QtWebkit widgets) -- and didn't turn up much. I also started digging through QTWebkit, particularly NPAPI, without success. For reference, I'm using the edge version of 4.7 (6aa50af000f85cc4497749fcf0860c8ed244a60e) This seems to be a fairly challenging problem. Any hints would be greatly appreciated.

    Read the article

  • Show list items specific to user sharepoint

    - by Sachin
    Hi all, In my project i have a asset list which contains "request to download" link. In the same list there is "download link" column which is default empty. Now when any user clicks on request to download link a workflow is activated and it will send request to approver to approve or reject the download request. If approver accept the request then the "download link" column in the asset list will be updated by some URL which redirect user to download page. Now what happen is, if user A send request to download asset to approver and approver approves it this will update respective item in asset list and put a download URL in "Download Link" column but if user B get look for the same record in asset list the download link will be visible to this user too which is wrong. I want to display download link columns value to only those user whos request has been approve. FYI: I am using WSS 3.0 Can anyone help me what should be the best approch to do this...? Thanks in Advance Sachin

    Read the article

  • CakePHP Accessing Dynamically Created Tables?

    - by Dave
    As part of a web application users can upload files of data, which generates a new table in a dedicated MySQL database to store the data in. They can then manipulate this data in various ways. The next version of this app is being written in CakePHP, and at the moment I can't figure out how to dynamically assign these tables at runtime. I have the different database config's set up and can create the tables on data upload just fine, but once this is completed I cannot access the new table from the controller as part of the record CRUD actions for the data manipulate. I hoped that it would be along the lines of function controllerAction(){ $this->uses[] = 'newTable'; $data = $this->newTable->find('all'); //use data } But it returns the error Undefined property: ReportsController::$newTable Fatal error: Call to a member function find() on a non-object in /app/controllers/reports_controller.php on line 60 Can anyone help.

    Read the article

  • Redirect/Subdomain with .htaccess

    - by fractalbit
    What i have currently: A wildcard dns record. So that every subdomain points to www.galop.gr A dynamically (php) generated .htacces file where i append the following code for every subdomain i want working: RewriteCond %{HTTP_HOST} ^fractalbit.galop.gr$ [OR] RewriteCond %{HTTP_HOST} ^www.fractalbit.galop.gr$ RewriteRule ^/?$ http://www.galop.gr/index.php?user=1 [R=301] Everything is working fine, i just want something more if it is possible. Right now, if someone enters fractalbit.galop.gr will be redirected to http://www.galop.gr/index.php?user=1 Is it possible to do this BUT keep fractalbit.galop.gr to the address bar of the browser? Thanks for any replies.

    Read the article

  • Problem with recording audio in Flash (Red5, ffmpeg)

    - by AT
    I'm trying to implement a small program with Flash and php that records audio and converts it to mp3. Currently I have Red5 server up and running, I can connect to it with no problems and I can publish flv recordings to the server. When I listen to the flv with Wimpy FLV player it seems to be fine. The problem comes when I'm trying to convert it with ffmpeg on the command line. I'm simply using a command ffmpeg -i but the output wav is about 50% slower than the input. When I record 10sec, the output is 15sec and pitched down. I've also tried all kinds of bitrate settings, -nv option, etc. but nothing seems to work. I have a recent version of ffmpeg that supports nellymoser format.. Don't know what to do. Anyone have any ideas?

    Read the article

  • Smooth screen recording software

    - by user85658
    Hello everyone, I am preparing for my senior thesis presentation. I'd like to back myself up in case there is no internet connection available. Therefore I want to record a video showing the functionality of my software. I have tried Camtasia but all the smooth and slick animations I've created, do not look that appealing. Is there an alternative. Something that will capture my screen 1 to 1, or near that. Camtasia is great, but it does not serve the purpose. Any help would be greatly appreciated. Best Regards, Kiril

    Read the article

  • eConnect timesheet entry multicurrency issue

    - by Hugo Emond
    Hello, I'm trying to use econnect to insert TimeSheet Entry batches from an external system via "taPATimeSheetLineInsert". When using the fuctionnal currency everything works fine. The problem is that when I use another currency, the ACCRUED REVENUES are set to 0. I tried to enter the same entry manually in GP and the accrued revenues are OK. When you take a look at it in the UI everything is the same in both timesheet entryes. (I specifed the currency id which is different from the functionnal currency and I provide a PAUNITCOST as requested by eConnect.) If I look into the PA10001 TABLE, there are differences between the record inserted manually and the one inserted with eConnect as the value of "PA_Base_Billing_Rate" and "PAORIGBSBILLRTE" are set to 0. The ACCRUED REVENUE COLUMN is evidently different as well. There is no option in taPATimeSheetLineInsert that can help me so I don't know what to do to make it work! Please help!

    Read the article

  • Factory Girl Association

    - by David Lyod
    I have an association of a Admin - Account in factory girl I now wish to associate a second user with the same account but am unable to do so. I build my Admin-Account association like this u.account { |account| account.association(:account)} This works fine and creates the Account and Admin association. Im looking for a way to setup a second user who's account also points to the record created in the Admin factory association. I currently just build the second user as such @user = Factory.build(:seconduser) @user.account = Account.first @user.save! Which works but seems somewhat hacky .

    Read the article

  • Subsonic linq using activerecord very slow compared to simplerepository

    - by skiik
    Anyone know anything about why linq queries are about 6 times slower when querying using active record vs simplerepository? The below code runs 6 times slower than when i query the data using a simple repository. This code is executed 1000 times in a loop Thanks in advance string ret = ""; // if (plan == null) { plan =VOUCHER_PLAN.SingleOrDefault(x => x.TENDER_TYPE == tenderType); } if (plan == null) throw new InvalidOperationException("voucher type does not exist." + tenderType); seq = plan.VOUCHER_SEQUENCES.First(); int i = seq.CURRENT_NUMBER; seq.CURRENT_NUMBER += seq.STEP; seq.Save();

    Read the article

  • search & replace on 3000 row, 25 column spreadsheet

    - by Deca
    I'm attempting to clean up data in this (old) spreadsheet and need to remove things like single and double quotes, HTML tags and so on. Trouble is, it's a 3000 row file with 25 columns and every spreadsheet app I've tried (NeoOffice, MS Excel, Apple Numbers) chokes on it. Hard. Any ideas on how else I can clean this thing up for import to MySQL? Clearly I could go through each record manually, row by row, but would like to avoid that if at all possible. Likewise, I could write a PHP script to handle it on import, but don't want to put the server into a death spiral either.

    Read the article

  • Process XML in C# using external entity file

    - by Ryan Berger
    I am processing an XML file (which does not contain any dtd or ent declarations) in C# that contains entities such as &eacute; and &agrave;. I receive the following exception when attempting to load an XML file... XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(record); Reference to undeclared entity 'eacute'. I was able to track down the proper ent file here. How do I tell XmlDocument to use this ent file when loading my XML file?

    Read the article

  • Simple but efficient way to store a series of small changes to an image?

    - by finnw
    I have a series of images. Each one is typically (but not always) similar to the previous one, with 3 or 4 small rectangular regions updated. I need to record these changes using a minimum of disk space. The source images are not compressed, but I would like the deltas to be compressed. I need to be able to recreate the images exactly as input (so a lossy video codec is not appropriate.) I am thinking of something along the lines of: Composite the new image with a negative of the old image Save the composited image in any common format that can compress using RLE (probably PNG.) Recreate the second image by compositing the previous image with the delta. Although the images have an alpha channel, I can ignore it for the purposes of this function. Is there an easy-to-implement algorithm or free Java library with this capability?

    Read the article

  • Entity Framework - avoiding another query

    - by adamjellyit
    I have a requirement to only save data to a table in a database (I don't need to read it) If the record already exists I want to update it otherwise I will add it. It usually exists. My entity context might already hold the object .. if it does I want to find it and use it again without causing it to refresh from the database when I 'find' it i.e. The context holds a collection of entities (rows of a database) I want to find an entity in the collection and only want the context to go to the database if entity is not in the collection. I don't care about the current values of the entity .. I just want to update them. Hope this is clear ..... thanks

    Read the article

  • Delphi - Using DeviceIoControl passing IOCTL_DISK_GET_LENGTH_INFO to get flash media physical size (Not Partition)

    - by SuicideClutchX2
    Alright this is the result of a couple of other questions. It appears I was doing something wrong with the suggestions and at this point have come up with an error when using the suggested API to get the media size. Those new to my problem I am working at the physical disk level, not within the confines of a partition or file system. Here is the pastebin code for the main unit (Delphi 2009) - http://clutchx2.pastebin.com/iMnq8kSx Here is the application source and executable with a form built to output the status of whats going on - http://www.mediafire.com/?js8e6ci8zrjq0de Its probably easier to use the download, unless your just looking for problems within the code. I will also paste the code here. unit Main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TfrmMain = class(TForm) edtDrive: TEdit; lblDrive: TLabel; btnMethod1: TButton; btnMethod2: TButton; lblSpace: TLabel; edtSpace: TEdit; lblFail: TLabel; edtFail: TEdit; lblError: TLabel; edtError: TEdit; procedure btnMethod1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; TDiskExtent = record DiskNumber: Cardinal; StartingOffset: Int64; ExtentLength: Int64; end; DISK_EXTENT = TDiskExtent; PDiskExtent = ^TDiskExtent; TVolumeDiskExtents = record NumberOfDiskExtents: Cardinal; Extents: array[0..0] of TDiskExtent; end; VOLUME_DISK_EXTENTS = TVolumeDiskExtents; PVolumeDiskExtents = ^TVolumeDiskExtents; var frmMain: TfrmMain; const FILE_DEVICE_DISK = $00000007; METHOD_BUFFERED = 0; FILE_ANY_ACCESS = 0; IOCTL_DISK_BASE = FILE_DEVICE_DISK; IOCTL_VOLUME_BASE = DWORD('V'); IOCTL_DISK_GET_LENGTH_INFO = $80070017; IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS = ((IOCTL_VOLUME_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or (0 shl 2) or METHOD_BUFFERED); implementation {$R *.dfm} function GetLD(Drive: Char): Cardinal; var Buffer : String; begin Buffer := Format('\\.\%s:',[Drive]); Result := CreateFile(PChar(Buffer),GENERIC_READ Or GENERIC_WRITE,FILE_SHARE_READ,nil,OPEN_EXISTING,0,0); If Result = INVALID_HANDLE_VALUE Then begin Result := CreateFile(PChar(Buffer),GENERIC_READ,FILE_SHARE_READ,nil,OPEN_EXISTING,0,0); end; end; function GetPD(Drive: Byte): Cardinal; var Buffer : String; begin If Drive = 0 Then begin Result := INVALID_HANDLE_VALUE; Exit; end; Buffer := Format('\\.\PHYSICALDRIVE%d',[Drive]); Result := CreateFile(PChar(Buffer),GENERIC_READ Or GENERIC_WRITE,FILE_SHARE_READ,nil,OPEN_EXISTING,0,0); If Result = INVALID_HANDLE_VALUE Then begin Result := CreateFile(PChar(Buffer),GENERIC_READ,FILE_SHARE_READ,nil,OPEN_EXISTING,0,0); end; end; function GetPhysicalDiskNumber(Drive: Char): Byte; var LD : DWORD; DiskExtents : PVolumeDiskExtents; DiskExtent : TDiskExtent; BytesReturned : Cardinal; begin Result := 0; LD := GetLD(Drive); If LD = INVALID_HANDLE_VALUE Then Exit; Try DiskExtents := AllocMem(Max_Path); DeviceIOControl(LD,IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,nil,0,DiskExtents,Max_Path,BytesReturned,nil); If DiskExtents^.NumberOfDiskExtents > 0 Then begin DiskExtent := DiskExtents^.Extents[0]; Result := DiskExtent.DiskNumber; end; Finally CloseHandle(LD); end; end; procedure TfrmMain.btnMethod1Click(Sender: TObject); var PD : DWORD; CardSize: Int64; BytesReturned: DWORD; CallSuccess: Boolean; begin PD := GetPD(GetPhysicalDiskNumber(edtDrive.Text[1])); If PD = INVALID_HANDLE_VALUE Then Begin ShowMessage('Invalid Physical Disk Handle'); Exit; End; CallSuccess := DeviceIoControl(PD, IOCTL_DISK_GET_LENGTH_INFO, nil, 0, @CardSize, SizeOf(CardSize), BytesReturned, nil); if not CallSuccess then begin edtError.Text := IntToStr(GetLastError()); edtFail.Text := 'True'; end else edtFail.Text := 'False'; CloseHandle(PD); end; end. I placed a second method button on the form so I can write a different set of code into the app if I feel like it. Only minimal error handling and safeguards are there is nothing that wasn't necessary for debugging this via source. I tried this on a Sony Memory Stick using a PSP as the reader because I cant find the adapter for using a duo in my machine. The target is an MS and half of my users use a PSP for a reader half dont. However this should work fine on SD cards and that is a secondary target for my work as well. I tried this on a usb memory card reader and several SD cards. Now that I have fixed my attempt I get an error returned. 50 ERROR_NOT_SUPPORTED The request is not supported. I have found an application that uses this API as well as alot of related functions for what I am trying todo. I am getting ready to look into it the application is called DriveImage and its source is here - http://sourceforge.net/projects/diskimage/ The only thing I have really noticed from that application is there use of TFileStream and using that to get a handle on the physical disk.

    Read the article

  • Event Tracking

    - by DRapp
    I want to understand event cycles. I have a form with a grid and textboxes. It has a grid, bound to DataTable, and textboxes bound to same table too. I'm trying to debug something and need to know how to identify ALL events fired in the form to see what may solve an issue for me. Anyhow, unless I explicitly subclass every class on my form, and override / attach to every event to my own event handlers, how can I get / listen to all events being fired during a certain action... Such as changing a "Selected" road in a DataGridView. It obviously updates its own "CurrentRow"... I need to know what / how to maybe FORCE a re-loading of SAME CurrentRow. Reason: during a form level "Edit Mode", and I change the content in another "Textbox" control, and reject changes, I need it to simulate the current "Record" is reloaded to go back to its original values.

    Read the article

< Previous Page | 172 173 174 175 176 177 178 179 180 181 182 183  | Next Page >