Search Results

Search found 1032 results on 42 pages for 'patrick kenny'.

Page 6/42 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Vbscript - Checking each subfolder for files

    - by Kenny Bones
    Ok, this is a script that's supposed to basically mirror two sets of folders. I managed to get it to work, but it seems like it didn't check each subfolder. So, I added these lines to the code: Set colFolders = objFolder.Subfolders Then I added this: For each subFolder in colFolders For each objFile in colFiles Dim DateModified DateModified = objFile.DateLastModified ReplaceIfNewer objFile, DateModified, strSourceFolder, strDestFolder Next Next This however does not seem to be working. This is the full code below. Dim strSourceFolder, strDestFolder Dim fso, objFolder, colFiles, colfolders strSourceFolder = "c:\users\vegsan\desktop\Source\" strDestFolder = "c:\users\vegsan\desktop\Dest\" Set fso = CreateObject("Scripting.FileSystemObject") Set objFolder = fso.GetFolder(strSourceFolder) Set colFiles = objFolder.Files Set colFolders = objFolder.Subfolders For each subFolder in colFolders For each objFile in colFiles Dim DateModified DateModified = objFile.DateLastModified ReplaceIfNewer objFile, DateModified, strSourceFolder, strDestFolder Next Next Sub ReplaceIfNewer (sourceFile, DateModified, SourceFolder, DestFolder) Const OVERWRITE_EXISTING = True Dim fso, objFolder, colFiles, sourceFileName, destFileName Dim DestDateModified, objDestFile Set fso = CreateObject("Scripting.FileSystemObject") sourceFileName = fso.GetFileName(sourceFile) destFileName = DestFolder & sourceFileName if fso.FileExists(destFileName) Then Set objDestFile = fso.GetFile(destFileName) DestDateModified = objDestFile.DateLastModified if DateModified <> DestDateModified Then fso.CopyFile sourceFile, destFileName End if End if if Not fso.FileExists(destFileName) Then fso.CopyFile sourceFile, destFileName End if End Sub

    Read the article

  • Unit testing with Mocks. Test behaviour not implementation

    - by Kenny Eliasson
    Hi.. I always had a problem when unit testing classes that calls other classes, for example I have a class that creates a new user from a phone-number then saves it to the database and sends a SMS to the number provided. Like the code provided below. public class UserRegistrationProcess : IUserRegistration { private readonly IRepository _repository; private readonly ISmsService _smsService; public UserRegistrationProcess(IRepository repository, ISmsService smsService) { _repository = repository; _smsService = smsService; } public void Register(string phone) { var user = new User(phone); _repository.Save(user); _smsService.Send(phone, "Welcome", "Message!"); } } It is a really simple class but how would you go about and test it? At the moment im using Mocks but I dont really like it [Test] public void WhenRegistreringANewUser_TheNewUserIsSavedToTheDatabase() { var repository = new Mock<IRepository>(); var smsService = new Mock<ISmsService>(); var userRegistration = new UserRegistrationProcess(repository.Object, smsService.Object); var phone = "0768524440"; userRegistration.Register(phone); repository.Verify(x => x.Save(It.Is<User>(user => user.Phone == phone)), Times.Once()); } [Test] public void WhenRegistreringANewUser_ItWillSendANewSms() { var repository = new Mock<IRepository>(); var smsService = new Mock<ISmsService>(); var userRegistration = new UserRegistrationProcess(repository.Object, smsService.Object); var phone = "0768524440"; userRegistration.Register(phone); smsService.Verify(x => x.Send(phone, It.IsAny<string>(), It.IsAny<string>()), Times.Once()); } It feels like I am testing the wrong thing here? Any thoughts on how to make this better?

    Read the article

  • Ruby TypeErrors involving `expected Data`

    - by Kenny Peng
    I've ran into situations where I have gotten these expected Data errors before, but they have always pointed to ActiveRecord not playing well with other libraries in the past. This piece of code: def load(kv_block, debug=false) # Converts a string block to a Hash using split kv_map = StringUtils.kv_array_to_hash(kv_block) # Loop through each key, value kv_map.each do |mem,val| # Format the member from camel case to underscore member = mem.camel_to_underscore() # If the object includes a method to set the key (i.e. the key # is a member of self), invoke the method, setting the value of # the member) if self.methods.include?(member.to_set_method_name()) then # Exception thrown here self.send(member.to_set_method_name(), val) # Else, check for the same case, this time for an instance variable elsif self.instance_variable_defined?(member.to_instance_var_name()) self.instance_variable_set(member.to_instance_var_name(), val) # Else, complain that the object doesn't understand the key with # respect to its class definition. else raise ArgumentError, "I don't know what to do with #{member}. #{self.class} does not have a member or function called #{member}" end end end produces the error wrong argument type #<Class:0x11a02088> (expected Data) (TypeError) in the each loop on the first if test. I've inspected a post-mortem debugging instance using rdebug, and running that line manually, it works without a hitch. Has anyone seen this error before and what's been your solution to it? I used to think it was ActiveRecord and other gems stomping on each other's definitions, but I removed any references to ActiveRecord and this still occurs.

    Read the article

  • jQuery UI - Sortable isn't firing?

    - by Kenny Bones
    Hi, I'm trying to get the jQuery UI sortable plugin to work and I've created a list that looks like this: <ul id="sortable"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> </ul> And I've included the plugin script files: $(function() { $("#sortable").sortable(); alert('test'); $("#sortable").disableSelection(); }); So I just tried putting the alert box before .sortable is run and the alertbox is showing. But putting it after .sortable isn't working. Which means that .sortable is failing right? I've included the scripts and put them in the head of the html document. <script type="text/javascript" src="js/jquery.ui.core.min.js"></script> <script type="text/javascript" src="js/jquery.ui.mouse.min.js"></script> <script type="text/javascript" src="js/jquery.ui.sortable.min.js"></script> <script type="text/javascript" src="js/jquery.ui.widget.min.js"></script> Which is correct right? And the function that actually runs .sortable is in a merged js file along with all other js snippets and plugins.

    Read the article

  • VB.NET - using textfile as source for menus and textboxes

    - by Kenny Bones
    Hi, this is probably a bit tense and I'm not sure if this is possible at all. But basically, I'm trying to create a small application which contains alot of PowerShell-code which I want to run in an easy matter. I've managed to create everything myself and it does work. But all of the PowerShell code is manually hardcoded and this gives me a huge disadvantage. What I was thinking was creating some sort of dynamic structure where I can read a couple of text files (possible a numerous amount of text files) and use these as the source for both the comboboxes and the richtextbox which provovides as the string used to run in PowerShell. I was thinking something like this: Combobox - "Choose cmdlet" - Use "menucode.txt" as source Richtextbox - Use "code.txt" as source But, the thing is, Powershell snippets need a few arguments in order for them to work. So I've got a couple of comboboxes and a few textboxes which provides as input for these arguments. And this is done manually as it is right now. So rewriting this small application should also search the textfile for some keywords and have the comboboxes and textboxes to replace those keywords. And I'm not sure how to do this. So, would this requre a whole lot of textfiles? Or could I use one textfile and separate each PowerShell cmdlet snippets with something? Like some sort of a header? Right now, I've got this code at the eventhandler (ComboBox_SelectedIndexChanged) If ComboBoxFunksjon.Text = "Set attribute" Then TxtBoxUsername.Visible = True End If If chkBoxTextfile.Checked = True Then If txtboxBrowse.Text = "" Then MsgBox("You haven't choses a textfile as input for usernames") End If LabelAttribute.Visible = True LabelUsername.Visible = False ComboBoxAttribute.Visible = True TxtBoxUsername.Visible = False txtBoxCode.Text = "$users = Get-Content " & txtboxBrowse.Text & vbCrLf & "foreach ($a in $users)" & vbCrLf & "{" & vbCrLf & "Set-QADUser -Identity $a -ObjectAttributes @{" & ComboBoxAttribute.SelectedItem & "='" & TxtBoxValue.Text & "'}" & vbCrLf & "}" If ComboBoxAttribute.SelectedItem = "Outlook WebAccess" Then TxtBoxValue.Visible = False CheckBoxValue.Visible = True CheckBoxValue.Text = "OWA Enabled?" txtBoxCode.Text = "$users = Get-Content " & txtboxBrowse.Text & vbCrLf & "foreach ($a in $users)" & vbCrLf & "{" & vbCrLf & "Set-CASMailbox -Identity $a -OWAEnabled" & " " & "$" & CheckBoxValue.Checked & " '}" & vbCrLf & "}" End If If ComboBoxAttribute.SelectedItem = "MobileSync" Then TxtBoxValue.Visible = False CheckBoxValue.Visible = True CheckBoxValue.Text = "MobileSync Enabled?" Dim value If CheckBoxValue.Checked = True Then value = "0" Else value = "7" End If txtBoxCode.Text = "$users = Get-Content " & txtboxBrowse.Text & vbCrLf & "foreach ($a in $users)" & vbCrLf & "{" & vbCrLf & "Set-QADUser -Identity $a -ObjectAttributes @{msExchOmaAdminWirelessEnable='" & value & " '}" & vbCrLf & "}" End If Else LabelAttribute.Visible = True LabelUsername.Visible = True ComboBoxAttribute.Visible = True txtBoxCode.Text = "Set-QADUser -Identity " & TxtBoxUsername.Text & " -ObjectAttributes @{" & ComboBoxAttribute.SelectedItem & "='" & TxtBoxValue.Text & " '}" If ComboBoxAttribute.SelectedItem = "Outlook WebAccess" Then TxtBoxValue.Visible = False CheckBoxValue.Visible = True CheckBoxValue.Text = "OWA Enabled?" txtBoxCode.Text = "Set-CASMailbox " & TxtBoxUsername.Text & " -OWAEnabled " & "$" & CheckBoxValue.Checked End If If ComboBoxAttribute.SelectedItem = "MobileSync" Then TxtBoxValue.Visible = False CheckBoxValue.Visible = True CheckBoxValue.Text = "MobileSync Enabled?" Dim value If CheckBoxValue.Checked = True Then value = "0" Else value = "7" End If txtBoxCode.Text = "Set-QADUser " & TxtBoxUsername.Text & " -ObjectAttributes @{msExchOmaAdminWirelessEnable='" & value & "'}" End If End If Now, this snippet above lets me either use a text file as a source for each username used in the powershell snippet. Just so you know :) And I know, this is probably coded as stupidly as it gets. But it does work! :)

    Read the article

  • IE7 not digesting JSON: "parse error"

    - by Kenny Leu
    While trying to GET a JSON, my callback function is NOT firing. $.ajax({ type:"GET", dataType:'json', url: myLocalURL, data: myData, success: function(returned_data){alert('success');} }); The strangest part of this is that my JSON(s) validates on JSONlint this ONLY fails on IE7...it works in Safari, Chrome, and all versions of Firefox. If I use 'error', then it reports "parseError"...even though it validates! Is there anything that I'm missing? Does IE7 not process certain characters, data structures (my data doesn't have anything non-alphanumeric, but it DOES have nested JSONs)? I have used tons of other AJAX calls that all work (even in IE7), but with the exception of THIS call. An example data return here is: {"question":{ "question_id":"19", "question_text":"testing", "other_crap":"none" }, "timestamp":{ "response":"answer", "response_text":"the text here" } } I am completely at a loss. Hopefully someone has some insight into what's going on...thank you!

    Read the article

  • Vbscript - Object Required for DateLastModified

    - by Kenny Bones
    I don't really know what's wrong right here. I'm trying to create a vbscript that basically checks two Folders for their files and compare the DateLastModified attribute of each and then copies the source files to the destination folder if the DateLastModified of the source file is newer than the existing one. I have this code: Dim strSourceFolder, strDestFolder Dim fso, objFolder, colFiles strSourceFolder = "c:\users\user\desktop\Source\" strDestFolder = "c:\users\user\desktop\Dest\" Set fso = CreateObject("Scripting.FileSystemObject") Set objFolder = fso.GetFolder(strSourceFolder) Set colFiles = objFolder.Files For each objFile in colFiles Dim DateModified DateModified = objFile.DateLastModified ReplaceIfNewer objFile, DateModified, strSourceFolder, strDestFolder Next Sub ReplaceIfNewer (sourceFile, DateModified, SourceFolder, DestFolder) Const OVERWRITE_EXISTING = True Dim fso, objFolder, colFiles, sourceFileName, destFileName Dim DestDateModified, objDestFile Set fso = CreateObject("Scripting.FileSystemObject") sourceFileName = fso.GetFileName(sourceFile) destFileName = DestFolder & sourceFileName if fso.FileExists(destFileName) Then objDestFile = fso.GetFile(destFileName) DestDateModified = objDestFile.DateLastModified msgbox "File last modified: " & DateModified msgbox "New file last modified: " & DestDateModified End if End Sub And I get the error: On line 34, Char 3 "Object required: 'objDestFile' But objDestFile IS created?

    Read the article

  • Changing the HTML of CKEditor form elements (in the dialog window)

    - by Kenny Meyers
    I'm trying to modify the HTML of the dialog boxes in CKEditor. The HTML inside each of those boxes is an absolute nightmare, and even worse, the source code is compressed and it's unclear what the path of execution is. I want to take something like this: <div class="cke_dialog_ui_select" id="44_uiElement" role="presentation"><label style="" for="42_select" id="43_label" class="cke_dialog_ui_labeled_label">Link Type</label><div role="presentation" class="cke_dialog_ui_labeled_content"><select aria-labelledby="43_label" class="cke_dialog_ui_input_select" id="42_select"><option value="url"> URL</option><option value="anchor"> Link to anchor in the text</option><option value="email"> E-mail</option></select></div></div> and turn it into something more legible and easier to style, removing one of the divs. These are for the Image and Anchor dialog boxes (Modal dialogues) respectively. Thanks for your help.

    Read the article

  • Sort/Enumerate an NSArray from somewhere in the middle?

    - by Kenny Winker
    I have an NSArray, with objects ordered like so: a b c d e f I would like to enumerate through this array in this order: c d e f a b i.e. starting at some point that is not the beginning, but hitting all the items. I imagine this is a matter of sorting first and then enumerating the array, but I'm not sure if that's the best technique... or, frankly, how to sort the array like this. Edit Adding details: These will be relatively small arrays, varying from 3 to 10 objects. No concurrent access. I'd like to permanently alter the sort order of the array each time I do this operation.

    Read the article

  • jQuery - Creating a dynamic content loader using $.get()

    - by Kenny Bones
    Hello everybody! (hello dr.Nick) :) So I posted a question yesterday about a content loader plugin for jQuery I thought I'd use, but didn't get it to work. http://stackoverflow.com/questions/2469291/jquery-could-use-a-little-help-with-a-content-loader Although it works now, I see some disadvantages to it. It requires heaploads of files where the content is in. Since the code essentially picks up the url in the href link and searches that file for a div called #content What I would really like to do is to collect all of these files into a single file and give each div/container it's unique ID and just pick up the content from those. So i won't need so many separate files laying around. Nick Craver thought I should use $.get()instead since it's got a descent callback. But I'm not that strong in js at all.. And I don't even know what this means. I'm basically used to Visual Basic and passing of arguments, storing in txt files etc. Which is really not suitable for this purpose. So what's the "normal" way of doing things like this? I'm pretty sure I'm not the only one who's thought of this right? I basically want to get content from a single php file that contains alot of divs with unique IDs. And without much hassle, fade out the existing content in my main page, pick up the contents from the other file and fade it into my main page.

    Read the article

  • SQL join from multiple tables

    - by Kenny Anderson
    Hi all We've got a system (MS SQL 2008 R2-based) that has a number of "input" database and a one "output" database. I'd like to write a query that will read from the output DB, and JOIN it to data in one of the source DB. However, the source table may be one or more individual tables :( The name of the source DB is included in the output DB; ideally, I'd like to do something like the following (pseudo-SQL ahoy) SELECT output.UID, output.description, input.data from output.dbo.description LEFT JOIN (SELECT input.UID, input.data FROM [output.sourcedb].dbo.datatable ) AS input ON input.UID=output.UID Is there any way to do something like the above - "dynamically" specify the database and table to be joined on for each row in the query?

    Read the article

  • How to properly preload images, js and css files?

    - by Kenny Bones
    Hi, I'm creating a website from scratch and I was really into this in the late 90's but the web has changed alot since then! And I'm more of a designer so when I started putting this site together, I basically did a system of php includes to make the site more "dynamic" When you first visit the site, you'll be presented to a logon screen, if you're not already logged on (cookies). If you're not logged on, a page called access.php is introdused. I thought I'd preload the most heavy images at this point. So that when the user is done logging on, the images are already cached. And this is working as I want. But I still notice that the biggest image still isn't rendered immediatly anyway. So it's seems kinda pointless. All of this has made me rethink how the site is structured and how scripts and css files are loaded. Using FireBug and YSlow with Firefox I see a few pointers like expires headers and reducing the size of each script. But is this really the culprit? For example, would this be really really stupid in the main index.php? The entire site is basically structured like this <?php require("dbconnect.php"); ?> <?php include ("head.php"); ?> And below this is basically just the body and the content of the site. Head.php however consists of the doctype, head portions, linking of two css style sheets, jQuery library, jQuery validation engine, Cufon and Cufon font file, and then the small Cufon.Replace snippet. The rest of the body comes with the index.php file, but at the bottom of this again is an include of a file called "footer.php" which basically consists of loading of a couple of jsLoader scripts and a slidepanel and then a js function. All of this makes the end page source look like a typical complete webpage, but I'm wondering if any of you can see immediatly that "this is really really stupid" and "don't do that, do this instead" etc. :) Are includes a bad way to go? This site is also pretty image intensive and I can probably do a little more optimization. But I don't think that's its the primary culprit. YSlow gives me a report of what takes up the most space: doc(1) - 5.8K js(5) - 198.7K css(2) - 5.6K cssimage(8) - 634.7K image(6) - 110.8K I know it looks like it's cssimage(8) that weighs the most, but I've already preloaded these images from before and it doesn't really affect the rendering.

    Read the article

  • Unknown Column?

    - by Kenny
    ok im trying to get mutual friends between these Two users, user1 and user92 This is the sql that is successful in displaying them SELECT IF(user_a = 1 OR user_a = 92, user_b, user_a) friend FROM friendship WHERE (user_a = 1 OR user_a = 92) OR (user_b = 1 OR user_b = 92) GROUP BY 1 HAVING COUNT(*) > 1 THis is how it looks friend 61 72 73 74 75 76 77 78 79 80 81 So now i want to select all users after the number 72, and i try to do it with this sql but its not working? It gives me the error, "unknown coulum name friend in where clause" SELECT IF(user_a = 1 OR user_a = 92, user_b, user_a) friend FROM friendship WHERE friend > 72 and (user_a = 1 OR user_a = 92) OR (user_b = 1 OR user_b = 92) GROUP BY 1 HAVING COUNT(*) > 1 what am i doing wrong? or what is the correct way?? thx

    Read the article

  • Custom UITableViewCell from xib isn't displaying properly

    - by Kenny Wyland
    I've created custom UITableCells a bunch of times and I've never run into this problem, so I'm hoping you can help me find the thing I've missed or messed up. When I run my app, the cells in my table view appear to be standard cells with Default style. I have SettingsTableCell which is a subclass of UITableViewCell. I have a SettingsTableCell.xib which contains a UITableViewCell and inside that are a couple labels and a textfield. I've set the class type in the xib to be SettingsTableCell and the File's Owner of the xib to my table controller. My SettingsTableController has an IBOutlet property named tableCell. My cellForRowAtIndexPath contains the following code to load my table view xib and assign it to my table controller's tableCell property: static NSString *CellIdentifier = @"CellSettings"; SettingsTableCell *cell = (SettingsTableCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { [[NSBundle mainBundle] loadNibNamed:@"SettingsTableCell" owner:self options:nil]; cell = self.tableCell; self.tableCell = nil; NSLog(@"cell=%@", cell); } This is what my xib set up looks like in IB: When I run my app, the table displays as if all of the cells are standard Default style cells though: The seriously weird part is though... if I tap on the area of the cell where the textfield SHOULD be, the keyboard does come up! The textfield isn't visible, there's no cursor or anything like that... but it does respond. The visible UILabel is obviously not the UILabel from my xib though because the label in my xib is right justified and the one showing in the app is left justified. I'm incredibly confused about how this is happening. Any help is appreciated.

    Read the article

  • CSS - Why is this invisible margin being applied to my <a> tag css-button?

    - by Kenny Bones
    I was having trouble with two types of buttons. It was a form button and a css button basically. And I was advised that the css button whould use display:inline-block; This made the whole a href tag actually look like a button. But this invisible margin seems to be screwing up something. I tried separating them into separate css classes, but oddly, applying a real margin to the css button gives an additional margin as well. What's causing this? You can easily see it here (low graphics): www.matkalenderen.no Basically, code looks like this: <input type="submit" value="Logg inn" class="button_blue" alt="ready to login"> <a class="button_css_red" href="access.php">Glemt passord</a> CSS .button_red, .button_blue, .button_css_red, .button_css_blue { background-image:url("../img/sprite_buttons.png"); background-repeat:no-repeat; border: none; color:#FFFFFF; display:inline-block; display:inline-block; font-size:12px; height:27px; width:98px; } .button_css_red, .button_css_blue { margin-top:20px; }

    Read the article

  • Using jQuery to store basic text string in mySQL base?

    - by Kenny Bones
    Could someone point me in the right direction here? Basically, I've got this jQuery code snippet: $('.bggallery_images').click(function () { var newBG = "url('" + $(this).attr('src'); var fullpath = $(this).attr('src'); var filename = fullpath.replace('img/Bakgrunner/', ''); $('#wrapper').css('background-image', newBG); // Lagre til SQL $.ajax({ url: "save_to_db.php", // The url to your function to handle saving to the db data: filename, dataType: 'Text', type: 'POST', // Could also use GET if you prefer success: function (data) { // Just for testing purposes. alert('Background changed to: ' + data); } }); }); This is being run when I click a certain button. So it's actually within a click handler. If I understand this correctly, this snippet takes the source if the image I just clicked and strips it so I end up with only the filename. If I do an alert(filename), I get the filename only. So this is working ok. But then, it does an ajax call to a php file called "save_to_db.php" and sends data: filename. This is correct right? Then, it does a callback which does an alert + data. Does this seem correct so far? Cause my php file looks like this: <?php require("dbconnect2.php"); $uploadstring = $_POST['filename']; $sessionid = $_SESSION['id']; echo ($sessionid); mysql_query("UPDATE brukere SET brukerBakgrunn = '$uploadstring' WHERE brukerID=" .$_SESSION['id']); mysql_close(); ?> When I click the image, the jQuery snippet fires and I get the results of this php file as output for the alert box. I think that the variables somehow are empty. Because notice the echo($sessionid); which is a variable I've created just to test what the session ID is. And it returns nothing. What could be the issue here? Edit: I just tried to echo out the $uploadstring variable as well and it also returns nothing. It's like the jQuery snippet doesn't even pass the variable on to the php file?

    Read the article

  • #region is XAML

    - by kenny
    I actually don't link #region in my code. BUT for some reason call me crazy, I would like to have them in my XAML. I would like whole sections to have a #region-like thing and collapse them (e.g. my <Window.CommandBindings, <Grid.*Definitions, <Menu, <Toolbar, etc.. Does this exist? If not, how about <RegionCollapse

    Read the article

  • jQuery - Save to SQL via PHP

    - by Kenny Bones
    This is probably easy for you guys, but I can't understand it. I want to save the filename of an image to it's own row in the SQL base. Basically, I log on to the site where I have my own userID. And each user has its own column for background images. And the user can choose his own image if he wants to. So basically, when the user clicks on the image he wants, a jquery click event occurs and an ajax call is made to a php file which is supposed to take care of the actual update. The row for each user always exist so there's only an update of the data that's necessary. First, I collect the filename of the css property 'background-image' and split it so I get only the filename. I then store that filename in a variable I call 'filename' which is then passed on to this jQuery snippet: $.ajax({ url: 'save_to_db.php', data: filename, dataType:'Text', type: 'POST', success: function(data) { // Just for testing purposes. alert('Background changed to: ' + data); } }); And this is the php: <?php require("dbconnect.php") ?> <?php $uploadstring = ($_POST['filename']); mysql_query("UPDATE brukere SET brukerBakgrunn = $uploadstring WHERE brukerID=" .$_SESSION['id'] .""; mysql_close(); ?> Basically, each user has their own ID and this is called 'brukerID' The table everything is in is called 'brukere' and the column I'm supposed to update is the one called 'brukerBakgrunn' When I just run the javascript snippet, I get this message box in return where it says: Background changed to: Parse error: syntax error, unexpected ';' in /var/www/clients/client2/web8/web/save_to_db.php on line 8 I actualle get this messagebox twice, not sure why. Line 8 in 'save_to_db.php' is this one: mysql_query("UPDATE brukere SET brukerBakgrunn = $uploadstring WHERE brukerID=" .$_SESSION['id'] .""; Not sure if you need to see db_connect.php as well. I can add that later if you need to see it. So what am I missing here?

    Read the article

  • VBScript - using IF statements in a mail script?

    - by Kenny Bones
    I really need some quick tips here. I've got this VBScript script which sends an e-mail. And I want to do several checks to see if an attribute is true and if it is, write an additional line in the mail. How can I do this? This is part of the script: obMessage.HTMLBody = ""_ & "<MENU>"_ & "<LI type = square>This is a line</i>."_ I want something which looks like this: obMessage.HTMLBody = ""_ & "<MENU>"_ If statement1 = true Then & "<LI type = square>This is an additional line</i>."_ end if Preferrably, could some select statements be made? I don't really mind what the code looks like, I just want it to work as soon as possible :)

    Read the article

  • jQuery - Set min-height of div

    - by Kenny Bones
    This is probably really easy for most of you. But I'm in need of a small snippet that looks up the current height of a div (the div has a dynamic height based on the content inside it) and then set that value in the css class's min-height value. Basically what this means is that I want this container to have it's min-height to be the exact same value as it's current height. This is probably a quick one :)

    Read the article

  • Multitrack sound recording - Downloadable control?

    - by Kenny Bones
    Hi, I was just wondering if anyone knows of any free Open Source software wich demonstrates multitrack recording support? I was thinking of something in the lines of this: http://www.soft411.com/company/NCH-Software/MixPad-Audio-Mixer%5Fscreenshot.html I want to include multitrack support in my own software, for personal use and I don't even know where to start to be able to do that. So preferrably a control or something would have been great. I could also be able to pay for something like this, as long as I'd be able to include it in my own VB.NET solution. Any replies are much appreciated! :) Edit: What's with the vote down? I was just wondering if there are any components I can buy and download to use in my own project..

    Read the article

  • I can't seem to get my grand Total to calculate correctly

    - by Kenny
    When I run this query below, SELECT clientid, CASE WHEN D.ccode = '-1' Then 'Did Not Show' ELSE D.ccode End ccode, ca, ot, bw, cshT, dc, dte, approv FROM dbo.emC D WHERE year(dte) = year(getdate()) I get the correct results. It is correct result because ccode shows 'Did Not Show' when the value on the db is '-1' However, when I do a UNION ALL so I can get total for each column, I get the results but then 'Did Not Show' is no longer visible when valye for ccode is '-1'. There are over 1000 records with valuye of '-1'. Can someone please help? Here is the entire code with UNION. SELECT clientid, CASE WHEN D.ccode = '-1' Then 'Did Not Show' ELSE D.ccode End ccode, ca, ot, bw, cshT, dc, dte, approv FROM dbo.emC D WhERE year(dte) = year(getdate()) UNION ALL SELECT 'Total', '', SUM(D.ca), SUM(D.ot), SUM(D.bw), SUM(D.cshT), '', '', '' FROM emC D WHERE YEAR(dte)='2011' I also tried using ROLLUP but the real issue here is that I can't get the 'Did Not Show' text to display when ccode value is -1 ClientID CCODE ot ca bw cshT 019692 CF001 0.00 0.00 1.00 0.00 0.00 019692 CH503 0.00 0.00 1.00 0.00 0.00 010487 AC407 0.00 0.00 1.00 0.00 0.00 028108 CH540 0.00 0.00 1.00 0.00 0.00 028108 GS925 0.00 0.00 1.00 0.00 0.00 001038 AC428 0.00 0.00 3.00 0.00 0.00 028561 Did Not Show 0.00 0.00 0.00 0.00 0.00 016884 Did Not Show 0.00 0.00 0.00 0.00 0.00 05184 CF001 0.00 0.00 4.50 0.00 0.00

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >