Search Results

Search found 2399 results on 96 pages for 'alex gosselin'.

Page 68/96 | < Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >

  • Unable to add FromName to e-mail using cdosys in SQL Server 2008

    - by Alex Andronov
    I have a piece of cdosys code which runs correctly and generates e-mail with my SQL Server 2008 server talking to a MS Exchange 2003 Server. However the from name is not appearing on the e-mails when they arrive. Is there a fault in the code is it not possible this way? Thanks in advance usp_send_cdosysmail @from varchar(500), @to text, @bcc text , @subject varchar(1000), @body text , @smtpserver varchar(25), @bodytype varchar(10) as declare @imsg int declare @hr int declare @source varchar(255) declare @description varchar(500) declare @output varchar(8000) exec @hr = sp_oacreate 'cdo.message', @imsg out exec @hr = sp_oasetproperty @imsg, 'configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusing").value','2' exec @hr = sp_oasetproperty @imsg, 'configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").value', @smtpserver exec @hr = sp_oamethod @imsg, 'configuration.fields.update', null exec @hr = sp_oasetproperty @imsg, 'to', @to exec @hr = sp_oasetproperty @imsg, 'bcc', @bcc exec @hr = sp_oasetproperty @imsg, 'from', @from exec @hr = sp_oasetproperty @imsg, 'fromname','A From Name' exec @hr = sp_oasetproperty @imsg, 'subject', @subject -- if you are using html e-mail, use 'htmlbody' instead of 'textbody'. exec @hr = sp_oasetproperty @imsg, @bodytype, @body exec @hr = sp_oamethod @imsg, 'send', null -- sample error handling. if @hr <>0 select @hr begin exec @hr = sp_oageterrorinfo null, @source out, @description out if @hr = 0 begin select @output = ' source: ' + @source print @output select @output = ' description: ' + @description print @output end else begin print ' sp_oageterrorinfo failed.' return end end exec @hr = sp_oadestroy @imsg

    Read the article

  • Permission denied on IE using window.open()?

    - by Alex
    Hello all, IE is giving me a permission denied error when I use window.open to open a window from a browser button. I do not get the error in Firefox or Chrome. What do I do? The code: <button type="button" onClick="window.open('https://www.example.com','newWindow');"> My button </button>

    Read the article

  • Javascript code in ASP.NET MVC Partial Views (ASCX) or not?

    - by Alex
    Is there a "best practice" for placing Javascript code when you have many partial views and JS code that's specific to them? I feel like I'm creating a maintenance nightmare by having many partial views and then a bunch of independent Javascript files for them which need to be synced up when there is a partial view change. It appears, for maintenance purposes, better to me to put the JS code with the partial view. But then I'm violating generally accepted practices that all JS code should be at the bottom of the page and not mixed in, and also I'd end up with multiple references to the same JS file (as I'd include a reference in each ASCX for intellisense purposes). Does anyone have a better idea? Thank you!

    Read the article

  • How do I make my custom Swing component visible?

    - by Alex
    I have no idea why it won't show. First I create an instance of the component and then add it to a certain element in a two-dimensional JPanel array. Then I loop through that array and add each JPanel to another JPanel container which is to hold all the JPanels. I then add that final container to my JFrame window and set visibility to true, it should be visible? public class View extends JFrame { Board gameBoard; JFrame gameWindow = new JFrame("Chess"); JPanel gamePanel = new JPanel(); JPanel[][] squarePanel = new JPanel[8][8]; JMenuBar gameMenu = new JMenuBar(); JButton restartGame = new JButton("Restart"); JButton pauseGame = new JButton("Pause"); JButton log = new JButton("Log"); View(Board board){ gameWindow.setDefaultCloseOperation(EXIT_ON_CLOSE); gameWindow.setSize(400, 420); gameWindow.getContentPane().add(gamePanel, BorderLayout.CENTER); gameWindow.getContentPane().add(gameMenu, BorderLayout.NORTH); gameMenu.add(restartGame); gameMenu.add(pauseGame); gameMenu.add(log); gameBoard = board; drawBoard(gameBoard); gameWindow.setResizable(false); gameWindow.setVisible(true); } public void drawBoard(Board board){ for(int row = 0; row < 8; row++){ for(int col = 0; col < 8; col++){ Box box = new Box(board.getSquare(col, row).getColour(), col, row); squarePanel[col][row] = new JPanel(); squarePanel[col][row].add(box); } } for(JPanel[] col : squarePanel){ for(JPanel square : col){ gamePanel.add(square); } } } } @SuppressWarnings("serial") class Box extends JComponent{ Color boxColour; int col, row; public Box(Color boxColour, int col, int row){ this.boxColour = boxColour; this.col = col; this.row = row; repaint(); } protected void paintComponent(Graphics drawBox){ drawBox.setColor(boxColour); drawBox.drawRect(50*col, 50*row, 50, 50); drawBox.fillRect(50*col, 50*row, 50, 50); } } A final question as well. Notice how each Box component has a position, what happens to the position when I add the component to a JPanel and add the JPanel to my JFrame? Does it still have the same position in relation to the other Box components?

    Read the article

  • CSS with Aligned LI within a UL

    - by Alex
    I am trying to have some LIs within a UL align left, right, and center within a page. For the life of me, I can't figure out how to keep something "centered" on the same line as a left and right aligned LI. <style> ul { margin:1em 0; padding:0 } ul li{ display:inline-block; white-space:nowrap; margin:5px } ul li.left{ float: left; text-align:left; } ul li.center{ float:left; text-align: center; } ul li.right{ float: right; text-align:right; } </style> <ul> <li class="left">left</li> <li class="center">center</li> <li class="right">right</li> </ul> <ul> <li class="left">left</li> <li class="right">right</li> </ul> <ul> <li class="left">left</li> </ul> Can anyone help? BTW, I've trying to avoid DIVs. Thanks!

    Read the article

  • Google Bar Chart Time Label Interval

    - by Alex Angelini
    Hi I am using Google Bar Chart through the visualization API on my site: http://code.google.com/apis/visualization/documentation/gallery/imagebarchart.html And my x-axis is time, and every time interval is a time of day in the format (HH:MM) Here is my code for the graph: <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> %s google.load("visualization", "1", {packages:["imagebarchart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Date'); data.addColumn('number', 'Amount'); data.addRows({{Rows}}); %s var chart = new google.visualization.ImageBarChart(document.getElementById('chart_div')); chart.draw(data, {width: 900, height: 340, min: 0, isVertical:true, legend:'none'}); } </script> The rows of data are added later using a templating engine, but that is the jist of my chart. Because I have added my time variable as 'string' I cannot use the valueLabelsInterval option to only show every 4 labels. Because I can't do that the labels overlap and look ugly. Is there any other way to only show every other time label or every 4th one, I read through the docs but could not see how to do it. Any help would be greatly appreciated thanks

    Read the article

  • Making Swedish characters show properly in Windows Command Prompt using Python in Notepad++

    - by Alex
    The title explains it well. I have set up Notepad++ to open the Python script in the command prompt when I press F8 but all Swedish characters looks messed up when opening in CMD but perfectly fine in e.g IDLE. This simple example code: #!/usr/bin/env python #-*- coding: UTF-8 -*- print "åäö" Looks like this. As you can see the output of the batch file I use to open Python in cmd below shows the characters correctly but not the Python script above it. How do I fix this? I open the file in cmd using this method

    Read the article

  • I want to learn a new language!

    - by Alex
    Hi, I'm a college student majoring in computer science. I know java and will be learning C++ the next couple years at school. I want to add another language to my repertoire and have gotten conflicting advice: Ruby, Python, Perl, JavaScript, PHP, AJAX, among others. I was wondering what everyone's opinions were on the relative value of each of these languages in the job market, the ease of learning of each of the languages, and just personal preferences when it comes to the languages mentioned above. Thanks!

    Read the article

  • Image gallery with a Lightbox in jQuery

    - by Alex
    Hi. I'd like to create a jQuery image gallery of showcased products. It will show one product image at a time, with Next/Previous arrows, and a brief name and price as overlay on the image. If users click it, it will go to the order page. It will have an icon to show a larger, modal version (Lightbox style) of the image with full description, price, and a link to a page to order it. In other words, it's an inline gallery, about 250px X 150px, with next/previous option, but also with a little icon to fire it up in a lightbox type modal window that can have links. Here's an example which doesn't have the inline gallery effect. Here's another, also missing the inline gallery. Is there such a beast as what I'm looking for? Thanks.

    Read the article

  • Use CSS referenced images in JSP pages

    - by Alex
    I am writing a java servlet (struts/JSP etc). I am trying to style a progress bar using CSS in a JSP page but get this error when using chrome's developer tools: Resource interpreted as image but transferred with MIME type text/plain. <%@ include file="../include/css/default.css" % And in the CSS file: background:url(../images/bg_bar.gif) no-repeat 0 0; Could anyone explain why this is and show how I can use this CSS in my page?

    Read the article

  • Select option in iPhone and Android browsers.

    - by alex
    I'd like a select box that will alert the value when the user selects the option. (in iPhone) <select> <option> 1 </option> <option> 2 </option> <option> 3 </option> </select> In my web browser on the desktop, I can do: onclick, but on the phone, onclick doesn't work.

    Read the article

  • Unreachable code detected in case statement

    - by alex
    I have a code: protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { switch (keyData) { case Keys.Alt|Keys.D1: if (this._condition1) { return true; } else { return base.ProcessCmdKey(ref msg, keyData); } break; case Keys.Control |Keys.U: if (this._condition2) { return true; } else { return base.ProcessCmdKey(ref msg, keyData); } break; default: return base.ProcessCmdKey(ref msg, keyData); } return true; It gives me "unreachable code detected" warning on breaks. Is it good practice not to use break operator here ? I don't want to turn off "unreachable code detected" warning. PS: There are many case in my ProcessCmdKey method.

    Read the article

  • How to set JComboBox not to select an element when created? (Java)

    - by Alex Cheng
    Hi all. Problem: I am using JComboBox, and tried using setSelectionIndex(-1) in my code (this code is placed in caretInvoke()) suggestionComboBox.removeAllItems(); for (int i = 0; i < suggestions.length; i++) { suggestionComboBox.addItem(suggestions[i]); } suggestionComboBox.setSelectedIndex(-1); suggestionComboBox.setEnabled(true); This is the initial setting when it was added to a pane: suggestionComboBox = new JComboBox(); suggestionComboBox.setEditable(false); suggestionComboBox.setPreferredSize(new Dimension(25, 25)); suggestionComboBox.addActionListener(new SuggestionComboBoxListener()); When the caretInvoke triggers the ComboBox initialisation, even before the user selects an element, the actionPerformed is already triggered (I tried a JOptionPane here): First popup (notice that "flow byte_jump" is selected): Second popup (I think the setSelectionIndex is executed) Then in the end: The problem is: My program autoinserts the selected text when the user selects an element from the ComboBox. So without the user selecting anything, it is automatically inserted already. How can I overcome the problem in this situation? Thanks.

    Read the article

  • SQL Server - Filter field contents to numbers only

    - by Alex
    How can I copy the value of a field, but only its numbers? I am creating a computed column for fulltext search, and I want to copy the values from my Phone Number fields (which are varchar) into it, but not with their formatting - numbers only. What is the command that would do this in my computed column formula? Thank you!

    Read the article

  • C# Bug or Brain Teaser? Cast working only with Coalesce (??) Operator

    - by Alex
    This is very strange, maybe someone can explain what's happening, or this is a bug (though I tend to think that this is probably just something intricate about C#). The following code throws the error "Cannot implicitly convert type 'uint?' to 'uint'.": public void Test(UInt32? p) { UInt32 x = p; } However, this code works without error: public void Test(UInt32? p) { UInt32 x = p ?? 1; } Huh? Why does this work? Why would the coalesce operator cause implicit conversion of UInt32? (nullable) to UInt32 (non-nullable), while the first error message says that there is no implicit conversion between those types?

    Read the article

  • Quantifying the amount of change in a git diff?

    - by Alex Feinman
    I use git for a slightly unusual purpose--it stores my text as I write fiction. (I know, I know...geeky.) I am trying to keep track of productivity, and want to measure the degree of difference between subsequent commits. The writer's proxy for "work" is "words written", at least during the creation stage. I can't use straight word count as it ignores editing and compression, both vital parts of writing. I think I want to track: (words added)+(words removed) which will double-count (words changed), but I'm okay with that. It'd be great to type some magic incantation and have git report this distance metric for any two revisions. However, git diffs are patches, which show entire lines even if you've only twiddled one character on the line; I don't want that, especially since my 'lines' are paragraphs. Ideally I'd even be able to specify what I mean by "word" (though \W+ would probably be acceptable). Is there a flag to git-diff to give diffs on a word-by-word basis? Alternately, is there a solution using standard command-line tools to compute the metric above?

    Read the article

  • Embed flash ActiveX in vb6 dynamically?

    - by Alex
    im trying to embed flash in my program by placing flash.ocx in my app's folder without having to register it. i found DirectCom.dll and with this code i can show the right version of flash. but how do i show it on the form and load the movie? Private Declare Function GetInstanceOld Lib "DirectCom" Alias "GETINSTANCE" (FName As String, ClassName As String) As Object Dim ShockwaveFlash1 As Object Set ShockwaveFlash1 = GetInstanceEx(StrPtr(App.Path & "\" & "flash.ocx"), StrPtr("ShockwaveFlash"), True) MsgBox ShockwaveFlash1.FlashVersion

    Read the article

  • In a Windows forms application, how can I setup can I set up the SelectedIndexChanged handle for 4 d

    - by Alex
    In a Windows forms application, within a DataGridView, I have 4 different DataGridCombobox controlshow can I set up the handler SelectedIndexChanged handler for the first combobox via the EditingControlShowing event. I added code for a second combobox but the SelectedIndexChanged didn't get wired up. Here's my code. Any advice would be appreciated. private ComboBox countryCombo; private EventHandler countryHandler; private ComboBox partCombo; private EventHandler partHandler; private void dataGridView2_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { countryCombo = e.Control as ComboBox; if (countryCombo != null) { //remove any existing handler if there is one countryCombo.SelectedIndexChanged -= countryHandler; //add the new handler countryCombo.SelectedIndexChanged += new EventHandler(countryCombo_SelectedIndexChanged); } if (partCombo != null) { partCombo.SelectedIndexChanged -= partHandler; partCombo.SelectedIndexChanged += new EventHandler(partCombo_SelectedIndexChanged); } } private void countryCombo_SelectedIndexChanged(object sender, EventArgs e) { ComboBox box = (ComboBox) sender; //MessageBox.Show(box.Items.Count.ToString()); int rowNum = dataGridView2.CurrentCell.RowIndex; dataGridView2.BeginEdit(false); dataGridView2.Rows[0].Cells[2].Value = "abcdef"; dataGridView2.EndEdit(); } private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e) { int cellColumn = e.ColumnIndex; //MessageBox.Show("Column is: " + cellColumn.ToString()); } private void partCombo_SelectedIndexChanged(object sender, EventArgs e) { ComboBox box = (ComboBox)sender; string partNumber = box.SelectedValue as string; // ToDo: now we need to get the HTSUS from the database so we can //populate the field int rowNum = dataGridView2.CurrentCell.RowIndex; dataGridView2.BeginEdit(false); dataGridView2.Rows[0].Cells[2].Value = "abcdef"; dataGridView2.EndEdit(); } } Al D.

    Read the article

  • FluentNHibernate: Not.Nullable() doesn't affect output schema

    - by alex
    Hello I'm using fluent nhibernate v. 1.0.0.595. There is a class: public class Weight { public virtual int Id { get; set; } public virtual double Value { get; set; } } I want to map it on the following table: create table [Weight] ( WeightId INT IDENTITY NOT NULL, Weight DOUBLE not null, primary key (WeightId) ) Here is the map: public class WeightMap : ClassMap<Weight> { public WeightMap() { Table("[Weight]"); Id(x => x.Id, "WeightId"); Map(x => x.Value, "Weight").Not.Nullable(); } } The problem is that this mapping produces table with nullable Weight column: Weight DOUBLE null Not-nullable column is generated only with default convention for column name (i.e. Map(x = x.Value).Not.Nullable() instead of Map(x = x.Value, "Weight").Not.Nullable()), but in this case there will be Value column instead of Weight: create table [Weight] ( WeightId INT IDENTITY NOT NULL, Value DOUBLE not null, primary key (WeightId) ) I found similiar problem here: http://code.google.com/p/fluent-nhibernate/issues/detail?id=121, but seems like mentioned workaround with SetAttributeOnColumnElement("not-null", "true") is outdated. Does anybody encountered with this problem? Is there a way to specify named column as not-nullable?

    Read the article

< Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >