Hello there. I'm at a point where I have to set up a continuous integration environment. I have contributed to projects using CI before, but I have never set it up. I roughly know what it is supposed to do, but I could definitely use some help. In my head I'm thinking something like this is what should happen (I'm using this for a PHP project): **pre-commit** * run unit tests * check if Sass compiles * check if JS compiles (using Webpack) * if everything goes well: commit **post-push** * run the same checks as before (as we cannot …

Member Avatar
Member Avatar
+0 forum 3

It's cool that you are constantly developing Daniweb, but I feel that it's time to mention some things that I feel are missing since the last overhaul: 1. Can't easily jump to subforums (like "PHP") any more. This isn't really a problem, because I used to just open the "Web development" section anyway, but I think it would be nice to include some tag filtering at the top of a forum now (or maybe in a fixed sidebar). 2. Can't see who posted the last reply to a discussion. Usually when I see/saw someone of whom I know has knowledge …

Member Avatar
Member Avatar
+3 forum 26

After reading [this](https://www.daniweb.com/web-development/php/threads/491368/looking-for-advice) post I started wondering what is required nowadays to build an app. Let's take an Android app as an example. I've heard of porters like PhoneGap, that convert your HTML/Javascript to Java (Android for as far as I know), but are there easier ways nowadays? I know very little about Java - my main focus is PHP. I do know a good bit of Javascript, though, so does anyone have experience with creating apps without knowing the main language in which those apps are usually written? Or better yet: what can you do in regard to creating …

Member Avatar
+0 forum 0

Does anyone know how to install a new locale on Apache that comes with Xampp for Windows? I'm trying to find an answer with Google but it only shows results for "local" instead of "locale" -_-. (I want to install a Dutch locale. It might even be in there already but I can't find out if it is, and I can't get it working).

Member Avatar
Member Avatar
+0 forum 2

So I've given RequireJS a try this weekend, and although it appears to work pretty smooth, I can't figure out one thing: How do I combine PHP and Javascript while using RequireJS? See, RequireJS can only work with .js files, meaning that it cannot "require" .php files. In many files, however, I use PHP to retrieve database data which is then used by Javascript. It feels pretty inefficient to me to take apart these processes and let my Javascript execute an AJAX request to retrieve the settings I can normally set with PHP directly. Is there anyone with experience with …

Member Avatar
Member Avatar
+0 forum 4

I'll be visiting my girlfriend who's staying in Helsinki, Finland until the end of december, and I'd like to surprise her by taking her on some kind of trip or event or something. However, last time I was there we have already seen the most popular places in Helsinki. So I was wondering, is there anyone here from Finland (or not from Finland) who knows some cool things to do in/around Helsinki? I've been thinking about renting a small cabin, but I'd actually like to get some more inspiration if I can :).

Member Avatar
Member Avatar
+0 forum 5

For some reason my triggers are recursing, while I think they shouldn't. I'll simplify the examples for the sake of you not having to read through all the code. Trigger 1: CREATE TRIGGER table_1_after_delete AFTER DELETE ON table_1 FOR EACH ROW BEGIN DELETE FROM table2 WHERE table2.table_1_key = OLD.table_1_key; END $$ Trigger 2: CREATE TRIGGER table_2_after_delete AFTER DELETE ON table_2 FOR EACH ROW BEGIN -- Only execute the UPDATE query if a record still exists in table_1, from which we have -- deleted a record, triggering this function and targeting back table_1 (recursion). CASE WHEN (SELECT table_1.table_1_key FROM table_1 WHERE …

Member Avatar
Member Avatar
+0 forum 1

So I'm planning to make a trip through the US. More specifically: through the west of the US (San Fransisco, Las Vegas, that area). I was wondering if you had any tips for me. It would be a 2-person trip of 20 days. Our plan was to rent a car or a campervan (van in which you can sleep). We prefer the campervan but it's fairly expensive (at least it sounds like a lot of money to me, $1450 for 19 days). Anyone know any good alternatives or have any other suggestions? Thanks!

Member Avatar
Member Avatar
+0 forum 39

Just curious about your thoughts on this subject. **Example:** www.site.com/?id=1 or www.site.com/?id=8adyfa8df614812yasdf (which is also "1", but encrypted) What would you recommend? What do you use? Anyone with pros and/or cons on if you should encrypt your URL data? **My thoughts:** Pros (to encrypting URL data): - Makes it harder for unwanted people to guess ID's, and thus you will have a safer application. - Noone will have the real access keys to your data, as long as they don't know how you've encrypted the URL data. Cons: - Longer URL's. - Uglier URL's. - Need for extra security checking …

Member Avatar
Member Avatar
+1 forum 1

Just some stuff that I come across often: 1. Would save me a second of time and effort if the "Username" field would get auto focused on the login page. I know it's a minor improvement, but I like it ^^. Facebook does it, for example - I like the way I can just start slamming on my keyboard as soon as the site is loaded, without having to click the "email" field. 2. The header gets a "fixed" position as soon as I scroll down anywhere. I find that useful, but in my opinion, something is missing in the …

Member Avatar
+0 forum 0

**The text:** `<form action="ajaxa/login" method="post" class="odf_ajax loading_image_left" data-target="ajax_login_form">` **The regex (to find the form's action):** `$regex = '/<form.+?action="(.+?)"/i';` **The expected result:** `Array (2): [0] => '<form action="ajaxa/login"', [1] => 'ajaxa/login'` **The actual result:** `Array (1): [0] => 'ajaxa/login'` Can anyone help me explain why this regex is not returning the expected result? Sidenote: If I remove the "<" from the start of the regex, it does return the expected result (without the "<", of course).

Member Avatar
Member Avatar
+0 forum 1

Someone just notified me that a new free online space provider has launched, called Copy. If you know Dropbox: it's pretty much similar to that for as far as I can see now, only here you get a starting **15GB** for free (instead of 2? at Dropbox). They now have a temporary? launch action: for each person you redirect to Copy that then registers himself, both you *and* the one registering get 5GB of extra space. So therefore my idea: if anyone is interested in registering, register, then copy your share-link to this thread, and the next person who is …

Member Avatar
Member Avatar
+0 forum 25

Does anybody know of a reason why a custom font would not load directly when a web page is loaded? When I visit the main page of my website, it uses a standard font instead of the custom font I selected, but if I then go to another page, that page *does* use the custom font, and when I then go back to the main page, the custom font is working all of a sudden. Anyone know how to fix this?

Member Avatar
Member Avatar
+0 forum 8

Okay so I've been going through my HTML lately and I discovered that I was still using the <base> element to define my website's base path. I want to get rid of that - I would like to be able to use relative URLs all the time, without having to rely on the <base> element. Now, the problem is that using URLs like "/this/that" doesn't work the way I want it to on "localhost/project". It would lead to "localhost/this/that" instead of to "localhost/project/this/that". I don't want to prepend `<?php echo $site_root_variable; ?>` to all my URLs either. Does anyone know …

Member Avatar
Member Avatar
+0 forum 4

I am currently working on a project, and I had a name for it in mind. However, the .com domain with that name is already in use. What do you think I should do? Rename my project, or use a .net domain instead of a .com? The name would be: opiniononion.com Would you rather see something like: opiniononion.net or would you rather see another name being used, like: discussiononion.com? Or something else entirely?

Member Avatar
Member Avatar
+0 forum 8

I'm writing a report about public transport, and I'm not English, so I was wondering if anyone could help me with this: what is the correct way to use "public transport" in English? For example: Group x uses public transport to get from A to B Using public transport comes with certain difficulties for group x Group x finds the price of using public transport too high Should I say "public transport" or "public transportation"?

Member Avatar
Member Avatar
+0 forum 29

Hello there, I would like to know if anyone knows a solution for excluding a group within a group in a regular expression. For example: /(name|(?:last[ ])name|(?:first[ ])name)/i I would only like the word "name" to be returned (this is just an example), but when I take match number 1 (matched against "last name"), I get "last name" instead of just "name", even though I used "?:" in the capture group. I think it's because I didn't use "?:" in the first group, so therefore I would like to know: is it possible to achieve what I would like to …

Member Avatar
Member Avatar
+0 forum 8

Hey there. The situation is like this: 1. The user clicks a button. 2. Tooltip pops up. 3. The user clicks the button again OR the user clicks anywhere outside the tooltip. 4. The tooltip is removed. Now I can get either of the events described in step 3 to work, but I can't get them to work at the same time. My code is in short like this (I'm not copying all code, just explaining it, so not all functions that I mention are real functions as you will see ^^): button onclick="function() // Checks if tooltip exists and …

Member Avatar
Member Avatar
+0 forum 4

I just started wondering.. I have a bass class, let's say a class called Framework. This class contains a lot of functions and sets a couple of variables that are used inside other classes. What would be the most efficient way to access these variables from inside other classes? Should I have them extend the Framework class, or should make the variables available in some other way? Side question: if I have 5 classes that all extend the Framework class, does that mean that the Framework class is instantiated and constructed 5 times during the execution of the script?

Member Avatar
Member Avatar
+0 forum 11

Hello! I've recently installed Windows 8 and since that moment my XAMPP installation has been acting a bit weird it takes over a second to establish a mysql connection (mysql_connect) where it used to take less than 0.01 seconds.Timed: Timer 1 (mysql_connect): 1.02864 Timer 2 (select_db): 0.00023 I have found a solution: instead of using mysql_connect('localhost'...) I use mysql_connect('127.0.0.1'...). New timers: Timer 1 (mysql_connect): 0.00446 Timer 2 (select_db): 0.00023 However, I want to be able to just connect to localhost! :) I've checked my hosts file. It does contain a line saying "127.0.0.1 localhost" and the line "::1 localhost" (the …

Member Avatar
Member Avatar
+0 forum 3

Hello everyone. I was wondering if you could help me with an issue. I currently know pretty much about web development in PHP/Javascript and I would like to start learning a new language (in which I can preferably also do some web development). Which language would you recommend for me to start learning? For as far as my knowledge goes I am now thinking about Java and ASP.NET. For as far as I've heard, Java is supported on many platforms and a good language to learn the basics of, and ASP.NET is also a pretty popular language at the moment. …

Member Avatar
Member Avatar
+0 forum 4

Hello there. I am kind of confused. In PHP I substract two unix timestamps from each other. The first: mktime(0, 0, 0, 10, 22, 2012) The second: mktime(24, 0, 0, 10, 28, 2012) For as far as I know the time difference between these two timestamps is exactly 7 days. What I get, however, when I substract the second from the first ($time_difference = $second_timestamp - $first_timestamp) and then divide it by a week (60 * 60 * 24 * 7) is not **1**, but **1.0059523809524** (which equals 1 week and 1 hour)! Wtf?! Can someone please explain? :p

Member Avatar
Member Avatar
+0 forum 3

Hello there. I would like to know if there is a way to write files to my server without CHmodding a certain directory. I have an auto-update script that downloads a .ZIP from my main server, and then extracts those file to the corresponding directories on the current server. However, I'm getting a permission denied error: Warning: ZipArchive::extractTo(../../../../index.php) [ziparchive.extractto]: failed to open stream: Permission denied in /var/www/vhosts/cms.com/httpdocs/cms/includes/modules/update/actions/update.action.php on line 149 I don't get this error after CHmodding the directory to 0777. But I don't want to CHmod ALL my directories. That wouldn't be safe, would it? Is there a workaround? …

Member Avatar
Member Avatar
+0 forum 2

Hello there, I'm running into a minor problem. I want to execute an onKeyUp action after a short delay when a key is released. So for example when the user gets his finger off the "y" button, I want to execute an action related to that "Y" after 1 second. BUT: I want to execute it only once. With the script I now have, 10 timers start running when the user types in 10 letters, which means [B]10 actions are executed[/B], each after 1 second after releasing a key, [B]while I only want to execute 1 action[/B]. So when the …

Member Avatar
Member Avatar
+0 forum 19

On my site there is a horizontal menu. When I hover over a menu button, which is a <div>, a <div> inside that <div> is shown with control options for that button (for example to edit the button text). This is done with Javascript (jQuery). It uses $.hover. So, when I click the "edit button text" button in the <div> that shows when I hover over the menu button, the inner content of the menu button <div> is changed to a text field through AJAX, so that I can edit the button's text. The hover <div> is not replaced when …

Member Avatar
Member Avatar
+0 forum 1

I would like to execute some Javascript after the document has loaded and even after the document.onload functions have been executed. Situation: I'm loading a text-edit field through ajax. When the user submits the form, he is redirected to a PHP file. That PHP file redirects him back to "file.php" using header('location: file.php'); What I want to do is to execute some Javascript actions in file.php, but when I print the <script></script> tags the file id displayed blank - nothing is loaded at all. As soon as I leave them out, the page does get loaded. Any suggestions?

Member Avatar
Member Avatar
+0 forum 2

The case: On my site there are four profile types: persons, artists, companies and events. A user can create multiple profiles. Each profile can be connected to another profile. So a person-profile can for example connect to an artist-profile, but also to an event-profile, and an event-profile can connect to a person-profile, but also to a company-profile or an artist-profile, etc. I want to count the number of connection requests that have been made to a certain user with a certain super_id ($user_id in the query below). The super_id defines the owner of the person, artist, company or event profile. …

Member Avatar
Member Avatar
+0 forum 3

What I would like to do is to create a repeating pattern inside a rewriterule. For example: RewriteRule ^([\w]+)/([\w]+)/(([\w]+)/([\w]+))*/?$ index.php?p=$1&s=$2(&$4=$5)* Breaking it down: On every page my ?p=BLA refers to a certain page, and every &s=BLA refers to a certain subpage. The rewriterule for this would obviously be: RewriteRule ^([\w]+)/([\w]+)/?$ index.php?p=$1&s=$2 But now I want to add custom $_GET data to my url. For example I want to add &search=SEARCH, and I want to add &page=15, and anotherquery=BLA. The rewriterule I just wrote does not support this. Is there any way to support an unspecified number of arguments in a …

Member Avatar
Member Avatar
+0 forum 1

What I would like to do is to create a repeating pattern inside a rewriterule. For example: RewriteRule ^([\w]+)/([\w]+)/[B](([\w]+)/([\w]+))*[/B]/?$ index.php?p=$1&s=$2[B](&$4=$5)*[/B] Breaking it down: On every page my ?p=BLA refers to a certain page, and every &s=BLA refers to a certain subpage. The rewriterule for this would obviously be: RewriteRule ^([\w]+)/([\w]+)/?$ index.php?p=$1&s=$2 But now I want to add custom $_GET data to my url. For example I want to add &search=SEARCH, and I want to add &page=15, and anotherquery=BLA. The rewriterule I just wrote does not support this. Is there any way to support an unspecified number of arguments in a …

Member Avatar
Member Avatar
+0 forum 5

Okay so me and a friend of mine are discussing the following: If you have 1. a table with 10 fields, each a varchar(255) or 2. a table with 10 fields, each a varchar(1billion) [B]Which would be better, performance wise?[/B] I say it won't matter, because MySQL reads the field names before it scans the content. My friend says it will matter, because the field size always impacts the performance of the scanning process.

Member Avatar
Member Avatar
+0 forum 6

The End.