Search Results

Search found 1325 results on 53 pages for 'jack douglas'.

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

  • iPhone: error: request for member 'table' in something not a structure or union

    - by Jack Griffiths
    Hi there, When it comes to compiling my application, I get the error mentioned in the title. How would I go about remedying this error? Basically, I want to get from one table to the other. Hierarchy, navigation. NextViewController.m #import "RootViewController.h" #import "NextViewController.h" @implementation NextViewController - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview // Release anything that's not essential, such as cached data } - (void)dealloc { [super dealloc]; } - (IBAction) changeTable:(NSString *)str{ tblCSS.table = str; } The last line contains the error. If you need any more code, just ask. I'll amend this post with it. Cheers, Jack

    Read the article

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Passing an array of data to a private function in CodeIgniter/PHP? [facepalm]

    - by Jack Webb-Heller
    So I thought this should be easy, but, I'm n00bing out here and failing epicly (as they say on teh interwebz). So here's my code: function xy() { $array['var1'] = x; $array['var2'] = y; echo $this->_z; } function _z($array) { $xy = $x.$y; return $xy; } So, why doesn't that seemingly simple code work? I know with views you can pass arrays and the variables are accessible in the views with just their array title, but, why doesn't it work in this case? Jack

    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

  • Ubuntu boot hangs after message "Running /scripts/init-bottom ... done"

    - by Douglas B. Staple
    I've been trying to copy a Proxmox container based on the Ubuntu Precise Standard template to a VirtualBox VM. I am now stuck at a point where my new Ubuntu/VirtualBox VM hangs after the message "Running /scripts/init-bottom ... done" during boot. I started by installing Ubuntu Server 12.04.4 LTS on a VirtualBox VM. Ubuntu Server 12.04.4 LTS was the closest "official" Ubuntu ISO to the Proxmox container OS I could find. I installed all updates on both the Proxmox container and on the VirtualBox VM. The idea was to get same version kernal running on the ProxMox container and VirtualBox VM. sudo apt-get update ; sudo apt-get upgrade ; sudo apt-get dist-upgrade sudo reboot rsync the entire proxmox container to a temporary directory in the VirtualBox VM: cd / mkdir /tmp/backup rsync -e ssh -av --exclude={/dev,/proc,/sys,/tmp,/run,/mnt,/media,/lost+found,/boot,/selinux} root@my_proxmox_container_hostname:/ /tmp/backup Shut down the virtual machine, and boot the VM with a bootable linux image. I used the Desktop image of Ubuntu 12.04 LTS, ubuntu-12.04.4-desktop-i386.iso Drop to a root prompt. Mount the VM root filesystem: sudo mount /dev/sda1 /mnt Remove files from most of /mnt cd /mnt sudo rm -rf bin etc home lib opt sbin root usr var Move all of the files from /mnt/backup into /mnt sudo mv /mnt/tmp/backup/* /mnt Rebooted system. For me, at this point the system freezes after starting, after the message: Running /scripts/init-bottom ... done I've tried reinstalling GRUB and all manner of other thing. I am almost ready to give up.

    Read the article

  • Share openVPN connection

    - by Douglas Gemignani
    Hello, Currently I have a server (dev tun) running openVPN and my WinXP client is able to connect to the server just fine. I have an ethernet device and I need to send data to a computer under the server's network, so since the device can't connect on its own I need to configurate my Windows XP to share its VPN connection. So, on my WinXP machine i have: Network Adapter #1 (ip 192.168.0.2 gw 192.168.0.1 with internet access). OpenVPN Connection (dhcp). Network Adapter #2 (crossover cable with device). Here is my client.ovpn cert gertec.crt key gertec.key client ns-cert-type server user nobody group nobody remote IP PORT ca ca.crt dev tun dev-node OpenVPN proto udp resolv-retry infinite nobind comp-lzo verb 3 I would appreciate any help.

    Read the article

  • Windows Installer using usb drive for temp purposes

    - by Douglas Anderson
    When installing apps that are built around Windows Installer, it would appear that it often uses my external usb hard disk (when it's connected) as the temp location while it expands and installs the application (creates a folder off the root with a guid name). Is there anyway to change this so it always defaults to a specific drive? This appears to be the case on Windows Vista and 7, not sure about previous releases. EDIT: Current environment variables look like this: TEMP=C:\Users\<me>\AppData\Local\Temp TMP=C:\Users\<me>\AppData\Local\Temp EDIT: I have a funny suspicion that it's using the drive with the largest available free space.

    Read the article

  • How can I most efficiently batch resize images on a Mac?

    - by Nick Douglas
    I've been batch-resizing images through Preview (OS X) through the menu bar, but I want a simpler workflow, since I do this a dozen times a day. What I want: 1. Select a group of image files in finder 2. Hit a button or two (menu item or keyboard shortcut) to do the following: a. Scale all the pictures to 600 pixels wide b. Save as JPG files at 75% quality What I also want: - All of the above, plus step a(1): Crop images to 200 pixel height I can do all that manually, to a batch of files, through Preview. I can do it one at a time with some keyboard shortcuts in Photoshop or Pixelmator. Automator (using Preview) can scale to 600 pixels on the longest dimension, but it doesn't let me specify width. (It can scale specifically to width before cropping height.) It can change to JPG, but it can't specify image quality. And I can assign a keyboard shortcut to the whole process. Is that my best option on a Mac? Can I accomplish this more efficiently through another app like Quicksilver?

    Read the article

  • Moving domain and keeping IMAP email - Linux Evolution, Mac Mail

    - by Douglas Squirrel
    This question is about keeping email during a server move, where the clients are Linux (me) and Mac (my wife) using IMAP. I receive email at [email protected] using a webmail service that my hosting company (1and1) provides. I read it via IMAP in evolution, so I should have copies of all the emails on my local machine. I have just moved mydomain.com from one type of account to another, and the hosting company don't move my existing email on the server when I do this - I assume they move my account to a different mailserver, and don't choose to provide a migration path for the email to move too (yes, this is annoying). Before migrating, I backed up Evolution (File - Backup settings) and did a spot-check in the evolution-backup.tar.gz file to be sure that my mail was in there. After migrating, I restored (File - Restore settings) and had hoped that I would see all my mail again. Unfortunately, Evolution just shows me new mail sent to the account, not the old mail. Is there a way to get the old mail back in the mailserver, or at least displaying in Evolution, as it was before the move? If not, can I read it in some convenient way, e.g. in Evolution offline or in a text file (then I can pick the mails I really want to keep and resend them to myself)? Also, I am about to do a similar move for my wife's domain, [email protected]. She reads her mail on a Mac using IMAP to Apple Mail. Is there anything I can do to make the move smooth for her? (I have backed up [her user]/Library/Mail already, but not sure what to do once the move is done.)

    Read the article

  • How can I get rid of / hide :2eDS_Store files on my linux netatalk server?

    - by Douglas Mayle
    I'm running a netatalk server process on my linux server that serves files up to Mac client machines. Whenever you use Mac's Finder to access foreign filesystems over netatalk, it creates '.DS_Store' files to store information about the folder. Normally, these files would be hidden by default, and I wouldn't care. Unfortunately, netatalk doesn't allow access to local hidden files, so when the Mac writes and reads these, it renames them :2eDS_Store on the local filesystem. When you have a deep tree, you end up with these littered all over the place, and other Windows and Linux clients have to deal with them. How do I make these available to Mac clients and hidden from everyone else?

    Read the article

  • How do I change my gnome Ubuntu key-binding work as emacs?

    - by Douglas
    , Hello, everyone How can I change editing key-binding in Gnome on Ubuntu, and make it work like Emacs? Eg. When I'm chat with my friend, and I want to use Ctrl-a Ctrl-k to move my cursor go to the left of current line, and then cut current line, as OSX or Emacs. By default in Gnome Ubuntu, Ctrl-a is for "select all" and ctrl-k for nothing. Where does this key binding define? And how can I change this? I tried gnome-keybinding-properties and gsettings, find nothing. Maybe I have to compile something?

    Read the article

  • Nodes inside Cisco VPN. Incoming SSH requests allowed. But can't initiate an outbound SSH.

    - by Douglas Peter
    I've a gateway-to-gateway VPN setup between my Linksys RV042 router and a Cisco VPN. I am able to SSH into any of the machine inside the VPN from my network. But none of the machines inside the VPN can initiate an SSH into my network. It seems they've blocked even all ping requests to my network gateway. This is the requirement: I have scripts that SSH into the machines inside the VPN and run a long mysql query. The query generates an output to a file. The time that these queries take is variable. So I have a loop in my machine that periodically SSHes into the VPN machine and checks if the query has finished, and pulls the generated file using SCP. I need to simplify it thus: The script will run at the machine inside the VPN, and when the query completes, it will SSH into my machine and pushes the generated file. Thanks for any ideas.

    Read the article

  • .htaccess https redirect best method

    - by Douglas Cottrell
    I have searched through all the redirects posted buy others and cant quite find the answer to my problem. I have a website with over 3000 pages and we are getting duplication issues within google. We want to keep everything in the parent directory to be http except our contact.php and login.php page. We then have 3 folders that must be secured. admin, clients, customers I have tried using the following code in seperate .htaccess files for each folder, but I keep getting a conflict when I try and I am still trying to find a good solution for the home directory. RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} admin RewriteRule ^(.*)$ https://www.website.com/$1 [R,L] Any help would be greatly appreciated.

    Read the article

  • How do I prevent libvirt from adding iptables rules for guest NAT networks?

    - by Jack Douglas
    Similar to this old request on BugZilla for Fedora 8, I'm hoping something has changed since then or someone knows another way. I want to manage the iptables rules by hand—the one-size-fits-all automatic rules don't suit me at all. These rules seem to be added and removed when a network is started and destroyed. Is there a way of either preventing these rules being added at all or hooking a script into the network start that restores the default rules afterwards. For now, I'm using a very crude method with cron, but I hope there is a better way: * * * * * root iptables-restore < /etc/sysconfig/iptables

    Read the article

  • How do graphics programmers deal with rendering vertices that don't change the image?

    - by canisrufus
    So, the title is a little awkward. I'll give some background, and then ask my question. Background: I work as a web GIS application developer, but in my spare time I've been playing with map rendering and improving data interchange formats. I work only in 2D space. One interesting issue I've encountered is that when you're rendering a polygon at a small scale (zoomed way out), many of the vertices are redundant. An extreme case would be that you have a polygon with 500,000 vertices that only takes up a single pixel. If you're sending this data to the browser, it would make sense to omit ~499,999 of those vertices. One way we achieve that is by rendering an image on a server and and sending it as a PNG: voila, it's a point. Sometimes, though, we want data sent to the browser where it can be rendered with SVG (or canvas, or webgl) so that it can be interactive. The problem: It turns out that, using modern geographic data sets, it's very easy to overload SVG's rendering abilities. In an effort to cope with those limitations, I'm trying to figure out how to visually losslessly reduce a data set for a given scale and map extent (and, if necessary, for a known map pixel width and height). I got a great reduction in data size just using the Douglas-Peucker algorithm, and I believe I was able to get it to keep the polygons true to within one pixel. Unfortunately, Douglas-Peucker doesn't preserve topology, so it changed how borders between polygons got rendered. I couldn't readily find other algorithms to try out and adapt to the purpose, but I don't have much CS/algorithm background and might not recognize them if I saw them.

    Read the article

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