Search Results

Search found 1816 results on 73 pages for 'attach'.

Page 4/73 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Attach data to Richtext using flex, mysql and php(newbie)

    - by dmschenk
    I'm trying to attach data to a richtext field in Flashbuilder. The data is an html string in a mysql database and I'm connecting using php. The php script is just converting to XML. The connection works because I can easily dump the data to a datagrid and I can see the string. when I try to hook the data to a Richtext field I get "object CallResponder" so I am connected, but I'm not sure how to break it down so that it is just an html string for the text field. Thanks protected function creationCompleteHandler(event:FlexEvent):void { getAllAbout_fxResult.token = aboutfxService.getAllAbout_fx(); } <s:RichText x="10" y="10" text="{getAllAbout_fxResult}" creationComplete="creationCompleteHandler(event)" width="300" height="300"/>

    Read the article

  • (iPhone) Instruments can't "Attach to Process"

    - by AlexLive
    Actually, I'm using a second generation Ipod Touch. What I'm trying to do is to debug my app on XCode and look for any memory leaks on Instruments at the same time. Is it even possible? Because the "Attach to Process" submenu lists when my app is running (or debugging in this case) but all the items inside this menu are disabled. All I can do is start the app from Instruments but later I come across some bug and I want to see the variables and properties affected. I'm also new to Instruments. Please, could someone give me any advice? Help would be greatly appreciated!

    Read the article

  • How to attach a sample grabber to the playcap sdk sample

    - by Mr Bell
    I want to get access to a webcam's frame image data so I can composite it with some other data. The playcap sample in the windows sdk directshow folder can show you a window streaming the webcam, but doesn't demonstrate access to the bytes. Someone mentioned that I could use a samplegrabber filter attached to a null rendered to gain access to the frame data. Unfortunately I haven't the first clue how to do this. How can I modify the playcap sample to attach a sample grabber and access the frame bytes? visual studio 2008 c++

    Read the article

  • "Attach to process" missing from Delphi 7's Run menu

    - by glob
    I have to resurrect an ancient Delphi 7 application, which means I have to use the D7 IDE. Upgrading the project to a more recent version of Delphi unfortunately isn't an option. My new D7 installation's Run menu is missing Attach to Process. Aside from the missing menu item, the debugger works fine (I can debug normal Delphi executables started with Run). I know D7 supported this feature (it's in the help file), so does anyone have any idea what I've missed? The installation is Delphi 7 Enterprise (Version 7.0 Build 4.453). Current Run menuitems: Run Parameters... - Step Over Trace Into Trace to next Source line Run to Cursor Run Until Return Show Execution Point Program Pause Program Reset - Evaluate/Modify Add Watch Add Breakpoint

    Read the article

  • jQuery attach function to 'load' event of an element

    - by Miguel Ping
    Hi, I want to attach a function to a jQuery element that fires whenever the element is added to the page. I've tried the following, but it didn't work: var el = jQuery('<h1>HI HI HI</H1>'); el.one('load', function(e) { window.alert('loaded'); }); jQuery('body').append(el); What I really want to do is to guarantee that another jQuery function that is expecting some #id to be at the page don't fail, so I want to call that function whenever my element is loaded in the page. To clarify, I am passing the el element to another library (in this case it's a movie player but it could be anything else) and I want to know when the el element is being added to the page, whether its my movie player code that it is adding the element or anyting else.

    Read the article

  • WPF attach popup with a control

    - by viky
    I have a scenario where I am displaying a popup on my control. I am able to do this using PlacementTarget, Position, etc. My problem is when I resize the window and move it to somewhere else in the desktop, the popup remains stationary meaning it doesn't move with the control set as PlacementTarget. I was able to hide it in case of other window getting focus. But not able to attach it with my control. How can I solve this problem? Is there any other such control available?

    Read the article

  • Generic Any/Attach/Add function for Entity Framework

    - by Matt Thrower
    Looking through my EF classes, they're littered with code that looks like this: if (_myContext.[EntityType].Any(d => d.RowId == dc.RowId)) { _myContext.[EntityType].Attach(dc); _myContext.Entry(dc).State = EntityState.Modified; } else { _myContext.[EntityType].Add(dc); } It's the same thing over and over, and is clearly itching to be handled by a generic function. However, I'm not sure how you'd go about handling the need for it to deal with a variety of unexpected entity types. A good example to get me started would be most appreciated.

    Read the article

  • Visual Studio WCF Application now asking to manually attach to process

    - by JL
    I have a console app that is calling a WCF app hosted in IIS. Up until now everything has been fine and I am able to debug the app - step through it without any problems... Until I added my dev pc to a domain.... now every time I get step into the code hosted in IIS, a popup comes up asking if I would like to attach to this process... I can then continue debugging... again not a huge train smash - however... now it randomly just jumps to the end of the process (almost like some kind of timeout) and I am not able to reliably step and debug the IIS hosted code.... Any ideas? All the projects are in the same solution, and all running on the local dev pc... Using Visual Studio 2008, dev PC is Win 7

    Read the article

  • Jquery attach show event to select option

    - by John
    Hi, I have a select form element with 5 options. If option 2 is selected I want to display another form input box (this has a style of display:none initially). How can I attach an event to option 2 so that whenever it is selected the input box is shown otherwise it is hidden. I have this currently but this does not handle is option 2 is already selected when the page loads $('#type').change(function(){ var typeSelected = $(this).val(); if (typeSelected == 2) { $('#extraInput').show(); } }); I know I could add another bit of code which checks what is selected on page load but wondered if there was a neater way of doing this. Also something that could handle the hiding of the input box if option 2 is not selected at the start as currently I have just hard-coded style="display:none" onto the input box but I would prefer this to be dynamic. Thanks

    Read the article

  • Attach to Property's setter

    - by StupidDeveloper
    I haven't found similiar post so I'm asking this. Let's say I defined somewhere an application wide available static Property (I mean it's not local) and in one class I would like to know when this property is being changed. Apart from aop (transparentproxy etc.) which I think doesn't suit me well here (and I can't add that to project anyway), what are the options here? One solution I can think of, which is probably a very nasty one, is to use some event that would be executed in the setter and just attach it in the class(es) which needs that. Something like: public static event EventHandler CurrentNumberChanged= delegate {}; public static int CurrentNumber { get { return currentNumber; } set { currentNumber = value; CurrentNumberChanged(null, EventArgs.Empty); } } I know it's really unsafe to use such events ( read here ). And since I would use it in asp.net makes it even more ugly. Do you have any advices ?

    Read the article

  • Best way to attach row from datagrid to EF.

    - by AKoran
    Using MVVM and EF...I have a datagrid binding to a View Model (using ObservableCollection). The view model has a save command which simply calls the SaveChanges command of the Data Context. However, when a user adds a new row to the datagrid, the new entity is detached. Is there any easy way to automatically attach it when it gets created. Currently, I'm having to do this in the Save command of my View Model and it seems a bit clunky: foreach (var dataItem in _DataList) // where _DataList is the ObservableCollection { if (dataItem.EntityState == EntityState.Detached) { _DataContext.AddToTestTables(dataItem); } } _DataContext.SaveChanges();

    Read the article

  • strange SQL Server attach database error

    - by George2
    Hello everyone, I am using SQL Server 2008 Enterprise with VSTS 2008, and I am developing a simple web application using ASP.Net and Forms Authentication. When I am using the configuration tool/menu of VSTS of my ASP.Net project (I want to use this tool to manually add some Forms authentication users), I met with the following error (SqlException), Trying to attach file D:\Projects\MyTest\App_Data\aspnetdb.mdf to automatically named database failed. It may be caused by existing the same name database, or may be caused by specified file can not be opened or caused by the specified file exists in UNC share. In my computer, there is no aspnetdb.mdf under dir D:\Projects\MyTest\App_Data, and I have used aspnet_regsql to generate database successfully before I run the configuration tool. Why there is such error? How to fix it? thanks in advance, George

    Read the article

  • Cannot attach to a service in VS 2008

    - by rhj4
    I have created a service in VS 2008 called EmailReader. I have compiled, installed and started the service. Its timer loop is writing records to a log file, so I can see that it is running. I am trying to attach to it in VS 2008, but the process name is greyed out in the list of available processes, and the name is "EmailReader.vshost.exe" instead of "EmailReader.exe". There is probably a simple answer, but I don't know it. Do you?

    Read the article

  • An attempt to attach an auto-named database for file failed in Vb.Net

    - by user2454135
    I am Trying to connect database for first time , and I am getting this error : An attempt to attach an auto-named database for file VBTestDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. and getting error on myconnect.Open() Heres my code : Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim myconnect As New SqlClient.SqlConnection myconnect.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=VBTestDB.mdf;Integrated Security=True;User Instance=True;" Dim mycommand As SqlClient.SqlCommand = New SqlClient.SqlCommand() mycommand.Connection = myconnect mycommand.CommandText = "INSERT INTO Card (CardNo,Name) VALUES (@cardno,@name)" myconnect.Open() Try mycommand.Parameters.Add("@cardno", SqlDbType.Int).Value = TextBox1.Text mycommand.Parameters.Add("@name", SqlDbType.NVarChar).Value = TextBox2.Text mycommand.ExecuteNonQuery() MsgBox("Success") Catch ex As System.Data.SqlClient.SqlException MsgBox(ex.Message) End Try myconnect.Close() End Sub

    Read the article

  • How attach a model with another model on a specific bone?

    - by Mehdi Bugnard
    I meet a difficulty attached to a model to another model on a "bone" accurate. I searched several forums but no result. I saw that many people have asked the same question but no real result see no response. Thread found : How to attach two XNA models together? How can I attach a model to the bone of another model? http://stackoverflow.com/questions/11391852/attach-model-xna But I think it is possible. Here is my code example attached a "cube" of the hand of my player private void draw_itemActionAttached(Model modelInUse) { Matrix[] Model1TransfoMatrix = new Matrix[this.player.Model.Bones.Count]; this.player.Model.CopyAbsoluteBoneTransformsTo(Model1TransfoMatrix); foreach (ModelMesh mesh in modelInUse.Meshes) { foreach (BasicEffect effect in mesh.Effects) { Matrix model2Transform = Matrix.CreateScale(1f) * Matrix.CreateFromYawPitchRoll(0, 0, 0); effect.World = model2Transform * Model1TransfoMatrix[0]; //root bone index effect.View = arcadia.camera.View; effect.Projection = arcadia.camera.Projection; } mesh.Draw(); } }

    Read the article

  • Android - attach data to views

    - by Leonti
    Hi! In my application I create dynamic rows in table much as in this tutorial: http://en.androidwiki.com/wiki/Dynamically_adding_rows_to_TableLayout for(int i = startDay; i < startDay + 7; i++){ /* Create a TextView to be the row-content. */ TextView day = new TextView(this); day.setText(Integer.toString(i)); day.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); day.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Log.i("Listener: ", "Click"); } So now when I click on a TextView I can register click event, but how do I determine which TextView was clicked? Not just an object which I get with an event but data like which day number was clicked? Ideally I would want to have data attached to every view I create dynamically. Something like data() method in Javascript jQuery. Right now I can see only 1 way to solve this - while creating TextView add id with data and when clicked - get id back and parse it to get my data. But it strikes me as ugly approach. Is there a way to attach arbitrary data to android views?

    Read the article

  • Send smtp mail in php with HTML page attach as a text

    - by Nirmal
    Hello All.... I have a requirement of sending mail using smtp server in php. Now I am able to send the mail using smtp for a plain text. but I have a requirement where I need to attach an HTML page, which includes set of images. Now for that I am trying the following code : <?php require_once "Mail.php"; $to = '[email protected]'; $from = '[email protected]'; $subject = $_POST['subject']; $body = $_POST['message']; $fileatt = $_FILES['fileatt']['tmp_name']; $fileatt_type = $_FILES['fileatt']['type']; $fileatt_name = $_FILES['fileatt']['name']; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); if (is_uploaded_file($fileatt)) { echo("<p>Inside 1</p>"); $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); // Generate a boundary string $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; array_push(&$headers, 'MIME-Version: 1.0'); array_push(&$headers, 'Content-Type: multipart/mixed;'); array_push(&$headers, " boundary=\"{$mime_boundary}\""); echo("<p>Inside 2</p>"); $body = "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $body . "\n\n"; echo("<p>Inside 3</p>"); $data = chunk_split(base64_encode($data)); echo("<p>Inside 4</p>"); $body .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" . "--{$mime_boundary}--\n"; echo("<p>Inside 5</p>"); } $host = "[email protected]"; $username = "[email protected]"; $password = "user"; $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?> Now this code works fine for me, and it's sending the mail to the target email address. But when I open this email in the inbox, it's showing me the following text in the mailbox: This is a multi-part message in MIME format. --==Multipart_Boundary_x368d72fe1ff44518e90537abdb4bf029x Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit test 1011 --==Multipart_Boundary_x368d72fe1ff44518e90537abdb4bf029x Content-Type: text/html; name="mailing.html" Content-Transfer-Encoding: base64 PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFs Ly9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25h ................ So, it's clearly showing me the encoded data. So, what should modify to send the proper html page that should be visible in targeted email's inbox? Thanks in advance...

    Read the article

  • How can I keep gnu screen from becoming unresponsive after losing my SSH connection?

    - by Mikey
    I use a VPN tunnel to connect to my work network and then SSH to connect to my work PC running cygwin. Once logged in I can attach to a screen session and everything works great. Now, after a while, I walk away from my computer and sooner or later, the VPN tunnel times out. The SSH connection on each end eventually times out and then I eventually come back to my computer to do some work. Theoretically, this should be a simple matter of just restarting the VPN, reconnecting via SSH, and then running "screen -r -d". However apparently when the sshd daemon times out on the cygwin PC, it leaves the screen session in some kind of hung state. I can reproduce a similar hung state by clicking the close box on a cygwin bash shell window while it's running a screen session. Is there any way to get the screen session to recover once this has happened, so that I don't lose anything?

    Read the article

  • How can i attached iphone image through mail in iphone

    - by Pugal Devan
    Hi, I am new to iphone development. I have created a button in the view. On clicking the button it loads the photolibrary from the Iphone. Now i want to attached the those selected image through mail. I donno how to attach the image in MFMailComposerView. How can i achieve this, Here my code is, -(IBAction) Pictures:(id)sender { self.imgpicker = [[UIImagePickerController alloc] init]; self.imgpicker.delegate = self; self.imgpicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:self.imgpicker animated:YES]; } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img1 editingInfo:(NSDictionary *)editInfo { [[picker parentViewController] dismissModalViewControllerAnimated:NO]; UIView *view = [[UIView alloc] init]; (This view for displaying the images) imageview = [[UIImageView alloc] initWithImage:img1]; [imageview setFrame:CGRectMake(0, 0, 320, 420)]; [self.view addSubview:imageview]; [view release]; UIBarButtonItem *rightbutton = [[UIBarButtonItem alloc] initWithTitle:@"Email" style:UIBarButtonItemStyleBordered target:self action:@selector(rightbutton)]; self.navigationItem.rightBarButtonItem = rightbutton; [rightbutton release]; } -(void) rightbutton { [self emailImage:(UIImage *)image];( how to pass the image to mail view) } - (void)emailImage:(UIImage *)image { picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [picker setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]]; NSData *data = UIImagePNGRepresentation(image); [picker addAttachmentData:data mimeType:@"image/png" fileName:@"iPod Library Image"]; [self presentModalViewController:picker animated:YES]; [picker release]; } Please help me out. Thanks.

    Read the article

  • sp_send_dbmail attach files stored as varbinary in database

    - by Mindstorm Interactive
    I have a two part question relating to sending query results as attachments using sp_send_dbmail. Problem 1: Only basic .txt files will open. Any other format like .pdf or .jpg are corrupted. Problem 2: When attempting to send multiple attachments, I receive one file with all file names glued together. I'm running SQL Server 2005 and I have a table storing uploaded documents: CREATE TABLE [dbo].[EmailAttachment]( [EmailAttachmentID] [int] IDENTITY(1,1) NOT NULL, [MassEmailID] [int] NULL, -- foreign key [FileData] [varbinary](max) NOT NULL, [FileName] [varchar](100) NOT NULL, [MimeType] [varchar](100) NOT NULL I also have a MassEmail table with standard email stuff. Here is the SQL Send Mail script. For brevity, I've excluded declare statements. while ( (select count(MassEmailID) from MassEmail where status = 20 )>0) begin select @MassEmailID = Min(MassEmailID) from MassEmail where status = 20 select @Subject = [Subject] from MassEmail where MassEmailID = @MassEmailID select @Body = Body from MassEmail where MassEmailID = @MassEmailID set @query = 'set nocount on; select cast(FileData as varchar(max)) from Mydatabase.dbo.EmailAttachment where MassEmailID = '+ CAST(@MassEmailID as varchar(100)) select @filename = '' select @filename = COALESCE(@filename+ ',', '') +FileName from EmailAttachment where MassEmailID = @MassEmailID exec msdb.dbo.sp_send_dbmail @profile_name = 'MASS_EMAIL', @recipients = '[email protected]', @subject = @Subject, @body =@Body, @body_format ='HTML', @query = @query, @query_attachment_filename = @filename, @attach_query_result_as_file = 1, @query_result_separator = '; ', @query_no_truncate = 1, @query_result_header = 0; update MassEmailset status= 30,SendDate = GetDate() where MassEmailID = @MassEmailID end I am able to successfully read files from the database so I know the binary data is not corrupted. .txt files only read when I cast FilaData to varchar. But clearly original headers are lost. It's also worth noting that attachment file sizes are different than the original files. That is most likely due to improper encoding as well. So I'm hoping there's a way to create file headers using the stored mimetype, or some way to include file headers in the binary data? I'm also not confident in the values of the last few parameters, and I know coalesce is not quite right, because it prepends the first file name with a comma. But good documentation is nearly impossible to find. Please help!

    Read the article

  • Unable to attach "AdventureWorks2008" Sample Database to a named Instance in SQL Server 2008

    - by uzorick
    First of all "Northwind" and "AdventureWorksDW2008" databases attached without problem, but "AdventureWorks2008" fails with the following error. // Msg 5120, Level 16, State 105, Line 1 Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents". Operating system error 2: "2(The system cannot find the file specified.)". Msg 5105, Level 16, State 14, Line 1 A file activation error occurred. The physical file name 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents' may be incorrect. Diagnose and correct additional errors, and retry the operation. Msg 1813, Level 16, State 2, Line 1 Could not open new database 'AdventureWorks2008'. CREATE DATABASE is aborted. // PS: I did not use the default database instance "MSSQLSERVER" during install, so Where is it finding this path "C:...\MSSQL10.MSSQLSERVER...\Documents"?

    Read the article

  • sqlite - any improvements for this attach code (running multiple sql commands transactionally in sql

    - by Greg
    Hi, Is this code solid? I've tried to use "using" etc. Basically a method to pass as sequenced list of SQL commands to be run against a Sqlite database. I assume it is true that in sqlite by default all commands run in a single connection are handled transactionally? Is this true? i.e. I should not have to (and haven't got in the code at the moment) a BeginTransaction, or CommitTransaction. It's using http://sqlite.phxsoftware.com/ as the sqlite ADO.net database provider. private int ExecuteNonQueryTransactionally(List<string> sqlList) { int totalRowsUpdated = 0; using (var conn = new SQLiteConnection(_connectionString)) { // Open connection (one connection so should be transactional - confirm) conn.Open(); // Apply each SQL statement passed in to sqlList foreach (string s in sqlList) { using (var cmd = new SQLiteCommand(conn)) { cmd.CommandText = s; totalRowsUpdated = totalRowsUpdated + cmd.ExecuteNonQuery(); } } } return totalRowsUpdated; }

    Read the article

  • Attach a formatter to a UITextField on iPhone

    - by charlax
    I'm trying to format an UITextField as user types text, for instance to show separator for thousands. I found this web page : http://www.iphonedevsdk.com/forum/iphone-sdk-development/16512-trying-add-commas.html It seems that shouldChangeCharactersInRange: is not a good solution. I thought of a custom UIView where the view would be updated as the user types digits, yet it would require recreating the wheel...

    Read the article

  • Access / Excel crossover: Should i attach spreadsheets to records

    - by glinch
    Hi, I currently have an archaic system of client records that I am trying to improve. For each client i have a directory, in that directory i include a directory for each job. Each job has a spreadsheet that i use to store their personal details, and run calculations and costings specific to their needs. In turn I also have word documents that are linked to their spreadsheet which automatically update accordingly. The spreadsheet is also exported as a pdf as well I am trying to build a database of customer records in Access, straight forward enough. For each new customer i need to be able to add the appropriate spreadsheet to their records, update the spreadsheet accordingly with their details, use the spreadsheet to calculate their costings etc.. I do not want to enter the same information repeatedly, and would like a cohesive system, with data being passed between access and excel. Should this be easy enough to do with the two packages? Thanks in advance Noel

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >