Search Results

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

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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 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

  • 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

  • Developers portfolios

    - by Alex
    I'm wondering if you have one, or u know any developer/programmer online portofolio. I know many web developers have one (and in many cases very well designed), but not any C++ developer (for example). On the net there are only some good blogs about some programming language, but in many cases these are extremely poor from a design point of view and i'd say very "nerdy".

    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

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