Search Results

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

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Why does it not allowed to use try-catch statement without {} ?

    - by alex
    Why can't I use code like this ? 1 int i = 0; try i = int.Parse("qwerty"); catch throw; 2 try i = int.Parse("qwerty"); catch; finally Log.Write("error"); And should write like this 1 int i = 0; try { i = int.Parse("qwerty"); } catch { throw; } 2 try { i = int.Parse("qwerty");} catch {} finally {Log.Write("error");} PS: I can use if-else statement without {}. Why should I use them with try-catch(-finally) statement ? Is there any meaningful reason ? Is it only because that some people think that code is hard to read ? Several months ago I asked that question on russian programming forum but I got no satisfactory answer ...

    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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • How to perform an external request in Kohana 3?

    - by alex
    I've always used cURL for this sort of stuff, but this article got me thinking I could request another page easily using the Request object in Kohana 3. $url = 'http://www.example.com'; $update = Request::factory($url); $update->method = 'POST'; $update->post = array( 'key' => 'value' ); $update->execute(); echo $update->response; However I get the error Accessing static property Request::$method as non static From this I can assume it means that the method method is static, but that doesn't help me much. I also copied and pasted the example from that article and it threw the same error. Basically, I'm trying to POST to a new page on an external server, and do it the Kohana way. So, am I doing this correctly, or should I just use cURL (or file_get_contents() with context)?

    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

  • Validating forms with regex in codeigniter

    - by Alex
    How can I validate a form using regex in codeiginiter. I'd like to check the input against: ^([0-1][0-9]|[2][0-3]):([0-5][0-9])$ I'm assuming the best way is in some sort of callback. I tried a bunch of ideas on the web but I can't seem to get any working.

    Read the article

  • How to set the URL of a link to a variable using WATIR

    - by Alex
    Using WATIR and Excel, I'd like to take the first row of a table in Excel, visit the URL, then set the 12th link on the page as a variable in the cell next to the cell with the URL, then go to the next line and repeat. I'm stuck on getting the URL of the 12th link on the page to set as a variable that I can feed into the next cell in Excel. Here's what I have and it's not working. worksheet = workbook.WorkSheets(1) # get first workbook #declare test site test_site = worksheet.Range("a2").text #open ie ie = Watir::IE.new #go to test_site ie.goto test_site #find primlink ie.link(:index, 12).text = "primlink" puts primlink Any ideas?

    Read the article

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