Search Results

Search found 1320 results on 53 pages for 'jack webb heller'.

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

  • CodeIgniter's XSS Protection is removing <script> tags from user inputs... but I don't want it to!

    - by Jack W-H
    Hey folks, CodeIgniter is brilliant but I'm using it to develop a site where users need to be able to share their code for websites. Unfortunately, CodeIgniter has been doing the "right" thing by removing <script> tags from my user's inputs into the database, so when it's returned data looks like this: [removed] User's data [removed] However, I need my site to DISPLAY script tags but obviously not PARSE them. How can I get CodeIgniter or PHP to return <script> tags, but still sanitise them for the database and return them without them executing? Thanks! Jack EDIT: By the way, it's not an option to use stuff like Markdown, everything has to output to copy-pastable code that could work with no modification somewhere else

    Read the article

  • Security precautions and techniques for a User-submitted Code Demo Area

    - by Jack W-H
    Hey folks Maybe this isn't really feasible. But basically, I've been developing a snippet-sharing website and I would like it to have a 'live demo area'. For example, you're browsing some snippets and click the Demo button. A new window pops up which executes the web code. I understand there are a gazillion security risks involved in doing this - XSS, tags, nasty malware/drive by downloads, pr0n, etc. etc. etc. The community would be able to flag submissions that are blatantly naughty but obviously some would go undetected (and, in many cases, someone would have to fall victim to discover whatever nasty thing was submitted). So I need to know: What should I do - security wise - to make sure that users can submit code, but that nothing malicious can be run - or executed offsite, etc? For your information my site is powered by PHP using CodeIgniter. Jack

    Read the article

  • Entity Framework does not display the last change from the database

    - by Jack
    Entity Framework does not display the last change from the database, but after sometime it show the updated content. I don't any special change on the server or on the page. Thank in advance. Jack Here is the code i use to get the list: var m = from r in ett.Article_Relations from i in ett.Article_Articles from a in ett.Article_Contents where r.MenuItemID == id && r.Article_Articles.ArticleID == i.ArticleID && a.LanguageID == LanguageID && i.ArticleID == a.Article_Articles.ArticleID select new ArticleViewModel { ArticleID = i.ArticleID, IsActive = i.IsActive, Author = i.ArticleAuthor, Content = a, DateCreated = i.DateCreated };

    Read the article

  • Rails CSV import, adding to a related table

    - by Jack
    Hi, I have a csv importing system on my app (used locally only) which parses the csv file line by line and adds the data to the database table. This is based on a tutorial here. require 'csv' def csv_import @parsed_file=CSV::Reader.parse(params[:dump][:file]) n = 0 @parsed_file.each_with_index do |row, i| next if i == 0 #ignore the first row course = Course.new course.title = row[0] course.unit_code = row[1] course.course_type = row[2] course.value = row[3] course.pass_mark = row[4] if course.save n = n+1 GC.start if n%50==0 end flash.now[:message] = "CSV Import Successful, #{n} new courses added to the database." end redirect_to(courses_url) end This is all in the courses controller and works fine. There is a relationship that courses HABTM years and years HABTM courses. In the csv file (effectively in row[5] to row[8]) are the year_id s. Is there a way that I can add this within the method above. I am confused as to how to loop over the 4 items and add them to the courses_years table. Thank you Jack

    Read the article

  • iPhone: Navigation Bar button indefinitely links to it's own view.

    - by Jack Griffiths
    Hi there, When I navigate from the root view to another view, it works. However, when I want to get back, the navigation button links to itself. This goes on for about 6 taps, until it eventually goes back to the root view. This only occurs on one view, and the rest are working fine. I have no idea what code is causing this, but if you need any code, I will amend this post with it. Just ask for it. Thanks a lot, Jack.

    Read the article

  • destroy an android service

    - by Jack Trowbridge
    I am using a service in my android app, which is called when an alarm is activated by a calander. When the service has been activated i want it to be destroyed by the OnStart() method once it has completed its code. My OnStart() method: @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); Vibrator vi = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); vi.vibrate(5000); Toast.makeText(this, "MyAlarmService.onStart()", Toast.LENGTH_LONG).show(); //CODE HERE TO DESTROY SERVICE?? } This bassically means when the service is called it runs the code in the OnStart() method and i want it to destroy itself. Any Ideas, methods that would do this?. Thanks, jack.

    Read the article

  • Django how to handle # in variable name.

    - by Jack
    I've got a dictionary in python which is assigned as a template variable. One of the keys is named "#text" but when i try to access it using {{ artist.image.3."#text"}} I get an error which is File "/home/jack/Desktop/test/appengine/lib/django/django/template/__init__.py", line 558, in __init__ raise TemplateSyntaxError, "Could not parse the remainder: %s" % token[upto:] TemplateSyntaxError: Could not parse the remainder: "#text" So how can I use this in the template? I've tried putting quotes around it but to no avail. I'd like to not modify the dictionary if possible, but if its easy enough to do then I guess its okay. Thanks

    Read the article

  • Counting the most tagged tag with MySQL

    - by Jack W-H
    Hi folks My problem is that I'm trying to count which tag has been used most in a table of user-submitted code. But the problem is with the database structure. The current query I'm using is this: SELECT tag1, COUNT(tag1) AS counttag FROM code GROUP BY tag1 ORDER BY counttag DESC LIMIT 1 This is fine, except, it only counts the most often occurence of tag1 - and my database has 5 tags per post - so there's columns tag1, tag2, tag3, tag4, tag5. How do I get the highest occurring tag value from all 5 columns in one query? Jack

    Read the article

  • NHibernate collections: many-to-many relationships

    - by Brad Heller
    I've got two models, a Product model and a ShoppingCart model. The ShoppingCart model has a collection of products as a property called Products (List). Here is the mapping for my ShoppingCart model. <class name="MyProject.ShoppingCart, MyProject" table="ShoppingCarts"> <id name="Id" column="Id"> <generator class="native" /> </id> <many-to-one name="Company" class="MyProject.Company, MyProject" column="CompanyId" /> <property name="ExternalId" column="GUID" generated="insert" /> <property name="Name" column="Name" /> <property name="Total" column="Total" /> <property name="CreationDate" column="CreationDate" generated="insert" /> <property name="UpdatedDate" column="UpdatedDate" generated="always" /> <bag name="Products" table="ShoppingCartContents" lazy="false"> <key column="ShoppingCartId" /> <many-to-many column="ProductId" class="MyProjectMyProject.Product, MyProject" fetch="join" /> </bag> </class> When I try to save to the DB, the ShoppingCart is saved, but the mapping rows in ShoppingCartContents aren't save, making me thing that there's an issue with the mapping. Where am I going wrong here?

    Read the article

  • AJAX response inside jqplot not working

    - by JuanGesino
    I'm trying to render data from an AJAX response as a bar chart with jqplot. To render this bar chart I use two variables: s1 which contains the numbers ex: s1 = [22,67,32,89] ticks which contains the name corresponding to a number inside s1 ex: ticks = ["Jack", "Mary", "Paul", "John"] So my AJAX returns two variables, data1 and data2. When I console.log(data1) I get 22,67,32,89 When I console.log(data2) I get "Jack", "Mary", "Paul", "John" I then add the square brackets and change variable: s1 = [data1] ticks = [data2] When I console.log(s1) I get ["22,67,32,89"] When I console.log(ticks) I get "Jack", "Mary", "Paul", "John" And the graph does not render, this is my code: s1 = [data]; ticks = [data]; plot4 = $.jqplot('chartdiv4', [s1], { animate: !$.jqplot.use_excanvas, series:[{color:'#5FAB78'}], seriesDefaults:{ renderer:$.jqplot.BarRenderer, pointLabels: { show: true } }, axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks }, yaxis:{min:0, max:100, label:'%',labelRenderer: $.jqplot.CanvasAxisLabelRenderer} }, highlighter: { show: false } }); });

    Read the article

  • Menubar + Commandbar on WM 5.0 and WM 6.5.3

    - by heller.rublog
    I'm developing a Windows Mobile application, and I faced a problem with CCommandBar that combines toolbar and menubar. Well, I mean the following: m_wndCommandBar.InsertMenuBar(IDR_MAINFRAME); m_wndCommandBar.LoadToolBar(IDR_MAINFRAME); I have only one root menu option in my command bar and some buttons in toolbar. It works perfectly on Windows Mobile till version 6.5.3, but on WM 6.5.3 all toolbar buttons have the same dimensions as the menu item: screen. Is it possible to force WM 6.5.3 to draw command bar the same way as WM 5.0 did? Of cource I can use only toolbar and throw away my menubar, but I want to save the old UI. P.S. I'm sorry for my English mistakes. I was always failing at school :-(

    Read the article

  • iPhone: App crashes when I click on a cell in table view.

    - by Jack Griffiths
    Hi there, Compiling my application works—everything is fine. The only errors I get are by deprecated functions (setText). The only problem is now, is that when I tap on a cell in my table, the app crashes, even though it's meant to push to the next view in the stack. Any solutions are appreciated, if you need any code, just ask. Also, how can I only make sure that one cell goes to only one view? For example: When I tap on CSS, it takes me to a new table with different levels of CSS. WHen I tap on an item in that new view, it comes up with an article on what I just selected. Regards, Jack

    Read the article

  • XmlDocument.WriteTo truncates resultant file

    - by Brad Heller
    Trying to serialize an XmlDocument to file. The XmlDocument is rather large; however, in the debugger I can see that the InnerXml property has all of the XML blob in it -- it's not truncated there. Here's the code that writes my XmlDocument object to file: // Write that string to a file. var fileStream = new FileStream("AdditionalData.xml", FileMode.OpenOrCreate, FileAccess.Write); xmlDocument.WriteTo(new XmlTextWriter(fileStream, Encoding.UTF8) {Formatting = Formatting.Indented}); fileStream.Close(); The file that's produced here only writes out to line like 5,760 -- it's actually truncated in the middle of a tag! Anyone have any ideas why this would truncate here?

    Read the article

  • Query to retrieve records by aplhabetic order, except for n predefined items which must be on top

    - by Ashraf Bashir
    I need to retrieve all records ordered alphabetically. Except for a predefined list of record's columns which their records should appear first in a given predefined order, then all other records should be sorted alphabetically based on the same column For instance, assume we have the following table which is called Names Lets assume the predefined list is ("Mathew", "Ashraf", "Jack"). I.e. these are the names of whom their records should be listed first as in the predefined order. So the desired query result should be: Which query could retrieve this custom order ? P.S, I'm using MySQL. Here's my trial based on comments' request: (SELECT * FROM Names WHERE Name in ('Mathew', 'Ashraf', 'Jack')) UNION (SELECT * FROM Names WHERE Name NOT IN ('Mathew', 'Ashraf', 'Jack') ORDER BY Name ASC); the first query result wasn't ordered as required.

    Read the article

  • Python how to handle # in a dictionary

    - by Jack
    I've got some json from last.fm's api which I've serialised into a dictionary using simplejson. A quick example of the basic structure is below. { "artist": "similar": { "artist": { "name": "Blah", "image": {"#text":"URLHERE","size": "small"} "image": {"#text":"URLHERE","size": "medium"} "image": {"#text":"URLHERE","size": "large"} } } } Any ideas how I can access the image urls of various different sizes. My attempts at accessing the #text variable don't seem to work because python doesn't appear to like #'s in the names. And any ideas how I can easily get the url for the depending on the size? Thanks, Jack

    Read the article

  • Buying replacement Macbook Pro Battery - Genuine vs. eBay

    - by Nicolas Webb
    I'm looking to replace my Macbook Pro's battery (15", last model before the Unibody). It's currently at 55% capacity (as reported in System Information and Battery Health Monitor). I've reset the SMC firmware, calibrated the battery, and it's just not lasting that long anymore. I've seen some genuine replacements that are "pulls" (pulled from used computers) that are rated at least 90% capacity (iFixit, MacSales). I've also seen a variety of batteries on eBay that look more like clones than genuine batteries, but are new. A new battery from Apple is $129, and when I brought my laptop in they ran the Battery test and said if I bought the battery right then they'd give me a discount (around $100). Anyone out there used one of these "OEM Compatible" batteries? Fit/finish good? (I don't want a funky color or a corner that sticks out.) Or, should I just suck it up and get the genuine replacement (for about twice the price)?

    Read the article

  • Enabling Multiple Monitor Support from Terminal Services/Remote Desktop over Citrix

    - by Nicolas Webb
    Our Remote Desktop/Terminal Services solution where I work relies on Citrix for machines not connected via the VPN. We're using Citrix Xen server (I'm pretty sure) and I'm going to try to connect to a Windows 7 Host (my work computer) and I think the RDC client runs on a Win2003 host (exposed via Citrix). Is it possible to take advantage of Windows 7 multiple monitor support for RDC with this setup? Would I need to try getting my Citrix guys to have a different host machine for the RDC (Win2008, or Win7?)? I'm probably going to connect using the OS X Citrix client, but I'd be willing to BootCamp/Fusion up a Windows instance to work remotely, as well. I really want to be able to use multiple monitors remotely. It does "span" multiple montiors currently (I have a 3000x1024 desktop, for example) but I'd rather it be "true" multiple monitor instead of one giant desktop, if possible.

    Read the article

  • SSD with multiple partitions - disk life implications

    - by Nicolas Webb
    Each block on a SSD has a finite number of writes. This is mitigated on modern drives by "spreading" the writes around as you use the drive. I'm wondering if you partition a SSD into several partitions (a Mac using Boot Camp, for example) if this measure is defeated somewhat - can the writes be spread across the entire drive? Or are they contained strictly within the partition boundaries? Any SSD controller engineers here :)?

    Read the article

  • How do I convert an animated GIF to a YouTube friendly video format?

    - by Dave Webb
    My son has made some animations with Pivot Stickfigure Animator which we'd like to upload to YouTube. The problem is Pivot saves as animated GIFs which I can't upload to YouTube. The Wikipedia article recommends using Windows Movie Maker to convert GIF to WMV, but unfortunatley I'm using Window 7 for which you can get the new Windows Live Movie Maker which doesn't seem to support GIFs. I Googled and found an article which said to use Beneton Movie GIF to convert animated GIF to AVI, but this seemed to rely on a 3rd Party application which wasn't installed and so failed. Installing the missing application - pjBmp2Avi - by hand and adding it to the path still didn't allow Beneton to do the conversion. I hoped FFmpeg might do the trick but this only outputs to animated GIFs, it won't read from then. Further Googling found lots of applications with 30 day trials and so on but I was hoping for something free. So any suggestions on how I can convert an animated GIF to a movie file on Windows using free (as in beer) software?

    Read the article

  • How do I convert an animated GIF to a YouTube friendly video format?

    - by Dave Webb
    My son has made some animations with Pivot Stickfigure Animator which we'd like to upload to YouTube. The problem is Pivot saves as animated GIFs which I can't upload to YouTube. The Wikipedia article recommends using Windows Movie Maker to convert GIF to WMV, but unfortunately I'm using Windows 7 for which you can get the new Windows Live Movie Maker which doesn't seem to support GIFs. I Googled and found an article which said to use Beneton Movie GIF to convert animated GIF to AVI, but this seemed to rely on a 3rd Party application which wasn't installed and so failed. Installing the missing application - pjBmp2Avi - by hand and adding it to the path still didn't allow Beneton to do the conversion. I hoped FFmpeg might do the trick but this only outputs to animated GIFs, it won't read from then. Further Googling found lots of applications with 30 day trials and so on but I was hoping for something free. So any suggestions on how I can convert an animated GIF to a movie file on Windows using free (as in beer) software?

    Read the article

  • How do I fully clear Firefox's cache of CSS and JS files?

    - by Mike Webb
    I work on a website at my work. The issue is that if I visit the site, which uses the cached versions of the CSS and JS files, and then upload an updated copy of a CSS/JS file, Firefox will still use the cached version. I can go to 'Tools-Clear Recent History' and clear the Cache of "Everything" and it still uses the cached version of the files. It will eventually updated and use the new files, but it can takes hours for this change to occur. So, how do I completely clear Firefox's cache of these files?

    Read the article

  • MDX needs a function or macro syntax

    - by Darren Gosbell
    I was having an interesting discussion with a few people about the impact of named sets on performance (the same discussion noted by Chris Webb here: http://cwebbbi.wordpress.com/2011/03/16/referencing-named-sets-in-calculations). And apparently the core of the performance issue comes down to the way named sets are materialized within the SSAS engine. Which lead me to the thought that what we really need is a syntax for declaring a non-materialized set or to take this even further a way of declaring an MDX expression as function or macro so that it can be re-used in multiple places. Because sometimes you do want the set materialised, such as when you use an ordered set for calculating rankings. But a lot of the time we just want to make our MDX modular and want to avoid having to repeat the same code over and over. I did some searches on connect and could not find any similar suggestions so I posted one here: https://connect.microsoft.com/SQLServer/feedback/details/651646/mdx-macro-or-function-syntax Although apparently I did not search quite hard enough as Chris Webb made a similar suggestion some time ago, although he also included a request for true MDX stored procedures (not the .Net style stored procs that we have at the moment): https://connect.microsoft.com/SQLServer/feedback/details/473694/create-parameterised-queries-and-functions-on-the-server Chris also pointed out this post that he did last year http://cwebbbi.wordpress.com/2010/09/13/iccube/ where he pointed out that the icCube product already has this sort of functionality. So if you think either or both of these suggestions is a good idea then I would encourage you to click on the links and vote for them.

    Read the article

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