Hello, I'm hoping for some help with a regex that has me stumped. My skill with regex is rather rudimentary. To start, here are a couple of example URLs, and whether I want to match them or not: collection/col1 // MATCH collection/col2 // FAIL collection/col1/products/pro1 // FAIL My criteria: * One single regex (cannot be multiple expressions) * I have a list of "col"s to fail on. For example, I do not want to match if specifically "col2" or "col3" are in the URL * Aside from col2 or col3, i can have any col[#] in the URL * Even …

Member Avatar
Member Avatar
+0 forum 4

Hello, I'm just starting off with Ruby, but I have a task that landed on my desk that I need a quick answer for, and haven't been able to find a solution online. I appreciate any help I can get. I need to know if a value in one array appears in another. This should be easy enough with a loop but I'm looking to do it the "Ruby way", if there's such a thing. Here's my current code: TARGET_COLOR = "red" # product.color contains "orange, yellow, red", for example if product.color.any? { |string| string.include?(TARGET_COLOR) } #do stuff Now if …

Member Avatar
Member Avatar
+0 forum 6

Hi folks, I have a situation that's most easily explained via example, I think. So here goes. Let's say I have the following URLs: 1. /page.asp?id=123 2. /page.asp?id=123&category=ABC 3. /page.asp?id=123&category=ABC&var3=X&var4=Y I need these pages redirected. Currently links 1, and 2 redirect correctly. Option 3 though can have an arbitrary number of other parameters with arbitrary values. What I need to do is, for page.asp, ignore all parameters aside from id and category. Is there a way to do this with rewrite rules? If not, would it be possible to do if I did have the names of the other parameters? …

Member Avatar
Member Avatar
+0 forum 5

Hi all, I'm wondering if anyone's had experience with the WordPress Importer tool. I'm having trouble importing my WXR file through the tool. It works well for the most part, but when I get to the author assignment section, there are some issues. Under Assign Authors I only see `Import author: ()`, with nothing in the parentheses. Once I submit the page, the next page says > Failed to create new user for . Their posts will be attributed to the current user. Cannot create a user with an empty login name. I don't know why there's a blank space …

Member Avatar
Member Avatar
+0 forum 1

Hello, I have a Macbook Pro w/ Retina display (A1502), running Win 7 on bootcamp. I also have 2 [LG 25UM64](https://www.google.com/shopping/product/264296052983113163) monitors. The optimal resolution for these monitors is 2560x1080. However, so far as I can tell I can only hit this resolution if I'm connected through HDMI, for which the MBPro only has one port. The thunderbolt ports won't go past 1920x1080, and I tried an HDMI to USB adapter without any luck. I'm wondering if there's a way to get this second monitor to go to full resolution. Hoping someone knows how. Thanks! -EF

Member Avatar
Member Avatar
+0 forum 2

A client of mine wants to implement SSL on their site. They have a number of forms which communicate sensitive/personal information, and want to send the data over a secure channel. I've worked with sites that have SSL certificates already, but never actually implemented one myself. The site runs on WordPress, using a custom theme I created. To the questions: 1. Their head of IT says they have a UCC SSL. Is this appropriate for the task? I once purchased an SSL for Magento Go, and I believe it was called an EV SSL, which I imagine is not the …

Member Avatar
Member Avatar
+0 forum 4

I have some web forms that contain several normal fields, and at least one upload field each. Upon submission, the contents of the form are e-mailed to the recipient. When I fill out the form *without* including a file for upload, it works correctly. I get an e-mail that, when opened, lists the field names and their values, like **Field Name: value**. However, if I *do* include a file for upload, instead of getting an e-mail that contains the normal fields as "Field Name: fieldvalue" along with an attachment for the file I uploaded, I receive a blank e-mail that …

Member Avatar
Member Avatar
+0 forum 5

Hi, I'm having trouble submitting a form using a link. I have a table that lists a bunch of data, and I want to allow users to edit the data directly in the table. The user can click the "EDIT" link, which makes jQuery replace the appropriate <td> html with <input> elements. Then, when the user clicks the "SAVE" link, it should submit the form, but it doesn't. [B]Table:[/B] [code=HTML] <form id="editSec" action="" method="post"> <table id="listSections"> <tr> <td>yellow</td> <td><input type="text" class="First Aisle" value="100" maxlength="3" name="editStart" id="editStart"></td> <td><input type="text" class="Last Aisle" value="153" maxlength="3" name="editEnd" id="editEnd"></td> <td><input type="text" class="Hex Code" value="none" maxlength="6" …

Member Avatar
Member Avatar
+0 forum 3

Hello, I am writing a development area for my clients to view their sites as I work on them. However, I'd like to restrict the directory of a given project to only users who are associated with that project. I'm looking for a way to create a "wrapper" so to speak, that wraps around all items in a project directory, and only allows users to view the directory if it is their project. I was thinking of using frames as the wrappers. While this would prevent the directory from showing up in the address bar, it wouldn't prevent anyone else …

Member Avatar
Member Avatar
+0 forum 5

Hello, I'm trying to create a button that allows the user to d/l info from a DB into a CSV. The button works fine, the download window appears and asks if I want to save/open the csv file. But when the file opens, there is nothing in it, and I don't understand why. If I un-comment the debug section below to test my data variable, the information stored looks fine. Which leads me to believe that the problem is with my header() calls. Can anyone provide any insight? Thanks in advance: [code=PHP] <?php require_once("../template.php"); // check to make that the …

Member Avatar
Member Avatar
+0 forum 1

Hi, I'm somewhat new to jQuery/JavaScript, so any help would be greatly appreciated. I have a few textboxes that need to be populated when a user clicks a hot spot on an image map. Each hot spot has an alt tag representing the ID number of the object I need to retrieve from a database. To retrieve the info from the DB, I have a small PHP script that is called with jQuery's .post() function, something to the effect of: [code=JavaScript] $.post($('#myForm').attr('action'),formInput, function(data){ ... }); [/code] My question is how do I use jQuery to get and manipulate the data …

Member Avatar
Member Avatar
+0 forum 7

Ok I feel like this may be a dumb question, but I'm putting it out there anyway. It's been a while since I've worked with C++. What characters does C++ print for negative values of char? Positive values seem to follow ASCII, but ASCII is only 128 characters. So where are the others from? [code=C++] #include<iostream> using namespace std; int main() { char myChar = 127; while(myChar > -128) { cout << static_cast<int>(myChar) << " " << myChar << endl; myChar--; } cout << static_cast<int>(myChar) << " " << myChar << endl; return 0; } [/code]

Member Avatar
Member Avatar
+0 forum 3

Hi all, I'm starting a new job soon and I'm going to be using my laptop there for a while until they get me my own system. I've set up a new user account called "Work" on my machine, but I'm not very well-versed with configuring user settings. What I'd like to do is remove all folders with programs/files I don't want to access with the Work account. I know that using parental controls I can [i]block[/i] certain programs, but they will still show up in the start menu or windows explorer, they'll just say Access Denied if I try …

Member Avatar
Member Avatar
+0 forum 2

Hi, I'm trying to make a link that changes my web page into a printable format and back: [code=HTML]<a id="print" href="#" title="Print map">Printable version</a>[/code] The switch to printable format works fine: [code=JavaScript] $('#print').click(function() { $('img').attr('src', newsrc); $(this).html('Screen version'); $(this).attr('id', 'screen'); return false; }); [/code] But going back, it doesn't work at all. Of course, [icode].click()[/icode] won't work because the element gets id "screen" only after the link is clicked. I tried using [icode].live()[/icode], but this didn't work either: [code=JavaScript] $('#screen').live("click", function() { $('img').attr('src', oldsrc); $(this).html('Printable version'); $(this).attr('id', 'print'); return false; }); [/code] I've since solved the problem by just using …

Member Avatar
Member Avatar
+0 forum 2

I have a rather embarrassing problem. While debugging a web app, I suddenly found I was not retrieving items from the database. I went to the command line to log into MySQL and got back "Error 1040: Too many connections." This was when I realized I'd forgotten to include a call to mysqli::close() in my PHP script. This has never been a problem before -- PHP is supposed to close the DB connection at the end of the script, if I'm not mistaken. In any case, it's fixed now, but in the meantime I can't connect to my DB. Is …

Member Avatar
Member Avatar
+0 forum 2

Hey all, I'm having a problem with my WordPress contact form. It is a script I edited from a tutorial I found, and it should be working right. I have a jQuery script that is supposed to help validate it and process it without page refresh. The problem is that for some reason, neither the PHP script nor the jQuery script can seem to find my contact page [i]when the form is submitted[/i]. The jQuery script, for example, works perfectly fine up until the ajax call, but once it sends the request Firebug says it hits the 404 page. I …

Member Avatar
Member Avatar
+0 forum 4

I'm trying to use the [URL="http://htmldog.com/articles/suckerfish/dropdowns/"]Son of Suckerfish[/URL] dropdown menu to make the drop-down menu for a site I'm working on. The dropdown looks fine in FF3, but on IE7 (the only other browser I've tested it on so far) it's got some problems. I've posted an example of the drop-down menu here: [URL="http://www.zivkarmi.com/dropdowntest"]http://www.zivkarmi.com/dropdowntest[/URL] If you're using IE7, mouse over the "Listen" menu. The first problem you'll probably notice is that there's way too much white space under "Jazz". It's actually the same amount of space that the Jazz submenu takes up. If you mouse over "Jazz", you'll also notice …

Member Avatar
Member Avatar
+0 forum 1

Hello, I'm looking to write a wallpaper-swapping program. This is just a personal project I feel like doing. I'm aware that there's already software out for this, but the one I like has limits on the freeware version, and the others don't have some of the features I'm looking for, or they don't work for Vista. Besides, I've been looking to practice my programming, since it's been a while since I've done any serious coding. Requirements: The program should let the user choose either a directory of images or choose specific images from one or more directories. Images will swap …

Member Avatar
+0 forum 0

Hello, My professor has asked me to write a C# GUI for a C++ program. I did not write the C++ program (hell, I'm not even completely sure what it does -- something to do with pattern recognition). I wanted to know how one would go about writing a C# GUI for a program written in another language. I did a little bit of research online and saw the term "wrapper" used, but it wasn't very clear. Is there a way to access the C++ program's classes and functions through a C# GUI? Also, the C++ program allows command line …

Member Avatar
Member Avatar
+0 forum 3

Hi, I'm using GD to dynamically draw a rectangle on an image I have of a map. I've got that part working fine. Here's my question: I know I need to set the headers of the page to [icode]content-type: image/png[/icode], otherwise I get a bunch of characters instead of the picture. But what if I want to place this dynamically created image inside a PHP or HTML document so that I can place text and other data around it? Is there any way to do this, or does the GD-generated image [I]have[/I] to stay on its own page? Thanks - …

Member Avatar
Member Avatar
+0 forum 4

Hello, I am writing a program (for fun as well as for practical uses) that will allow me to keep track of several projects I am working on and how long I have spent working on each. My program has a class "Project" which has the following variables: [code="VB"] Private projectID As Integer ' Project's unique identifier Private projectTitle As String ' Project's title Private description As String ' Project's description Private elapsedTime As UInteger = 0 ' Total time elapsed for the project so far Private active As Boolean ' Whether or not the project is active Private entries …

Member Avatar
Member Avatar
+0 forum 6

The End.