Daily Archives

Articles indexed Wednesday December 12 2012

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

  • How web server choose between unicode and utf-8 for accentued characters?

    - by jacques
    I have a web server with my ISP which replaces in the urls the accentued characters by their unicode values: for instance é (eacute) is translated to %e9 (dec 233). For testing I use locally Easyphp which translate those characters by their utf-8 equivalence: é is then replaced by the well known sequence %c3%a9 (é)... Browsers served by Easyphp don't decode unicode values but they do if running locally (utf-8 and non converted accent also)... I have been unable to find where this behavior is configured in the server. This is a problem as some urls are built by my application using the php rawurlencode() which seems to always encode with unicode values on both servers. Any idea? Thanks in advance.

    Read the article

  • Doing affiliate program with shops who don't have a program already set up

    - by Jacobo Polavieja
    I am developing an online shop which has managed to agree with other shops to a comission per sale. Now, the problem, is these other shops don't have any kind of affiliate system. So my question is, is there any way we could arrange an easy way for this? They don't plan to develop anything as they are small shops, so... my only guess right now is to control on my site how many times the links to them have been clicked to have an estimate of potential clients, but don't know how they can know that user came through my site and purchased something. Thank you very much for your help!

    Read the article

  • Woolrich Parka di tutti i tipi con punti di prezzo poco costoso

    - by maple
    Sebbene il modello di Woolrich Parka Femmine è Giubbotto Woolrich così intenso alla fine, il concetto resta da come l'unica look.During inverno Inuit stagione mesi, scelgono in pile camicie cappotto ricchi rispetto ad altri in quanto mantenere il heated.Tide sistema completamente regolabile in direzione del coperchio, costo pesante di stagno grado comparabili con piuma riscaldata, viene dopo guardando. Overstriking velo maglia, si Woolrich Artic Parka può facilmente prendere position.Woolrich migliora il cliente con la migliore fatta di abiti giacca in pile.wufengfengmaple36

    Read the article

  • 400 bad request when calling a WCF service via jQuery/Ajax in a IIS7 server

    - by Max
    This is what the IIS log says: 2012-12-12 16:35:44 W3SVC1 server001 76.229.32.109 POST /Dashboard/svc/RunJob.svc/RunJob/ExecuteJob - 80 - 76.229.32.109 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+WOW64;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.30729;+.NET+CLR+3.5.30729) ASP.NET_SessionId=poxpqp45rv2m3tuflzckix45 http ://server001/Dashboard/RunJob.aspx server001 400 0 0 2444 1423 1934 I have maxReceivedMessageSize set to a very high number. The weird thing is that the same code works in the lab but it wont work in production. Both environments (lab and production) are using the same web.config file. Any ideas? Thank you

    Read the article

  • Canvas scalable arc position

    - by Amay
    http://jsfiddle.net/cs5Sg/11/ I want to do the scalable canvas. I created two circles (arcs) and one line, when you click on circle and move it, the line will follow and change position. The problem is when I added code for resize: var canvas = document.getElementById('myCanvas'), context = canvas.getContext('2d'), radius = 12, p = null, point = { p1: { x:100, y:250 }, p2: { x:400, y:100 } }, moving = false; window.addEventListener("resize", OnResizeCalled, false); function OnResizeCalled() { var gameWidth = window.innerWidth; var gameHeight = window.innerHeight; var scaleToFitX = gameWidth / 800; var scaleToFitY = gameHeight / 480; var currentScreenRatio = gameWidth / gameHeight; var optimalRatio = Math.min(scaleToFitX, scaleToFitY); if (currentScreenRatio >= 1.77 && currentScreenRatio <= 1.79) { canvas.style.width = gameWidth + "px"; canvas.style.height = gameHeight + "px"; } else { canvas.style.width = 800 * optimalRatio + "px"; canvas.style.height = 480 * optimalRatio + "px"; } } function init() { return setInterval(draw, 10); } canvas.addEventListener('mousedown', function(e) { for (p in point) { var mouseX = e.clientX - 1, mouseY = e.clientY - 1, distance = Math.sqrt(Math.pow(mouseX - point[p].x, 2) + Math.pow(mouseY - point[p].y, 2)); if (distance <= radius) { moving = p; break; } } }); canvas.addEventListener('mouseup', function(e) { moving = false; }); canvas.addEventListener('mousemove', function(e) { if(moving) { point[moving].x = e.clientX - 1; point[moving].y = e.clientY - 1; } }); function draw() { context.clearRect(0, 0, canvas.width, canvas.height); context.beginPath(); context.moveTo(point.p1.x,point.p1.y); context.lineTo(point.p2.x,point.p2.y); context.closePath(); context.fillStyle = '#8ED6FF'; context.fill(); context.stroke(); for (p in point) { context.beginPath(); context.arc(point[p].x,point[p].y,radius,0,2*Math.PI); context.fillStyle = 'red'; context.fill(); context.stroke(); } context.closePath(); } init(); The canvas is scalable, but the problem is with the points (circles). When you change the window size, they still have the same position on the canvas area, but the distance change (so the click option fails). How to fix that?

    Read the article

  • Scheduling a Delay Job on Heroku with a Worker Dyno

    - by user1524775
    I'm currently using Heroku's scheduler to run a script. However, the time that the script takes to run is going to increase from a few milliseconds to a few minutes. I'm looking at using the delayed_job gem to push this process off to a Worker Dyno. I want to continue to run this script once-a-day, just offload it to the worker. My current rake task is: desc "This task updates some stuff for you." task :update_some_stuff => :environment do puts "Updating some stuff ..." SomeClass.new.process puts "... done." end Once the gem is installed, migration run, and worker dyno started, will the script just need to change to: desc "This task updates some stuff for you." task :update_some_stuff => :environment do puts "Updating some stuff ..." SomeClass.new.delay.process puts "... done." end With this task still being a rake task scheduled by Heroku's Scheduler, is the only thing that needs to happen here the introduction of the delay method to put this in the Worker's queue? Thanks in advance for any help.

    Read the article

  • Can anyone tell why Wordpress is adding this p tag?

    - by Elliott Samuel Lemberger
    Here's the page: http://www.gammagoochee.com/media/ WP is adding a p tag on line 55 between the end of my header and the beginning of my post content. I am using Raw HTML Pro, and the post starts with content surrounded by [raw] tags. There is no content between the last tag in my header, and the beginning of my post. This doesn't happen on my other site pages, and the only difference is that this page is using a template, but the template is the same in this part of the page. All the template does differently than the other site pages is add a sidebar. Anyone have any ideas whatsoever why WP is adding this p tag, and/or how I can prevent it? Thanks so much!

    Read the article

  • Java, user input to the command line when using Runtime.getRuntime().exec(command);

    - by user1557354
    I dont think this is possible, but I have been using: Process p = Runtime.getRuntime().exec(command); to run commands on the command line, but now I have come accross a situation where the command I am running part way through will ask for some user input, for example a username. This can not be resolved by a argument to the command that is being exec, is there any way I can pass the username to the same command line instance and continue? Thanks in advance.

    Read the article

  • Error installing gst-python through Homebrew

    - by hrr
    I'm trying to install gst-python and it errors with: brew install gst-python Warning: Your Xcode (4.2.1) is outdated Please install Xcode 4.5.2. ==> Downloading http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10. Already downloaded: /Library/Caches/Homebrew/gst-python-0.10.22.tar.bz2 ==> ./configure --prefix=/usr/local/Cellar/gst-python/0.10.22 configure: set WARNING_CFLAGS to -Wall -Wdeclaration-after-statement -Wpointer-arith configure: set ERROR_CFLAGS to checking for valgrind... no checking for libraries required to embed python... no configure: error: could not find Python lib This is all after I removed the default OSX python and re-installed it with Homebrew, I've edited /etc/paths and python is working well. I just can't install the package above (gst, pygtk is successfully installed). i was told that I need to install python-devel but I have no idea where from. I'm using OSX Lion 10.7.5 With Python 2.7.3

    Read the article

  • Rewriting .each() loop as for loop to optimize, how to replicate $(this).attr()

    - by John B
    I running into some performance issues with a jquery script i wrote when running in ie so I'm going through it trying to optimize any way possible. Apparently using for loops is way faster than using the jQuery .each method. This has led me to a question regarding the equivalent of $(this) inside a for loop. I'm simplifying what I'm doing in my loop down to just using an attr() function as it gets across my main underlying question. Im doing this with each(simplified) var existing = $('#existing'); existing.each(function(){ console.log($(this).attr('id')); }); And I've tried rewriting it as a for loop as such: var existing = $('#existing'); for(var i = 0;i < existing.length;i++) { console.log(existing[i].attr('id')); } Its throwing an error saying: Uncaught TypeError: Object #<HTMLDivElement> has no method 'attr' Thanks.

    Read the article

  • ASP.NET MVC4: How to convert an IEnumerable to a string for ViewBag

    - by sehummel
    This is what I'm trying to do, but it doesn't work: HardwareType hwt = new HardwareType { HType = "PC" }; IEnumerable<Hardware> Pcs = db.Hardware.Where(h => h.HardwareType.Contains(hwt)); ViewBag.Pcs = Pcs.ToString(); So how do I convert my IEnumerable to a string (or other primitive data type) so the compiler won't give me an error when I try to use it in my Razor? @foreach (var item in ViewBag.Pcs) { <li><a href="#" class="btn"><i class="icon-hdd"></i> @item.HType</a></li> }

    Read the article

  • What is the difference between declaring data attributes inside or outside __init__

    - by user1898540
    I'm trying to get my head around OOP in Python and I'm a bit confused when it comes to declare variables within a class. Should I declare them inside of the __init__ procedure or outside it? What's the difference? The following code works just fine: # Declaring variables within __init__ class MyClass: def __init__(self): country = "" city = "" def information(self): print "Hi! I'm from %s, (%s)"%(self.city,self.country) me = MyClass() me.country = "Spain" me.city = "Barcelona" me.information() But declaring the variables outside of the __init procedure also works: # Declaring variables outside of __init__ class MyClass: country = "" city = "" def information(self): print "Hi! I'm from %s, (%s)"%(self.city,self.country) me = MyClass() me.country = "Spain" me.city = "Barcelona" me.information()

    Read the article

  • Cant change text in custom cell

    - by darkman
    I created a custom cell to display a text a two images, when the user select the cell, the image is suposed to change, i can acess the properties of the cell, but cant change then : - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; CustomCell *cell = (CustomCell *)[self.tableView cellForRowAtIndexPath:indexPath]; cell.check.image = setImage:[UIImage imageNamed:@"1355327732_checkbox-checked"]; [cell.check setImage:[UIImage imageNamed:@"1355327732_checkbox-checked"]]; } cell.check is a UIImageView Am i missing something?

    Read the article

  • MySQL update query, how to skip empty values?

    - by Pawel
    I've got such query: $sql = "UPDATE test_accs SET acc_owner = '$owner_id', acc_policy_version = '$version', acc_policy_last_update = '$approved', acc_policy_next_update = '$renewed' WHERE acc_id = '1'"; Now, all of these values on the web folmular are optional, one can set one of these values, two, or so. Now, after I submit the form, it goes in the query like that: UPDATE test_accs SET acc_owner = '2', acc_policy_version = '1.2', acc_policy_last_update = '2012-12-19', acc_policy_next_update = '2012-12-18' WHERE acc_id = '1' It works only when I submit all values from the form. Can you please show me how could it work even if not all the values has been sent, just for example one of them? When I set one value (f.ex. policy version), it looks like that: UPDATE test_accs SET acc_owner = '', acc_policy_version = '1.2', acc_policy_last_update = '', acc_policy_next_update = '' WHERE acc_id = '1' and it isn't working. It might be possible cause of the acc_owner table values? #1366 - Incorrect integer value: '' for column 'acc_owner' at row 1 Thanks in advice.

    Read the article

  • Assign parameters to function according to parameter names

    - by Korcholis
    I have an assoc array with a list of what are parameters to me. Here's an example: array( 'param1' => 'value1', 'param4' => 'value4', 'param3' => 'value3', 'param2' => 'value2', ); Note that they may come unsorted. Now, is there a way I can make a call (static or from an instance, using call_user_func_array or similar) and correctly pass each value to each parameter? Just to be sure, an example function I'd like to call using that parameter array is one such this: exampleFunction($param1, $param2, $param3, $param4) { ... } PS: Reflection is great, but I'm concerned about execution times (which, at least, in Java tends to increase a lot when using Reflection). If you know any other way to do so, it would be awesome.

    Read the article

  • check if username exists on form submit

    - by Developer
    This is my code. .js $(document).ready(function() { $("#username").focusout(function() { $.ajax({ type:'post', url:site_url()+'/client/checkUserName', data:{'username':$("#username").val()}, dataType:'json', success:function(result){ if(result != 'false'){ $('#message').text('Username exists'); } } }); }); .html <form id='form1' method="post"> <input type="text" name="username" id="username"/> <span id="message" style="color:red"></span> <input type="submit" value="submit" id="regis" class="btn"/> </form> Its working fine on focusout. How to make the form to not submit if username exists? Suppose there is a hidden field in the form say <input type="text" hidden id="type" value="<?php echo $type;?>"> Then if value exists in the hidden field then the username neednot be checked if already exists or not.

    Read the article

  • Calling up DockPanel-Suite's "AutoHidden" DockContent programmatically

    - by Lockszmith
    I am having trouble causing an 'autohide' dock to appear programmatically. Couldn't find any answer around the net, though the following SO Question suggested that .Show() should have done the trick I've tried this on the latest NuGet version of the code. My test code is below. Anyone know how to do it? or what I'm doing wrong? My test Code Create a simple Visual Studio Windows Form application, and replace the main form's source file content with this code: using System; using System.Windows.Forms; using dps = WeifenLuo.WinFormsUI.Docking; namespace testDockPanel { public partial class Form1 : Form { private dps.DockPanel dockPanel; private dps.DockContent dc; private Control innerCtrl; public Form1() { InitializeComponent(); dockPanel = new dps.DockPanel(); dockPanel.Dock = DockStyle.Fill; dockPanel.DocumentStyle = dps.DocumentStyle.DockingWindow; toolStripContainer1.ContentPanel.Controls.Add(dockPanel); dc = new dps.DockContent(); dc.DockPanel = dockPanel; dc.DockState = dps.DockState.DockRightAutoHide; innerCtrl = new WebBrowser() { Dock = DockStyle.Fill }; dc.Controls.Add( innerCtrl ); // This SHOULD show the autohide-dock, but NOTHING happens. dc.Show(); } } }

    Read the article

  • hta/ javascript How to execute an application with relative path

    - by user1644062
    I'm building a .hta (with javascript) from which i want to launch several applications. But when i execute my .hta i get the error message can't find file this is the code: <script type="text/javascript" language="javascript"> function RunFile(path) { var relpath = window.location.href; var fullpath = relpath + path; WshShell = new ActiveXObject("WScript.Shell"); WshShell.Run(fullpath, 1, false); } RunFile("\file.exe"); </script>

    Read the article

  • How to enable other languages for MailChimp List Subscribe Plugin?

    - by Lenin
    I have translated the MailChimp provided MailChimp List Subscribe Form plugin for wordpress. I used poEdit to edit. At wp-config.php I have language set as ar_SA. Which works for the themes I have used in two Bilingual sites. But the mo file had to be renamed to ar.mo I got two problems: While updating the catalog poEdit crashes. But I could save the .po and generated .mo successfully. The translated .mo doesn't appear for the confirmation success or error messages through the Ajax calls which its supposed to. I am submitting my .po file link here for experts to view. I have saved the settings for translation in the files. Translated Bangla.po file || Translated Arabic.po file

    Read the article

  • Adding custom columns to Propel model?

    - by Hard-Boiled Wonderland
    At the moment I am using the below query: $claims = ClaimQuery::create('c') ->leftJoinUser() ->withColumn('CONCAT(User.Firstname, " ", User.Lastname)', 'name') ->withColumn('User.Email', 'email') ->filterByArray($conditions) ->paginate($page = $page, $maxPerPage = $top); However I then want to add columns manually, so I thought this would simply work: foreach($claims as &$claim){ $claim->actions = array('edit' => array( 'url' => $this->get('router')->generate('hera_claims_edit'), 'text' => 'Edit' ) ); } return array('claims' => $claims, 'count' => count($claims)); However when the data is returned Propel or Symfony2 seems to be stripping the custom data when it gets converted to JSON along with all of the superflous model data. What is the correct way of manually adding data this way?

    Read the article

  • ios UITableView reloadData don't increase content height

    - by Zoltan Varadi
    I'm facing a strange error in my iOS app and haven't been able to figure out the reason why. In my UITableView i can add new cells, so i refresh the array that is the datasource and call reloadData. Everything works without error. The numberOfRowsInSection is called again, and it's value is one more than it's previous value was. The new cell even gets inserted at the bottom of the tableview, but i cant scroll down to it. I only know that it's there because the tableview bounces and i can see it. I'm guessing the tableview's content height is not getting increased for some reason, but i have no idea why. I'm using iOS 6 btw. Any help is very much appreciated! Thanks, Zoli EDIT, answers for Srikanth's questions: How is data getting added. There's an NSArray containing objects of a specific type. The array.count is the number of the number of cells. This NSArray gets its values from a database query. When you say, you are refreshing the array, what do you mean. By refreshing the array i mean i execute a new query in the database and put the results of this query into an NSArray. this will be the tableview's datasource array. Like this: dataSourceArray = [dbManager executeQuery]; [tableView reloadData]; Are you adding the data within the same view controller Yes. Can you show some code as to what you are doing See above. Is the table view at the root of the view controllers view or is it within another view The tableview is the main view's first child. Can you try adding data to the array at the beginning, so that you can view the cell being added at the top. I don't understand what you mean.

    Read the article

  • How to use a variable in a function expression which is injected in a page?

    - by anonymous
    I'm trying to inject a function into a webpage via Chrome extension content script by: function inject(code) { var actualCode = '(' + code + ')();'; var script = document.createElement('script'); script.textContent = actualCode; (document.head||document.documentElement).appendChild(script); script.parentNode.removeChild(script); } var myObj = person; // myObj/person is passed in from elsewhere var fn = function() { alert(myObj.name); }; inject(fn); // myObj undefined My issue is, since fn is a function expression, I can't pass in myObj.personName. So my question is, how can I construct a function expression that includes a variable? Do I do some sort of string concatenation instead? I also tried to pass the object to the function, as follows: function inject(code, myObj) { var actualCode = '(' + code + ')(' + myObj +');'; ... But this did not work, and caused a "Uncaught SyntaxError: Unexpected identifier" error. Related: Building a Chrome Extension - Inject code in a page using a Content script

    Read the article

  • Link my tag on other website search

    - by kresna kurdang
    This is my search code <div id="search"> <form method="get" action="http://www.other-website.com/search"> <input type="hidden" name="f" value=""> <input type="text" placeholder="Temukan informasi, komunitas & produk yang kamu cari disini" accesskey="s" name="q"> <input type="submit" value="Search"> </form> </div> This is the tag code (display only text "do not link") <?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ' '; } } ?> The code can apply well on the website, but I have to enter text to the search. I just want to place my tag on that search text so my question is How to make fixed word(my tag) automatically placed on search or where I must place the tag code, the search result is mytag linked on @www.other-website.com/search so user do not have to type? I want to search my tag on other website search

    Read the article

  • Exchange Web Service (EWS) call fails under ASP.NET but not a console application

    - by Vince Panuccio
    I'm getting an error when I attempt to connect to Exchange Web Services via ASP.NET. The following code works if I call it via a console application but the very same code fails when executed on a ASP.NET web forms page. Just as a side note, I am using my own credentials throughout this entire code sample. "When making a request as an account that does not have a mailbox, you must specify the mailbox primary SMTP address for any distinguished folder Ids." I thought I might be able to fix the issue by specifying an impersonated user. exchangeservice.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "[email protected]"); But then I get a different error. "The account does not have permission to impersonate the requested user." The App Pool that the web application is running under is also my own account (same as the console application) so I have no idea what might be causing this issue. I am using .NET framework 3.5. Here is the code in full. var exchangeservice = new ExchangeService(ExchangeVersion.Exchange2010_SP1) { Timeout = 10000 }; var credentials = new System.Net.NetworkCredential("username", "pass", "domain"); exchangeservice.AutodiscoverUrl("[email protected]") FolderId rootFolderId = new FolderId(WellKnownFolderName.Inbox); var folderView = new FolderView(100) { Traversal = FolderTraversal.Shallow }; FindFoldersResults findFoldersResults = service.FindFolders(rootFolderId, folderView);

    Read the article

  • JVM segmentation faults due to "Invalid memory access of location"

    - by Dan
    I have a small project written in Scala 2.9.2 with unit tests written using ScalaTest. I use SBT for compiling and running my tests. Running sbt test on my project makes the JVM segfault regularly, but just compiling and running my project from SBT works fine. Here is the exact error message: Invalid memory access of location 0x8 rip=0x10959f3c9 [1] 11925 segmentation fault sbt I cannot locate a core dump anywhere, but would be happy to provide it if it can be obtained. Running java -version results in this: java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) But I've also got Java 7 installed (though I was never able to actually run a Java program with it, afaik). Another issue that may be related: some of my test cases contain titles including parentheses like ( and ). SBT or ScalaTest (not sure) will consequently insert square parens in the middle of the output. For example, a test case with the name (..)..(..) might suddenly look like (..[)..](..). Any help resolving these issues is much appreciated :-) EDIT: I installed the Java 7 JDK, so now java -version shows the right thing: java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode) This also means that I now get a more detailed segfault error and a core dump: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x000000010a71a3e3, pid=16830, tid=19459 # # JRE version: 7.0_07-b10 # Java VM: Java HotSpot(TM) 64-Bit Server VM (23.3-b01 mixed mode bsd-amd64 compressed oops) # Problematic frame: # V [libjvm.dylib+0x3cd3e3] And the dump.

    Read the article

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