Search Results

Search found 2396 results on 96 pages for 'alex zylman'.

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • How to build website with two speaking language (Arabic and English)?

    - by Alex
    hi, I am beginner in web designing, I using CLASSIC ASP for web development. My client need his website in two languages (Arabic and English). What is the best way for develop website in multiple language? I read some information from website's :- Create website in two lanuages. for example (www.example.com/English/)and (www.example.com/Arabic/) 2.Use transilaters(Google,SpeakFish,etc..) for your default website. Anyone can help me for this which is the suitable way for develop website in multiple languages? Any reference or any links? hoping your help

    Read the article

  • How can I get an Active Directory data code from System.DirectoryServices[.Protocols]?

    - by Alex Waddell
    When using .Protocols, I can run the following pseudocode to authenticate to an AD: try { LdapConnection c = new LdapConnection("User", "Password"); c.Bind(); } catch (LdapException le) { Debug.WriteLine(le.ResultCode); } This code will allow me to get the "Invalid Credentials" error string, and the AD code "49", but I need to get the additional data errors similar to an LDAP Java client : [LDAP: error code 49 - 80090308: LdapErr: DSID-0C09030F, comment: AcceptSecurityContext error, data **525**, vece ] 525 – user not found 52e – invalid credentials (bad password) 530 – logon time restriction 532 – password expired 533 – account disabled 701 – account expired 773 – user must reset password

    Read the article

  • What's the difference between single and double quotes in Objective-C?

    - by Alex Mcp
    I'm working through a book exercise to generate some random serial number, and here's my function: NSString *randomSerialNumber = [NSString stringWithFormat:@"%c%c%c%c%c", '0' + random() % 10, 'A' + random() % 26, '0' + random() % 10, 'A' + random() % 26, '0' + random() % 10]; This works and has an output like: 2J6X7. But before, the 0s and As I had wrapped in double quotes, and an example output was 11764iÒ˜. What did I do wrong my first time around, and why did using single quotes fix it?

    Read the article

  • Jquery Var Returned As object

    - by alex
    I'm trying to pass a variable from one function to another, but the var elmId is being returned as an object and giving an error. When we click on any of the generated divs we should be able to change the size of the div by choosing a width / height value from the drop down menus. I'm trying to pass the clicked div id which is elmId to function displayVals but it is not working. If we replace "#"+elmId in the function displayVals with the actual id of the first div created with is "#divid1" then it works. Why is the value of var elmId not being passed to displayVals <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/base/jquery-ui.css" type="text/css" media="all" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js" type="text/javascript"></script> <style> .aaa{width:100px; height:100px; background-color:#ccc;} button{width:100px; height:20px;} </style> <button class="idiv">div</button> <select id="width"> <option>100px</option> <option>200px</option> <option>300px</option> </select> <select id="height"> <option>100px</option> <option>200px</option> <option>300px</option> </select> <p></p> <script type="text/javascript"> var divId = 1; $("button").click(function(){ var elm = $('<div id=divid' + divId + ' class=aaa></div>'); elm.appendTo('p'); divId++; }); $("p").click(function(e){ var elmType = $(e.target)[0].nodeName, elmId = $(e.target)[0].id; return displayVals(elmId); }); function displayVals(elmId) { var iwidth = $("#width").val(); var iheight = $("#height").val(); $("#"+elmId).css({width:iwidth, height:iheight}); console.log(elmId); } $("select").change(displayVals); displayVals(); </script>

    Read the article

  • How can I increment a Smarty variable?

    - by alex
    I am not usually a Smarty guy, so I'm a bit stuck. I want to echo the index of an array, but I want to increment it each time I echo it. This is what I have... <ul> {foreach from=$gallery key=index item=image} <li> <img src="{$image}" alt="" id="panel-{$index++}" /> </li> {/foreach} </ul> It doesn't work. Is the best way to do this to pre-process the array before handing it to Smarty? Is there a way I can do this using Smarty?

    Read the article

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