Search Results

Search found 3158 results on 127 pages for 'mr alex'.

Page 88/127 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • How to learn Ruby on Rails as a complete Programming Beginner?

    - by Alex
    I want to build a scalable dynamic Web Application. I have never programmed an Object Oriented language before. Or, let's just say I am completely new to programming, because the previous experiences aren't worth talking about. I know I have a really big task ahead of me ^^ but I wanted to get into coding for the last 10 years and now that I'm finally doing it, I would like to know how to get there in the most efficient way. Any good books/tutorials you could recommend? Would it really make sense to learn other, better documented languages before learning RoR? Or would it be better for a beginner to learn C# with ASP.NET first? Thank you for your help in advance ;-)

    Read the article

  • ASP.NET MVC Route based on Web Browser/Device (e.g. iPhone)

    - by Alex
    Is it possible, from within ASP.NET MVC, to route to different controllers or actions based on the accessing device/browser? I'm thinking of setting up alternative actions and views for some parts of my website in case it is accessed from the iPhone, to optimize display and functionality of it. I don't want to create a completely separate project for the iPhone though as the majority of the site is fine on any device. Any idea on how to do this?

    Read the article

  • Imploding nested arrays

    - by Alex Zylman
    Hey guys, If I have an array structured like this: $array[index]['first_name'] $array[index]['last_name'] Is there an easy way to implode it into something like first_name last_name,first_name last_name, etc. for all the indices? Implode didn't seem to do what I wanted for something like this. Currently I'm just looping over the whole thing, but it's a SIGNIFICANT bottleneck.

    Read the article

  • Save phone calls data in a DB?

    - by Alex
    How would you save this data on a database: An user can make phone calls (id, date, hour, duration, outcome). The "outcome" can be, for example, to recall the client on another day (so I have to save the date, the hour, etc of this "future" call). How would you manage this data on a db? At the moment i have only a "Call" table.

    Read the article

  • Is there an easier way to do Classic ASP "relative path"?

    - by Alex.Piechowski
    Right now, I'm having trouble. First of all I have a page, let's call it "http://blah.com/login". That obviously goes strait to "index.asp" A line of Main.asp: <!--#include file="resource/menu.asp"--> Page top includes all of what I need for my menu... so: Part of resource/menu.htm: <div id="colortab" class="ddcolortabs"> <ul> <li><a href="main.asp" title="Main" rel="dropmain"><span>Main</span></a></li> ... </ul> </div> <!--Main drop down menu --> <div id="dropmain" class="dropmenudiv_a"> <a href="main/announcements.asp">Announcements</a> <a href="main/contacts.asp">Contact Information</a> <a href="main/MeetingPlans.asp">Meeting Plan</a> <a href="main/photos.asp">Photo Gallery</a> <a href="main/events.asp">Upcoming Events</a> </div> Let's say I click on the "announcements" (http://blah.com/login/main/announcements.asp) link... Now I'm at the announcements page! But wait, I include the same menu file. Guess what happens: I get sent to "http://blah.com/login/main/main/announcements.asp Which doesn't exist... My solution: Make a menu_sub.asp include for any subpages. But wait a second... this WORKS, but it gets REALLY REALLY messy... What can I do to use just one main "menu.asp" instead of "menu_sub.asp"? using "/main/announcements.asp" WON'T be an option because this is a web application that will be on different directories per server. Any ideas? PLEASE

    Read the article

  • Deployment of SQL Server: installing a second instance?

    - by Workshop Alex
    Simple problem. I'm working on a Delphi 2007/WIN32 application which now uses MS Access as simple data store. I have to modify it to support SQL Server Express, which is easy. These modifications are working so the application can be deployed using either SQL Server or MS Access. (Whatever the user prefers.) I did consider deploying the whole application together with the SQL Compact but this is not practicak. Using SQL Server Express 2008 instead of 2005 is an option, but also has a few nasty side-effects which we don't want to resolve for now. The problem is deploying the whole project. The installation with SQL Server would need a quiet installation so the user won't notice it. SQL Server is mentioned in the documentation so they know it's there. We just don't want to bother them with technical issues. In most cases, such an installation will go just fine. But what if the user already has an SQL Server (2005) installation which is used for something else? Personally, I would prefer to just install a second instance of SQL Server on their system so it won't conflict with the other installation. (Thus, if they uninstall the other app, the SQL instance will just stay installed.) While SQL Server 2005 and 2008 can be installed on the same system simply by using two different names for the instance, I wonder if it's also possible to install SQL Server 2005 twice on a single system to get two instances. And if possible, how?

    Read the article

  • Visual Studio: Collapse Methods, but not Comments (Summary etc.)

    - by Alex
    Hello, is there a way (settings? "macro"? extension?) that I can simply toggle outlining so that only the using section and my methods collapse to their signature line, but my comments (summary and double slash comments) and classes stay expanded? Examples: 1) Uncollapsed using System; using MachineGun; namespace Animals { /// <summary> /// Angry animal /// Pretty Fast, too /// </summary> public partial class Lion { // // Dead or Alive public Boolean Alive; /// <summary> /// Bad bite /// </summary> public PieceOfAnimal Bite(Animal animalToBite) { return animalToBite.Shoulder; } /// <summary> /// Fatal bite /// </summary> public PieceOfAnimal Kill(Animal animalToKill) { return animalToKill.Head; } } } 2) Collapsed (the following is my desired result): using[...] namespace Animals { /// <summary> /// Angry animal /// Pretty Fast, too /// </summary> public partial class Lion { // // Dead or Alive public Boolean Alive; /// <summary> /// Bad bite /// </summary> public PieceOfAnimal Bite(Animal animalToBite)[...] /// <summary> /// Fatal bite /// </summary> public PieceOfAnimal Kill(Animal animalToKill)[...] } } This is how I prefer seeing my class files (the collapsed form). I've been doing the collapsing by hand a million times by now and I think there should be a way to automate/customize/extend VS to do it the way I want? Every time I debug/hit a breakpoint, it uncollapses and messes up things. If I collapse via the context menu's collapse to outline etc. it also collapses my comments which isn't desired. Appreciate your help!

    Read the article

  • WPF: Change padding depending of container ?

    - by Alex Ilyin
    I have UserControl named MyUserControl, and another UserControl named MyContainer. I want MyUserControl to have padding 10 if it is placed inside MyContainer and 15 otherwise. Shortly, I want <MyContainer> <MyUserControl> Hello </MyUserControl> </MyContainer> to look like <MyContainer> <UserControl Padding="10"> Hello </UserControl> <MyContainer> and <MyUserControl> Hello </MyUserControl> to look like <UserControl Padding="15"> Hello </UserControl>

    Read the article

  • Using multiple databases within one application

    - by Alex
    I have a web application made for several groups of people not connected with each other. Instead of using one database for all of them, I'm thinking about making separate databases. This will improve the speed of the queries and make me free from checking to what group the user belongs. But since I'm working with LINQ to SQL, my classes are explicitly connected with the databases, so I will have to make separate DataContexts for all of the databases. So how can I solve this problem? Or should I just not bother and use one database only?

    Read the article

  • What is a practical use for a closure in JavaScript?

    - by alex
    I'm trying my hardest to wrap my head around JavaScript's closures. I get that by returning an inner function, it will have access to any variable defined in it's immediate parent. Where would this be useful to me? Perhaps I haven't quite got my head around it yet. Most of the examples I have seen online don't provide any real world code, just vague examples. Can someone show me a real world use of a closure? Is this one, for example? var warnUser = function (msg) { var calledCount = 0; return function() { calledCount++; alert(msg + '\nYou have been warned ' + calledCount + ' times.'); }; }; var warnForTamper = warnUser('You can not tamper with our HTML.'); warnForTamper(); warnForTamper(); Thanks

    Read the article

  • LinkButton child controls render

    - by Alex
    Hi. I want to have a LinkButton that adds 'span' tag around the text. protected override void Render(HtmlTextWriter writer) { Text = String.Concat("<span>", Text, "</span>"); base.Render(writer); } It's works perfectly, but only if I add text like this: <cc:TestLinkButton ID="TestLinkButton" runat="server" Text="SomeText"> </cc:TestLinkButton> If I want to add some image I will write something like this: <cc:TestLinkButton ID="LinkButton1" runat="server"> <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/icon_holiday.png" BorderWidth="0" /> SomeText </cc:TestLinkButton> In this case Text property will be empty, because actualy "SomeText" is child control property. So question is is how to add tag around child controls.

    Read the article

  • Dump to CSV/Postgres memory

    - by alex
    I have a large table (300 million lines) that I would like to dump to a csv - I need to do some processing that cannot be done with SQL. Right now I am using Squirrel as a client, and it does not apparently deal very well with large datasets - at least as far as I can tell from my own (limited) experience. If I run the query on the actual host, will it use less memory? Thanks for any help.

    Read the article

  • Not sure why I'm getting a NullPointerException when creating a Swing component

    - by Alex
    The error occurs when creating the Box object. 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].add(box); } } Board is given from the Game constructor here (another class): public Game() throws Throwable{ View graphics = new View(); board = new Board(); board.setDefault(); graphics.drawBoard(board); } The Board constructor looks like this: public Board(){ grid = new Square[COLUMNS][ROWS]; for(int row = 0; row < 8; row++){ for(int col = 0; col < 8; col++){ grid[col][row] = new Square(this); } } for(int row = 0; row < 8; row++){ for(int col = 0; col < 4; col++){ int odd = 2*col + 1; int even = 2*col; getSquare(odd, row).setColour(Color.BLACK); getSquare(even, row).setColour(Color.WHITE); } } } And finally the Box class: 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(); } public void paint(Graphics drawBox){ drawBox.setColor(boxColour); drawBox.drawRect(50*col, 50*row, 50, 50); drawBox.fillRect(50*col, 50*row, 50, 50); } } So while looping through the array, it uses the two integers as coordinates to create the Box. The coordinates are referenced and then repaint() is run. The box also gets the colour, using the two integers, from the Square in the Board class. Since the colour is already set, before the drawBoard(board) method is run, that shouldn't be a problem, right? Exception in thread "main" java.lang.NullPointerException at View.drawBoard(View.java:38) at Game.<init>(Game.java:21) at Game.main(Game.java:14) The relevant part of Square import java.awt.Color; public class Square { private Piece piece; private Board board; private Color squareColour; public Square(Board board){ this.board = board; } public void setColour(Color squareColour){ this.squareColour = squareColour; } public Color getColour(){ return squareColour; }

    Read the article

  • SslStream.ReadByte() blocks thread?

    - by alex
    I'm trying to write an Imap4 client. For that I use a SslStream to Connect to the Server. Everything's fine until I send the "Login" command. When I try to get an Answer to it, SslStream.ReadByte() block the thread. The result is that my programm crashes always. Whats happening here?? Code: if (ssl) { s = stream; } int cc = 0; MessageBox.Show("entered"); while (true) { int xs = s.ReadByte(); MessageBox.Show(xs.ToString()); if (xs > 0) { buf.Add((byte)xs); cc++; if (xs == '\n') { break; } if (cc > 10) MessageBox.Show(en.GetString(buf.ToArray())); } else { break; } } MessageBox.Show("left");

    Read the article

  • Page fully rendered event?

    - by alex
    I'm altering the DOM tree in plain JS and need to know when the changes get fully rendered on screen (mostly care about document dimensions). window.onload=function(){ ss = document.styleSheets[0]; for(i = 0; i < ss.cssRules.length; i++) { ss.deleteRule(i) }; ss.addRule('p', 'color: red;') // ... many more // call some other function when the page is fully rendered? } TIA.

    Read the article

  • mysql replace matching but not changing

    - by alex
    I've used mysql's update replace function before, but even though I think I'm following the same syntax, I can't get this to work-it matches the rows, but doesn't replace. Here's what I'm trying to do: mysql> update contained_widgets set preference_values = replace(preference_values, '<li><a_href="/enewsletter"><span class="not-tc">eNewsletter</span></a></li>', '<li><a_href="/enewsletter"><span class="not-tc">eNewsletter</span></a></li> <li> <a_href="/projects"><span class="not-tc">Projects</span></a></li>'); Query OK, 0 rows affected (0.00 sec) Rows matched: 77 Changed: 0 Warnings: 0 I don't see what I'm missing. Any help is appreciated. I edited "a " to "a_" because the site thinks I'm posting spam links otherwise.

    Read the article

  • Is this text wrapping technique possible in CSS and jQuery?

    - by alex
    I have built a sliding text thing for a website. http://www.solomonadventures.com/~new/adventure-tours/seafari-tours/ The background contains the menu (on the right hand side), and when it originally loads, I have placed an element to make the text look like it is wrapping around the menu. Now, I have a sliding text thing I was asked to implement. The buttons to use it are currently in the top left corner. My question is, when I slide the content down, am I able to somehow make the text still wrap around it? This is all I have thought of so far (all with trade offs) Make the text appear beneath the menu - no need to wrap Make the text as narrow to the beginning of the menu - no need to wrap Manually place placeholders in the text that make it line break so it appears to wrap - not elegant (site uses a CMS too) Is there any jQuery selector I could write that would allow me to select the paragraph from top (once slid to the top) or the top most text node (so I could do an after() to place a new placeholder element to force it to wrap?) Any other solutions? Many thanks.

    Read the article

  • How do I find where an exception was thrown in C++?

    - by Alex
    I have a program that throws an uncaught exception somewhere. All I get is a report of an exception being thrown, and no information as to where it was thrown. It seems illogical for a program compiled to contain debug symbols not to notify me of where in my code an exception was generated. Is there any way to tell where my exceptions are coming from short of setting 'catch throw' in gdb and calling a backtrace for every single thrown exception?

    Read the article

  • Given an even number of vertices, how to find an optimum set of pairs based on proximity?

    - by Alex Z
    The problem: We have a set of n vertices in 3D euclidean space, and there is an even number of these vertices. We want to pair them up based on their proximity. In other words, we'd like to be able to find a set of vertex pairs, where the vertices in each pair are as close as possible together. We want to minimise sacrificing the proximity between the vertices of any other pairs as much as possible in doing this. I am not looking for the most optimal solution (if it even strictly exists/can be done), just a reasonable one that can be computed relatively quickly. A relatively awful brute force approach involves choosing a vertex and looping through the rest to find its nearest neighbor and then repeating until there are none left. Of course as we near the end of the list the closest vertex could be very far away, but it is the only choice, therefore this can fail badly on the third point above.

    Read the article

  • How to maintain fixed size of C variable types over different machines?

    - by Alex
    I've all this kind of functions. ssize_t fuc1(int var1, void *buf, size_t count); int func2(char *charPtr, int mode, int dev); short func3( long var2); problem is that data types in C has different sizes when compiled on different machines(64bit & 32bit). This is true for even void*. For some reasons. I need to ensure that these sizes all are same on every machine(64bit & 32bit). So, how should I modify these ?

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >